From 70fd7937e7f47cc109becb1dc470e45b8837c19c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 24 Apr 2024 19:33:15 +0000 Subject: [PATCH 001/127] feat(api): OpenAPI spec update via Stainless API (#1840) --- addressing/prefixbgpbinding.go | 28 ------ alerting/policy.go | 87 +++++++++++++------ alerting/policy_test.go | 24 ++--- api.md | 51 ----------- event_notifications/r2configuration.go | 73 +++++++++++++++- filters/filter.go | 2 +- firewall/lockdown.go | 28 ------ firewall/rule.go | 4 +- firewall/wafoverride.go | 18 ++-- intel/dns.go | 28 ------ internal/shared/union.go | 4 +- load_balancers/preview.go | 53 ++++++++++- magic_network_monitoring/config.go | 13 --- magic_transit/siteacl.go | 20 ----- origin_tls_client_auth/hostnamecertificate.go | 63 -------------- page_shield/policy.go | 20 ----- rate_plans/rateplan.go | 23 ----- rules/listitem.go | 21 ----- speed/schedule.go | 14 --- user/token.go | 69 ++------------- waiting_rooms/setting.go | 23 ----- web3/hostname.go | 13 --- workers/scriptschedule.go | 7 -- workers/worker.go | 16 ++-- .../dispatchnamespacescript.go | 4 +- .../dispatchnamespacescriptsetting.go | 8 +- zero_trust/accessapplicationpolicy.go | 39 --------- zero_trust/networkroute.go | 18 ---- 28 files changed, 231 insertions(+), 540 deletions(-) diff --git a/addressing/prefixbgpbinding.go b/addressing/prefixbgpbinding.go index 1004efd6e0..a8ab60987c 100644 --- a/addressing/prefixbgpbinding.go +++ b/addressing/prefixbgpbinding.go @@ -179,34 +179,6 @@ func (r ServiceBindingProvisioningState) IsKnown() bool { return false } -type ServiceBindingParam struct { - // IP Prefix in Classless Inter-Domain Routing format. - CIDR param.Field[string] `json:"cidr"` - // Status of a Service Binding's deployment to the Cloudflare network - Provisioning param.Field[ServiceBindingProvisioningParam] `json:"provisioning"` - // Identifier - ServiceID param.Field[string] `json:"service_id"` - // Name of a service running on the Cloudflare network - ServiceName param.Field[string] `json:"service_name"` -} - -func (r ServiceBindingParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ServiceBindingParam) implementsWorkersBindingUnionParam() {} - -// Status of a Service Binding's deployment to the Cloudflare network -type ServiceBindingProvisioningParam struct { - // When a binding has been deployed to a majority of Cloudflare datacenters, the - // binding will become active and can be used with its associated service. - State param.Field[ServiceBindingProvisioningState] `json:"state"` -} - -func (r ServiceBindingProvisioningParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - type PrefixBGPBindingDeleteResponse struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` diff --git a/alerting/policy.go b/alerting/policy.go index cddd12190f..1009e7e72c 100644 --- a/alerting/policy.go +++ b/alerting/policy.go @@ -110,9 +110,68 @@ func (r *PolicyService) Get(ctx context.Context, policyID string, query PolicyGe return } -type Mechanism map[string][]Mechanism +type Mechanism map[string][]MechanismItem -type MechanismParam map[string][]MechanismParam +type MechanismItem struct { + // UUID + ID MechanismItemIDUnion `json:"id"` + JSON mechanismItemJSON `json:"-"` +} + +// mechanismItemJSON contains the JSON metadata for the struct [MechanismItem] +type mechanismItemJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *MechanismItem) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r mechanismItemJSON) RawJSON() string { + return r.raw +} + +// UUID +// +// Union satisfied by [shared.UnionString] or [shared.UnionString]. +type MechanismItemIDUnion interface { + ImplementsAlertingMechanismItemIDUnion() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*MechanismItemIDUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) +} + +type MechanismParam map[string][]MechanismItemParam + +type MechanismItemParam struct { + // UUID + ID param.Field[MechanismItemIDUnionParam] `json:"id"` +} + +func (r MechanismItemParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// UUID +// +// Satisfied by [shared.UnionString], [shared.UnionString]. +type MechanismItemIDUnionParam interface { + ImplementsAlertingMechanismItemIDUnionParam() +} type Policy struct { // The unique identifier of a notification policy @@ -233,30 +292,6 @@ func (r PolicyAlertType) IsKnown() bool { return false } -type PolicyParam struct { - // Refers to which event will trigger a Notification dispatch. You can use the - // endpoint to get available alert types which then will give you a list of - // possible values. - AlertType param.Field[PolicyAlertType] `json:"alert_type"` - // Optional description for the Notification policy. - Description param.Field[string] `json:"description"` - // Whether or not the Notification policy is enabled. - Enabled param.Field[bool] `json:"enabled"` - // Optional filters that allow you to be alerted only on a subset of events for - // that alert type based on some criteria. This is only available for select alert - // types. See alert type documentation for more details. - Filters param.Field[PolicyFilterParam] `json:"filters"` - // List of IDs that will be used when dispatching a notification. IDs for email - // type will be the email address. - Mechanisms param.Field[MechanismParam] `json:"mechanisms"` - // Name of the policy. - Name param.Field[string] `json:"name"` -} - -func (r PolicyParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - // Optional filters that allow you to be alerted only on a subset of events for // that alert type based on some criteria. This is only available for select alert // types. See alert type documentation for more details. diff --git a/alerting/policy_test.go b/alerting/policy_test.go index e42ad6ac6a..6684d15480 100644 --- a/alerting/policy_test.go +++ b/alerting/policy_test.go @@ -34,14 +34,14 @@ func TestPolicyNewWithOptionalParams(t *testing.T) { AlertType: cloudflare.F(alerting.PolicyNewParamsAlertTypeUniversalSSLEventType), Enabled: cloudflare.F(true), Mechanisms: cloudflare.F(alerting.MechanismParam{ - "email": []alerting.MechanismParam{{ - ID: cloudflare.F[alerting.MechanismIDUnionParam](shared.UnionString("test@example.com")), + "email": []alerting.MechanismItemParam{{ + ID: cloudflare.F[alerting.MechanismItemIDUnionParam](shared.UnionString("test@example.com")), }}, - "pagerduty": []alerting.MechanismParam{{ - ID: cloudflare.F[alerting.MechanismIDUnionParam](shared.UnionString("e8133a15-00a4-4d69-aec1-32f70c51f6e5")), + "pagerduty": []alerting.MechanismItemParam{{ + ID: cloudflare.F[alerting.MechanismItemIDUnionParam](shared.UnionString("e8133a15-00a4-4d69-aec1-32f70c51f6e5")), }}, - "webhooks": []alerting.MechanismParam{{ - ID: cloudflare.F[alerting.MechanismIDUnionParam](shared.UnionString("14cc1190-5d2b-4b98-a696-c424cb2ad05f")), + "webhooks": []alerting.MechanismItemParam{{ + ID: cloudflare.F[alerting.MechanismItemIDUnionParam](shared.UnionString("14cc1190-5d2b-4b98-a696-c424cb2ad05f")), }}, }), Name: cloudflare.F("SSL Notification Event Policy"), @@ -163,14 +163,14 @@ func TestPolicyUpdateWithOptionalParams(t *testing.T) { Zones: cloudflare.F([]string{"string", "string", "string"}), }), Mechanisms: cloudflare.F(alerting.MechanismParam{ - "email": []alerting.MechanismParam{{ - ID: cloudflare.F[alerting.MechanismIDUnionParam](shared.UnionString("test@example.com")), + "email": []alerting.MechanismItemParam{{ + ID: cloudflare.F[alerting.MechanismItemIDUnionParam](shared.UnionString("test@example.com")), }}, - "pagerduty": []alerting.MechanismParam{{ - ID: cloudflare.F[alerting.MechanismIDUnionParam](shared.UnionString("e8133a15-00a4-4d69-aec1-32f70c51f6e5")), + "pagerduty": []alerting.MechanismItemParam{{ + ID: cloudflare.F[alerting.MechanismItemIDUnionParam](shared.UnionString("e8133a15-00a4-4d69-aec1-32f70c51f6e5")), }}, - "webhooks": []alerting.MechanismParam{{ - ID: cloudflare.F[alerting.MechanismIDUnionParam](shared.UnionString("14cc1190-5d2b-4b98-a696-c424cb2ad05f")), + "webhooks": []alerting.MechanismItemParam{{ + ID: cloudflare.F[alerting.MechanismItemIDUnionParam](shared.UnionString("14cc1190-5d2b-4b98-a696-c424cb2ad05f")), }}, }), Name: cloudflare.F("SSL Notification Event Policy"), diff --git a/api.md b/api.md index 4c8a70def2..96fabe589c 100644 --- a/api.md +++ b/api.md @@ -210,7 +210,6 @@ Params Types: Response Types: -- user.Policy - user.TokenNewResponse - user.TokenUpdateResponseUnion - user.TokenListResponse @@ -1311,10 +1310,6 @@ Methods: # RatePlans -Params Types: - -- rate_plans.RatePlanParam - Response Types: - rate_plans.RatePlan @@ -1688,10 +1683,6 @@ Methods: ## Lockdowns -Params Types: - -- firewall.ConfigurationUnionParam - Response Types: - firewall.Configuration @@ -2063,7 +2054,6 @@ Methods: Response Types: -- origin_tls_client_auth.Certificate - origin_tls_client_auth.HostnameCertificateNewResponse - origin_tls_client_auth.HostnameCertificateDeleteResponse - origin_tls_client_auth.HostnameCertificateGetResponse @@ -2126,10 +2116,6 @@ Methods: # RateLimits -Params Types: - -- rate_limits.Action - Response Types: - rate_limits.Action @@ -2352,7 +2338,6 @@ Methods: Response Types: -- waiting_rooms.Setting - waiting_rooms.SettingUpdateResponse - waiting_rooms.SettingEditResponse - waiting_rooms.SettingGetResponse @@ -2367,10 +2352,6 @@ Methods: ## Hostnames -Params Types: - -- web3.HostnameParam - Response Types: - web3.Hostname @@ -2478,10 +2459,6 @@ Methods: ### Schedules -Params Types: - -- workers.ScheduleParam - Response Types: - workers.Schedule @@ -2754,10 +2731,6 @@ Methods: ## Policies -Params Types: - -- page_shield.PolicyParam - Response Types: - page_shield.Policy @@ -3096,10 +3069,6 @@ Methods: #### Bindings -Params Types: - -- addressing.ServiceBindingParam - Response Types: - addressing.ServiceBinding @@ -3301,10 +3270,6 @@ Methods: ## DNS -Params Types: - -- intel.DNSParam - Response Types: - intel.DNS @@ -3578,7 +3543,6 @@ Methods: Params Types: -- magic_transit.ACLParam - magic_transit.ACLConfigurationParam - magic_transit.AllowedProtocol - magic_transit.SubnetUnionParam @@ -3648,10 +3612,6 @@ Methods: ## Configs -Params Types: - -- magic_network_monitoring.ConfigurationParam - Response Types: - magic_network_monitoring.Configuration @@ -3904,7 +3864,6 @@ Methods: Response Types: - rules.ListCursor -- rules.ListItem - rules.ListItemNewResponse - rules.ListItemUpdateResponse - rules.ListItemListResponse @@ -4197,7 +4156,6 @@ Methods: Params Types: - alerting.MechanismParam -- alerting.PolicyParam - alerting.PolicyFilterParam Response Types: @@ -4791,7 +4749,6 @@ Methods: Params Types: - zero_trust.ApprovalGroupParam -- zero_trust.PolicyParam Response Types: @@ -5477,10 +5434,6 @@ Methods: ### Routes -Params Types: - -- zero_trust.RouteParam - Response Types: - zero_trust.Route @@ -6661,10 +6614,6 @@ Methods: ## Schedule -Params Types: - -- speed.ScheduleParam - Response Types: - speed.Schedule diff --git a/event_notifications/r2configuration.go b/event_notifications/r2configuration.go index 23c06736f8..840b87d100 100644 --- a/event_notifications/r2configuration.go +++ b/event_notifications/r2configuration.go @@ -48,7 +48,78 @@ func (r *R2ConfigurationService) Get(ctx context.Context, bucketName string, que return } -type R2ConfigurationGetResponse map[string]map[string]R2ConfigurationGetResponse +type R2ConfigurationGetResponse map[string]map[string]R2ConfigurationGetResponseItem + +type R2ConfigurationGetResponseItem struct { + // Queue ID that will receive notifications based on the configured rules + Queue string `json:"queue,required"` + // Array of rules to drive notifications + Rules []R2ConfigurationGetResponseItemRule `json:"rules,required"` + JSON r2ConfigurationGetResponseItemJSON `json:"-"` +} + +// r2ConfigurationGetResponseItemJSON contains the JSON metadata for the struct +// [R2ConfigurationGetResponseItem] +type r2ConfigurationGetResponseItemJSON struct { + Queue apijson.Field + Rules apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *R2ConfigurationGetResponseItem) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r r2ConfigurationGetResponseItemJSON) RawJSON() string { + return r.raw +} + +type R2ConfigurationGetResponseItemRule struct { + // Array of R2 object actions that will trigger notifications + Actions []R2ConfigurationGetResponseItemRulesAction `json:"actions,required"` + // Notifications will be sent only for objects with this prefix + Prefix string `json:"prefix"` + // Notifications will be sent only for objects with this suffix + Suffix string `json:"suffix"` + JSON r2ConfigurationGetResponseItemRuleJSON `json:"-"` +} + +// r2ConfigurationGetResponseItemRuleJSON contains the JSON metadata for the struct +// [R2ConfigurationGetResponseItemRule] +type r2ConfigurationGetResponseItemRuleJSON struct { + Actions apijson.Field + Prefix apijson.Field + Suffix apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *R2ConfigurationGetResponseItemRule) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r r2ConfigurationGetResponseItemRuleJSON) RawJSON() string { + return r.raw +} + +type R2ConfigurationGetResponseItemRulesAction string + +const ( + R2ConfigurationGetResponseItemRulesActionPutObject R2ConfigurationGetResponseItemRulesAction = "PutObject" + R2ConfigurationGetResponseItemRulesActionCopyObject R2ConfigurationGetResponseItemRulesAction = "CopyObject" + R2ConfigurationGetResponseItemRulesActionDeleteObject R2ConfigurationGetResponseItemRulesAction = "DeleteObject" + R2ConfigurationGetResponseItemRulesActionCompleteMultipartUpload R2ConfigurationGetResponseItemRulesAction = "CompleteMultipartUpload" + R2ConfigurationGetResponseItemRulesActionAbortMultipartUpload R2ConfigurationGetResponseItemRulesAction = "AbortMultipartUpload" +) + +func (r R2ConfigurationGetResponseItemRulesAction) IsKnown() bool { + switch r { + case R2ConfigurationGetResponseItemRulesActionPutObject, R2ConfigurationGetResponseItemRulesActionCopyObject, R2ConfigurationGetResponseItemRulesActionDeleteObject, R2ConfigurationGetResponseItemRulesActionCompleteMultipartUpload, R2ConfigurationGetResponseItemRulesActionAbortMultipartUpload: + return true + } + return false +} type R2ConfigurationGetParams struct { // Identifier diff --git a/filters/filter.go b/filters/filter.go index 8ed53f1a81..d25ec52673 100644 --- a/filters/filter.go +++ b/filters/filter.go @@ -145,7 +145,7 @@ func (r firewallFilterJSON) RawJSON() string { return r.raw } -func (r FirewallFilter) implementsFirewallFirewallRuleFilter() {} +func (r FirewallFilter) ImplementsFirewallFirewallRuleFilter() {} type FilterNewParams struct { Body interface{} `json:"body,required"` diff --git a/firewall/lockdown.go b/firewall/lockdown.go index 4d509127ef..df0fb227c7 100644 --- a/firewall/lockdown.go +++ b/firewall/lockdown.go @@ -194,34 +194,6 @@ func (r ConfigurationTarget) IsKnown() bool { return false } -// A list of IP addresses or CIDR ranges that will be allowed to access the URLs -// specified in the Zone Lockdown rule. You can include any number of `ip` or -// `ip_range` configurations. -type ConfigurationParam struct { - // The configuration target. You must set the target to `ip` when specifying an IP - // address in the Zone Lockdown rule. - Target param.Field[ConfigurationTarget] `json:"target"` - // The IP address to match. This address will be compared to the IP address of - // incoming requests. - Value param.Field[string] `json:"value"` -} - -func (r ConfigurationParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r ConfigurationParam) implementsFirewallConfigurationUnionParam() {} - -// A list of IP addresses or CIDR ranges that will be allowed to access the URLs -// specified in the Zone Lockdown rule. You can include any number of `ip` or -// `ip_range` configurations. -// -// Satisfied by [firewall.LockdownIPConfigurationParam], -// [firewall.LockdownCIDRConfigurationParam], [ConfigurationParam]. -type ConfigurationUnionParam interface { - implementsFirewallConfigurationUnionParam() -} - type Lockdown struct { // The unique identifier of the Zone Lockdown rule. ID string `json:"id,required"` diff --git a/firewall/rule.go b/firewall/rule.go index 5e9e1cd9ea..864f1cfbef 100644 --- a/firewall/rule.go +++ b/firewall/rule.go @@ -220,7 +220,7 @@ func (r FirewallRuleFilter) AsUnion() FirewallRuleFilterUnion { // Union satisfied by [filters.FirewallFilter] or [firewall.DeletedFilter]. type FirewallRuleFilterUnion interface { - implementsFirewallFirewallRuleFilter() + ImplementsFirewallFirewallRuleFilter() } func init() { @@ -283,7 +283,7 @@ func (r deletedFilterJSON) RawJSON() string { return r.raw } -func (r DeletedFilter) implementsFirewallFirewallRuleFilter() {} +func (r DeletedFilter) ImplementsFirewallFirewallRuleFilter() {} type RuleNewParams struct { Body interface{} `json:"body,required"` diff --git a/firewall/wafoverride.go b/firewall/wafoverride.go index d3afc09ecd..18e2efa9f6 100644 --- a/firewall/wafoverride.go +++ b/firewall/wafoverride.go @@ -255,22 +255,22 @@ func (r RewriteActionDisable) IsKnown() bool { return false } -type WAFRule map[string]WAFRuleItem +type WAFRule map[string]WAFRuleItemItem // The WAF rule action to apply. -type WAFRuleItem string +type WAFRuleItemItem string const ( - WAFRuleItemChallenge WAFRuleItem = "challenge" - WAFRuleItemBlock WAFRuleItem = "block" - WAFRuleItemSimulate WAFRuleItem = "simulate" - WAFRuleItemDisable WAFRuleItem = "disable" - WAFRuleItemDefault WAFRuleItem = "default" + WAFRuleItemItemChallenge WAFRuleItemItem = "challenge" + WAFRuleItemItemBlock WAFRuleItemItem = "block" + WAFRuleItemItemSimulate WAFRuleItemItem = "simulate" + WAFRuleItemItemDisable WAFRuleItemItem = "disable" + WAFRuleItemItemDefault WAFRuleItemItem = "default" ) -func (r WAFRuleItem) IsKnown() bool { +func (r WAFRuleItemItem) IsKnown() bool { switch r { - case WAFRuleItemChallenge, WAFRuleItemBlock, WAFRuleItemSimulate, WAFRuleItemDisable, WAFRuleItemDefault: + case WAFRuleItemItemChallenge, WAFRuleItemItemBlock, WAFRuleItemItemSimulate, WAFRuleItemItemDisable, WAFRuleItemItemDefault: return true } return false diff --git a/intel/dns.go b/intel/dns.go index 7f1cb07d88..58d25b3731 100644 --- a/intel/dns.go +++ b/intel/dns.go @@ -116,34 +116,6 @@ func (r dnsReverseRecordJSON) RawJSON() string { return r.raw } -type DNSParam struct { - // Total results returned based on your search parameters. - Count param.Field[float64] `json:"count"` - // Current page within paginated list of results. - Page param.Field[float64] `json:"page"` - // Number of results per page of results. - PerPage param.Field[float64] `json:"per_page"` - // Reverse DNS look-ups observed during the time period. - ReverseRecords param.Field[[]DNSReverseRecordParam] `json:"reverse_records"` -} - -func (r DNSParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type DNSReverseRecordParam struct { - // First seen date of the DNS record during the time period. - FirstSeen param.Field[time.Time] `json:"first_seen" format:"date"` - // Hostname that the IP was observed resolving to. - Hostname param.Field[interface{}] `json:"hostname"` - // Last seen date of the DNS record during the time period. - LastSeen param.Field[time.Time] `json:"last_seen" format:"date"` -} - -func (r DNSReverseRecordParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - type DNSListResponse struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` diff --git a/internal/shared/union.go b/internal/shared/union.go index ce0501634e..a815e1fec6 100644 --- a/internal/shared/union.go +++ b/internal/shared/union.go @@ -127,8 +127,8 @@ func (UnionString) ImplementsAlertingAvailableAlertListResponseUnion() func (UnionString) ImplementsAlertingDestinationEligibleGetResponseUnion() {} func (UnionString) ImplementsAlertingDestinationPagerdutyDeleteResponseUnion() {} func (UnionString) ImplementsAlertingDestinationWebhookDeleteResponseUnion() {} -func (UnionString) ImplementsAlertingMechanismIDUnionParam() {} -func (UnionString) ImplementsAlertingMechanismIDUnion() {} +func (UnionString) ImplementsAlertingMechanismItemIDUnionParam() {} +func (UnionString) ImplementsAlertingMechanismItemIDUnion() {} func (UnionString) ImplementsAlertingPolicyDeleteResponseUnion() {} func (UnionString) ImplementsD1DatabaseDeleteResponseUnion() {} func (UnionString) ImplementsWARPConnectorWARPConnectorTokenResponseUnion() {} diff --git a/load_balancers/preview.go b/load_balancers/preview.go index 8efc9f8d74..ac4930978c 100644 --- a/load_balancers/preview.go +++ b/load_balancers/preview.go @@ -44,7 +44,58 @@ func (r *PreviewService) Get(ctx context.Context, previewID string, query Previe return } -type PreviewGetResponse map[string]PreviewGetResponse +type PreviewGetResponse map[string]PreviewGetResponseItem + +type PreviewGetResponseItem struct { + Healthy bool `json:"healthy"` + Origins []map[string]PreviewGetResponseItemOrigin `json:"origins"` + JSON previewGetResponseItemJSON `json:"-"` +} + +// previewGetResponseItemJSON contains the JSON metadata for the struct +// [PreviewGetResponseItem] +type previewGetResponseItemJSON struct { + Healthy apijson.Field + Origins apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *PreviewGetResponseItem) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r previewGetResponseItemJSON) RawJSON() string { + return r.raw +} + +// The origin ipv4/ipv6 address or domain name mapped to it's health data. +type PreviewGetResponseItemOrigin struct { + FailureReason string `json:"failure_reason"` + Healthy bool `json:"healthy"` + ResponseCode float64 `json:"response_code"` + RTT string `json:"rtt"` + JSON previewGetResponseItemOriginJSON `json:"-"` +} + +// previewGetResponseItemOriginJSON contains the JSON metadata for the struct +// [PreviewGetResponseItemOrigin] +type previewGetResponseItemOriginJSON struct { + FailureReason apijson.Field + Healthy apijson.Field + ResponseCode apijson.Field + RTT apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *PreviewGetResponseItemOrigin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r previewGetResponseItemOriginJSON) RawJSON() string { + return r.raw +} type PreviewGetParams struct { // Identifier diff --git a/magic_network_monitoring/config.go b/magic_network_monitoring/config.go index 9d68c935aa..8a0e76206c 100644 --- a/magic_network_monitoring/config.go +++ b/magic_network_monitoring/config.go @@ -126,19 +126,6 @@ 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 interface{} `json:"body,required"` diff --git a/magic_transit/siteacl.go b/magic_transit/siteacl.go index 68bb0af4a3..186b4b1c85 100644 --- a/magic_transit/siteacl.go +++ b/magic_transit/siteacl.go @@ -149,26 +149,6 @@ func (r aclJSON) RawJSON() string { return r.raw } -// Bidirectional ACL policy for network traffic within a site. -type ACLParam struct { - // Description for the ACL. - Description param.Field[string] `json:"description"` - // The desired forwarding action for this ACL policy. If set to "false", the policy - // will forward traffic to Cloudflare. If set to "true", the policy will forward - // traffic locally on the Magic WAN Connector. If not included in request, will - // default to false. - ForwardLocally param.Field[bool] `json:"forward_locally"` - LAN1 param.Field[ACLConfigurationParam] `json:"lan_1"` - LAN2 param.Field[ACLConfigurationParam] `json:"lan_2"` - // The name of the ACL. - Name param.Field[string] `json:"name"` - Protocols param.Field[[]AllowedProtocol] `json:"protocols"` -} - -func (r ACLParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - type ACLConfiguration struct { // The identifier for the LAN you want to create an ACL policy with. LANID string `json:"lan_id,required"` diff --git a/origin_tls_client_auth/hostnamecertificate.go b/origin_tls_client_auth/hostnamecertificate.go index 5adecc4d2b..5682c21ec3 100644 --- a/origin_tls_client_auth/hostnamecertificate.go +++ b/origin_tls_client_auth/hostnamecertificate.go @@ -97,69 +97,6 @@ func (r *HostnameCertificateService) Get(ctx context.Context, certificateID stri return } -type Certificate struct { - // Identifier - ID string `json:"id"` - // The hostname certificate. - Certificate string `json:"certificate"` - // The date when the certificate expires. - ExpiresOn time.Time `json:"expires_on" format:"date-time"` - // The certificate authority that issued the certificate. - Issuer string `json:"issuer"` - // The serial number on the uploaded certificate. - SerialNumber string `json:"serial_number"` - // The type of hash used for the certificate. - Signature string `json:"signature"` - // Status of the certificate or the association. - Status CertificateStatus `json:"status"` - // The time when the certificate was uploaded. - UploadedOn time.Time `json:"uploaded_on" format:"date-time"` - JSON certificateJSON `json:"-"` -} - -// certificateJSON contains the JSON metadata for the struct [Certificate] -type certificateJSON struct { - ID apijson.Field - Certificate apijson.Field - ExpiresOn apijson.Field - Issuer apijson.Field - SerialNumber apijson.Field - Signature apijson.Field - Status apijson.Field - UploadedOn apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *Certificate) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r certificateJSON) RawJSON() string { - return r.raw -} - -// Status of the certificate or the association. -type CertificateStatus string - -const ( - CertificateStatusInitializing CertificateStatus = "initializing" - CertificateStatusPendingDeployment CertificateStatus = "pending_deployment" - CertificateStatusPendingDeletion CertificateStatus = "pending_deletion" - CertificateStatusActive CertificateStatus = "active" - CertificateStatusDeleted CertificateStatus = "deleted" - CertificateStatusDeploymentTimedOut CertificateStatus = "deployment_timed_out" - CertificateStatusDeletionTimedOut CertificateStatus = "deletion_timed_out" -) - -func (r CertificateStatus) IsKnown() bool { - switch r { - case CertificateStatusInitializing, CertificateStatusPendingDeployment, CertificateStatusPendingDeletion, CertificateStatusActive, CertificateStatusDeleted, CertificateStatusDeploymentTimedOut, CertificateStatusDeletionTimedOut: - return true - } - return false -} - type HostnameCertificateNewResponse struct { // Identifier ID string `json:"id"` diff --git a/page_shield/policy.go b/page_shield/policy.go index 558860a922..6ff4f55dd9 100644 --- a/page_shield/policy.go +++ b/page_shield/policy.go @@ -140,26 +140,6 @@ func (r PolicyAction) IsKnown() bool { return false } -type PolicyParam struct { - // The ID of the policy - ID param.Field[string] `json:"id"` - // The action to take if the expression matches - Action param.Field[PolicyAction] `json:"action"` - // A description for the policy - Description param.Field[string] `json:"description"` - // Whether the policy is enabled - Enabled param.Field[bool] `json:"enabled"` - // The expression which must match for the policy to be applied, using the - // Cloudflare Firewall rule expression syntax - Expression param.Field[string] `json:"expression"` - // The policy which will be applied - Value param.Field[string] `json:"value"` -} - -func (r PolicyParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - type PolicyNewParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` diff --git a/rate_plans/rateplan.go b/rate_plans/rateplan.go index bf1c3922ad..8ccba47272 100644 --- a/rate_plans/rateplan.go +++ b/rate_plans/rateplan.go @@ -8,7 +8,6 @@ import ( "net/http" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" - "github.com/cloudflare/cloudflare-go/v2/internal/param" "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/internal/shared" "github.com/cloudflare/cloudflare-go/v2/option" @@ -144,28 +143,6 @@ func (r RatePlanFrequency) IsKnown() bool { return false } -type RatePlanParam struct { - // Array of available components values for the plan. - Components param.Field[[]RatePlanComponentParam] `json:"components"` - // The duration of the plan subscription. - Duration param.Field[float64] `json:"duration"` -} - -func (r RatePlanParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type RatePlanComponentParam struct { - // The default amount allocated. - Default param.Field[float64] `json:"default"` - // The unique component. - Name param.Field[RatePlanComponentsName] `json:"name"` -} - -func (r RatePlanComponentParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - type RatePlanGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` diff --git a/rules/listitem.go b/rules/listitem.go index c7edaddf41..365a28b491 100644 --- a/rules/listitem.go +++ b/rules/listitem.go @@ -146,27 +146,6 @@ func (r listCursorJSON) RawJSON() string { return r.raw } -type ListItem struct { - // The unique operation ID of the asynchronous action. - OperationID string `json:"operation_id"` - JSON listItemJSON `json:"-"` -} - -// listItemJSON contains the JSON metadata for the struct [ListItem] -type listItemJSON struct { - OperationID apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ListItem) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r listItemJSON) RawJSON() string { - return r.raw -} - type ListItemNewResponse struct { // The unique operation ID of the asynchronous action. OperationID string `json:"operation_id"` diff --git a/speed/schedule.go b/speed/schedule.go index 70641f2031..6ffa6980c4 100644 --- a/speed/schedule.go +++ b/speed/schedule.go @@ -124,20 +124,6 @@ func (r ScheduleRegion) IsKnown() bool { return false } -// The test schedule. -type ScheduleParam struct { - // The frequency of the test. - Frequency param.Field[ScheduleFrequency] `json:"frequency"` - // A test region. - Region param.Field[ScheduleRegion] `json:"region"` - // A URL. - URL param.Field[string] `json:"url"` -} - -func (r ScheduleParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - type ScheduleNewResponse struct { // The test schedule. Schedule Schedule `json:"schedule"` diff --git a/user/token.go b/user/token.go index 0fcec0a4b5..398f295ac6 100644 --- a/user/token.go +++ b/user/token.go @@ -131,34 +131,17 @@ func (r *TokenService) Verify(ctx context.Context, opts ...option.RequestOption) type CIDRListParam = string -type Policy struct { - // Policy identifier. - ID string `json:"id,required"` +type PolicyParam struct { // Allow or deny operations against the resources. - Effect PolicyEffect `json:"effect,required"` + Effect param.Field[PolicyEffect] `json:"effect,required"` // A set of permission groups that are specified to the policy. - PermissionGroups []PolicyPermissionGroup `json:"permission_groups,required"` + PermissionGroups param.Field[[]PolicyPermissionGroupParam] `json:"permission_groups,required"` // A list of resource names that the policy applies to. - Resources interface{} `json:"resources,required"` - JSON policyJSON `json:"-"` -} - -// policyJSON contains the JSON metadata for the struct [Policy] -type policyJSON struct { - ID apijson.Field - Effect apijson.Field - PermissionGroups apijson.Field - Resources apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *Policy) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) + Resources param.Field[interface{}] `json:"resources,required"` } -func (r policyJSON) RawJSON() string { - return r.raw +func (r PolicyParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) } // Allow or deny operations against the resources. @@ -177,46 +160,6 @@ func (r PolicyEffect) IsKnown() bool { return false } -// A named group of permissions that map to a group of operations against -// resources. -type PolicyPermissionGroup struct { - // Identifier of the group. - ID string `json:"id,required"` - // Name of the group. - Name string `json:"name"` - JSON policyPermissionGroupJSON `json:"-"` -} - -// policyPermissionGroupJSON contains the JSON metadata for the struct -// [PolicyPermissionGroup] -type policyPermissionGroupJSON struct { - ID apijson.Field - Name apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *PolicyPermissionGroup) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r policyPermissionGroupJSON) RawJSON() string { - return r.raw -} - -type PolicyParam struct { - // Allow or deny operations against the resources. - Effect param.Field[PolicyEffect] `json:"effect,required"` - // A set of permission groups that are specified to the policy. - PermissionGroups param.Field[[]PolicyPermissionGroupParam] `json:"permission_groups,required"` - // A list of resource names that the policy applies to. - Resources param.Field[interface{}] `json:"resources,required"` -} - -func (r PolicyParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - // A named group of permissions that map to a group of operations against // resources. type PolicyPermissionGroupParam struct { diff --git a/waiting_rooms/setting.go b/waiting_rooms/setting.go index 9f48d70740..0c7d903a35 100644 --- a/waiting_rooms/setting.go +++ b/waiting_rooms/setting.go @@ -69,29 +69,6 @@ func (r *SettingService) Get(ctx context.Context, query SettingGetParams, opts . return } -type Setting struct { - // Whether to allow verified search engine crawlers to bypass all waiting rooms on - // this zone. Verified search engine crawlers will not be tracked or counted by the - // waiting room system, and will not appear in waiting room analytics. - SearchEngineCrawlerBypass bool `json:"search_engine_crawler_bypass,required"` - JSON settingJSON `json:"-"` -} - -// settingJSON contains the JSON metadata for the struct [Setting] -type settingJSON struct { - SearchEngineCrawlerBypass apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *Setting) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingJSON) RawJSON() string { - return r.raw -} - type SettingUpdateResponse struct { // Whether to allow verified search engine crawlers to bypass all waiting rooms on // this zone. Verified search engine crawlers will not be tracked or counted by the diff --git a/web3/hostname.go b/web3/hostname.go index 6258eb9b78..8ab0466100 100644 --- a/web3/hostname.go +++ b/web3/hostname.go @@ -187,19 +187,6 @@ func (r HostnameTarget) IsKnown() bool { return false } -type HostnameParam struct { - // An optional description of the hostname. - Description param.Field[string] `json:"description"` - // DNSLink value used if the target is ipfs. - Dnslink param.Field[string] `json:"dnslink"` - // Target gateway of the hostname. - Target param.Field[HostnameTarget] `json:"target"` -} - -func (r HostnameParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - type HostnameDeleteResponse struct { // Identifier ID string `json:"id,required"` diff --git a/workers/scriptschedule.go b/workers/scriptschedule.go index 6c6bdb17ed..a85e3a0e95 100644 --- a/workers/scriptschedule.go +++ b/workers/scriptschedule.go @@ -82,13 +82,6 @@ func (r scheduleJSON) RawJSON() string { return r.raw } -type ScheduleParam struct { -} - -func (r ScheduleParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - type ScriptScheduleUpdateResponse struct { Schedules []Schedule `json:"schedules"` JSON scriptScheduleUpdateResponseJSON `json:"-"` diff --git a/workers/worker.go b/workers/worker.go index 23688ec140..d23370fd22 100644 --- a/workers/worker.go +++ b/workers/worker.go @@ -996,10 +996,10 @@ func (r singleStepMigrationJSON) RawJSON() string { return r.raw } -func (r SingleStepMigration) implementsWorkersForPlatformsDispatchNamespaceScriptSettingEditResponseMigrations() { +func (r SingleStepMigration) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingEditResponseMigrations() { } -func (r SingleStepMigration) implementsWorkersForPlatformsDispatchNamespaceScriptSettingGetResponseMigrations() { +func (r SingleStepMigration) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingGetResponseMigrations() { } type SingleStepMigrationRenamedClass struct { @@ -1075,10 +1075,10 @@ func (r SingleStepMigrationParam) MarshalJSON() (data []byte, err error) { func (r SingleStepMigrationParam) implementsWorkersScriptUpdateParamsBodyObjectMetadataMigrationsUnion() { } -func (r SingleStepMigrationParam) implementsWorkersForPlatformsDispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrationsUnion() { +func (r SingleStepMigrationParam) ImplementsWorkersForPlatformsDispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrationsUnion() { } -func (r SingleStepMigrationParam) implementsWorkersForPlatformsDispatchNamespaceScriptSettingEditParamsSettingsMigrationsUnion() { +func (r SingleStepMigrationParam) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingEditParamsSettingsMigrationsUnion() { } type SingleStepMigrationRenamedClassParam struct { @@ -1129,10 +1129,10 @@ func (r steppedMigrationJSON) RawJSON() string { return r.raw } -func (r SteppedMigration) implementsWorkersForPlatformsDispatchNamespaceScriptSettingEditResponseMigrations() { +func (r SteppedMigration) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingEditResponseMigrations() { } -func (r SteppedMigration) implementsWorkersForPlatformsDispatchNamespaceScriptSettingGetResponseMigrations() { +func (r SteppedMigration) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingGetResponseMigrations() { } type SteppedMigrationParam struct { @@ -1152,10 +1152,10 @@ func (r SteppedMigrationParam) MarshalJSON() (data []byte, err error) { func (r SteppedMigrationParam) implementsWorkersScriptUpdateParamsBodyObjectMetadataMigrationsUnion() { } -func (r SteppedMigrationParam) implementsWorkersForPlatformsDispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrationsUnion() { +func (r SteppedMigrationParam) ImplementsWorkersForPlatformsDispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrationsUnion() { } -func (r SteppedMigrationParam) implementsWorkersForPlatformsDispatchNamespaceScriptSettingEditParamsSettingsMigrationsUnion() { +func (r SteppedMigrationParam) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingEditParamsSettingsMigrationsUnion() { } // JSON encoded metadata about the uploaded parts and Worker configuration. diff --git a/workers_for_platforms/dispatchnamespacescript.go b/workers_for_platforms/dispatchnamespacescript.go index 13de482c18..8a2b443332 100644 --- a/workers_for_platforms/dispatchnamespacescript.go +++ b/workers_for_platforms/dispatchnamespacescript.go @@ -237,7 +237,7 @@ func (r DispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrations) Marshal return apijson.MarshalRoot(r) } -func (r DispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrations) implementsWorkersForPlatformsDispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrationsUnion() { +func (r DispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrations) ImplementsWorkersForPlatformsDispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrationsUnion() { } // Migrations to apply for Durable Objects associated with this Worker. @@ -246,7 +246,7 @@ func (r DispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrations) impleme // [workers.SteppedMigrationParam], // [DispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrations]. type DispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrationsUnion interface { - implementsWorkersForPlatformsDispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrationsUnion() + ImplementsWorkersForPlatformsDispatchNamespaceScriptUpdateParamsBodyObjectMetadataMigrationsUnion() } // Usage model to apply to invocations. diff --git a/workers_for_platforms/dispatchnamespacescriptsetting.go b/workers_for_platforms/dispatchnamespacescriptsetting.go index bd495f39dd..96f4abb07e 100644 --- a/workers_for_platforms/dispatchnamespacescriptsetting.go +++ b/workers_for_platforms/dispatchnamespacescriptsetting.go @@ -182,7 +182,7 @@ func (r DispatchNamespaceScriptSettingEditResponseMigrations) AsUnion() Dispatch // // Union satisfied by [workers.SingleStepMigration] or [workers.SteppedMigration]. type DispatchNamespaceScriptSettingEditResponseMigrationsUnion interface { - implementsWorkersForPlatformsDispatchNamespaceScriptSettingEditResponseMigrations() + ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingEditResponseMigrations() } func init() { @@ -321,7 +321,7 @@ func (r DispatchNamespaceScriptSettingGetResponseMigrations) AsUnion() DispatchN // // Union satisfied by [workers.SingleStepMigration] or [workers.SteppedMigration]. type DispatchNamespaceScriptSettingGetResponseMigrationsUnion interface { - implementsWorkersForPlatformsDispatchNamespaceScriptSettingGetResponseMigrations() + ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingGetResponseMigrations() } func init() { @@ -403,7 +403,7 @@ func (r DispatchNamespaceScriptSettingEditParamsSettingsMigrations) MarshalJSON( return apijson.MarshalRoot(r) } -func (r DispatchNamespaceScriptSettingEditParamsSettingsMigrations) implementsWorkersForPlatformsDispatchNamespaceScriptSettingEditParamsSettingsMigrationsUnion() { +func (r DispatchNamespaceScriptSettingEditParamsSettingsMigrations) ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingEditParamsSettingsMigrationsUnion() { } // Migrations to apply for Durable Objects associated with this Worker. @@ -412,7 +412,7 @@ func (r DispatchNamespaceScriptSettingEditParamsSettingsMigrations) implementsWo // [workers.SteppedMigrationParam], // [DispatchNamespaceScriptSettingEditParamsSettingsMigrations]. type DispatchNamespaceScriptSettingEditParamsSettingsMigrationsUnion interface { - implementsWorkersForPlatformsDispatchNamespaceScriptSettingEditParamsSettingsMigrationsUnion() + ImplementsWorkersForPlatformsDispatchNamespaceScriptSettingEditParamsSettingsMigrationsUnion() } type DispatchNamespaceScriptSettingEditResponseEnvelope struct { diff --git a/zero_trust/accessapplicationpolicy.go b/zero_trust/accessapplicationpolicy.go index db0fbb3d1c..04736e07ab 100644 --- a/zero_trust/accessapplicationpolicy.go +++ b/zero_trust/accessapplicationpolicy.go @@ -283,45 +283,6 @@ func (r PolicyDecision) IsKnown() bool { return false } -type PolicyParam struct { - // Administrators who can approve a temporary authentication request. - ApprovalGroups param.Field[[]ApprovalGroupParam] `json:"approval_groups"` - // Requires the user to request access from an administrator at the start of each - // session. - ApprovalRequired param.Field[bool] `json:"approval_required"` - // The action Access will take if a user matches this policy. - 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[[]AccessRuleUnionParam] `json:"exclude"` - // Rules evaluated with an OR logical operator. A user needs to meet only one of - // the Include rules. - Include param.Field[[]AccessRuleUnionParam] `json:"include"` - // Require this application to be served in an isolated browser for users matching - // this policy. 'Client Web Isolation' must be on for the account in order to use - // this feature. - IsolationRequired param.Field[bool] `json:"isolation_required"` - // The name of the Access policy. - Name param.Field[string] `json:"name"` - // The order of execution for this policy. Must be unique for each policy. - Precedence param.Field[int64] `json:"precedence"` - // A custom message that will appear on the purpose justification screen. - PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` - // Require users to enter a justification when they log in to the application. - PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` - // Rules evaluated with an AND logical operator. To match the policy, a user must - // meet all of the Require rules. - Require param.Field[[]AccessRuleUnionParam] `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. - SessionDuration param.Field[string] `json:"session_duration"` -} - -func (r PolicyParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - type AccessApplicationPolicyDeleteResponse struct { // UUID ID string `json:"id"` diff --git a/zero_trust/networkroute.go b/zero_trust/networkroute.go index 5b05205de6..890e8c1dec 100644 --- a/zero_trust/networkroute.go +++ b/zero_trust/networkroute.go @@ -143,24 +143,6 @@ func (r routeJSON) RawJSON() string { return r.raw } -type RouteParam struct { - // Optional remark describing the route. - Comment param.Field[string] `json:"comment"` - // Timestamp of when the resource was created. - CreatedAt param.Field[time.Time] `json:"created_at" format:"date-time"` - // Timestamp of when the resource was deleted. If `null`, the resource has not been - // deleted. - DeletedAt param.Field[time.Time] `json:"deleted_at" format:"date-time"` - // The private IPv4 or IPv6 range connected by the route, in CIDR notation. - Network param.Field[string] `json:"network"` - // UUID of the virtual network. - VirtualNetworkID param.Field[string] `json:"virtual_network_id" format:"uuid"` -} - -func (r RouteParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - type Teamnet struct { // UUID of the route. ID string `json:"id"` From 09c26b26e4d7375816e3c113d7ca34cac0330738 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 24 Apr 2024 20:54:27 +0000 Subject: [PATCH 002/127] feat(api): OpenAPI spec update via Stainless API (#1842) --- .github/workflows/release-doctor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 5b90a3ac59..5e1530a500 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -10,7 +10,7 @@ jobs: if: github.repository == 'cloudflare/cloudflare-go' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Check release environment run: | From 7b8a09ab66847e43bce0c5945ec078cd4cba9e8e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 24 Apr 2024 22:56:12 +0000 Subject: [PATCH 003/127] feat(api): OpenAPI spec update via Stainless API (#1843) --- accounts/member.go | 9 +- accounts/member_test.go | 1 - addressing/addressmap.go | 9 +- addressing/addressmap_test.go | 1 - addressing/addressmapaccount.go | 9 +- addressing/addressmapaccount_test.go | 1 - addressing/addressmapip.go | 9 +- addressing/addressmapip_test.go | 1 - addressing/addressmapzone.go | 9 +- addressing/addressmapzone_test.go | 1 - addressing/prefix.go | 9 +- addressing/prefix_test.go | 1 - addressing/prefixdelegation.go | 9 +- addressing/prefixdelegation_test.go | 1 - api.md | 203 +++++++++--------- cache/smarttieredcache.go | 9 +- cache/smarttieredcache_test.go | 1 - cache/variant.go | 9 +- cache/variant_test.go | 1 - custom_certificates/customcertificate.go | 9 +- custom_certificates/customcertificate_test.go | 1 - custom_hostnames/customhostname.go | 9 +- custom_hostnames/customhostname_test.go | 1 - custom_hostnames/fallbackorigin.go | 9 +- custom_hostnames/fallbackorigin_test.go | 1 - custom_nameservers/customnameserver.go | 9 +- custom_nameservers/customnameserver_test.go | 1 - dns/firewall.go | 9 +- dns/firewall_test.go | 1 - dns/record.go | 9 +- dns/record_test.go | 1 - dnssec/dnssec.go | 9 +- dnssec/dnssec_test.go | 1 - filters/filter.go | 10 +- filters/filter_test.go | 3 - firewall/accessrule.go | 13 +- firewall/accessrule_test.go | 1 - firewall/lockdown.go | 10 +- firewall/lockdown_test.go | 3 - firewall/rule.go | 14 +- firewall/rule_test.go | 5 +- firewall/uarule.go | 10 +- firewall/uarule_test.go | 3 - firewall/wafoverride.go | 10 +- firewall/wafoverride_test.go | 3 - healthchecks/healthcheck.go | 9 +- healthchecks/healthcheck_test.go | 1 - healthchecks/preview.go | 9 +- healthchecks/preview_test.go | 1 - images/v1.go | 9 +- images/v1_test.go | 1 - images/v1variant.go | 9 +- images/v1variant_test.go | 1 - intel/attacksurfacereportissue.go | 62 +++--- keyless_certificates/keylesscertificate.go | 9 +- .../keylesscertificate_test.go | 1 - kv/namespace.go | 9 +- kv/namespace_test.go | 1 - kv/namespacebulk.go | 11 +- kv/namespacebulk_test.go | 1 - kv/namespacevalue.go | 9 +- kv/namespacevalue_test.go | 1 - load_balancers/loadbalancer.go | 9 +- load_balancers/loadbalancer_test.go | 1 - load_balancers/monitor.go | 9 +- load_balancers/monitor_test.go | 1 - load_balancers/pool.go | 9 +- load_balancers/pool_test.go | 1 - logpush/job.go | 13 +- logpush/job_test.go | 1 - logs/controlcmbconfig.go | 9 +- logs/controlcmbconfig_test.go | 1 - magic_network_monitoring/config.go | 9 +- magic_network_monitoring/config_test.go | 1 - magic_network_monitoring/rule.go | 9 +- magic_network_monitoring/rule_test.go | 1 - magic_transit/gretunnel.go | 9 +- magic_transit/gretunnel_test.go | 1 - magic_transit/ipsectunnel.go | 9 +- magic_transit/ipsectunnel_test.go | 1 - magic_transit/route.go | 47 +--- magic_transit/route_test.go | 2 - magic_transit/site.go | 9 +- magic_transit/site_test.go | 1 - magic_transit/siteacl.go | 9 +- magic_transit/siteacl_test.go | 1 - magic_transit/sitelan.go | 9 +- magic_transit/sitelan_test.go | 1 - magic_transit/sitewan.go | 9 +- magic_transit/sitewan_test.go | 1 - memberships/membership.go | 10 +- memberships/membership_test.go | 8 +- mtls_certificates/mtlscertificate.go | 9 +- mtls_certificates/mtlscertificate_test.go | 1 - origin_ca_certificates/origincacertificate.go | 10 +- .../origincacertificate_test.go | 8 +- origin_tls_client_auth/hostnamecertificate.go | 9 +- .../hostnamecertificate_test.go | 1 - origin_tls_client_auth/origintlsclientauth.go | 9 +- .../origintlsclientauth_test.go | 1 - pagerules/pagerule.go | 9 +- pagerules/pagerule_test.go | 1 - pages/project.go | 9 +- pages/project_test.go | 1 - pages/projectdeployment.go | 9 +- pages/projectdeployment_test.go | 1 - pages/projectdomain.go | 9 +- pages/projectdomain_test.go | 1 - queues/consumer.go | 9 +- queues/consumer_test.go | 1 - queues/queue.go | 9 +- queues/queue_test.go | 1 - rate_limits/ratelimit.go | 10 +- rate_limits/ratelimit_test.go | 3 - rules/list.go | 9 +- rules/list_test.go | 1 - rules/listitem.go | 22 +- rules/listitem_test.go | 5 +- secondary_dns/acl.go | 9 +- secondary_dns/acl_test.go | 1 - secondary_dns/incoming.go | 9 +- secondary_dns/incoming_test.go | 1 - secondary_dns/outgoing.go | 9 +- secondary_dns/outgoing_test.go | 1 - secondary_dns/peer.go | 9 +- secondary_dns/peer_test.go | 1 - secondary_dns/tsig.go | 9 +- secondary_dns/tsig_test.go | 1 - spectrum/app.go | 10 +- spectrum/app_test.go | 3 - ssl/certificatepack.go | 9 +- ssl/certificatepack_test.go | 1 - stream/captionlanguage.go | 9 +- stream/captionlanguage_test.go | 1 - stream/key.go | 9 +- stream/key_test.go | 1 - stream/liveinput.go | 9 +- stream/liveinput_test.go | 1 - stream/liveinputoutput.go | 9 +- stream/liveinputoutput_test.go | 1 - stream/stream.go | 9 +- stream/stream_test.go | 1 - stream/watermark.go | 9 +- stream/watermark_test.go | 1 - stream/webhook.go | 9 +- stream/webhook_test.go | 1 - subscriptions/subscription.go | 10 +- subscriptions/subscription_test.go | 3 - user/organization.go | 10 +- user/organization_test.go | 8 +- user/subscription.go | 10 +- user/subscription_test.go | 8 +- user/token.go | 10 +- user/token_test.go | 8 +- waiting_rooms/event.go | 9 +- waiting_rooms/event_test.go | 1 - waiting_rooms/rule.go | 9 +- waiting_rooms/rule_test.go | 1 - waiting_rooms/waitingroom.go | 9 +- waiting_rooms/waitingroom_test.go | 1 - warp_connector/warpconnector.go | 11 +- warp_connector/warpconnector_test.go | 1 - web3/hostname.go | 10 +- web3/hostname_test.go | 3 - ...stnameipfsuniversalpathcontentlistentry.go | 10 +- ...eipfsuniversalpathcontentlistentry_test.go | 3 - workers/domain.go | 9 +- workers/domain_test.go | 1 - workers/script.go | 5 - workers/script_test.go | 1 - workers/scripttail.go | 9 +- workers/scripttail_test.go | 1 - .../dispatchnamespacescript.go | 5 - .../dispatchnamespacescript_test.go | 1 - zero_trust/accessbookmark.go | 10 +- zero_trust/accessbookmark_test.go | 3 - zero_trust/devicenetwork.go | 9 +- zero_trust/devicenetwork_test.go | 1 - zero_trust/devicepolicy.go | 9 +- zero_trust/devicepolicy_test.go | 1 - zero_trust/deviceposture.go | 9 +- zero_trust/deviceposture_test.go | 1 - zero_trust/devicepostureintegration.go | 9 +- zero_trust/devicepostureintegration_test.go | 1 - zero_trust/dlpprofilecustom.go | 9 +- zero_trust/dlpprofilecustom_test.go | 1 - zero_trust/gatewaylist.go | 9 +- zero_trust/gatewaylist_test.go | 1 - zero_trust/gatewaylocation.go | 9 +- zero_trust/gatewaylocation_test.go | 1 - zero_trust/gatewayproxyendpoint.go | 9 +- zero_trust/gatewayproxyendpoint_test.go | 1 - zero_trust/gatewayrule.go | 9 +- zero_trust/gatewayrule_test.go | 1 - zero_trust/networkvirtualnetwork.go | 9 +- zero_trust/networkvirtualnetwork_test.go | 1 - zero_trust/tunnel.go | 11 +- zero_trust/tunnel_test.go | 1 - zero_trust/tunnelconnection.go | 11 +- zero_trust/tunnelconnection_test.go | 1 - 200 files changed, 331 insertions(+), 1067 deletions(-) diff --git a/accounts/member.go b/accounts/member.go index 6143a70517..950e329bd8 100644 --- a/accounts/member.go +++ b/accounts/member.go @@ -84,10 +84,10 @@ func (r *MemberService) ListAutoPaging(ctx context.Context, params MemberListPar } // Remove a member from an account. -func (r *MemberService) Delete(ctx context.Context, memberID string, params MemberDeleteParams, opts ...option.RequestOption) (res *MemberDeleteResponse, err error) { +func (r *MemberService) Delete(ctx context.Context, memberID string, body MemberDeleteParams, opts ...option.RequestOption) (res *MemberDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env MemberDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%v/members/%s", params.AccountID, memberID) + path := fmt.Sprintf("accounts/%v/members/%s", body.AccountID, memberID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -519,11 +519,6 @@ func (r MemberListParamsStatus) IsKnown() bool { type MemberDeleteParams struct { AccountID param.Field[interface{}] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r MemberDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type MemberDeleteResponseEnvelope struct { diff --git a/accounts/member_test.go b/accounts/member_test.go index f5ddc86ec7..8052d0be66 100644 --- a/accounts/member_test.go +++ b/accounts/member_test.go @@ -133,7 +133,6 @@ func TestMemberDelete(t *testing.T) { "4536bcfad5faccb111b47003c79917fa", accounts.MemberDeleteParams{ AccountID: cloudflare.F[any](map[string]interface{}{}), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/addressing/addressmap.go b/addressing/addressmap.go index 3655b59b76..c553728bdc 100644 --- a/addressing/addressmap.go +++ b/addressing/addressmap.go @@ -77,10 +77,10 @@ func (r *AddressMapService) ListAutoPaging(ctx context.Context, query AddressMap // Delete a particular address map owned by the account. An Address Map must be // disabled before it can be deleted. -func (r *AddressMapService) Delete(ctx context.Context, addressMapID string, params AddressMapDeleteParams, opts ...option.RequestOption) (res *[]AddressMapDeleteResponse, err error) { +func (r *AddressMapService) Delete(ctx context.Context, addressMapID string, body AddressMapDeleteParams, opts ...option.RequestOption) (res *[]AddressMapDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env AddressMapDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/addressing/address_maps/%s", params.AccountID, addressMapID) + path := fmt.Sprintf("accounts/%s/addressing/address_maps/%s", body.AccountID, addressMapID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -483,11 +483,6 @@ type AddressMapListParams struct { type AddressMapDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r AddressMapDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type AddressMapDeleteResponseEnvelope struct { diff --git a/addressing/addressmap_test.go b/addressing/addressmap_test.go index 301c5faef9..dce9f55ef0 100644 --- a/addressing/addressmap_test.go +++ b/addressing/addressmap_test.go @@ -87,7 +87,6 @@ func TestAddressMapDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", addressing.AddressMapDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/addressing/addressmapaccount.go b/addressing/addressmapaccount.go index 2ab8646017..163abe8b4b 100644 --- a/addressing/addressmapaccount.go +++ b/addressing/addressmapaccount.go @@ -46,10 +46,10 @@ func (r *AddressMapAccountService) Update(ctx context.Context, addressMapID stri } // Remove an account as a member of a particular address map. -func (r *AddressMapAccountService) Delete(ctx context.Context, addressMapID string, params AddressMapAccountDeleteParams, opts ...option.RequestOption) (res *[]AddressMapAccountDeleteResponse, err error) { +func (r *AddressMapAccountService) Delete(ctx context.Context, addressMapID string, body AddressMapAccountDeleteParams, opts ...option.RequestOption) (res *[]AddressMapAccountDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env AddressMapAccountDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/addressing/address_maps/%s/accounts/%s", params.AccountID, addressMapID, params.AccountID) + path := fmt.Sprintf("accounts/%s/addressing/address_maps/%s/accounts/%s", body.AccountID, addressMapID, body.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -151,11 +151,6 @@ func (r addressMapAccountUpdateResponseEnvelopeResultInfoJSON) RawJSON() string type AddressMapAccountDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r AddressMapAccountDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type AddressMapAccountDeleteResponseEnvelope struct { diff --git a/addressing/addressmapaccount_test.go b/addressing/addressmapaccount_test.go index 697d6f7098..b13dad1f48 100644 --- a/addressing/addressmapaccount_test.go +++ b/addressing/addressmapaccount_test.go @@ -64,7 +64,6 @@ func TestAddressMapAccountDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", addressing.AddressMapAccountDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/addressing/addressmapip.go b/addressing/addressmapip.go index b9ac5a9d04..16ac5eb17c 100644 --- a/addressing/addressmapip.go +++ b/addressing/addressmapip.go @@ -46,10 +46,10 @@ func (r *AddressMapIPService) Update(ctx context.Context, addressMapID string, i } // Remove an IP from a particular address map. -func (r *AddressMapIPService) Delete(ctx context.Context, addressMapID string, ipAddress string, params AddressMapIPDeleteParams, opts ...option.RequestOption) (res *[]AddressMapIPDeleteResponse, err error) { +func (r *AddressMapIPService) Delete(ctx context.Context, addressMapID string, ipAddress string, body AddressMapIPDeleteParams, opts ...option.RequestOption) (res *[]AddressMapIPDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env AddressMapIPDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/addressing/address_maps/%s/ips/%s", params.AccountID, addressMapID, ipAddress) + path := fmt.Sprintf("accounts/%s/addressing/address_maps/%s/ips/%s", body.AccountID, addressMapID, ipAddress) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -151,11 +151,6 @@ func (r addressMapIPUpdateResponseEnvelopeResultInfoJSON) RawJSON() string { type AddressMapIPDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r AddressMapIPDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type AddressMapIPDeleteResponseEnvelope struct { diff --git a/addressing/addressmapip_test.go b/addressing/addressmapip_test.go index 4f0c3ebe7d..8b83306c14 100644 --- a/addressing/addressmapip_test.go +++ b/addressing/addressmapip_test.go @@ -66,7 +66,6 @@ func TestAddressMapIPDelete(t *testing.T) { "192.0.2.1", addressing.AddressMapIPDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/addressing/addressmapzone.go b/addressing/addressmapzone.go index ab7b8f9cfb..af09239319 100644 --- a/addressing/addressmapzone.go +++ b/addressing/addressmapzone.go @@ -46,10 +46,10 @@ func (r *AddressMapZoneService) Update(ctx context.Context, addressMapID string, } // Remove a zone as a member of a particular address map. -func (r *AddressMapZoneService) Delete(ctx context.Context, addressMapID string, params AddressMapZoneDeleteParams, opts ...option.RequestOption) (res *[]AddressMapZoneDeleteResponse, err error) { +func (r *AddressMapZoneService) Delete(ctx context.Context, addressMapID string, body AddressMapZoneDeleteParams, opts ...option.RequestOption) (res *[]AddressMapZoneDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env AddressMapZoneDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/addressing/address_maps/%s/zones/%s", params.AccountID, addressMapID, params.ZoneID) + path := fmt.Sprintf("accounts/%s/addressing/address_maps/%s/zones/%s", body.AccountID, addressMapID, body.ZoneID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -155,11 +155,6 @@ type AddressMapZoneDeleteParams struct { ZoneID param.Field[string] `path:"zone_id,required"` // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r AddressMapZoneDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type AddressMapZoneDeleteResponseEnvelope struct { diff --git a/addressing/addressmapzone_test.go b/addressing/addressmapzone_test.go index 4268fa43c9..b01d8162be 100644 --- a/addressing/addressmapzone_test.go +++ b/addressing/addressmapzone_test.go @@ -66,7 +66,6 @@ func TestAddressMapZoneDelete(t *testing.T) { addressing.AddressMapZoneDeleteParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/addressing/prefix.go b/addressing/prefix.go index 4977ca211c..ea500057f6 100644 --- a/addressing/prefix.go +++ b/addressing/prefix.go @@ -74,10 +74,10 @@ func (r *PrefixService) ListAutoPaging(ctx context.Context, query PrefixListPara } // Delete an unapproved prefix owned by the account. -func (r *PrefixService) Delete(ctx context.Context, prefixID string, params PrefixDeleteParams, opts ...option.RequestOption) (res *[]PrefixDeleteResponse, err error) { +func (r *PrefixService) Delete(ctx context.Context, prefixID string, body PrefixDeleteParams, opts ...option.RequestOption) (res *[]PrefixDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env PrefixDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/addressing/prefixes/%s", params.AccountID, prefixID) + path := fmt.Sprintf("accounts/%s/addressing/prefixes/%s", body.AccountID, prefixID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -239,11 +239,6 @@ type PrefixListParams struct { type PrefixDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r PrefixDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type PrefixDeleteResponseEnvelope struct { diff --git a/addressing/prefix_test.go b/addressing/prefix_test.go index 7cee67a6a5..bf7ee843c8 100644 --- a/addressing/prefix_test.go +++ b/addressing/prefix_test.go @@ -88,7 +88,6 @@ func TestPrefixDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", addressing.PrefixDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/addressing/prefixdelegation.go b/addressing/prefixdelegation.go index cfed1b68bd..687dfabbb3 100644 --- a/addressing/prefixdelegation.go +++ b/addressing/prefixdelegation.go @@ -71,10 +71,10 @@ func (r *PrefixDelegationService) ListAutoPaging(ctx context.Context, prefixID s } // Delete an account delegation for a given IP prefix. -func (r *PrefixDelegationService) Delete(ctx context.Context, prefixID string, delegationID string, params PrefixDelegationDeleteParams, opts ...option.RequestOption) (res *PrefixDelegationDeleteResponse, err error) { +func (r *PrefixDelegationService) Delete(ctx context.Context, prefixID string, delegationID string, body PrefixDelegationDeleteParams, opts ...option.RequestOption) (res *PrefixDelegationDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env PrefixDelegationDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/addressing/prefixes/%s/delegations/%s", params.AccountID, prefixID, delegationID) + path := fmt.Sprintf("accounts/%s/addressing/prefixes/%s/delegations/%s", body.AccountID, prefixID, delegationID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -203,11 +203,6 @@ type PrefixDelegationListParams struct { type PrefixDelegationDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r PrefixDelegationDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type PrefixDelegationDeleteResponseEnvelope struct { diff --git a/addressing/prefixdelegation_test.go b/addressing/prefixdelegation_test.go index 670d919c95..c5a207a9e1 100644 --- a/addressing/prefixdelegation_test.go +++ b/addressing/prefixdelegation_test.go @@ -96,7 +96,6 @@ func TestPrefixDelegationDelete(t *testing.T) { "d933b1530bc56c9953cf8ce166da8004", addressing.PrefixDelegationDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/api.md b/api.md index 96fabe589c..fc990f01d0 100644 --- a/api.md +++ b/api.md @@ -48,7 +48,7 @@ Methods: - client.Accounts.Members.New(ctx context.Context, params accounts.MemberNewParams) (accounts.UserWithInviteCode, error) - client.Accounts.Members.Update(ctx context.Context, memberID string, params accounts.MemberUpdateParams) (shared.Member, error) - client.Accounts.Members.List(ctx context.Context, params accounts.MemberListParams) (pagination.V4PagePaginationArray[accounts.MemberListResponse], error) -- client.Accounts.Members.Delete(ctx context.Context, memberID string, params accounts.MemberDeleteParams) (accounts.MemberDeleteResponse, error) +- client.Accounts.Members.Delete(ctx context.Context, memberID string, body accounts.MemberDeleteParams) (accounts.MemberDeleteResponse, error) - client.Accounts.Members.Get(ctx context.Context, memberID string, query accounts.MemberGetParams) (shared.Member, error) ## Roles @@ -75,7 +75,7 @@ Methods: - client.OriginCACertificates.New(ctx context.Context, body origin_ca_certificates.OriginCACertificateNewParams) (origin_ca_certificates.OriginCACertificateNewResponseUnion, error) - client.OriginCACertificates.List(ctx context.Context, query origin_ca_certificates.OriginCACertificateListParams) (pagination.SinglePage[origin_ca_certificates.OriginCACertificate], error) -- client.OriginCACertificates.Delete(ctx context.Context, certificateID string, body origin_ca_certificates.OriginCACertificateDeleteParams) (origin_ca_certificates.OriginCACertificateDeleteResponse, error) +- client.OriginCACertificates.Delete(ctx context.Context, certificateID string) (origin_ca_certificates.OriginCACertificateDeleteResponse, error) - client.OriginCACertificates.Get(ctx context.Context, certificateID string) (origin_ca_certificates.OriginCACertificateGetResponseUnion, error) # IPs @@ -103,7 +103,7 @@ Methods: - client.Memberships.Update(ctx context.Context, membershipID string, body memberships.MembershipUpdateParams) (memberships.MembershipUpdateResponseUnion, error) - client.Memberships.List(ctx context.Context, query memberships.MembershipListParams) (pagination.V4PagePaginationArray[memberships.Membership], error) -- client.Memberships.Delete(ctx context.Context, membershipID string, body memberships.MembershipDeleteParams) (memberships.MembershipDeleteResponse, error) +- client.Memberships.Delete(ctx context.Context, membershipID string) (memberships.MembershipDeleteResponse, error) - client.Memberships.Get(ctx context.Context, membershipID string) (memberships.MembershipGetResponseUnion, error) # User @@ -171,7 +171,7 @@ Response Types: Methods: - client.User.Organizations.List(ctx context.Context, query user.OrganizationListParams) (pagination.V4PagePaginationArray[user.Organization], error) -- client.User.Organizations.Delete(ctx context.Context, organizationID string, body user.OrganizationDeleteParams) (user.OrganizationDeleteResponse, error) +- client.User.Organizations.Delete(ctx context.Context, organizationID string) (user.OrganizationDeleteResponse, error) - client.User.Organizations.Get(ctx context.Context, organizationID string) (user.OrganizationGetResponseUnion, error) ## Subscriptions @@ -196,7 +196,7 @@ Response Types: Methods: - client.User.Subscriptions.Update(ctx context.Context, identifier string, body user.SubscriptionUpdateParams) (user.SubscriptionUpdateResponseUnion, error) -- client.User.Subscriptions.Delete(ctx context.Context, identifier string, body user.SubscriptionDeleteParams) (user.SubscriptionDeleteResponse, error) +- client.User.Subscriptions.Delete(ctx context.Context, identifier string) (user.SubscriptionDeleteResponse, error) - client.User.Subscriptions.Edit(ctx context.Context, identifier string, body user.SubscriptionEditParams) (user.SubscriptionEditResponseUnion, error) - client.User.Subscriptions.Get(ctx context.Context) ([]user.Subscription, error) @@ -222,7 +222,7 @@ Methods: - client.User.Tokens.New(ctx context.Context, body user.TokenNewParams) (user.TokenNewResponse, error) - client.User.Tokens.Update(ctx context.Context, tokenID interface{}, body user.TokenUpdateParams) (user.TokenUpdateResponseUnion, error) - client.User.Tokens.List(ctx context.Context, query user.TokenListParams) (pagination.V4PagePaginationArray[user.TokenListResponse], error) -- client.User.Tokens.Delete(ctx context.Context, tokenID interface{}, body user.TokenDeleteParams) (user.TokenDeleteResponse, error) +- client.User.Tokens.Delete(ctx context.Context, tokenID interface{}) (user.TokenDeleteResponse, error) - client.User.Tokens.Get(ctx context.Context, tokenID interface{}) (user.TokenGetResponseUnion, error) - client.User.Tokens.Verify(ctx context.Context) (user.TokenVerifyResponse, error) @@ -968,7 +968,7 @@ Methods: - client.LoadBalancers.New(ctx context.Context, params load_balancers.LoadBalancerNewParams) (load_balancers.LoadBalancer, error) - client.LoadBalancers.Update(ctx context.Context, loadBalancerID string, params load_balancers.LoadBalancerUpdateParams) (load_balancers.LoadBalancer, error) - client.LoadBalancers.List(ctx context.Context, query load_balancers.LoadBalancerListParams) (pagination.SinglePage[load_balancers.LoadBalancer], error) -- client.LoadBalancers.Delete(ctx context.Context, loadBalancerID string, params load_balancers.LoadBalancerDeleteParams) (load_balancers.LoadBalancerDeleteResponse, error) +- client.LoadBalancers.Delete(ctx context.Context, loadBalancerID string, body load_balancers.LoadBalancerDeleteParams) (load_balancers.LoadBalancerDeleteResponse, error) - client.LoadBalancers.Edit(ctx context.Context, loadBalancerID string, params load_balancers.LoadBalancerEditParams) (load_balancers.LoadBalancer, error) - client.LoadBalancers.Get(ctx context.Context, loadBalancerID string, query load_balancers.LoadBalancerGetParams) (load_balancers.LoadBalancer, error) @@ -984,7 +984,7 @@ Methods: - client.LoadBalancers.Monitors.New(ctx context.Context, params load_balancers.MonitorNewParams) (load_balancers.Monitor, error) - client.LoadBalancers.Monitors.Update(ctx context.Context, monitorID string, params load_balancers.MonitorUpdateParams) (load_balancers.Monitor, error) - client.LoadBalancers.Monitors.List(ctx context.Context, query load_balancers.MonitorListParams) (pagination.SinglePage[load_balancers.Monitor], error) -- client.LoadBalancers.Monitors.Delete(ctx context.Context, monitorID string, params load_balancers.MonitorDeleteParams) (load_balancers.MonitorDeleteResponse, error) +- client.LoadBalancers.Monitors.Delete(ctx context.Context, monitorID string, body load_balancers.MonitorDeleteParams) (load_balancers.MonitorDeleteResponse, error) - client.LoadBalancers.Monitors.Edit(ctx context.Context, monitorID string, params load_balancers.MonitorEditParams) (load_balancers.Monitor, error) - client.LoadBalancers.Monitors.Get(ctx context.Context, monitorID string, query load_balancers.MonitorGetParams) (load_balancers.Monitor, error) @@ -1020,7 +1020,7 @@ Methods: - client.LoadBalancers.Pools.New(ctx context.Context, params load_balancers.PoolNewParams) (load_balancers.Pool, error) - client.LoadBalancers.Pools.Update(ctx context.Context, poolID string, params load_balancers.PoolUpdateParams) (load_balancers.Pool, error) - client.LoadBalancers.Pools.List(ctx context.Context, params load_balancers.PoolListParams) (pagination.SinglePage[load_balancers.Pool], error) -- client.LoadBalancers.Pools.Delete(ctx context.Context, poolID string, params load_balancers.PoolDeleteParams) (load_balancers.PoolDeleteResponse, error) +- client.LoadBalancers.Pools.Delete(ctx context.Context, poolID string, body load_balancers.PoolDeleteParams) (load_balancers.PoolDeleteResponse, error) - client.LoadBalancers.Pools.Edit(ctx context.Context, poolID string, params load_balancers.PoolEditParams) (load_balancers.Pool, error) - client.LoadBalancers.Pools.Get(ctx context.Context, poolID string, query load_balancers.PoolGetParams) (load_balancers.Pool, error) @@ -1116,7 +1116,7 @@ Response Types: Methods: -- client.Cache.SmartTieredCache.Delete(ctx context.Context, params cache.SmartTieredCacheDeleteParams) (cache.SmartTieredCacheDeleteResponseUnion, error) +- client.Cache.SmartTieredCache.Delete(ctx context.Context, body cache.SmartTieredCacheDeleteParams) (cache.SmartTieredCacheDeleteResponseUnion, error) - client.Cache.SmartTieredCache.Edit(ctx context.Context, params cache.SmartTieredCacheEditParams) (cache.SmartTieredCacheEditResponseUnion, error) - client.Cache.SmartTieredCache.Get(ctx context.Context, query cache.SmartTieredCacheGetParams) (cache.SmartTieredCacheGetResponseUnion, error) @@ -1131,7 +1131,7 @@ Response Types: Methods: -- client.Cache.Variants.Delete(ctx context.Context, params cache.VariantDeleteParams) (cache.CacheVariant, error) +- client.Cache.Variants.Delete(ctx context.Context, body cache.VariantDeleteParams) (cache.CacheVariant, error) - client.Cache.Variants.Edit(ctx context.Context, params cache.VariantEditParams) (cache.VariantEditResponse, error) - client.Cache.Variants.Get(ctx context.Context, query cache.VariantGetParams) (cache.VariantGetResponse, error) @@ -1177,7 +1177,7 @@ Response Types: Methods: - client.SSL.CertificatePacks.List(ctx context.Context, params ssl.CertificatePackListParams) (pagination.SinglePage[ssl.CertificatePackListResponse], error) -- client.SSL.CertificatePacks.Delete(ctx context.Context, certificatePackID string, params ssl.CertificatePackDeleteParams) (ssl.CertificatePackDeleteResponse, error) +- client.SSL.CertificatePacks.Delete(ctx context.Context, certificatePackID string, body ssl.CertificatePackDeleteParams) (ssl.CertificatePackDeleteResponse, error) - client.SSL.CertificatePacks.Edit(ctx context.Context, certificatePackID string, params ssl.CertificatePackEditParams) (ssl.CertificatePackEditResponse, error) - client.SSL.CertificatePacks.Get(ctx context.Context, certificatePackID string, query ssl.CertificatePackGetParams) (ssl.CertificatePackGetResponseUnion, error) @@ -1254,7 +1254,7 @@ Methods: - client.Subscriptions.New(ctx context.Context, identifier string, body subscriptions.SubscriptionNewParams) (subscriptions.SubscriptionNewResponseUnion, error) - client.Subscriptions.Update(ctx context.Context, accountIdentifier string, subscriptionIdentifier string, body subscriptions.SubscriptionUpdateParams) (subscriptions.SubscriptionUpdateResponseUnion, 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.Delete(ctx context.Context, accountIdentifier string, subscriptionIdentifier string) (subscriptions.SubscriptionDeleteResponse, error) - client.Subscriptions.Get(ctx context.Context, identifier string) (subscriptions.SubscriptionGetResponseUnion, error) # ACM @@ -1371,7 +1371,7 @@ Methods: - client.CustomCertificates.New(ctx context.Context, params custom_certificates.CustomCertificateNewParams) (custom_certificates.CustomCertificateNewResponseUnion, error) - client.CustomCertificates.List(ctx context.Context, params custom_certificates.CustomCertificateListParams) (pagination.V4PagePaginationArray[custom_certificates.CustomCertificate], error) -- client.CustomCertificates.Delete(ctx context.Context, customCertificateID string, params custom_certificates.CustomCertificateDeleteParams) (custom_certificates.CustomCertificateDeleteResponse, error) +- client.CustomCertificates.Delete(ctx context.Context, customCertificateID string, body custom_certificates.CustomCertificateDeleteParams) (custom_certificates.CustomCertificateDeleteResponse, error) - client.CustomCertificates.Edit(ctx context.Context, customCertificateID string, params custom_certificates.CustomCertificateEditParams) (custom_certificates.CustomCertificateEditResponseUnion, error) - client.CustomCertificates.Get(ctx context.Context, customCertificateID string, query custom_certificates.CustomCertificateGetParams) (custom_certificates.CustomCertificateGetResponseUnion, error) @@ -1404,7 +1404,7 @@ 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.Delete(ctx context.Context, customHostnameID string, params custom_hostnames.CustomHostnameDeleteParams) (custom_hostnames.CustomHostnameDeleteResponse, error) +- client.CustomHostnames.Delete(ctx context.Context, customHostnameID string, body custom_hostnames.CustomHostnameDeleteParams) (custom_hostnames.CustomHostnameDeleteResponse, 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) @@ -1419,7 +1419,7 @@ Response Types: Methods: - client.CustomHostnames.FallbackOrigin.Update(ctx context.Context, params custom_hostnames.FallbackOriginUpdateParams) (custom_hostnames.FallbackOriginUpdateResponseUnion, error) -- client.CustomHostnames.FallbackOrigin.Delete(ctx context.Context, params custom_hostnames.FallbackOriginDeleteParams) (custom_hostnames.FallbackOriginDeleteResponseUnion, error) +- client.CustomHostnames.FallbackOrigin.Delete(ctx context.Context, body custom_hostnames.FallbackOriginDeleteParams) (custom_hostnames.FallbackOriginDeleteResponseUnion, error) - client.CustomHostnames.FallbackOrigin.Get(ctx context.Context, query custom_hostnames.FallbackOriginGetParams) (custom_hostnames.FallbackOriginGetResponseUnion, error) # CustomNameservers @@ -1432,7 +1432,7 @@ Response Types: Methods: - client.CustomNameservers.New(ctx context.Context, params custom_nameservers.CustomNameserverNewParams) (custom_nameservers.CustomNameserver, error) -- client.CustomNameservers.Delete(ctx context.Context, customNSID string, params custom_nameservers.CustomNameserverDeleteParams) (custom_nameservers.CustomNameserverDeleteResponseUnion, error) +- client.CustomNameservers.Delete(ctx context.Context, customNSID string, body custom_nameservers.CustomNameserverDeleteParams) (custom_nameservers.CustomNameserverDeleteResponseUnion, error) - client.CustomNameservers.Availabilty(ctx context.Context, query custom_nameservers.CustomNameserverAvailabiltyParams) ([]string, error) - client.CustomNameservers.Get(ctx context.Context, query custom_nameservers.CustomNameserverGetParams) ([]custom_nameservers.CustomNameserver, error) - client.CustomNameservers.Verify(ctx context.Context, params custom_nameservers.CustomNameserverVerifyParams) ([]custom_nameservers.CustomNameserver, error) @@ -1509,7 +1509,7 @@ Methods: - client.DNS.Records.New(ctx context.Context, params dns.RecordNewParams) (dns.Record, error) - client.DNS.Records.Update(ctx context.Context, dnsRecordID string, params dns.RecordUpdateParams) (dns.Record, error) - client.DNS.Records.List(ctx context.Context, params dns.RecordListParams) (pagination.V4PagePaginationArray[dns.Record], error) -- client.DNS.Records.Delete(ctx context.Context, dnsRecordID string, params dns.RecordDeleteParams) (dns.RecordDeleteResponse, error) +- client.DNS.Records.Delete(ctx context.Context, dnsRecordID string, body dns.RecordDeleteParams) (dns.RecordDeleteResponse, error) - client.DNS.Records.Edit(ctx context.Context, dnsRecordID string, params dns.RecordEditParams) (dns.Record, error) - client.DNS.Records.Export(ctx context.Context, query dns.RecordExportParams) (string, error) - client.DNS.Records.Get(ctx context.Context, dnsRecordID string, query dns.RecordGetParams) (dns.Record, error) @@ -1559,7 +1559,7 @@ Methods: - client.DNS.Firewall.New(ctx context.Context, params dns.FirewallNewParams) (dns.Firewall, error) - client.DNS.Firewall.List(ctx context.Context, params dns.FirewallListParams) (pagination.V4PagePaginationArray[dns.Firewall], error) -- client.DNS.Firewall.Delete(ctx context.Context, dnsFirewallID string, params dns.FirewallDeleteParams) (dns.FirewallDeleteResponse, error) +- client.DNS.Firewall.Delete(ctx context.Context, dnsFirewallID string, body dns.FirewallDeleteParams) (dns.FirewallDeleteResponse, error) - client.DNS.Firewall.Edit(ctx context.Context, dnsFirewallID string, params dns.FirewallEditParams) (dns.Firewall, error) - client.DNS.Firewall.Get(ctx context.Context, dnsFirewallID string, query dns.FirewallGetParams) (dns.Firewall, error) @@ -1586,7 +1586,7 @@ Response Types: Methods: -- client.DNSSEC.Delete(ctx context.Context, params dnssec.DNSSECDeleteParams) (dnssec.DNSSECDeleteResponseUnion, error) +- client.DNSSEC.Delete(ctx context.Context, body dnssec.DNSSECDeleteParams) (dnssec.DNSSECDeleteResponseUnion, error) - client.DNSSEC.Edit(ctx context.Context, params dnssec.DNSSECEditParams) (dnssec.DNSSEC, error) - client.DNSSEC.Get(ctx context.Context, query dnssec.DNSSECGetParams) (dnssec.DNSSEC, error) @@ -1676,7 +1676,7 @@ Methods: - client.Filters.New(ctx context.Context, zoneIdentifier string, body filters.FilterNewParams) ([]filters.FirewallFilter, error) - client.Filters.Update(ctx context.Context, zoneIdentifier string, id string, body filters.FilterUpdateParams) (filters.FirewallFilter, error) - client.Filters.List(ctx context.Context, zoneIdentifier string, query filters.FilterListParams) (pagination.V4PagePaginationArray[filters.FirewallFilter], error) -- client.Filters.Delete(ctx context.Context, zoneIdentifier string, id string, body filters.FilterDeleteParams) (filters.FirewallFilter, error) +- client.Filters.Delete(ctx context.Context, zoneIdentifier string, id string) (filters.FirewallFilter, error) - client.Filters.Get(ctx context.Context, zoneIdentifier string, id string) (filters.FirewallFilter, error) # Firewall @@ -1697,7 +1697,7 @@ Methods: - client.Firewall.Lockdowns.New(ctx context.Context, zoneIdentifier string, body firewall.LockdownNewParams) (firewall.Lockdown, error) - client.Firewall.Lockdowns.Update(ctx context.Context, zoneIdentifier string, id string, body firewall.LockdownUpdateParams) (firewall.Lockdown, error) - client.Firewall.Lockdowns.List(ctx context.Context, zoneIdentifier string, query firewall.LockdownListParams) (pagination.V4PagePaginationArray[firewall.Lockdown], error) -- client.Firewall.Lockdowns.Delete(ctx context.Context, zoneIdentifier string, id string, body firewall.LockdownDeleteParams) (firewall.LockdownDeleteResponse, error) +- client.Firewall.Lockdowns.Delete(ctx context.Context, zoneIdentifier string, id string) (firewall.LockdownDeleteResponse, error) - client.Firewall.Lockdowns.Get(ctx context.Context, zoneIdentifier string, id string) (firewall.Lockdown, error) ## Rules @@ -1713,7 +1713,7 @@ Methods: - client.Firewall.Rules.New(ctx context.Context, zoneIdentifier string, body firewall.RuleNewParams) ([]firewall.FirewallRule, error) - client.Firewall.Rules.Update(ctx context.Context, zoneIdentifier string, id string, body firewall.RuleUpdateParams) (firewall.FirewallRule, error) - client.Firewall.Rules.List(ctx context.Context, zoneIdentifier string, query firewall.RuleListParams) (pagination.V4PagePaginationArray[firewall.FirewallRule], error) -- client.Firewall.Rules.Delete(ctx context.Context, zoneIdentifier string, id string, body firewall.RuleDeleteParams) (firewall.FirewallRule, error) +- client.Firewall.Rules.Delete(ctx context.Context, zoneIdentifier string, id string) (firewall.FirewallRule, error) - client.Firewall.Rules.Edit(ctx context.Context, zoneIdentifier string, id string, body firewall.RuleEditParams) ([]firewall.FirewallRule, error) - client.Firewall.Rules.Get(ctx context.Context, zoneIdentifier string, params firewall.RuleGetParams) (firewall.FirewallRule, error) @@ -1739,7 +1739,7 @@ Methods: - client.Firewall.AccessRules.New(ctx context.Context, params firewall.AccessRuleNewParams) (firewall.AccessRuleNewResponseUnion, error) - client.Firewall.AccessRules.List(ctx context.Context, params firewall.AccessRuleListParams) (pagination.V4PagePaginationArray[firewall.AccessRuleListResponse], error) -- client.Firewall.AccessRules.Delete(ctx context.Context, identifier interface{}, params firewall.AccessRuleDeleteParams) (firewall.AccessRuleDeleteResponse, error) +- client.Firewall.AccessRules.Delete(ctx context.Context, identifier interface{}, body firewall.AccessRuleDeleteParams) (firewall.AccessRuleDeleteResponse, error) - client.Firewall.AccessRules.Edit(ctx context.Context, identifier interface{}, params firewall.AccessRuleEditParams) (firewall.AccessRuleEditResponseUnion, error) - client.Firewall.AccessRules.Get(ctx context.Context, identifier interface{}, query firewall.AccessRuleGetParams) (firewall.AccessRuleGetResponseUnion, error) @@ -1758,7 +1758,7 @@ Methods: - client.Firewall.UARules.New(ctx context.Context, zoneIdentifier string, body firewall.UARuleNewParams) (firewall.UARuleNewResponseUnion, error) - client.Firewall.UARules.Update(ctx context.Context, zoneIdentifier string, id string, body firewall.UARuleUpdateParams) (firewall.UARuleUpdateResponseUnion, error) - client.Firewall.UARules.List(ctx context.Context, zoneIdentifier string, query firewall.UARuleListParams) (pagination.V4PagePaginationArray[firewall.UARuleListResponse], error) -- client.Firewall.UARules.Delete(ctx context.Context, zoneIdentifier string, id string, body firewall.UARuleDeleteParams) (firewall.UARuleDeleteResponse, error) +- client.Firewall.UARules.Delete(ctx context.Context, zoneIdentifier string, id string) (firewall.UARuleDeleteResponse, error) - client.Firewall.UARules.Get(ctx context.Context, zoneIdentifier string, id string) (firewall.UARuleGetResponseUnion, error) ## WAF @@ -1778,7 +1778,7 @@ Methods: - client.Firewall.WAF.Overrides.New(ctx context.Context, zoneIdentifier string, body firewall.WAFOverrideNewParams) (firewall.Override, error) - client.Firewall.WAF.Overrides.Update(ctx context.Context, zoneIdentifier string, id string, body firewall.WAFOverrideUpdateParams) (firewall.Override, error) - client.Firewall.WAF.Overrides.List(ctx context.Context, zoneIdentifier string, query firewall.WAFOverrideListParams) (pagination.V4PagePaginationArray[firewall.Override], error) -- client.Firewall.WAF.Overrides.Delete(ctx context.Context, zoneIdentifier string, id string, body firewall.WAFOverrideDeleteParams) (firewall.WAFOverrideDeleteResponse, error) +- client.Firewall.WAF.Overrides.Delete(ctx context.Context, zoneIdentifier string, id string) (firewall.WAFOverrideDeleteResponse, error) - client.Firewall.WAF.Overrides.Get(ctx context.Context, zoneIdentifier string, id string) (firewall.Override, error) ### Packages @@ -1845,7 +1845,7 @@ Methods: - client.Healthchecks.New(ctx context.Context, params healthchecks.HealthcheckNewParams) (healthchecks.Healthcheck, error) - client.Healthchecks.Update(ctx context.Context, healthcheckID string, params healthchecks.HealthcheckUpdateParams) (healthchecks.Healthcheck, error) - client.Healthchecks.List(ctx context.Context, params healthchecks.HealthcheckListParams) (pagination.SinglePage[healthchecks.Healthcheck], error) -- client.Healthchecks.Delete(ctx context.Context, healthcheckID string, params healthchecks.HealthcheckDeleteParams) (healthchecks.HealthcheckDeleteResponse, error) +- client.Healthchecks.Delete(ctx context.Context, healthcheckID string, body healthchecks.HealthcheckDeleteParams) (healthchecks.HealthcheckDeleteResponse, error) - client.Healthchecks.Edit(ctx context.Context, healthcheckID string, params healthchecks.HealthcheckEditParams) (healthchecks.Healthcheck, error) - client.Healthchecks.Get(ctx context.Context, healthcheckID string, query healthchecks.HealthcheckGetParams) (healthchecks.Healthcheck, error) @@ -1858,7 +1858,7 @@ Response Types: Methods: - client.Healthchecks.Previews.New(ctx context.Context, params healthchecks.PreviewNewParams) (healthchecks.Healthcheck, error) -- client.Healthchecks.Previews.Delete(ctx context.Context, healthcheckID string, params healthchecks.PreviewDeleteParams) (healthchecks.PreviewDeleteResponse, error) +- client.Healthchecks.Previews.Delete(ctx context.Context, healthcheckID string, body healthchecks.PreviewDeleteParams) (healthchecks.PreviewDeleteResponse, error) - client.Healthchecks.Previews.Get(ctx context.Context, healthcheckID string, query healthchecks.PreviewGetParams) (healthchecks.Healthcheck, error) # KeylessCertificates @@ -1877,7 +1877,7 @@ Methods: - client.KeylessCertificates.New(ctx context.Context, params keyless_certificates.KeylessCertificateNewParams) (keyless_certificates.KeylessCertificate, 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) (keyless_certificates.KeylessCertificateDeleteResponse, error) +- client.KeylessCertificates.Delete(ctx context.Context, keylessCertificateID string, body keyless_certificates.KeylessCertificateDeleteParams) (keyless_certificates.KeylessCertificateDeleteResponse, error) - client.KeylessCertificates.Edit(ctx context.Context, keylessCertificateID string, params keyless_certificates.KeylessCertificateEditParams) (keyless_certificates.KeylessCertificate, error) - client.KeylessCertificates.Get(ctx context.Context, keylessCertificateID string, query keyless_certificates.KeylessCertificateGetParams) (keyless_certificates.KeylessCertificate, error) @@ -1929,7 +1929,7 @@ Methods: - client.Logpush.Jobs.New(ctx context.Context, params logpush.JobNewParams) (logpush.LogpushJob, error) - client.Logpush.Jobs.Update(ctx context.Context, jobID int64, params logpush.JobUpdateParams) (logpush.LogpushJob, error) - client.Logpush.Jobs.List(ctx context.Context, query logpush.JobListParams) (pagination.SinglePage[logpush.LogpushJob], error) -- client.Logpush.Jobs.Delete(ctx context.Context, jobID int64, params logpush.JobDeleteParams) (logpush.JobDeleteResponse, error) +- client.Logpush.Jobs.Delete(ctx context.Context, jobID int64, body logpush.JobDeleteParams) (logpush.JobDeleteResponse, error) - client.Logpush.Jobs.Get(ctx context.Context, jobID int64, query logpush.JobGetParams) (logpush.LogpushJob, error) ## Ownership @@ -1990,7 +1990,7 @@ Response Types: Methods: - client.Logs.Control.Cmb.Config.New(ctx context.Context, params logs.ControlCmbConfigNewParams) (logs.CmbConfig, error) -- client.Logs.Control.Cmb.Config.Delete(ctx context.Context, params logs.ControlCmbConfigDeleteParams) (logs.ControlCmbConfigDeleteResponse, error) +- client.Logs.Control.Cmb.Config.Delete(ctx context.Context, body logs.ControlCmbConfigDeleteParams) (logs.ControlCmbConfigDeleteResponse, error) - client.Logs.Control.Cmb.Config.Get(ctx context.Context, query logs.ControlCmbConfigGetParams) (logs.CmbConfig, error) ## RayID @@ -2036,7 +2036,7 @@ Methods: - client.OriginTLSClientAuth.New(ctx context.Context, params origin_tls_client_auth.OriginTLSClientAuthNewParams) (origin_tls_client_auth.OriginTLSClientAuthNewResponseUnion, 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) (origin_tls_client_auth.OriginTLSClientAuthDeleteResponseUnion, error) +- client.OriginTLSClientAuth.Delete(ctx context.Context, certificateID string, body origin_tls_client_auth.OriginTLSClientAuthDeleteParams) (origin_tls_client_auth.OriginTLSClientAuthDeleteResponseUnion, error) - client.OriginTLSClientAuth.Get(ctx context.Context, certificateID string, query origin_tls_client_auth.OriginTLSClientAuthGetParams) (origin_tls_client_auth.OriginTLSClientAuthGetResponseUnion, error) ## Hostnames @@ -2062,7 +2062,7 @@ Methods: - client.OriginTLSClientAuth.Hostnames.Certificates.New(ctx context.Context, params origin_tls_client_auth.HostnameCertificateNewParams) (origin_tls_client_auth.HostnameCertificateNewResponse, 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.HostnameCertificateDeleteResponse, error) +- client.OriginTLSClientAuth.Hostnames.Certificates.Delete(ctx context.Context, certificateID string, body origin_tls_client_auth.HostnameCertificateDeleteParams) (origin_tls_client_auth.HostnameCertificateDeleteResponse, error) - client.OriginTLSClientAuth.Hostnames.Certificates.Get(ctx context.Context, certificateID string, query origin_tls_client_auth.HostnameCertificateGetParams) (origin_tls_client_auth.HostnameCertificateGetResponse, error) ## Settings @@ -2100,7 +2100,7 @@ Methods: - client.Pagerules.New(ctx context.Context, params pagerules.PageruleNewParams) (pagerules.PageruleNewResponseUnion, error) - client.Pagerules.Update(ctx context.Context, pageruleID string, params pagerules.PageruleUpdateParams) (pagerules.PageruleUpdateResponseUnion, error) - client.Pagerules.List(ctx context.Context, params pagerules.PageruleListParams) ([]pagerules.PageRule, error) -- client.Pagerules.Delete(ctx context.Context, pageruleID string, params pagerules.PageruleDeleteParams) (pagerules.PageruleDeleteResponse, error) +- client.Pagerules.Delete(ctx context.Context, pageruleID string, body pagerules.PageruleDeleteParams) (pagerules.PageruleDeleteResponse, error) - client.Pagerules.Edit(ctx context.Context, pageruleID string, params pagerules.PageruleEditParams) (pagerules.PageruleEditResponseUnion, error) - client.Pagerules.Get(ctx context.Context, pageruleID string, query pagerules.PageruleGetParams) (pagerules.PageruleGetResponseUnion, error) @@ -2130,7 +2130,7 @@ Methods: - client.RateLimits.New(ctx context.Context, zoneIdentifier string, body rate_limits.RateLimitNewParams) (rate_limits.RateLimitNewResponseUnion, error) - client.RateLimits.List(ctx context.Context, zoneIdentifier string, query rate_limits.RateLimitListParams) (pagination.V4PagePaginationArray[rate_limits.RateLimit], error) -- client.RateLimits.Delete(ctx context.Context, zoneIdentifier string, id string, body rate_limits.RateLimitDeleteParams) (rate_limits.RateLimitDeleteResponse, error) +- client.RateLimits.Delete(ctx context.Context, zoneIdentifier string, id string) (rate_limits.RateLimitDeleteResponse, error) - client.RateLimits.Edit(ctx context.Context, zoneIdentifier string, id string, body rate_limits.RateLimitEditParams) (rate_limits.RateLimitEditResponseUnion, error) - client.RateLimits.Get(ctx context.Context, zoneIdentifier string, id string) (rate_limits.RateLimitGetResponseUnion, error) @@ -2159,7 +2159,7 @@ Methods: - client.SecondaryDNS.Incoming.New(ctx context.Context, params secondary_dns.IncomingNewParams) (secondary_dns.IncomingNewResponse, error) - client.SecondaryDNS.Incoming.Update(ctx context.Context, params secondary_dns.IncomingUpdateParams) (secondary_dns.IncomingUpdateResponse, error) -- client.SecondaryDNS.Incoming.Delete(ctx context.Context, params secondary_dns.IncomingDeleteParams) (secondary_dns.IncomingDeleteResponse, error) +- client.SecondaryDNS.Incoming.Delete(ctx context.Context, body secondary_dns.IncomingDeleteParams) (secondary_dns.IncomingDeleteResponse, error) - client.SecondaryDNS.Incoming.Get(ctx context.Context, query secondary_dns.IncomingGetParams) (secondary_dns.IncomingGetResponse, error) ## Outgoing @@ -2177,7 +2177,7 @@ Methods: - client.SecondaryDNS.Outgoing.New(ctx context.Context, params secondary_dns.OutgoingNewParams) (secondary_dns.OutgoingNewResponse, error) - client.SecondaryDNS.Outgoing.Update(ctx context.Context, params secondary_dns.OutgoingUpdateParams) (secondary_dns.OutgoingUpdateResponse, error) -- client.SecondaryDNS.Outgoing.Delete(ctx context.Context, params secondary_dns.OutgoingDeleteParams) (secondary_dns.OutgoingDeleteResponse, error) +- client.SecondaryDNS.Outgoing.Delete(ctx context.Context, body secondary_dns.OutgoingDeleteParams) (secondary_dns.OutgoingDeleteResponse, error) - client.SecondaryDNS.Outgoing.Disable(ctx context.Context, params secondary_dns.OutgoingDisableParams) (secondary_dns.DisableTransfer, error) - client.SecondaryDNS.Outgoing.Enable(ctx context.Context, params secondary_dns.OutgoingEnableParams) (secondary_dns.EnableTransfer, error) - client.SecondaryDNS.Outgoing.ForceNotify(ctx context.Context, params secondary_dns.OutgoingForceNotifyParams) (string, error) @@ -2205,7 +2205,7 @@ Methods: - client.SecondaryDNS.ACLs.New(ctx context.Context, params secondary_dns.ACLNewParams) (secondary_dns.ACL, error) - client.SecondaryDNS.ACLs.Update(ctx context.Context, aclID string, params secondary_dns.ACLUpdateParams) (secondary_dns.ACL, error) - client.SecondaryDNS.ACLs.List(ctx context.Context, query secondary_dns.ACLListParams) (pagination.SinglePage[secondary_dns.ACL], error) -- client.SecondaryDNS.ACLs.Delete(ctx context.Context, aclID string, params secondary_dns.ACLDeleteParams) (secondary_dns.ACLDeleteResponse, error) +- client.SecondaryDNS.ACLs.Delete(ctx context.Context, aclID string, body secondary_dns.ACLDeleteParams) (secondary_dns.ACLDeleteResponse, error) - client.SecondaryDNS.ACLs.Get(ctx context.Context, aclID string, query secondary_dns.ACLGetParams) (secondary_dns.ACL, error) ## Peers @@ -2224,7 +2224,7 @@ Methods: - client.SecondaryDNS.Peers.New(ctx context.Context, params secondary_dns.PeerNewParams) (secondary_dns.Peer, error) - client.SecondaryDNS.Peers.Update(ctx context.Context, peerID string, params secondary_dns.PeerUpdateParams) (secondary_dns.Peer, error) - client.SecondaryDNS.Peers.List(ctx context.Context, query secondary_dns.PeerListParams) (pagination.SinglePage[secondary_dns.Peer], error) -- client.SecondaryDNS.Peers.Delete(ctx context.Context, peerID string, params secondary_dns.PeerDeleteParams) (secondary_dns.PeerDeleteResponse, error) +- client.SecondaryDNS.Peers.Delete(ctx context.Context, peerID string, body secondary_dns.PeerDeleteParams) (secondary_dns.PeerDeleteResponse, error) - client.SecondaryDNS.Peers.Get(ctx context.Context, peerID string, query secondary_dns.PeerGetParams) (secondary_dns.Peer, error) ## TSIGs @@ -2243,7 +2243,7 @@ Methods: - client.SecondaryDNS.TSIGs.New(ctx context.Context, params secondary_dns.TSIGNewParams) (secondary_dns.TSIG, error) - client.SecondaryDNS.TSIGs.Update(ctx context.Context, tsigID string, params secondary_dns.TSIGUpdateParams) (secondary_dns.TSIG, error) - client.SecondaryDNS.TSIGs.List(ctx context.Context, query secondary_dns.TSIGListParams) (pagination.SinglePage[secondary_dns.TSIG], error) -- client.SecondaryDNS.TSIGs.Delete(ctx context.Context, tsigID string, params secondary_dns.TSIGDeleteParams) (secondary_dns.TSIGDeleteResponse, error) +- client.SecondaryDNS.TSIGs.Delete(ctx context.Context, tsigID string, body secondary_dns.TSIGDeleteParams) (secondary_dns.TSIGDeleteResponse, error) - client.SecondaryDNS.TSIGs.Get(ctx context.Context, tsigID string, query secondary_dns.TSIGGetParams) (secondary_dns.TSIG, error) # WaitingRooms @@ -2266,7 +2266,7 @@ Methods: - client.WaitingRooms.New(ctx context.Context, params waiting_rooms.WaitingRoomNewParams) (waiting_rooms.WaitingRoom, error) - client.WaitingRooms.Update(ctx context.Context, waitingRoomID string, params waiting_rooms.WaitingRoomUpdateParams) (waiting_rooms.WaitingRoom, error) - client.WaitingRooms.List(ctx context.Context, params waiting_rooms.WaitingRoomListParams) (pagination.SinglePage[waiting_rooms.WaitingRoom], error) -- client.WaitingRooms.Delete(ctx context.Context, waitingRoomID string, params waiting_rooms.WaitingRoomDeleteParams) (waiting_rooms.WaitingRoomDeleteResponse, error) +- client.WaitingRooms.Delete(ctx context.Context, waitingRoomID string, body waiting_rooms.WaitingRoomDeleteParams) (waiting_rooms.WaitingRoomDeleteResponse, error) - client.WaitingRooms.Edit(ctx context.Context, waitingRoomID string, params waiting_rooms.WaitingRoomEditParams) (waiting_rooms.WaitingRoom, error) - client.WaitingRooms.Get(ctx context.Context, waitingRoomID string, query waiting_rooms.WaitingRoomGetParams) (waiting_rooms.WaitingRoom, error) @@ -2292,7 +2292,7 @@ Methods: - client.WaitingRooms.Events.New(ctx context.Context, waitingRoomID string, params waiting_rooms.EventNewParams) (waiting_rooms.Event, error) - client.WaitingRooms.Events.Update(ctx context.Context, waitingRoomID string, eventID string, params waiting_rooms.EventUpdateParams) (waiting_rooms.Event, error) - client.WaitingRooms.Events.List(ctx context.Context, waitingRoomID string, params waiting_rooms.EventListParams) (pagination.SinglePage[waiting_rooms.Event], error) -- client.WaitingRooms.Events.Delete(ctx context.Context, waitingRoomID string, eventID string, params waiting_rooms.EventDeleteParams) (waiting_rooms.EventDeleteResponse, error) +- client.WaitingRooms.Events.Delete(ctx context.Context, waitingRoomID string, eventID string, body waiting_rooms.EventDeleteParams) (waiting_rooms.EventDeleteResponse, error) - client.WaitingRooms.Events.Edit(ctx context.Context, waitingRoomID string, eventID string, params waiting_rooms.EventEditParams) (waiting_rooms.Event, error) - client.WaitingRooms.Events.Get(ctx context.Context, waitingRoomID string, eventID string, query waiting_rooms.EventGetParams) (waiting_rooms.Event, error) @@ -2321,7 +2321,7 @@ Methods: - client.WaitingRooms.Rules.New(ctx context.Context, waitingRoomID string, params waiting_rooms.RuleNewParams) ([]waiting_rooms.WaitingRoomRule, error) - client.WaitingRooms.Rules.Update(ctx context.Context, waitingRoomID string, params waiting_rooms.RuleUpdateParams) ([]waiting_rooms.WaitingRoomRule, error) - client.WaitingRooms.Rules.List(ctx context.Context, waitingRoomID string, query waiting_rooms.RuleListParams) (pagination.SinglePage[waiting_rooms.WaitingRoomRule], error) -- client.WaitingRooms.Rules.Delete(ctx context.Context, waitingRoomID string, ruleID string, params waiting_rooms.RuleDeleteParams) ([]waiting_rooms.WaitingRoomRule, error) +- client.WaitingRooms.Rules.Delete(ctx context.Context, waitingRoomID string, ruleID string, body waiting_rooms.RuleDeleteParams) ([]waiting_rooms.WaitingRoomRule, error) - client.WaitingRooms.Rules.Edit(ctx context.Context, waitingRoomID string, ruleID string, params waiting_rooms.RuleEditParams) ([]waiting_rooms.WaitingRoomRule, error) ## Statuses @@ -2361,7 +2361,7 @@ Methods: - client.Web3.Hostnames.New(ctx context.Context, zoneIdentifier string, body web3.HostnameNewParams) (web3.Hostname, error) - client.Web3.Hostnames.List(ctx context.Context, zoneIdentifier string) (pagination.SinglePage[web3.Hostname], error) -- client.Web3.Hostnames.Delete(ctx context.Context, zoneIdentifier string, identifier string, body web3.HostnameDeleteParams) (web3.HostnameDeleteResponse, error) +- client.Web3.Hostnames.Delete(ctx context.Context, zoneIdentifier string, identifier string) (web3.HostnameDeleteResponse, error) - client.Web3.Hostnames.Edit(ctx context.Context, zoneIdentifier string, identifier string, body web3.HostnameEditParams) (web3.Hostname, error) - client.Web3.Hostnames.Get(ctx context.Context, zoneIdentifier string, identifier string) (web3.Hostname, error) @@ -2393,7 +2393,7 @@ Methods: - client.Web3.Hostnames.IPFSUniversalPaths.ContentLists.Entries.New(ctx context.Context, zoneIdentifier string, identifier string, body web3.HostnameIPFSUniversalPathContentListEntryNewParams) (web3.HostnameIPFSUniversalPathContentListEntryNewResponse, error) - client.Web3.Hostnames.IPFSUniversalPaths.ContentLists.Entries.Update(ctx context.Context, zoneIdentifier string, identifier string, contentListEntryIdentifier string, body web3.HostnameIPFSUniversalPathContentListEntryUpdateParams) (web3.HostnameIPFSUniversalPathContentListEntryUpdateResponse, error) - client.Web3.Hostnames.IPFSUniversalPaths.ContentLists.Entries.List(ctx context.Context, zoneIdentifier string, identifier string) (web3.HostnameIPFSUniversalPathContentListEntryListResponse, error) -- client.Web3.Hostnames.IPFSUniversalPaths.ContentLists.Entries.Delete(ctx context.Context, zoneIdentifier string, identifier string, contentListEntryIdentifier string, body web3.HostnameIPFSUniversalPathContentListEntryDeleteParams) (web3.HostnameIPFSUniversalPathContentListEntryDeleteResponse, error) +- client.Web3.Hostnames.IPFSUniversalPaths.ContentLists.Entries.Delete(ctx context.Context, zoneIdentifier string, identifier string, contentListEntryIdentifier string) (web3.HostnameIPFSUniversalPathContentListEntryDeleteResponse, error) - client.Web3.Hostnames.IPFSUniversalPaths.ContentLists.Entries.Get(ctx context.Context, zoneIdentifier string, identifier string, contentListEntryIdentifier string) (web3.HostnameIPFSUniversalPathContentListEntryGetResponse, error) # Workers @@ -2486,7 +2486,7 @@ Response Types: Methods: - client.Workers.Scripts.Tail.New(ctx context.Context, scriptName string, params workers.ScriptTailNewParams) (workers.ScriptTailNewResponse, error) -- client.Workers.Scripts.Tail.Delete(ctx context.Context, scriptName string, id string, params workers.ScriptTailDeleteParams) (workers.ScriptTailDeleteResponse, error) +- client.Workers.Scripts.Tail.Delete(ctx context.Context, scriptName string, id string, body workers.ScriptTailDeleteParams) (workers.ScriptTailDeleteResponse, error) - client.Workers.Scripts.Tail.Get(ctx context.Context, scriptName string, query workers.ScriptTailGetParams) (workers.ScriptTailGetResponse, error) ### Content @@ -2556,7 +2556,7 @@ Methods: - client.Workers.Domains.Update(ctx context.Context, params workers.DomainUpdateParams) (workers.Domain, error) - client.Workers.Domains.List(ctx context.Context, params workers.DomainListParams) (pagination.SinglePage[workers.Domain], error) -- client.Workers.Domains.Delete(ctx context.Context, domainID string, params workers.DomainDeleteParams) error +- client.Workers.Domains.Delete(ctx context.Context, domainID string, body workers.DomainDeleteParams) error - client.Workers.Domains.Get(ctx context.Context, domainID string, query workers.DomainGetParams) (workers.Domain, error) ## Subdomains @@ -2586,7 +2586,7 @@ Methods: - client.KV.Namespaces.New(ctx context.Context, params kv.NamespaceNewParams) (kv.Namespace, error) - client.KV.Namespaces.Update(ctx context.Context, namespaceID string, params kv.NamespaceUpdateParams) (kv.NamespaceUpdateResponseUnion, error) - client.KV.Namespaces.List(ctx context.Context, params kv.NamespaceListParams) (pagination.V4PagePaginationArray[kv.Namespace], error) -- client.KV.Namespaces.Delete(ctx context.Context, namespaceID string, params kv.NamespaceDeleteParams) (kv.NamespaceDeleteResponseUnion, error) +- client.KV.Namespaces.Delete(ctx context.Context, namespaceID string, body kv.NamespaceDeleteParams) (kv.NamespaceDeleteResponseUnion, error) ### Bulk @@ -2598,7 +2598,7 @@ Response Types: Methods: - client.KV.Namespaces.Bulk.Update(ctx context.Context, namespaceID string, params kv.NamespaceBulkUpdateParams) (kv.NamespaceBulkUpdateResponseUnion, error) -- client.KV.Namespaces.Bulk.Delete(ctx context.Context, namespaceID string, params kv.NamespaceBulkDeleteParams) (kv.NamespaceBulkDeleteResponseUnion, error) +- client.KV.Namespaces.Bulk.Delete(ctx context.Context, namespaceID string, body kv.NamespaceBulkDeleteParams) (kv.NamespaceBulkDeleteResponseUnion, error) ### Keys @@ -2630,7 +2630,7 @@ Response Types: Methods: - client.KV.Namespaces.Values.Update(ctx context.Context, namespaceID string, keyName string, params kv.NamespaceValueUpdateParams) (kv.NamespaceValueUpdateResponseUnion, error) -- client.KV.Namespaces.Values.Delete(ctx context.Context, namespaceID string, keyName string, params kv.NamespaceValueDeleteParams) (kv.NamespaceValueDeleteResponseUnion, error) +- client.KV.Namespaces.Values.Delete(ctx context.Context, namespaceID string, keyName string, body kv.NamespaceValueDeleteParams) (kv.NamespaceValueDeleteResponseUnion, error) - client.KV.Namespaces.Values.Get(ctx context.Context, namespaceID string, keyName string, query kv.NamespaceValueGetParams) (string, error) # DurableObjects @@ -2669,7 +2669,7 @@ Methods: - client.Queues.New(ctx context.Context, params queues.QueueNewParams) (queues.QueueCreated, error) - client.Queues.Update(ctx context.Context, queueID string, params queues.QueueUpdateParams) (queues.QueueUpdated, error) - client.Queues.List(ctx context.Context, query queues.QueueListParams) (pagination.SinglePage[queues.Queue], error) -- client.Queues.Delete(ctx context.Context, queueID string, params queues.QueueDeleteParams) (queues.QueueDeleteResponseUnion, error) +- client.Queues.Delete(ctx context.Context, queueID string, body queues.QueueDeleteParams) (queues.QueueDeleteResponseUnion, error) - client.Queues.Get(ctx context.Context, queueID string, query queues.QueueGetParams) (queues.Queue, error) ## Consumers @@ -2685,7 +2685,7 @@ Methods: - client.Queues.Consumers.New(ctx context.Context, queueID string, params queues.ConsumerNewParams) (queues.ConsumerNewResponse, error) - client.Queues.Consumers.Update(ctx context.Context, queueID string, consumerID string, params queues.ConsumerUpdateParams) (queues.ConsumerUpdateResponse, error) -- client.Queues.Consumers.Delete(ctx context.Context, queueID string, consumerID string, params queues.ConsumerDeleteParams) (queues.ConsumerDeleteResponseUnion, error) +- client.Queues.Consumers.Delete(ctx context.Context, queueID string, consumerID string, body queues.ConsumerDeleteParams) (queues.ConsumerDeleteResponseUnion, error) - client.Queues.Consumers.Get(ctx context.Context, queueID string, query queues.ConsumerGetParams) ([]queues.Consumer, error) ## Messages @@ -2962,7 +2962,7 @@ Methods: - client.Spectrum.Apps.New(ctx context.Context, zone string, body spectrum.AppNewParams) (spectrum.AppNewResponse, error) - client.Spectrum.Apps.Update(ctx context.Context, zone string, appID string, body spectrum.AppUpdateParams) (spectrum.AppUpdateResponse, error) - client.Spectrum.Apps.List(ctx context.Context, zone string, query spectrum.AppListParams) (pagination.V4PagePaginationArray[spectrum.AppListResponse], error) -- client.Spectrum.Apps.Delete(ctx context.Context, zone string, appID string, body spectrum.AppDeleteParams) (spectrum.AppDeleteResponse, error) +- client.Spectrum.Apps.Delete(ctx context.Context, zone string, appID string) (spectrum.AppDeleteResponse, error) - client.Spectrum.Apps.Get(ctx context.Context, zone string, appID string) (spectrum.AppGetResponseUnion, error) # Addressing @@ -2990,7 +2990,7 @@ Methods: - client.Addressing.AddressMaps.New(ctx context.Context, params addressing.AddressMapNewParams) (addressing.AddressMapNewResponse, error) - client.Addressing.AddressMaps.List(ctx context.Context, query addressing.AddressMapListParams) (pagination.SinglePage[addressing.AddressMap], error) -- client.Addressing.AddressMaps.Delete(ctx context.Context, addressMapID string, params addressing.AddressMapDeleteParams) ([]addressing.AddressMapDeleteResponse, error) +- client.Addressing.AddressMaps.Delete(ctx context.Context, addressMapID string, body addressing.AddressMapDeleteParams) ([]addressing.AddressMapDeleteResponse, error) - client.Addressing.AddressMaps.Edit(ctx context.Context, addressMapID string, params addressing.AddressMapEditParams) (addressing.AddressMap, error) - client.Addressing.AddressMaps.Get(ctx context.Context, addressMapID string, query addressing.AddressMapGetParams) (addressing.AddressMapGetResponse, error) @@ -3004,7 +3004,7 @@ Response Types: Methods: - client.Addressing.AddressMaps.Accounts.Update(ctx context.Context, addressMapID string, params addressing.AddressMapAccountUpdateParams) ([]addressing.AddressMapAccountUpdateResponse, error) -- client.Addressing.AddressMaps.Accounts.Delete(ctx context.Context, addressMapID string, params addressing.AddressMapAccountDeleteParams) ([]addressing.AddressMapAccountDeleteResponse, error) +- client.Addressing.AddressMaps.Accounts.Delete(ctx context.Context, addressMapID string, body addressing.AddressMapAccountDeleteParams) ([]addressing.AddressMapAccountDeleteResponse, error) ### IPs @@ -3016,7 +3016,7 @@ Response Types: Methods: - client.Addressing.AddressMaps.IPs.Update(ctx context.Context, addressMapID string, ipAddress string, params addressing.AddressMapIPUpdateParams) ([]addressing.AddressMapIPUpdateResponse, error) -- client.Addressing.AddressMaps.IPs.Delete(ctx context.Context, addressMapID string, ipAddress string, params addressing.AddressMapIPDeleteParams) ([]addressing.AddressMapIPDeleteResponse, error) +- client.Addressing.AddressMaps.IPs.Delete(ctx context.Context, addressMapID string, ipAddress string, body addressing.AddressMapIPDeleteParams) ([]addressing.AddressMapIPDeleteResponse, error) ### Zones @@ -3028,7 +3028,7 @@ Response Types: Methods: - client.Addressing.AddressMaps.Zones.Update(ctx context.Context, addressMapID string, params addressing.AddressMapZoneUpdateParams) ([]addressing.AddressMapZoneUpdateResponse, error) -- client.Addressing.AddressMaps.Zones.Delete(ctx context.Context, addressMapID string, params addressing.AddressMapZoneDeleteParams) ([]addressing.AddressMapZoneDeleteResponse, error) +- client.Addressing.AddressMaps.Zones.Delete(ctx context.Context, addressMapID string, body addressing.AddressMapZoneDeleteParams) ([]addressing.AddressMapZoneDeleteResponse, error) ## LOADocuments @@ -3061,7 +3061,7 @@ Methods: - client.Addressing.Prefixes.New(ctx context.Context, params addressing.PrefixNewParams) (addressing.Prefix, error) - client.Addressing.Prefixes.List(ctx context.Context, query addressing.PrefixListParams) (pagination.SinglePage[addressing.Prefix], error) -- client.Addressing.Prefixes.Delete(ctx context.Context, prefixID string, params addressing.PrefixDeleteParams) ([]addressing.PrefixDeleteResponse, error) +- client.Addressing.Prefixes.Delete(ctx context.Context, prefixID string, body addressing.PrefixDeleteParams) ([]addressing.PrefixDeleteResponse, error) - client.Addressing.Prefixes.Edit(ctx context.Context, prefixID string, params addressing.PrefixEditParams) (addressing.Prefix, error) - client.Addressing.Prefixes.Get(ctx context.Context, prefixID string, query addressing.PrefixGetParams) (addressing.Prefix, error) @@ -3116,7 +3116,7 @@ Methods: - client.Addressing.Prefixes.Delegations.New(ctx context.Context, prefixID string, params addressing.PrefixDelegationNewParams) (addressing.Delegations, error) - client.Addressing.Prefixes.Delegations.List(ctx context.Context, prefixID string, query addressing.PrefixDelegationListParams) (pagination.SinglePage[addressing.Delegations], error) -- client.Addressing.Prefixes.Delegations.Delete(ctx context.Context, prefixID string, delegationID string, params addressing.PrefixDelegationDeleteParams) (addressing.PrefixDelegationDeleteResponse, error) +- client.Addressing.Prefixes.Delegations.Delete(ctx context.Context, prefixID string, delegationID string, body addressing.PrefixDelegationDeleteParams) (addressing.PrefixDelegationDeleteResponse, error) # AuditLogs @@ -3177,7 +3177,7 @@ Methods: - client.Images.V1.New(ctx context.Context, params images.V1NewParams) (images.Image, error) - client.Images.V1.List(ctx context.Context, params images.V1ListParams) (pagination.V4PagePagination[images.V1ListResponse], error) -- client.Images.V1.Delete(ctx context.Context, imageID string, params images.V1DeleteParams) (images.V1DeleteResponseUnion, error) +- client.Images.V1.Delete(ctx context.Context, imageID string, body images.V1DeleteParams) (images.V1DeleteResponseUnion, error) - client.Images.V1.Edit(ctx context.Context, imageID string, params images.V1EditParams) (images.Image, error) - client.Images.V1.Get(ctx context.Context, imageID string, query images.V1GetParams) (images.Image, error) @@ -3220,7 +3220,7 @@ Methods: - client.Images.V1.Variants.New(ctx context.Context, params images.V1VariantNewParams) (images.V1VariantNewResponse, error) - client.Images.V1.Variants.List(ctx context.Context, query images.V1VariantListParams) (images.Variant, error) -- client.Images.V1.Variants.Delete(ctx context.Context, variantID string, params images.V1VariantDeleteParams) (images.V1VariantDeleteResponseUnion, error) +- client.Images.V1.Variants.Delete(ctx context.Context, variantID string, body images.V1VariantDeleteParams) (images.V1VariantDeleteResponseUnion, error) - client.Images.V1.Variants.Edit(ctx context.Context, variantID string, params images.V1VariantEditParams) (images.V1VariantEditResponse, error) - client.Images.V1.Variants.Get(ctx context.Context, variantID string, query images.V1VariantGetParams) (images.V1VariantGetResponse, error) @@ -3402,11 +3402,8 @@ Methods: Params Types: -- intel.IssueClassParam - intel.IssueType -- intel.ProductParam - intel.SeverityQueryParam -- intel.SubjectParam Response Types: @@ -3467,7 +3464,7 @@ Methods: - client.MagicTransit.GRETunnels.New(ctx context.Context, params magic_transit.GRETunnelNewParams) (magic_transit.GRETunnelNewResponse, error) - client.MagicTransit.GRETunnels.Update(ctx context.Context, tunnelIdentifier string, params magic_transit.GRETunnelUpdateParams) (magic_transit.GRETunnelUpdateResponse, error) - client.MagicTransit.GRETunnels.List(ctx context.Context, query magic_transit.GRETunnelListParams) (magic_transit.GRETunnelListResponse, error) -- client.MagicTransit.GRETunnels.Delete(ctx context.Context, tunnelIdentifier string, params magic_transit.GRETunnelDeleteParams) (magic_transit.GRETunnelDeleteResponse, error) +- client.MagicTransit.GRETunnels.Delete(ctx context.Context, tunnelIdentifier string, body magic_transit.GRETunnelDeleteParams) (magic_transit.GRETunnelDeleteResponse, error) - client.MagicTransit.GRETunnels.Get(ctx context.Context, tunnelIdentifier string, query magic_transit.GRETunnelGetParams) (magic_transit.GRETunnelGetResponse, error) ## IPSECTunnels @@ -3487,7 +3484,7 @@ Methods: - client.MagicTransit.IPSECTunnels.New(ctx context.Context, params magic_transit.IPSECTunnelNewParams) (magic_transit.IPSECTunnelNewResponse, error) - client.MagicTransit.IPSECTunnels.Update(ctx context.Context, tunnelIdentifier string, params magic_transit.IPSECTunnelUpdateParams) (magic_transit.IPSECTunnelUpdateResponse, error) - client.MagicTransit.IPSECTunnels.List(ctx context.Context, query magic_transit.IPSECTunnelListParams) (magic_transit.IPSECTunnelListResponse, error) -- client.MagicTransit.IPSECTunnels.Delete(ctx context.Context, tunnelIdentifier string, params magic_transit.IPSECTunnelDeleteParams) (magic_transit.IPSECTunnelDeleteResponse, error) +- client.MagicTransit.IPSECTunnels.Delete(ctx context.Context, tunnelIdentifier string, body magic_transit.IPSECTunnelDeleteParams) (magic_transit.IPSECTunnelDeleteResponse, error) - client.MagicTransit.IPSECTunnels.Get(ctx context.Context, tunnelIdentifier string, query magic_transit.IPSECTunnelGetParams) (magic_transit.IPSECTunnelGetResponse, error) - client.MagicTransit.IPSECTunnels.PSKGenerate(ctx context.Context, tunnelIdentifier string, params magic_transit.IPSECTunnelPSKGenerateParams) (magic_transit.IPSECTunnelPSKGenerateResponse, error) @@ -3495,14 +3492,10 @@ Methods: Params Types: -- magic_transit.ColoNameParam -- magic_transit.ColoRegionParam - magic_transit.ScopeParam Response Types: -- magic_transit.ColoName -- magic_transit.ColoRegion - magic_transit.Scope - magic_transit.RouteNewResponse - magic_transit.RouteUpdateResponse @@ -3516,8 +3509,8 @@ Methods: - client.MagicTransit.Routes.New(ctx context.Context, params magic_transit.RouteNewParams) (magic_transit.RouteNewResponse, error) - client.MagicTransit.Routes.Update(ctx context.Context, routeIdentifier string, params magic_transit.RouteUpdateParams) (magic_transit.RouteUpdateResponse, error) - client.MagicTransit.Routes.List(ctx context.Context, query magic_transit.RouteListParams) (magic_transit.RouteListResponse, error) -- client.MagicTransit.Routes.Delete(ctx context.Context, routeIdentifier string, params magic_transit.RouteDeleteParams) (magic_transit.RouteDeleteResponse, error) -- client.MagicTransit.Routes.Empty(ctx context.Context, params magic_transit.RouteEmptyParams) (magic_transit.RouteEmptyResponse, error) +- client.MagicTransit.Routes.Delete(ctx context.Context, routeIdentifier string, body magic_transit.RouteDeleteParams) (magic_transit.RouteDeleteResponse, error) +- client.MagicTransit.Routes.Empty(ctx context.Context, body magic_transit.RouteEmptyParams) (magic_transit.RouteEmptyResponse, error) - client.MagicTransit.Routes.Get(ctx context.Context, routeIdentifier string, query magic_transit.RouteGetParams) (magic_transit.RouteGetResponse, error) ## Sites @@ -3536,7 +3529,7 @@ Methods: - client.MagicTransit.Sites.New(ctx context.Context, params magic_transit.SiteNewParams) (magic_transit.Site, error) - client.MagicTransit.Sites.Update(ctx context.Context, siteID string, params magic_transit.SiteUpdateParams) (magic_transit.Site, error) - client.MagicTransit.Sites.List(ctx context.Context, params magic_transit.SiteListParams) (pagination.SinglePage[magic_transit.Site], error) -- client.MagicTransit.Sites.Delete(ctx context.Context, siteID string, params magic_transit.SiteDeleteParams) (magic_transit.Site, error) +- client.MagicTransit.Sites.Delete(ctx context.Context, siteID string, body magic_transit.SiteDeleteParams) (magic_transit.Site, error) - client.MagicTransit.Sites.Get(ctx context.Context, siteID string, query magic_transit.SiteGetParams) (magic_transit.Site, error) ### ACLs @@ -3559,7 +3552,7 @@ Methods: - client.MagicTransit.Sites.ACLs.New(ctx context.Context, siteID string, params magic_transit.SiteACLNewParams) (magic_transit.ACL, error) - client.MagicTransit.Sites.ACLs.Update(ctx context.Context, siteID string, aclIdentifier string, params magic_transit.SiteACLUpdateParams) (magic_transit.ACL, error) - client.MagicTransit.Sites.ACLs.List(ctx context.Context, siteID string, query magic_transit.SiteACLListParams) (pagination.SinglePage[magic_transit.ACL], error) -- client.MagicTransit.Sites.ACLs.Delete(ctx context.Context, siteID string, aclIdentifier string, params magic_transit.SiteACLDeleteParams) (magic_transit.ACL, error) +- client.MagicTransit.Sites.ACLs.Delete(ctx context.Context, siteID string, aclIdentifier string, body magic_transit.SiteACLDeleteParams) (magic_transit.ACL, error) - client.MagicTransit.Sites.ACLs.Get(ctx context.Context, siteID string, aclIdentifier string, query magic_transit.SiteACLGetParams) (magic_transit.ACL, error) ### LANs @@ -3586,7 +3579,7 @@ Methods: - client.MagicTransit.Sites.LANs.New(ctx context.Context, siteID string, params magic_transit.SiteLANNewParams) ([]magic_transit.LAN, error) - client.MagicTransit.Sites.LANs.Update(ctx context.Context, siteID string, lanID string, params magic_transit.SiteLANUpdateParams) (magic_transit.LAN, error) - client.MagicTransit.Sites.LANs.List(ctx context.Context, siteID string, query magic_transit.SiteLANListParams) (pagination.SinglePage[magic_transit.LAN], error) -- client.MagicTransit.Sites.LANs.Delete(ctx context.Context, siteID string, lanID string, params magic_transit.SiteLANDeleteParams) (magic_transit.LAN, error) +- client.MagicTransit.Sites.LANs.Delete(ctx context.Context, siteID string, lanID string, body magic_transit.SiteLANDeleteParams) (magic_transit.LAN, error) - client.MagicTransit.Sites.LANs.Get(ctx context.Context, siteID string, lanID string, query magic_transit.SiteLANGetParams) (magic_transit.LAN, error) ### WANs @@ -3605,7 +3598,7 @@ Methods: - client.MagicTransit.Sites.WANs.New(ctx context.Context, siteID string, params magic_transit.SiteWANNewParams) ([]magic_transit.WAN, error) - client.MagicTransit.Sites.WANs.Update(ctx context.Context, siteID string, wanID string, params magic_transit.SiteWANUpdateParams) (magic_transit.WAN, error) - client.MagicTransit.Sites.WANs.List(ctx context.Context, siteID string, query magic_transit.SiteWANListParams) (pagination.SinglePage[magic_transit.WAN], error) -- client.MagicTransit.Sites.WANs.Delete(ctx context.Context, siteID string, wanID string, params magic_transit.SiteWANDeleteParams) (magic_transit.WAN, error) +- client.MagicTransit.Sites.WANs.Delete(ctx context.Context, siteID string, wanID string, body magic_transit.SiteWANDeleteParams) (magic_transit.WAN, error) - client.MagicTransit.Sites.WANs.Get(ctx context.Context, siteID string, wanID string, query magic_transit.SiteWANGetParams) (magic_transit.WAN, error) # MagicNetworkMonitoring @@ -3620,7 +3613,7 @@ Methods: - client.MagicNetworkMonitoring.Configs.New(ctx context.Context, params magic_network_monitoring.ConfigNewParams) (magic_network_monitoring.Configuration, error) - client.MagicNetworkMonitoring.Configs.Update(ctx context.Context, params magic_network_monitoring.ConfigUpdateParams) (magic_network_monitoring.Configuration, error) -- client.MagicNetworkMonitoring.Configs.Delete(ctx context.Context, params magic_network_monitoring.ConfigDeleteParams) (magic_network_monitoring.Configuration, error) +- client.MagicNetworkMonitoring.Configs.Delete(ctx context.Context, body magic_network_monitoring.ConfigDeleteParams) (magic_network_monitoring.Configuration, error) - client.MagicNetworkMonitoring.Configs.Edit(ctx context.Context, params magic_network_monitoring.ConfigEditParams) (magic_network_monitoring.Configuration, error) - client.MagicNetworkMonitoring.Configs.Get(ctx context.Context, query magic_network_monitoring.ConfigGetParams) (magic_network_monitoring.Configuration, error) @@ -3641,7 +3634,7 @@ Methods: - client.MagicNetworkMonitoring.Rules.New(ctx context.Context, params magic_network_monitoring.RuleNewParams) (magic_network_monitoring.MagicNetworkMonitoringRule, error) - client.MagicNetworkMonitoring.Rules.Update(ctx context.Context, params magic_network_monitoring.RuleUpdateParams) (magic_network_monitoring.MagicNetworkMonitoringRule, error) - client.MagicNetworkMonitoring.Rules.List(ctx context.Context, query magic_network_monitoring.RuleListParams) (pagination.SinglePage[magic_network_monitoring.MagicNetworkMonitoringRule], error) -- client.MagicNetworkMonitoring.Rules.Delete(ctx context.Context, ruleID string, params magic_network_monitoring.RuleDeleteParams) (magic_network_monitoring.MagicNetworkMonitoringRule, error) +- client.MagicNetworkMonitoring.Rules.Delete(ctx context.Context, ruleID string, body magic_network_monitoring.RuleDeleteParams) (magic_network_monitoring.MagicNetworkMonitoringRule, error) - client.MagicNetworkMonitoring.Rules.Edit(ctx context.Context, ruleID string, params magic_network_monitoring.RuleEditParams) (magic_network_monitoring.MagicNetworkMonitoringRule, error) - client.MagicNetworkMonitoring.Rules.Get(ctx context.Context, ruleID string, query magic_network_monitoring.RuleGetParams) (magic_network_monitoring.MagicNetworkMonitoringRule, error) @@ -3666,7 +3659,7 @@ Methods: - client.MTLSCertificates.New(ctx context.Context, params mtls_certificates.MTLSCertificateNewParams) (mtls_certificates.MTLSCertificateNewResponse, error) - client.MTLSCertificates.List(ctx context.Context, query mtls_certificates.MTLSCertificateListParams) (pagination.SinglePage[mtls_certificates.MTLSCertificate], error) -- client.MTLSCertificates.Delete(ctx context.Context, mtlsCertificateID string, params mtls_certificates.MTLSCertificateDeleteParams) (mtls_certificates.MTLSCertificate, error) +- client.MTLSCertificates.Delete(ctx context.Context, mtlsCertificateID string, body mtls_certificates.MTLSCertificateDeleteParams) (mtls_certificates.MTLSCertificate, error) - client.MTLSCertificates.Get(ctx context.Context, mtlsCertificateID string, query mtls_certificates.MTLSCertificateGetParams) (mtls_certificates.MTLSCertificate, error) ## Associations @@ -3703,7 +3696,7 @@ Methods: - client.Pages.Projects.New(ctx context.Context, params pages.ProjectNewParams) (pages.ProjectNewResponseUnion, error) - client.Pages.Projects.List(ctx context.Context, query pages.ProjectListParams) (pagination.SinglePage[pages.Deployment], error) -- client.Pages.Projects.Delete(ctx context.Context, projectName string, params pages.ProjectDeleteParams) (pages.ProjectDeleteResponse, error) +- client.Pages.Projects.Delete(ctx context.Context, projectName string, body pages.ProjectDeleteParams) (pages.ProjectDeleteResponse, error) - client.Pages.Projects.Edit(ctx context.Context, projectName string, params pages.ProjectEditParams) (pages.ProjectEditResponseUnion, error) - client.Pages.Projects.Get(ctx context.Context, projectName string, query pages.ProjectGetParams) (pages.Project, error) - client.Pages.Projects.PurgeBuildCache(ctx context.Context, projectName string, body pages.ProjectPurgeBuildCacheParams) (pages.ProjectPurgeBuildCacheResponse, error) @@ -3718,7 +3711,7 @@ Methods: - client.Pages.Projects.Deployments.New(ctx context.Context, projectName string, params pages.ProjectDeploymentNewParams) (pages.Deployment, error) - client.Pages.Projects.Deployments.List(ctx context.Context, projectName string, params pages.ProjectDeploymentListParams) (pagination.SinglePage[pages.Deployment], error) -- client.Pages.Projects.Deployments.Delete(ctx context.Context, projectName string, deploymentID string, params pages.ProjectDeploymentDeleteParams) (pages.ProjectDeploymentDeleteResponse, error) +- client.Pages.Projects.Deployments.Delete(ctx context.Context, projectName string, deploymentID string, body pages.ProjectDeploymentDeleteParams) (pages.ProjectDeploymentDeleteResponse, error) - client.Pages.Projects.Deployments.Get(ctx context.Context, projectName string, deploymentID string, query pages.ProjectDeploymentGetParams) (pages.Deployment, error) - client.Pages.Projects.Deployments.Retry(ctx context.Context, projectName string, deploymentID string, params pages.ProjectDeploymentRetryParams) (pages.Deployment, error) - client.Pages.Projects.Deployments.Rollback(ctx context.Context, projectName string, deploymentID string, params pages.ProjectDeploymentRollbackParams) (pages.Deployment, error) @@ -3749,7 +3742,7 @@ Methods: - client.Pages.Projects.Domains.New(ctx context.Context, projectName string, params pages.ProjectDomainNewParams) (pages.ProjectDomainNewResponseUnion, error) - client.Pages.Projects.Domains.List(ctx context.Context, projectName string, query pages.ProjectDomainListParams) (pagination.SinglePage[pages.ProjectDomainListResponse], error) -- client.Pages.Projects.Domains.Delete(ctx context.Context, projectName string, domainName string, params pages.ProjectDomainDeleteParams) (pages.ProjectDomainDeleteResponse, error) +- client.Pages.Projects.Domains.Delete(ctx context.Context, projectName string, domainName string, body pages.ProjectDomainDeleteParams) (pages.ProjectDomainDeleteResponse, error) - client.Pages.Projects.Domains.Edit(ctx context.Context, projectName string, domainName string, params pages.ProjectDomainEditParams) (pages.ProjectDomainEditResponseUnion, error) - client.Pages.Projects.Domains.Get(ctx context.Context, projectName string, domainName string, query pages.ProjectDomainGetParams) (pages.ProjectDomainGetResponseUnion, error) @@ -3846,7 +3839,7 @@ Methods: - client.Rules.Lists.New(ctx context.Context, params rules.ListNewParams) (rules.ListsList, error) - client.Rules.Lists.Update(ctx context.Context, listID string, params rules.ListUpdateParams) (rules.ListsList, error) - client.Rules.Lists.List(ctx context.Context, query rules.ListListParams) (pagination.SinglePage[rules.ListsList], error) -- client.Rules.Lists.Delete(ctx context.Context, listID string, params rules.ListDeleteParams) (rules.ListDeleteResponse, error) +- client.Rules.Lists.Delete(ctx context.Context, listID string, body rules.ListDeleteParams) (rules.ListDeleteResponse, error) - client.Rules.Lists.Get(ctx context.Context, listID string, query rules.ListGetParams) (rules.ListsList, error) ### BulkOperations @@ -3875,7 +3868,7 @@ Methods: - client.Rules.Lists.Items.New(ctx context.Context, listID string, params rules.ListItemNewParams) (rules.ListItemNewResponse, error) - client.Rules.Lists.Items.Update(ctx context.Context, listID string, params rules.ListItemUpdateParams) (rules.ListItemUpdateResponse, error) - client.Rules.Lists.Items.List(ctx context.Context, listID string, params rules.ListItemListParams) (pagination.CursorPagination[rules.ListItemListResponse], error) -- client.Rules.Lists.Items.Delete(ctx context.Context, listID string, params rules.ListItemDeleteParams) (rules.ListItemDeleteResponse, error) +- client.Rules.Lists.Items.Delete(ctx context.Context, listID string, body rules.ListItemDeleteParams) (rules.ListItemDeleteResponse, error) - client.Rules.Lists.Items.Get(ctx context.Context, accountIdentifier string, listID string, itemID string) (rules.ListItemGetResponseUnion, error) # Storage @@ -3907,7 +3900,7 @@ Methods: - client.Stream.New(ctx context.Context, params stream.StreamNewParams) error - client.Stream.List(ctx context.Context, params stream.StreamListParams) (pagination.SinglePage[stream.Video], error) -- client.Stream.Delete(ctx context.Context, identifier string, params stream.StreamDeleteParams) error +- client.Stream.Delete(ctx context.Context, identifier string, body stream.StreamDeleteParams) error - client.Stream.Get(ctx context.Context, identifier string, query stream.StreamGetParams) (stream.Video, error) ## AudioTracks @@ -3971,7 +3964,7 @@ Response Types: Methods: - client.Stream.Keys.New(ctx context.Context, params stream.KeyNewParams) (stream.Keys, error) -- client.Stream.Keys.Delete(ctx context.Context, identifier string, params stream.KeyDeleteParams) (stream.KeyDeleteResponseUnion, error) +- client.Stream.Keys.Delete(ctx context.Context, identifier string, body stream.KeyDeleteParams) (stream.KeyDeleteResponseUnion, error) - client.Stream.Keys.Get(ctx context.Context, query stream.KeyGetParams) ([]stream.KeyGetResponse, error) ## LiveInputs @@ -3986,7 +3979,7 @@ Methods: - client.Stream.LiveInputs.New(ctx context.Context, params stream.LiveInputNewParams) (stream.LiveInput, error) - client.Stream.LiveInputs.Update(ctx context.Context, liveInputIdentifier string, params stream.LiveInputUpdateParams) (stream.LiveInput, error) - client.Stream.LiveInputs.List(ctx context.Context, params stream.LiveInputListParams) (stream.LiveInputListResponse, error) -- client.Stream.LiveInputs.Delete(ctx context.Context, liveInputIdentifier string, params stream.LiveInputDeleteParams) error +- client.Stream.LiveInputs.Delete(ctx context.Context, liveInputIdentifier string, body stream.LiveInputDeleteParams) error - client.Stream.LiveInputs.Get(ctx context.Context, liveInputIdentifier string, query stream.LiveInputGetParams) (stream.LiveInput, error) ### Outputs @@ -4000,7 +3993,7 @@ Methods: - client.Stream.LiveInputs.Outputs.New(ctx context.Context, liveInputIdentifier string, params stream.LiveInputOutputNewParams) (stream.Output, error) - client.Stream.LiveInputs.Outputs.Update(ctx context.Context, liveInputIdentifier string, outputIdentifier string, params stream.LiveInputOutputUpdateParams) (stream.Output, error) - client.Stream.LiveInputs.Outputs.List(ctx context.Context, liveInputIdentifier string, query stream.LiveInputOutputListParams) (pagination.SinglePage[stream.Output], error) -- client.Stream.LiveInputs.Outputs.Delete(ctx context.Context, liveInputIdentifier string, outputIdentifier string, params stream.LiveInputOutputDeleteParams) error +- client.Stream.LiveInputs.Outputs.Delete(ctx context.Context, liveInputIdentifier string, outputIdentifier string, body stream.LiveInputOutputDeleteParams) error ## Watermarks @@ -4013,7 +4006,7 @@ Methods: - client.Stream.Watermarks.New(ctx context.Context, params stream.WatermarkNewParams) (stream.Watermark, error) - client.Stream.Watermarks.List(ctx context.Context, query stream.WatermarkListParams) (pagination.SinglePage[stream.Watermark], error) -- client.Stream.Watermarks.Delete(ctx context.Context, identifier string, params stream.WatermarkDeleteParams) (stream.WatermarkDeleteResponseUnion, error) +- client.Stream.Watermarks.Delete(ctx context.Context, identifier string, body stream.WatermarkDeleteParams) (stream.WatermarkDeleteResponseUnion, error) - client.Stream.Watermarks.Get(ctx context.Context, identifier string, query stream.WatermarkGetParams) (stream.Watermark, error) ## Webhooks @@ -4027,7 +4020,7 @@ Response Types: Methods: - client.Stream.Webhooks.Update(ctx context.Context, params stream.WebhookUpdateParams) (stream.WebhookUpdateResponseUnion, error) -- client.Stream.Webhooks.Delete(ctx context.Context, params stream.WebhookDeleteParams) (stream.WebhookDeleteResponseUnion, error) +- client.Stream.Webhooks.Delete(ctx context.Context, body stream.WebhookDeleteParams) (stream.WebhookDeleteResponseUnion, error) - client.Stream.Webhooks.Get(ctx context.Context, query stream.WebhookGetParams) (stream.WebhookGetResponseUnion, error) ## Captions @@ -4045,7 +4038,7 @@ Methods: Methods: - client.Stream.Captions.Language.Update(ctx context.Context, identifier string, language string, params stream.CaptionLanguageUpdateParams) (stream.Caption, error) -- client.Stream.Captions.Language.Delete(ctx context.Context, identifier string, language string, params stream.CaptionLanguageDeleteParams) (string, error) +- client.Stream.Captions.Language.Delete(ctx context.Context, identifier string, language string, body stream.CaptionLanguageDeleteParams) (string, error) - client.Stream.Captions.Language.Get(ctx context.Context, identifier string, language string, query stream.CaptionLanguageGetParams) (stream.Caption, error) #### Vtt @@ -4247,7 +4240,7 @@ Methods: - client.WARPConnector.New(ctx context.Context, params warp_connector.WARPConnectorNewParams) (warp_connector.WARPConnectorNewResponse, error) - client.WARPConnector.List(ctx context.Context, params warp_connector.WARPConnectorListParams) (pagination.V4PagePaginationArray[warp_connector.WARPConnectorListResponse], error) -- client.WARPConnector.Delete(ctx context.Context, tunnelID string, params warp_connector.WARPConnectorDeleteParams) (warp_connector.WARPConnectorDeleteResponse, error) +- client.WARPConnector.Delete(ctx context.Context, tunnelID string, body warp_connector.WARPConnectorDeleteParams) (warp_connector.WARPConnectorDeleteResponse, error) - client.WARPConnector.Edit(ctx context.Context, tunnelID string, params warp_connector.WARPConnectorEditParams) (warp_connector.WARPConnectorEditResponse, error) - client.WARPConnector.Get(ctx context.Context, tunnelID string, query warp_connector.WARPConnectorGetParams) (warp_connector.WARPConnectorGetResponse, error) - client.WARPConnector.Token(ctx context.Context, tunnelID string, query warp_connector.WARPConnectorTokenParams) (warp_connector.WARPConnectorTokenResponseUnion, error) @@ -4378,7 +4371,7 @@ Methods: - client.ZeroTrust.Devices.Networks.New(ctx context.Context, params zero_trust.DeviceNetworkNewParams) (zero_trust.DeviceNetwork, error) - client.ZeroTrust.Devices.Networks.Update(ctx context.Context, networkID string, params zero_trust.DeviceNetworkUpdateParams) (zero_trust.DeviceNetwork, error) - client.ZeroTrust.Devices.Networks.List(ctx context.Context, query zero_trust.DeviceNetworkListParams) (pagination.SinglePage[zero_trust.DeviceNetwork], error) -- client.ZeroTrust.Devices.Networks.Delete(ctx context.Context, networkID string, params zero_trust.DeviceNetworkDeleteParams) ([]zero_trust.DeviceNetwork, error) +- client.ZeroTrust.Devices.Networks.Delete(ctx context.Context, networkID string, body zero_trust.DeviceNetworkDeleteParams) ([]zero_trust.DeviceNetwork, error) - client.ZeroTrust.Devices.Networks.Get(ctx context.Context, networkID string, query zero_trust.DeviceNetworkGetParams) (zero_trust.DeviceNetwork, error) ### Policies @@ -4394,7 +4387,7 @@ Methods: - client.ZeroTrust.Devices.Policies.New(ctx context.Context, params zero_trust.DevicePolicyNewParams) (zero_trust.SettingsPolicy, error) - client.ZeroTrust.Devices.Policies.List(ctx context.Context, query zero_trust.DevicePolicyListParams) (pagination.SinglePage[zero_trust.SettingsPolicy], error) -- client.ZeroTrust.Devices.Policies.Delete(ctx context.Context, policyID string, params zero_trust.DevicePolicyDeleteParams) ([]zero_trust.SettingsPolicy, error) +- client.ZeroTrust.Devices.Policies.Delete(ctx context.Context, policyID string, body zero_trust.DevicePolicyDeleteParams) ([]zero_trust.SettingsPolicy, error) - client.ZeroTrust.Devices.Policies.Edit(ctx context.Context, policyID string, params zero_trust.DevicePolicyEditParams) (zero_trust.SettingsPolicy, error) - client.ZeroTrust.Devices.Policies.Get(ctx context.Context, policyID string, query zero_trust.DevicePolicyGetParams) (zero_trust.SettingsPolicy, error) @@ -4505,7 +4498,7 @@ Methods: - client.ZeroTrust.Devices.Posture.New(ctx context.Context, params zero_trust.DevicePostureNewParams) (zero_trust.DevicePostureRule, error) - client.ZeroTrust.Devices.Posture.Update(ctx context.Context, ruleID string, params zero_trust.DevicePostureUpdateParams) (zero_trust.DevicePostureRule, error) - client.ZeroTrust.Devices.Posture.List(ctx context.Context, query zero_trust.DevicePostureListParams) (pagination.SinglePage[zero_trust.DevicePostureRule], error) -- client.ZeroTrust.Devices.Posture.Delete(ctx context.Context, ruleID string, params zero_trust.DevicePostureDeleteParams) (zero_trust.DevicePostureDeleteResponse, error) +- client.ZeroTrust.Devices.Posture.Delete(ctx context.Context, ruleID string, body zero_trust.DevicePostureDeleteParams) (zero_trust.DevicePostureDeleteResponse, error) - client.ZeroTrust.Devices.Posture.Get(ctx context.Context, ruleID string, query zero_trust.DevicePostureGetParams) (zero_trust.DevicePostureRule, error) #### Integrations @@ -4519,7 +4512,7 @@ Methods: - client.ZeroTrust.Devices.Posture.Integrations.New(ctx context.Context, params zero_trust.DevicePostureIntegrationNewParams) (zero_trust.Integration, error) - client.ZeroTrust.Devices.Posture.Integrations.List(ctx context.Context, query zero_trust.DevicePostureIntegrationListParams) (pagination.SinglePage[zero_trust.Integration], error) -- client.ZeroTrust.Devices.Posture.Integrations.Delete(ctx context.Context, integrationID string, params zero_trust.DevicePostureIntegrationDeleteParams) (zero_trust.DevicePostureIntegrationDeleteResponseUnion, error) +- client.ZeroTrust.Devices.Posture.Integrations.Delete(ctx context.Context, integrationID string, body zero_trust.DevicePostureIntegrationDeleteParams) (zero_trust.DevicePostureIntegrationDeleteResponseUnion, error) - client.ZeroTrust.Devices.Posture.Integrations.Edit(ctx context.Context, integrationID string, params zero_trust.DevicePostureIntegrationEditParams) (zero_trust.Integration, error) - client.ZeroTrust.Devices.Posture.Integrations.Get(ctx context.Context, integrationID string, query zero_trust.DevicePostureIntegrationGetParams) (zero_trust.Integration, error) @@ -4843,7 +4836,7 @@ Methods: - client.ZeroTrust.Access.Bookmarks.New(ctx context.Context, identifier string, uuid string, body zero_trust.AccessBookmarkNewParams) (zero_trust.Bookmark, error) - client.ZeroTrust.Access.Bookmarks.Update(ctx context.Context, identifier string, uuid string, body zero_trust.AccessBookmarkUpdateParams) (zero_trust.Bookmark, error) - client.ZeroTrust.Access.Bookmarks.List(ctx context.Context, identifier string) (pagination.SinglePage[zero_trust.Bookmark], error) -- client.ZeroTrust.Access.Bookmarks.Delete(ctx context.Context, identifier string, uuid string, body zero_trust.AccessBookmarkDeleteParams) (zero_trust.AccessBookmarkDeleteResponse, error) +- client.ZeroTrust.Access.Bookmarks.Delete(ctx context.Context, identifier string, uuid string) (zero_trust.AccessBookmarkDeleteResponse, error) - client.ZeroTrust.Access.Bookmarks.Get(ctx context.Context, identifier string, uuid string) (zero_trust.Bookmark, error) ### Keys @@ -5073,7 +5066,7 @@ Methods: - client.ZeroTrust.Tunnels.New(ctx context.Context, params zero_trust.TunnelNewParams) (zero_trust.TunnelNewResponse, error) - client.ZeroTrust.Tunnels.List(ctx context.Context, params zero_trust.TunnelListParams) (pagination.V4PagePaginationArray[zero_trust.TunnelListResponse], error) -- client.ZeroTrust.Tunnels.Delete(ctx context.Context, tunnelID string, params zero_trust.TunnelDeleteParams) (zero_trust.TunnelDeleteResponse, error) +- client.ZeroTrust.Tunnels.Delete(ctx context.Context, tunnelID string, body zero_trust.TunnelDeleteParams) (zero_trust.TunnelDeleteResponse, error) - client.ZeroTrust.Tunnels.Edit(ctx context.Context, tunnelID string, params zero_trust.TunnelEditParams) (zero_trust.TunnelEditResponse, error) - client.ZeroTrust.Tunnels.Get(ctx context.Context, tunnelID string, query zero_trust.TunnelGetParams) (zero_trust.TunnelGetResponse, error) @@ -5098,7 +5091,7 @@ Response Types: Methods: -- client.ZeroTrust.Tunnels.Connections.Delete(ctx context.Context, tunnelID string, params zero_trust.TunnelConnectionDeleteParams) (zero_trust.TunnelConnectionDeleteResponseUnion, error) +- client.ZeroTrust.Tunnels.Connections.Delete(ctx context.Context, tunnelID string, body zero_trust.TunnelConnectionDeleteParams) (zero_trust.TunnelConnectionDeleteResponseUnion, error) - client.ZeroTrust.Tunnels.Connections.Get(ctx context.Context, tunnelID string, query zero_trust.TunnelConnectionGetParams) ([]zero_trust.Client, error) ### Token @@ -5221,7 +5214,7 @@ Methods: - client.ZeroTrust.DLP.Profiles.Custom.New(ctx context.Context, params zero_trust.DLPProfileCustomNewParams) ([]zero_trust.CustomProfile, error) - client.ZeroTrust.DLP.Profiles.Custom.Update(ctx context.Context, profileID string, params zero_trust.DLPProfileCustomUpdateParams) (zero_trust.CustomProfile, error) -- client.ZeroTrust.DLP.Profiles.Custom.Delete(ctx context.Context, profileID string, params zero_trust.DLPProfileCustomDeleteParams) (zero_trust.DLPProfileCustomDeleteResponseUnion, error) +- client.ZeroTrust.DLP.Profiles.Custom.Delete(ctx context.Context, profileID string, body zero_trust.DLPProfileCustomDeleteParams) (zero_trust.DLPProfileCustomDeleteResponseUnion, error) - client.ZeroTrust.DLP.Profiles.Custom.Get(ctx context.Context, profileID string, query zero_trust.DLPProfileCustomGetParams) (zero_trust.CustomProfile, error) #### Predefined @@ -5337,7 +5330,7 @@ Methods: - client.ZeroTrust.Gateway.Lists.New(ctx context.Context, params zero_trust.GatewayListNewParams) (zero_trust.GatewayListNewResponse, error) - client.ZeroTrust.Gateway.Lists.Update(ctx context.Context, listID string, params zero_trust.GatewayListUpdateParams) (zero_trust.GatewayList, error) - client.ZeroTrust.Gateway.Lists.List(ctx context.Context, query zero_trust.GatewayListListParams) (pagination.SinglePage[zero_trust.GatewayList], error) -- client.ZeroTrust.Gateway.Lists.Delete(ctx context.Context, listID string, params zero_trust.GatewayListDeleteParams) (zero_trust.GatewayListDeleteResponseUnion, error) +- client.ZeroTrust.Gateway.Lists.Delete(ctx context.Context, listID string, body zero_trust.GatewayListDeleteParams) (zero_trust.GatewayListDeleteResponseUnion, error) - client.ZeroTrust.Gateway.Lists.Edit(ctx context.Context, listID string, params zero_trust.GatewayListEditParams) (zero_trust.GatewayList, error) - client.ZeroTrust.Gateway.Lists.Get(ctx context.Context, listID string, query zero_trust.GatewayListGetParams) (zero_trust.GatewayList, error) @@ -5364,7 +5357,7 @@ Methods: - client.ZeroTrust.Gateway.Locations.New(ctx context.Context, params zero_trust.GatewayLocationNewParams) (zero_trust.Location, error) - client.ZeroTrust.Gateway.Locations.Update(ctx context.Context, locationID string, params zero_trust.GatewayLocationUpdateParams) (zero_trust.Location, error) - client.ZeroTrust.Gateway.Locations.List(ctx context.Context, query zero_trust.GatewayLocationListParams) (pagination.SinglePage[zero_trust.Location], error) -- client.ZeroTrust.Gateway.Locations.Delete(ctx context.Context, locationID string, params zero_trust.GatewayLocationDeleteParams) (zero_trust.GatewayLocationDeleteResponseUnion, error) +- client.ZeroTrust.Gateway.Locations.Delete(ctx context.Context, locationID string, body zero_trust.GatewayLocationDeleteParams) (zero_trust.GatewayLocationDeleteResponseUnion, error) - client.ZeroTrust.Gateway.Locations.Get(ctx context.Context, locationID string, query zero_trust.GatewayLocationGetParams) (zero_trust.Location, error) ### Logging @@ -5398,7 +5391,7 @@ Methods: - client.ZeroTrust.Gateway.ProxyEndpoints.New(ctx context.Context, params zero_trust.GatewayProxyEndpointNewParams) (zero_trust.ProxyEndpoint, error) - client.ZeroTrust.Gateway.ProxyEndpoints.List(ctx context.Context, query zero_trust.GatewayProxyEndpointListParams) (pagination.SinglePage[zero_trust.ProxyEndpoint], error) -- client.ZeroTrust.Gateway.ProxyEndpoints.Delete(ctx context.Context, proxyEndpointID string, params zero_trust.GatewayProxyEndpointDeleteParams) (zero_trust.GatewayProxyEndpointDeleteResponseUnion, error) +- client.ZeroTrust.Gateway.ProxyEndpoints.Delete(ctx context.Context, proxyEndpointID string, body zero_trust.GatewayProxyEndpointDeleteParams) (zero_trust.GatewayProxyEndpointDeleteResponseUnion, error) - client.ZeroTrust.Gateway.ProxyEndpoints.Edit(ctx context.Context, proxyEndpointID string, params zero_trust.GatewayProxyEndpointEditParams) (zero_trust.ProxyEndpoint, error) - client.ZeroTrust.Gateway.ProxyEndpoints.Get(ctx context.Context, proxyEndpointID string, query zero_trust.GatewayProxyEndpointGetParams) (zero_trust.ProxyEndpoint, error) @@ -5427,7 +5420,7 @@ Methods: - client.ZeroTrust.Gateway.Rules.New(ctx context.Context, params zero_trust.GatewayRuleNewParams) (zero_trust.GatewayRule, error) - client.ZeroTrust.Gateway.Rules.Update(ctx context.Context, ruleID string, params zero_trust.GatewayRuleUpdateParams) (zero_trust.GatewayRule, error) - client.ZeroTrust.Gateway.Rules.List(ctx context.Context, query zero_trust.GatewayRuleListParams) (pagination.SinglePage[zero_trust.GatewayRule], error) -- client.ZeroTrust.Gateway.Rules.Delete(ctx context.Context, ruleID string, params zero_trust.GatewayRuleDeleteParams) (zero_trust.GatewayRuleDeleteResponseUnion, error) +- client.ZeroTrust.Gateway.Rules.Delete(ctx context.Context, ruleID string, body zero_trust.GatewayRuleDeleteParams) (zero_trust.GatewayRuleDeleteResponseUnion, error) - client.ZeroTrust.Gateway.Rules.Get(ctx context.Context, ruleID string, query zero_trust.GatewayRuleGetParams) (zero_trust.GatewayRule, error) ## Networks @@ -5473,7 +5466,7 @@ Methods: - client.ZeroTrust.Networks.VirtualNetworks.New(ctx context.Context, params zero_trust.NetworkVirtualNetworkNewParams) (zero_trust.NetworkVirtualNetworkNewResponseUnion, error) - client.ZeroTrust.Networks.VirtualNetworks.List(ctx context.Context, params zero_trust.NetworkVirtualNetworkListParams) (pagination.SinglePage[zero_trust.VirtualNetwork], error) -- client.ZeroTrust.Networks.VirtualNetworks.Delete(ctx context.Context, virtualNetworkID string, params zero_trust.NetworkVirtualNetworkDeleteParams) (zero_trust.NetworkVirtualNetworkDeleteResponseUnion, error) +- client.ZeroTrust.Networks.VirtualNetworks.Delete(ctx context.Context, virtualNetworkID string, body zero_trust.NetworkVirtualNetworkDeleteParams) (zero_trust.NetworkVirtualNetworkDeleteResponseUnion, error) - client.ZeroTrust.Networks.VirtualNetworks.Edit(ctx context.Context, virtualNetworkID string, params zero_trust.NetworkVirtualNetworkEditParams) (zero_trust.NetworkVirtualNetworkEditResponseUnion, error) ## RiskScoring diff --git a/cache/smarttieredcache.go b/cache/smarttieredcache.go index dbbbec55ad..d98fc64467 100644 --- a/cache/smarttieredcache.go +++ b/cache/smarttieredcache.go @@ -35,10 +35,10 @@ func NewSmartTieredCacheService(opts ...option.RequestOption) (r *SmartTieredCac } // Remvoves enablement of Smart Tiered Cache -func (r *SmartTieredCacheService) Delete(ctx context.Context, params SmartTieredCacheDeleteParams, opts ...option.RequestOption) (res *SmartTieredCacheDeleteResponseUnion, err error) { +func (r *SmartTieredCacheService) Delete(ctx context.Context, body SmartTieredCacheDeleteParams, opts ...option.RequestOption) (res *SmartTieredCacheDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) var env SmartTieredCacheDeleteResponseEnvelope - path := fmt.Sprintf("zones/%s/cache/tiered_cache_smart_topology_enable", params.ZoneID) + path := fmt.Sprintf("zones/%s/cache/tiered_cache_smart_topology_enable", body.ZoneID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -127,11 +127,6 @@ func init() { type SmartTieredCacheDeleteParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` - Body interface{} `json:"body,required"` -} - -func (r SmartTieredCacheDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type SmartTieredCacheDeleteResponseEnvelope struct { diff --git a/cache/smarttieredcache_test.go b/cache/smarttieredcache_test.go index 661bf82872..cc24d46ab8 100644 --- a/cache/smarttieredcache_test.go +++ b/cache/smarttieredcache_test.go @@ -30,7 +30,6 @@ func TestSmartTieredCacheDelete(t *testing.T) { ) _, err := client.Cache.SmartTieredCache.Delete(context.TODO(), cache.SmartTieredCacheDeleteParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }) if err != nil { var apierr *cloudflare.Error diff --git a/cache/variant.go b/cache/variant.go index af095ffdbd..4b1afc13a1 100644 --- a/cache/variant.go +++ b/cache/variant.go @@ -37,10 +37,10 @@ func NewVariantService(opts ...option.RequestOption) (r *VariantService) { // 'Vary: Accept' response header. If the origin server sends 'Vary: Accept' but // does not serve the variant requested, the response will not be cached. This will // be indicated with BYPASS cache status in the response headers. -func (r *VariantService) Delete(ctx context.Context, params VariantDeleteParams, opts ...option.RequestOption) (res *CacheVariant, err error) { +func (r *VariantService) Delete(ctx context.Context, body VariantDeleteParams, opts ...option.RequestOption) (res *CacheVariant, err error) { opts = append(r.Options[:], opts...) var env VariantDeleteResponseEnvelope - path := fmt.Sprintf("zones/%s/cache/variants", params.ZoneID) + path := fmt.Sprintf("zones/%s/cache/variants", body.ZoneID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -324,11 +324,6 @@ func (r variantGetResponseValueJSON) RawJSON() string { type VariantDeleteParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` - Body interface{} `json:"body,required"` -} - -func (r VariantDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type VariantDeleteResponseEnvelope struct { diff --git a/cache/variant_test.go b/cache/variant_test.go index cfa9a34ae5..7907f28292 100644 --- a/cache/variant_test.go +++ b/cache/variant_test.go @@ -30,7 +30,6 @@ func TestVariantDelete(t *testing.T) { ) _, err := client.Cache.Variants.Delete(context.TODO(), cache.VariantDeleteParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }) if err != nil { var apierr *cloudflare.Error diff --git a/custom_certificates/customcertificate.go b/custom_certificates/customcertificate.go index 5f1cd33ce6..56595280d4 100644 --- a/custom_certificates/customcertificate.go +++ b/custom_certificates/customcertificate.go @@ -83,10 +83,10 @@ func (r *CustomCertificateService) ListAutoPaging(ctx context.Context, params Cu } // Remove a SSL certificate from a zone. -func (r *CustomCertificateService) Delete(ctx context.Context, customCertificateID string, params CustomCertificateDeleteParams, opts ...option.RequestOption) (res *CustomCertificateDeleteResponse, err error) { +func (r *CustomCertificateService) Delete(ctx context.Context, customCertificateID string, body CustomCertificateDeleteParams, opts ...option.RequestOption) (res *CustomCertificateDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env CustomCertificateDeleteResponseEnvelope - path := fmt.Sprintf("zones/%s/custom_certificates/%s", params.ZoneID, customCertificateID) + path := fmt.Sprintf("zones/%s/custom_certificates/%s", body.ZoneID, customCertificateID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -511,11 +511,6 @@ func (r CustomCertificateListParamsStatus) IsKnown() bool { type CustomCertificateDeleteParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` - Body interface{} `json:"body,required"` -} - -func (r CustomCertificateDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type CustomCertificateDeleteResponseEnvelope struct { diff --git a/custom_certificates/customcertificate_test.go b/custom_certificates/customcertificate_test.go index ba46385c71..fea3655c53 100644 --- a/custom_certificates/customcertificate_test.go +++ b/custom_certificates/customcertificate_test.go @@ -98,7 +98,6 @@ func TestCustomCertificateDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", custom_certificates.CustomCertificateDeleteParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/custom_hostnames/customhostname.go b/custom_hostnames/customhostname.go index c06346dcc4..97618af8be 100644 --- a/custom_hostnames/customhostname.go +++ b/custom_hostnames/customhostname.go @@ -81,9 +81,9 @@ func (r *CustomHostnameService) ListAutoPaging(ctx context.Context, params Custo } // Delete Custom Hostname (and any issued SSL certificates) -func (r *CustomHostnameService) Delete(ctx context.Context, customHostnameID string, params CustomHostnameDeleteParams, opts ...option.RequestOption) (res *CustomHostnameDeleteResponse, err error) { +func (r *CustomHostnameService) Delete(ctx context.Context, customHostnameID string, body CustomHostnameDeleteParams, opts ...option.RequestOption) (res *CustomHostnameDeleteResponse, err error) { opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/custom_hostnames/%s", params.ZoneID, customHostnameID) + path := fmt.Sprintf("zones/%s/custom_hostnames/%s", body.ZoneID, customHostnameID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -2388,11 +2388,6 @@ func (r CustomHostnameListParamsSSL) IsKnown() bool { type CustomHostnameDeleteParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` - Body interface{} `json:"body,required"` -} - -func (r CustomHostnameDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type CustomHostnameEditParams struct { diff --git a/custom_hostnames/customhostname_test.go b/custom_hostnames/customhostname_test.go index 6ae3aeefb0..097099275f 100644 --- a/custom_hostnames/customhostname_test.go +++ b/custom_hostnames/customhostname_test.go @@ -112,7 +112,6 @@ func TestCustomHostnameDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", custom_hostnames.CustomHostnameDeleteParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/custom_hostnames/fallbackorigin.go b/custom_hostnames/fallbackorigin.go index d63acaa335..c5e283ca84 100644 --- a/custom_hostnames/fallbackorigin.go +++ b/custom_hostnames/fallbackorigin.go @@ -48,10 +48,10 @@ func (r *FallbackOriginService) Update(ctx context.Context, params FallbackOrigi } // Delete Fallback Origin for Custom Hostnames -func (r *FallbackOriginService) Delete(ctx context.Context, params FallbackOriginDeleteParams, opts ...option.RequestOption) (res *FallbackOriginDeleteResponseUnion, err error) { +func (r *FallbackOriginService) Delete(ctx context.Context, body FallbackOriginDeleteParams, opts ...option.RequestOption) (res *FallbackOriginDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) var env FallbackOriginDeleteResponseEnvelope - path := fmt.Sprintf("zones/%s/custom_hostnames/fallback_origin", params.ZoneID) + path := fmt.Sprintf("zones/%s/custom_hostnames/fallback_origin", body.ZoneID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -181,11 +181,6 @@ func (r FallbackOriginUpdateResponseEnvelopeSuccess) IsKnown() bool { type FallbackOriginDeleteParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` - Body interface{} `json:"body,required"` -} - -func (r FallbackOriginDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type FallbackOriginDeleteResponseEnvelope struct { diff --git a/custom_hostnames/fallbackorigin_test.go b/custom_hostnames/fallbackorigin_test.go index 988da10cf6..1e2de9182a 100644 --- a/custom_hostnames/fallbackorigin_test.go +++ b/custom_hostnames/fallbackorigin_test.go @@ -57,7 +57,6 @@ func TestFallbackOriginDelete(t *testing.T) { ) _, err := client.CustomHostnames.FallbackOrigin.Delete(context.TODO(), custom_hostnames.FallbackOriginDeleteParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }) if err != nil { var apierr *cloudflare.Error diff --git a/custom_nameservers/customnameserver.go b/custom_nameservers/customnameserver.go index 67dfa7ba45..f0cb850d8e 100644 --- a/custom_nameservers/customnameserver.go +++ b/custom_nameservers/customnameserver.go @@ -48,10 +48,10 @@ func (r *CustomNameserverService) New(ctx context.Context, params CustomNameserv } // Delete Account Custom Nameserver -func (r *CustomNameserverService) Delete(ctx context.Context, customNSID string, params CustomNameserverDeleteParams, opts ...option.RequestOption) (res *CustomNameserverDeleteResponseUnion, err error) { +func (r *CustomNameserverService) Delete(ctx context.Context, customNSID string, body CustomNameserverDeleteParams, opts ...option.RequestOption) (res *CustomNameserverDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) var env CustomNameserverDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/custom_ns/%s", params.AccountID, customNSID) + path := fmt.Sprintf("accounts/%s/custom_ns/%s", body.AccountID, customNSID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -279,11 +279,6 @@ func (r CustomNameserverNewResponseEnvelopeSuccess) IsKnown() bool { type CustomNameserverDeleteParams struct { // Account identifier tag. AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r CustomNameserverDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type CustomNameserverDeleteResponseEnvelope struct { diff --git a/custom_nameservers/customnameserver_test.go b/custom_nameservers/customnameserver_test.go index 7d9df3e08e..cb1ddc92d3 100644 --- a/custom_nameservers/customnameserver_test.go +++ b/custom_nameservers/customnameserver_test.go @@ -61,7 +61,6 @@ func TestCustomNameserverDelete(t *testing.T) { "ns1.example.com", custom_nameservers.CustomNameserverDeleteParams{ AccountID: cloudflare.F("372e67954025e0ba6aaa6d586b9e0b59"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/dns/firewall.go b/dns/firewall.go index cab5e9339c..872e6a6911 100644 --- a/dns/firewall.go +++ b/dns/firewall.go @@ -76,10 +76,10 @@ func (r *FirewallService) ListAutoPaging(ctx context.Context, params FirewallLis } // Delete a configured DNS Firewall Cluster. -func (r *FirewallService) Delete(ctx context.Context, dnsFirewallID string, params FirewallDeleteParams, opts ...option.RequestOption) (res *FirewallDeleteResponse, err error) { +func (r *FirewallService) Delete(ctx context.Context, dnsFirewallID string, body FirewallDeleteParams, opts ...option.RequestOption) (res *FirewallDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env FirewallDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/dns_firewall/%s", params.AccountID, dnsFirewallID) + path := fmt.Sprintf("accounts/%s/dns_firewall/%s", body.AccountID, dnsFirewallID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -413,11 +413,6 @@ func (r FirewallListParams) URLQuery() (v url.Values) { type FirewallDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r FirewallDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type FirewallDeleteResponseEnvelope struct { diff --git a/dns/firewall_test.go b/dns/firewall_test.go index 624ae1b64e..afda2009e4 100644 --- a/dns/firewall_test.go +++ b/dns/firewall_test.go @@ -101,7 +101,6 @@ func TestFirewallDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", dns.FirewallDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/dns/record.go b/dns/record.go index 4d132329a9..cf0d62f731 100644 --- a/dns/record.go +++ b/dns/record.go @@ -99,10 +99,10 @@ func (r *RecordService) ListAutoPaging(ctx context.Context, params RecordListPar } // Delete DNS Record -func (r *RecordService) Delete(ctx context.Context, dnsRecordID string, params RecordDeleteParams, opts ...option.RequestOption) (res *RecordDeleteResponse, err error) { +func (r *RecordService) Delete(ctx context.Context, dnsRecordID string, body RecordDeleteParams, opts ...option.RequestOption) (res *RecordDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env RecordDeleteResponseEnvelope - path := fmt.Sprintf("zones/%s/dns_records/%s", params.ZoneID, dnsRecordID) + path := fmt.Sprintf("zones/%s/dns_records/%s", body.ZoneID, dnsRecordID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -3847,11 +3847,6 @@ func (r RecordListParamsType) IsKnown() bool { type RecordDeleteParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` - Body interface{} `json:"body,required"` -} - -func (r RecordDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type RecordDeleteResponseEnvelope struct { diff --git a/dns/record_test.go b/dns/record_test.go index 267e28141f..9c8fdac419 100644 --- a/dns/record_test.go +++ b/dns/record_test.go @@ -161,7 +161,6 @@ func TestRecordDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", dns.RecordDeleteParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/dnssec/dnssec.go b/dnssec/dnssec.go index 2236c973e5..eaa93042af 100644 --- a/dnssec/dnssec.go +++ b/dnssec/dnssec.go @@ -35,10 +35,10 @@ func NewDNSSECService(opts ...option.RequestOption) (r *DNSSECService) { } // Delete DNSSEC. -func (r *DNSSECService) Delete(ctx context.Context, params DNSSECDeleteParams, opts ...option.RequestOption) (res *DNSSECDeleteResponseUnion, err error) { +func (r *DNSSECService) Delete(ctx context.Context, body DNSSECDeleteParams, opts ...option.RequestOption) (res *DNSSECDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) var env DNSSECDeleteResponseEnvelope - path := fmt.Sprintf("zones/%s/dnssec", params.ZoneID) + path := fmt.Sprintf("zones/%s/dnssec", body.ZoneID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -181,11 +181,6 @@ func init() { type DNSSECDeleteParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` - Body interface{} `json:"body,required"` -} - -func (r DNSSECDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type DNSSECDeleteResponseEnvelope struct { diff --git a/dnssec/dnssec_test.go b/dnssec/dnssec_test.go index 2e87d475d1..e8f58a54b6 100644 --- a/dnssec/dnssec_test.go +++ b/dnssec/dnssec_test.go @@ -30,7 +30,6 @@ func TestDNSSECDelete(t *testing.T) { ) _, err := client.DNSSEC.Delete(context.TODO(), dnssec.DNSSECDeleteParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }) if err != nil { var apierr *cloudflare.Error diff --git a/filters/filter.go b/filters/filter.go index d25ec52673..2af2a1f328 100644 --- a/filters/filter.go +++ b/filters/filter.go @@ -86,7 +86,7 @@ func (r *FilterService) ListAutoPaging(ctx context.Context, zoneIdentifier strin } // Deletes an existing filter. -func (r *FilterService) Delete(ctx context.Context, zoneIdentifier string, id string, body FilterDeleteParams, opts ...option.RequestOption) (res *FirewallFilter, err error) { +func (r *FilterService) Delete(ctx context.Context, zoneIdentifier string, id string, opts ...option.RequestOption) (res *FirewallFilter, err error) { opts = append(r.Options[:], opts...) var env FilterDeleteResponseEnvelope path := fmt.Sprintf("zones/%s/filters/%s", zoneIdentifier, id) @@ -307,14 +307,6 @@ func (r FilterListParams) URLQuery() (v url.Values) { }) } -type FilterDeleteParams struct { - Body interface{} `json:"body,required"` -} - -func (r FilterDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) -} - type FilterDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` diff --git a/filters/filter_test.go b/filters/filter_test.go index f39799c845..79741554d1 100644 --- a/filters/filter_test.go +++ b/filters/filter_test.go @@ -129,9 +129,6 @@ func TestFilterDelete(t *testing.T) { context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353", "372e67954025e0ba6aaa6d586b9e0b61", - filters.FilterDeleteParams{ - Body: map[string]interface{}{}, - }, ) if err != nil { var apierr *cloudflare.Error diff --git a/firewall/accessrule.go b/firewall/accessrule.go index 81b293daa8..8d1045f5e1 100644 --- a/firewall/accessrule.go +++ b/firewall/accessrule.go @@ -101,17 +101,17 @@ func (r *AccessRuleService) ListAutoPaging(ctx context.Context, params AccessRul // Deletes an existing IP Access rule defined. // // Note: This operation will affect all zones in the account or zone. -func (r *AccessRuleService) Delete(ctx context.Context, identifier interface{}, params AccessRuleDeleteParams, opts ...option.RequestOption) (res *AccessRuleDeleteResponse, err error) { +func (r *AccessRuleService) Delete(ctx context.Context, identifier interface{}, body AccessRuleDeleteParams, opts ...option.RequestOption) (res *AccessRuleDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env AccessRuleDeleteResponseEnvelope var accountOrZone string var accountOrZoneID param.Field[string] - if params.AccountID.Present { + if body.AccountID.Present { accountOrZone = "accounts" - accountOrZoneID = params.AccountID + accountOrZoneID = body.AccountID } else { accountOrZone = "zones" - accountOrZoneID = params.ZoneID + accountOrZoneID = body.ZoneID } path := fmt.Sprintf("%s/%s/firewall/access_rules/rules/%v", accountOrZone, accountOrZoneID, identifier) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) @@ -703,17 +703,12 @@ func (r AccessRuleListParamsOrder) IsKnown() bool { } type AccessRuleDeleteParams struct { - Body interface{} `json:"body,required"` // The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. AccountID param.Field[string] `path:"account_id"` // The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. ZoneID param.Field[string] `path:"zone_id"` } -func (r AccessRuleDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) -} - type AccessRuleDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` diff --git a/firewall/accessrule_test.go b/firewall/accessrule_test.go index 102a172c4c..8f63a4197c 100644 --- a/firewall/accessrule_test.go +++ b/firewall/accessrule_test.go @@ -109,7 +109,6 @@ func TestAccessRuleDeleteWithOptionalParams(t *testing.T) { context.TODO(), map[string]interface{}{}, firewall.AccessRuleDeleteParams{ - Body: map[string]interface{}{}, AccountID: cloudflare.F("string"), ZoneID: cloudflare.F("string"), }, diff --git a/firewall/lockdown.go b/firewall/lockdown.go index df0fb227c7..08f6666864 100644 --- a/firewall/lockdown.go +++ b/firewall/lockdown.go @@ -89,7 +89,7 @@ func (r *LockdownService) ListAutoPaging(ctx context.Context, zoneIdentifier str } // Deletes an existing Zone Lockdown rule. -func (r *LockdownService) Delete(ctx context.Context, zoneIdentifier string, id string, body LockdownDeleteParams, opts ...option.RequestOption) (res *LockdownDeleteResponse, err error) { +func (r *LockdownService) Delete(ctx context.Context, zoneIdentifier string, id string, opts ...option.RequestOption) (res *LockdownDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env LockdownDeleteResponseEnvelope path := fmt.Sprintf("zones/%s/firewall/lockdowns/%s", zoneIdentifier, id) @@ -488,14 +488,6 @@ func (r LockdownListParams) URLQuery() (v url.Values) { }) } -type LockdownDeleteParams struct { - Body interface{} `json:"body,required"` -} - -func (r LockdownDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) -} - type LockdownDeleteResponseEnvelope struct { Result LockdownDeleteResponse `json:"result"` JSON lockdownDeleteResponseEnvelopeJSON `json:"-"` diff --git a/firewall/lockdown_test.go b/firewall/lockdown_test.go index 37c3859604..33675ea8be 100644 --- a/firewall/lockdown_test.go +++ b/firewall/lockdown_test.go @@ -134,9 +134,6 @@ func TestLockdownDelete(t *testing.T) { context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353", "372e67954025e0ba6aaa6d586b9e0b59", - firewall.LockdownDeleteParams{ - Body: map[string]interface{}{}, - }, ) if err != nil { var apierr *cloudflare.Error diff --git a/firewall/rule.go b/firewall/rule.go index 864f1cfbef..edf49e4137 100644 --- a/firewall/rule.go +++ b/firewall/rule.go @@ -90,11 +90,11 @@ func (r *RuleService) ListAutoPaging(ctx context.Context, zoneIdentifier string, } // Deletes an existing firewall rule. -func (r *RuleService) Delete(ctx context.Context, zoneIdentifier string, id string, body RuleDeleteParams, opts ...option.RequestOption) (res *FirewallRule, err error) { +func (r *RuleService) Delete(ctx context.Context, zoneIdentifier string, id string, opts ...option.RequestOption) (res *FirewallRule, err error) { opts = append(r.Options[:], opts...) var env RuleDeleteResponseEnvelope path := fmt.Sprintf("zones/%s/firewall/rules/%s", zoneIdentifier, id) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return } @@ -443,16 +443,6 @@ func (r RuleListParams) URLQuery() (v url.Values) { }) } -type RuleDeleteParams struct { - // When true, indicates that Cloudflare should also delete the associated filter if - // there are no other firewall rules referencing the filter. - DeleteFilterIfUnused param.Field[bool] `json:"delete_filter_if_unused"` -} - -func (r RuleDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - type RuleDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` diff --git a/firewall/rule_test.go b/firewall/rule_test.go index 2d99b0534d..eaeb22e40d 100644 --- a/firewall/rule_test.go +++ b/firewall/rule_test.go @@ -110,7 +110,7 @@ func TestRuleListWithOptionalParams(t *testing.T) { } } -func TestRuleDeleteWithOptionalParams(t *testing.T) { +func TestRuleDelete(t *testing.T) { t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { @@ -128,9 +128,6 @@ func TestRuleDeleteWithOptionalParams(t *testing.T) { context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353", "372e67954025e0ba6aaa6d586b9e0b60", - firewall.RuleDeleteParams{ - DeleteFilterIfUnused: cloudflare.F(true), - }, ) if err != nil { var apierr *cloudflare.Error diff --git a/firewall/uarule.go b/firewall/uarule.go index bbddbba5b1..66e488898e 100644 --- a/firewall/uarule.go +++ b/firewall/uarule.go @@ -88,7 +88,7 @@ func (r *UARuleService) ListAutoPaging(ctx context.Context, zoneIdentifier strin } // Deletes an existing User Agent Blocking rule. -func (r *UARuleService) Delete(ctx context.Context, zoneIdentifier string, id string, body UARuleDeleteParams, opts ...option.RequestOption) (res *UARuleDeleteResponse, err error) { +func (r *UARuleService) Delete(ctx context.Context, zoneIdentifier string, id string, opts ...option.RequestOption) (res *UARuleDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env UARuleDeleteResponseEnvelope path := fmt.Sprintf("zones/%s/firewall/ua_rules/%s", zoneIdentifier, id) @@ -388,14 +388,6 @@ func (r UARuleListParams) URLQuery() (v url.Values) { }) } -type UARuleDeleteParams struct { - Body interface{} `json:"body,required"` -} - -func (r UARuleDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) -} - type UARuleDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` diff --git a/firewall/uarule_test.go b/firewall/uarule_test.go index 909e141d2f..ccbd1a2bbc 100644 --- a/firewall/uarule_test.go +++ b/firewall/uarule_test.go @@ -127,9 +127,6 @@ func TestUARuleDelete(t *testing.T) { context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353", "372e67954025e0ba6aaa6d586b9e0b59", - firewall.UARuleDeleteParams{ - Body: map[string]interface{}{}, - }, ) if err != nil { var apierr *cloudflare.Error diff --git a/firewall/wafoverride.go b/firewall/wafoverride.go index 18e2efa9f6..319f248664 100644 --- a/firewall/wafoverride.go +++ b/firewall/wafoverride.go @@ -100,7 +100,7 @@ func (r *WAFOverrideService) ListAutoPaging(ctx context.Context, zoneIdentifier // // **Note:** Applies only to the // [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). -func (r *WAFOverrideService) Delete(ctx context.Context, zoneIdentifier string, id string, body WAFOverrideDeleteParams, opts ...option.RequestOption) (res *WAFOverrideDeleteResponse, err error) { +func (r *WAFOverrideService) Delete(ctx context.Context, zoneIdentifier string, id string, opts ...option.RequestOption) (res *WAFOverrideDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env WAFOverrideDeleteResponseEnvelope path := fmt.Sprintf("zones/%s/firewall/waf/overrides/%s", zoneIdentifier, id) @@ -415,14 +415,6 @@ func (r WAFOverrideListParams) URLQuery() (v url.Values) { }) } -type WAFOverrideDeleteParams struct { - Body interface{} `json:"body,required"` -} - -func (r WAFOverrideDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) -} - type WAFOverrideDeleteResponseEnvelope struct { Result WAFOverrideDeleteResponse `json:"result"` JSON wafOverrideDeleteResponseEnvelopeJSON `json:"-"` diff --git a/firewall/wafoverride_test.go b/firewall/wafoverride_test.go index 1a187260cd..0fdcf292af 100644 --- a/firewall/wafoverride_test.go +++ b/firewall/wafoverride_test.go @@ -124,9 +124,6 @@ func TestWAFOverrideDelete(t *testing.T) { context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353", "de677e5818985db1285d0e80225f06e5", - firewall.WAFOverrideDeleteParams{ - Body: map[string]interface{}{}, - }, ) if err != nil { var apierr *cloudflare.Error diff --git a/healthchecks/healthcheck.go b/healthchecks/healthcheck.go index 1916c5b0d4..2dfd51db83 100644 --- a/healthchecks/healthcheck.go +++ b/healthchecks/healthcheck.go @@ -88,10 +88,10 @@ func (r *HealthcheckService) ListAutoPaging(ctx context.Context, params Healthch } // Delete a health check. -func (r *HealthcheckService) Delete(ctx context.Context, healthcheckID string, params HealthcheckDeleteParams, opts ...option.RequestOption) (res *HealthcheckDeleteResponse, err error) { +func (r *HealthcheckService) Delete(ctx context.Context, healthcheckID string, body HealthcheckDeleteParams, opts ...option.RequestOption) (res *HealthcheckDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env HealthcheckDeleteResponseEnvelope - path := fmt.Sprintf("zones/%s/healthchecks/%s", params.ZoneID, healthcheckID) + path := fmt.Sprintf("zones/%s/healthchecks/%s", body.ZoneID, healthcheckID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -588,11 +588,6 @@ func (r HealthcheckListParams) URLQuery() (v url.Values) { type HealthcheckDeleteParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` - Body interface{} `json:"body,required"` -} - -func (r HealthcheckDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type HealthcheckDeleteResponseEnvelope struct { diff --git a/healthchecks/healthcheck_test.go b/healthchecks/healthcheck_test.go index 3edde20e3d..60f1f5c65e 100644 --- a/healthchecks/healthcheck_test.go +++ b/healthchecks/healthcheck_test.go @@ -185,7 +185,6 @@ func TestHealthcheckDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", healthchecks.HealthcheckDeleteParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/healthchecks/preview.go b/healthchecks/preview.go index 2101e5169b..4a2bb591a6 100644 --- a/healthchecks/preview.go +++ b/healthchecks/preview.go @@ -45,10 +45,10 @@ func (r *PreviewService) New(ctx context.Context, params PreviewNewParams, opts } // Delete a health check. -func (r *PreviewService) Delete(ctx context.Context, healthcheckID string, params PreviewDeleteParams, opts ...option.RequestOption) (res *PreviewDeleteResponse, err error) { +func (r *PreviewService) Delete(ctx context.Context, healthcheckID string, body PreviewDeleteParams, opts ...option.RequestOption) (res *PreviewDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env PreviewDeleteResponseEnvelope - path := fmt.Sprintf("zones/%s/healthchecks/preview/%s", params.ZoneID, healthcheckID) + path := fmt.Sprintf("zones/%s/healthchecks/preview/%s", body.ZoneID, healthcheckID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -148,11 +148,6 @@ func (r PreviewNewResponseEnvelopeSuccess) IsKnown() bool { type PreviewDeleteParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` - Body interface{} `json:"body,required"` -} - -func (r PreviewDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type PreviewDeleteResponseEnvelope struct { diff --git a/healthchecks/preview_test.go b/healthchecks/preview_test.go index 47267ef08f..c02dfc44f3 100644 --- a/healthchecks/preview_test.go +++ b/healthchecks/preview_test.go @@ -93,7 +93,6 @@ func TestPreviewDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", healthchecks.PreviewDeleteParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/images/v1.go b/images/v1.go index 5508db8671..2724307ce1 100644 --- a/images/v1.go +++ b/images/v1.go @@ -87,10 +87,10 @@ func (r *V1Service) ListAutoPaging(ctx context.Context, params V1ListParams, opt // Delete an image on Cloudflare Images. On success, all copies of the image are // deleted and purged from cache. -func (r *V1Service) Delete(ctx context.Context, imageID string, params V1DeleteParams, opts ...option.RequestOption) (res *V1DeleteResponseUnion, err error) { +func (r *V1Service) Delete(ctx context.Context, imageID string, body V1DeleteParams, opts ...option.RequestOption) (res *V1DeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) var env V1DeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/images/v1/%s", params.AccountID, imageID) + path := fmt.Sprintf("accounts/%s/images/v1/%s", body.AccountID, imageID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -352,11 +352,6 @@ func (r V1ListParams) URLQuery() (v url.Values) { type V1DeleteParams struct { // Account identifier tag. AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r V1DeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type V1DeleteResponseEnvelope struct { diff --git a/images/v1_test.go b/images/v1_test.go index 3971ac966b..45033c2d44 100644 --- a/images/v1_test.go +++ b/images/v1_test.go @@ -91,7 +91,6 @@ func TestV1Delete(t *testing.T) { "string", images.V1DeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/images/v1variant.go b/images/v1variant.go index 1e1222b24a..dc461ae067 100644 --- a/images/v1variant.go +++ b/images/v1variant.go @@ -60,10 +60,10 @@ func (r *V1VariantService) List(ctx context.Context, query V1VariantListParams, } // Deleting a variant purges the cache for all images associated with the variant. -func (r *V1VariantService) Delete(ctx context.Context, variantID string, params V1VariantDeleteParams, opts ...option.RequestOption) (res *V1VariantDeleteResponseUnion, err error) { +func (r *V1VariantService) Delete(ctx context.Context, variantID string, body V1VariantDeleteParams, opts ...option.RequestOption) (res *V1VariantDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) var env V1VariantDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/images/v1/variants/%s", params.AccountID, variantID) + path := fmt.Sprintf("accounts/%s/images/v1/variants/%s", body.AccountID, variantID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -773,11 +773,6 @@ func (r V1VariantListResponseEnvelopeSuccess) IsKnown() bool { type V1VariantDeleteParams struct { // Account identifier tag. AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r V1VariantDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type V1VariantDeleteResponseEnvelope struct { diff --git a/images/v1variant_test.go b/images/v1variant_test.go index 75b21ec379..f020cc2d65 100644 --- a/images/v1variant_test.go +++ b/images/v1variant_test.go @@ -93,7 +93,6 @@ func TestV1VariantDelete(t *testing.T) { "hero", images.V1VariantDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/intel/attacksurfacereportissue.go b/intel/attacksurfacereportissue.go index 98a16d2b4b..a0d9008419 100644 --- a/intel/attacksurfacereportissue.go +++ b/intel/attacksurfacereportissue.go @@ -113,8 +113,6 @@ func (r *AttackSurfaceReportIssueService) Type(ctx context.Context, params Attac return } -type IssueClassParam []string - type IssueType string const ( @@ -133,8 +131,6 @@ func (r IssueType) IsKnown() bool { return false } -type ProductParam []string - type SeverityQueryParam string const ( @@ -151,8 +147,6 @@ func (r SeverityQueryParam) IsKnown() bool { return false } -type SubjectParam []string - type AttackSurfaceReportIssueListResponse struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` @@ -389,22 +383,22 @@ func (r attackSurfaceReportIssueTypeResponseJSON) RawJSON() string { type AttackSurfaceReportIssueListParams struct { // Identifier - AccountID param.Field[string] `path:"account_id,required"` - Dismissed param.Field[bool] `query:"dismissed"` - IssueClass param.Field[IssueClassParam] `query:"issue_class"` - IssueClassNeq param.Field[IssueClassParam] `query:"issue_class~neq"` - IssueType param.Field[[]IssueType] `query:"issue_type"` - IssueTypeNeq param.Field[[]IssueType] `query:"issue_type~neq"` + AccountID param.Field[string] `path:"account_id,required"` + Dismissed param.Field[bool] `query:"dismissed"` + IssueClass param.Field[[]string] `query:"issue_class"` + IssueClassNeq param.Field[[]string] `query:"issue_class~neq"` + IssueType param.Field[[]IssueType] `query:"issue_type"` + IssueTypeNeq param.Field[[]IssueType] `query:"issue_type~neq"` // Current page within paginated list of results Page param.Field[int64] `query:"page"` // Number of results per page of results PerPage param.Field[int64] `query:"per_page"` - Product param.Field[ProductParam] `query:"product"` - ProductNeq param.Field[ProductParam] `query:"product~neq"` + Product param.Field[[]string] `query:"product"` + ProductNeq param.Field[[]string] `query:"product~neq"` Severity param.Field[[]SeverityQueryParam] `query:"severity"` SeverityNeq param.Field[[]SeverityQueryParam] `query:"severity~neq"` - Subject param.Field[SubjectParam] `query:"subject"` - SubjectNeq param.Field[SubjectParam] `query:"subject~neq"` + Subject param.Field[[]string] `query:"subject"` + SubjectNeq param.Field[[]string] `query:"subject~neq"` } // URLQuery serializes [AttackSurfaceReportIssueListParams]'s query parameters as @@ -420,16 +414,16 @@ type AttackSurfaceReportIssueClassParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` Dismissed param.Field[bool] `query:"dismissed"` - IssueClass param.Field[IssueClassParam] `query:"issue_class"` - IssueClassNeq param.Field[IssueClassParam] `query:"issue_class~neq"` + IssueClass param.Field[[]string] `query:"issue_class"` + IssueClassNeq param.Field[[]string] `query:"issue_class~neq"` IssueType param.Field[[]IssueType] `query:"issue_type"` IssueTypeNeq param.Field[[]IssueType] `query:"issue_type~neq"` - Product param.Field[ProductParam] `query:"product"` - ProductNeq param.Field[ProductParam] `query:"product~neq"` + Product param.Field[[]string] `query:"product"` + ProductNeq param.Field[[]string] `query:"product~neq"` Severity param.Field[[]SeverityQueryParam] `query:"severity"` SeverityNeq param.Field[[]SeverityQueryParam] `query:"severity~neq"` - Subject param.Field[SubjectParam] `query:"subject"` - SubjectNeq param.Field[SubjectParam] `query:"subject~neq"` + Subject param.Field[[]string] `query:"subject"` + SubjectNeq param.Field[[]string] `query:"subject~neq"` } // URLQuery serializes [AttackSurfaceReportIssueClassParams]'s query parameters as @@ -541,16 +535,16 @@ type AttackSurfaceReportIssueSeverityParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` Dismissed param.Field[bool] `query:"dismissed"` - IssueClass param.Field[IssueClassParam] `query:"issue_class"` - IssueClassNeq param.Field[IssueClassParam] `query:"issue_class~neq"` + IssueClass param.Field[[]string] `query:"issue_class"` + IssueClassNeq param.Field[[]string] `query:"issue_class~neq"` IssueType param.Field[[]IssueType] `query:"issue_type"` IssueTypeNeq param.Field[[]IssueType] `query:"issue_type~neq"` - Product param.Field[ProductParam] `query:"product"` - ProductNeq param.Field[ProductParam] `query:"product~neq"` + Product param.Field[[]string] `query:"product"` + ProductNeq param.Field[[]string] `query:"product~neq"` Severity param.Field[[]SeverityQueryParam] `query:"severity"` SeverityNeq param.Field[[]SeverityQueryParam] `query:"severity~neq"` - Subject param.Field[SubjectParam] `query:"subject"` - SubjectNeq param.Field[SubjectParam] `query:"subject~neq"` + Subject param.Field[[]string] `query:"subject"` + SubjectNeq param.Field[[]string] `query:"subject~neq"` } // URLQuery serializes [AttackSurfaceReportIssueSeverityParams]'s query parameters @@ -609,16 +603,16 @@ type AttackSurfaceReportIssueTypeParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` Dismissed param.Field[bool] `query:"dismissed"` - IssueClass param.Field[IssueClassParam] `query:"issue_class"` - IssueClassNeq param.Field[IssueClassParam] `query:"issue_class~neq"` + IssueClass param.Field[[]string] `query:"issue_class"` + IssueClassNeq param.Field[[]string] `query:"issue_class~neq"` IssueType param.Field[[]IssueType] `query:"issue_type"` IssueTypeNeq param.Field[[]IssueType] `query:"issue_type~neq"` - Product param.Field[ProductParam] `query:"product"` - ProductNeq param.Field[ProductParam] `query:"product~neq"` + Product param.Field[[]string] `query:"product"` + ProductNeq param.Field[[]string] `query:"product~neq"` Severity param.Field[[]SeverityQueryParam] `query:"severity"` SeverityNeq param.Field[[]SeverityQueryParam] `query:"severity~neq"` - Subject param.Field[SubjectParam] `query:"subject"` - SubjectNeq param.Field[SubjectParam] `query:"subject~neq"` + Subject param.Field[[]string] `query:"subject"` + SubjectNeq param.Field[[]string] `query:"subject~neq"` } // URLQuery serializes [AttackSurfaceReportIssueTypeParams]'s query parameters as diff --git a/keyless_certificates/keylesscertificate.go b/keyless_certificates/keylesscertificate.go index 903d0dc242..610a8d75f1 100644 --- a/keyless_certificates/keylesscertificate.go +++ b/keyless_certificates/keylesscertificate.go @@ -72,10 +72,10 @@ func (r *KeylessCertificateService) ListAutoPaging(ctx context.Context, query Ke } // Delete Keyless SSL Configuration -func (r *KeylessCertificateService) Delete(ctx context.Context, keylessCertificateID string, params KeylessCertificateDeleteParams, opts ...option.RequestOption) (res *KeylessCertificateDeleteResponse, err error) { +func (r *KeylessCertificateService) Delete(ctx context.Context, keylessCertificateID string, body KeylessCertificateDeleteParams, opts ...option.RequestOption) (res *KeylessCertificateDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env KeylessCertificateDeleteResponseEnvelope - path := fmt.Sprintf("zones/%s/keyless_certificates/%s", params.ZoneID, keylessCertificateID) + path := fmt.Sprintf("zones/%s/keyless_certificates/%s", body.ZoneID, keylessCertificateID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -313,11 +313,6 @@ type KeylessCertificateListParams struct { type KeylessCertificateDeleteParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` - Body interface{} `json:"body,required"` -} - -func (r KeylessCertificateDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type KeylessCertificateDeleteResponseEnvelope struct { diff --git a/keyless_certificates/keylesscertificate_test.go b/keyless_certificates/keylesscertificate_test.go index bef4462bd5..b34e62956f 100644 --- a/keyless_certificates/keylesscertificate_test.go +++ b/keyless_certificates/keylesscertificate_test.go @@ -95,7 +95,6 @@ func TestKeylessCertificateDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", keyless_certificates.KeylessCertificateDeleteParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/kv/namespace.go b/kv/namespace.go index c91a623e4b..745f08a6fa 100644 --- a/kv/namespace.go +++ b/kv/namespace.go @@ -96,10 +96,10 @@ func (r *NamespaceService) ListAutoPaging(ctx context.Context, params NamespaceL } // Deletes the namespace corresponding to the given ID. -func (r *NamespaceService) Delete(ctx context.Context, namespaceID string, params NamespaceDeleteParams, opts ...option.RequestOption) (res *NamespaceDeleteResponseUnion, err error) { +func (r *NamespaceService) Delete(ctx context.Context, namespaceID string, body NamespaceDeleteParams, opts ...option.RequestOption) (res *NamespaceDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) var env NamespaceDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/storage/kv/namespaces/%s", params.AccountID, namespaceID) + path := fmt.Sprintf("accounts/%s/storage/kv/namespaces/%s", body.AccountID, namespaceID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -332,11 +332,6 @@ func (r NamespaceListParamsOrder) IsKnown() bool { type NamespaceDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r NamespaceDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type NamespaceDeleteResponseEnvelope struct { diff --git a/kv/namespace_test.go b/kv/namespace_test.go index 3d4bbb4e88..635b9e316c 100644 --- a/kv/namespace_test.go +++ b/kv/namespace_test.go @@ -121,7 +121,6 @@ func TestNamespaceDelete(t *testing.T) { "0f2ac74b498b48028cb68387c421e279", kv.NamespaceDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/kv/namespacebulk.go b/kv/namespacebulk.go index 6d492909e2..00f4f5c2d5 100644 --- a/kv/namespacebulk.go +++ b/kv/namespacebulk.go @@ -54,11 +54,11 @@ func (r *NamespaceBulkService) Update(ctx context.Context, namespaceID string, p // Remove multiple KV pairs from the namespace. Body should be an array of up to // 10,000 keys to be removed. -func (r *NamespaceBulkService) Delete(ctx context.Context, namespaceID string, params NamespaceBulkDeleteParams, opts ...option.RequestOption) (res *NamespaceBulkDeleteResponseUnion, err error) { +func (r *NamespaceBulkService) Delete(ctx context.Context, namespaceID string, body NamespaceBulkDeleteParams, opts ...option.RequestOption) (res *NamespaceBulkDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) var env NamespaceBulkDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/storage/kv/namespaces/%s/bulk", params.AccountID, namespaceID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, params, &env, opts...) + path := fmt.Sprintf("accounts/%s/storage/kv/namespaces/%s/bulk", body.AccountID, namespaceID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return } @@ -180,11 +180,6 @@ func (r NamespaceBulkUpdateResponseEnvelopeSuccess) IsKnown() bool { type NamespaceBulkDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body []string `json:"body,required"` -} - -func (r NamespaceBulkDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type NamespaceBulkDeleteResponseEnvelope struct { diff --git a/kv/namespacebulk_test.go b/kv/namespacebulk_test.go index b8ab731e9f..85bb4994cd 100644 --- a/kv/namespacebulk_test.go +++ b/kv/namespacebulk_test.go @@ -91,7 +91,6 @@ func TestNamespaceBulkDelete(t *testing.T) { "0f2ac74b498b48028cb68387c421e279", kv.NamespaceBulkDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: []string{"My-Key", "My-Key", "My-Key"}, }, ) if err != nil { diff --git a/kv/namespacevalue.go b/kv/namespacevalue.go index c5b061402a..2563520d36 100644 --- a/kv/namespacevalue.go +++ b/kv/namespacevalue.go @@ -54,10 +54,10 @@ func (r *NamespaceValueService) Update(ctx context.Context, namespaceID string, // Remove a KV pair from the namespace. Use URL-encoding to use special characters // (for example, `:`, `!`, `%`) in the key name. -func (r *NamespaceValueService) Delete(ctx context.Context, namespaceID string, keyName string, params NamespaceValueDeleteParams, opts ...option.RequestOption) (res *NamespaceValueDeleteResponseUnion, err error) { +func (r *NamespaceValueService) Delete(ctx context.Context, namespaceID string, keyName string, body NamespaceValueDeleteParams, opts ...option.RequestOption) (res *NamespaceValueDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) var env NamespaceValueDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/storage/kv/namespaces/%s/values/%s", params.AccountID, namespaceID, keyName) + path := fmt.Sprintf("accounts/%s/storage/kv/namespaces/%s/values/%s", body.AccountID, namespaceID, keyName) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -171,11 +171,6 @@ func (r NamespaceValueUpdateResponseEnvelopeSuccess) IsKnown() bool { type NamespaceValueDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r NamespaceValueDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type NamespaceValueDeleteResponseEnvelope struct { diff --git a/kv/namespacevalue_test.go b/kv/namespacevalue_test.go index 175a684b6f..6cc0ab6697 100644 --- a/kv/namespacevalue_test.go +++ b/kv/namespacevalue_test.go @@ -67,7 +67,6 @@ func TestNamespaceValueDelete(t *testing.T) { "My-Key", kv.NamespaceValueDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/load_balancers/loadbalancer.go b/load_balancers/loadbalancer.go index 1447f7662c..30b089522c 100644 --- a/load_balancers/loadbalancer.go +++ b/load_balancers/loadbalancer.go @@ -94,10 +94,10 @@ func (r *LoadBalancerService) ListAutoPaging(ctx context.Context, query LoadBala } // Delete a configured load balancer. -func (r *LoadBalancerService) Delete(ctx context.Context, loadBalancerID string, params LoadBalancerDeleteParams, opts ...option.RequestOption) (res *LoadBalancerDeleteResponse, err error) { +func (r *LoadBalancerService) Delete(ctx context.Context, loadBalancerID string, body LoadBalancerDeleteParams, opts ...option.RequestOption) (res *LoadBalancerDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env LoadBalancerDeleteResponseEnvelope - path := fmt.Sprintf("zones/%s/load_balancers/%s", params.ZoneID, loadBalancerID) + path := fmt.Sprintf("zones/%s/load_balancers/%s", body.ZoneID, loadBalancerID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -2194,11 +2194,6 @@ type LoadBalancerListParams struct { type LoadBalancerDeleteParams struct { ZoneID param.Field[string] `path:"zone_id,required"` - Body interface{} `json:"body,required"` -} - -func (r LoadBalancerDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type LoadBalancerDeleteResponseEnvelope struct { diff --git a/load_balancers/loadbalancer_test.go b/load_balancers/loadbalancer_test.go index ce92749b2f..9142624af4 100644 --- a/load_balancers/loadbalancer_test.go +++ b/load_balancers/loadbalancer_test.go @@ -680,7 +680,6 @@ func TestLoadBalancerDelete(t *testing.T) { "699d98642c564d2e855e9661899b7252", load_balancers.LoadBalancerDeleteParams{ ZoneID: cloudflare.F("699d98642c564d2e855e9661899b7252"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/load_balancers/monitor.go b/load_balancers/monitor.go index 1fdd2f373f..4691e2e59f 100644 --- a/load_balancers/monitor.go +++ b/load_balancers/monitor.go @@ -87,10 +87,10 @@ func (r *MonitorService) ListAutoPaging(ctx context.Context, query MonitorListPa } // Delete a configured monitor. -func (r *MonitorService) Delete(ctx context.Context, monitorID string, params MonitorDeleteParams, opts ...option.RequestOption) (res *MonitorDeleteResponse, err error) { +func (r *MonitorService) Delete(ctx context.Context, monitorID string, body MonitorDeleteParams, opts ...option.RequestOption) (res *MonitorDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env MonitorDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/load_balancers/monitors/%s", params.AccountID, monitorID) + path := fmt.Sprintf("accounts/%s/load_balancers/monitors/%s", body.AccountID, monitorID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -508,11 +508,6 @@ type MonitorListParams struct { type MonitorDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r MonitorDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type MonitorDeleteResponseEnvelope struct { diff --git a/load_balancers/monitor_test.go b/load_balancers/monitor_test.go index 60066c9107..10fc985fc5 100644 --- a/load_balancers/monitor_test.go +++ b/load_balancers/monitor_test.go @@ -161,7 +161,6 @@ func TestMonitorDelete(t *testing.T) { "f1aba936b94213e5b8dca0c0dbf1f9cc", load_balancers.MonitorDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/load_balancers/pool.go b/load_balancers/pool.go index 49a79ff74a..b790ff98dd 100644 --- a/load_balancers/pool.go +++ b/load_balancers/pool.go @@ -89,10 +89,10 @@ func (r *PoolService) ListAutoPaging(ctx context.Context, params PoolListParams, } // Delete a configured pool. -func (r *PoolService) Delete(ctx context.Context, poolID string, params PoolDeleteParams, opts ...option.RequestOption) (res *PoolDeleteResponse, err error) { +func (r *PoolService) Delete(ctx context.Context, poolID string, body PoolDeleteParams, opts ...option.RequestOption) (res *PoolDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env PoolDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/load_balancers/pools/%s", params.AccountID, poolID) + path := fmt.Sprintf("accounts/%s/load_balancers/pools/%s", body.AccountID, poolID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -435,11 +435,6 @@ func (r PoolListParams) URLQuery() (v url.Values) { type PoolDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r PoolDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type PoolDeleteResponseEnvelope struct { diff --git a/load_balancers/pool_test.go b/load_balancers/pool_test.go index 2d16443595..946e0246d5 100644 --- a/load_balancers/pool_test.go +++ b/load_balancers/pool_test.go @@ -227,7 +227,6 @@ func TestPoolDelete(t *testing.T) { "17b5962d775c646f3f9725cbc7a53df4", load_balancers.PoolDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/logpush/job.go b/logpush/job.go index fdcec70eb6..d97768d62a 100644 --- a/logpush/job.go +++ b/logpush/job.go @@ -110,17 +110,17 @@ func (r *JobService) ListAutoPaging(ctx context.Context, query JobListParams, op } // Deletes a Logpush job. -func (r *JobService) Delete(ctx context.Context, jobID int64, params JobDeleteParams, opts ...option.RequestOption) (res *JobDeleteResponse, err error) { +func (r *JobService) Delete(ctx context.Context, jobID int64, body JobDeleteParams, opts ...option.RequestOption) (res *JobDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env JobDeleteResponseEnvelope var accountOrZone string var accountOrZoneID param.Field[string] - if params.AccountID.Present { + if body.AccountID.Present { accountOrZone = "accounts" - accountOrZoneID = params.AccountID + accountOrZoneID = body.AccountID } else { accountOrZone = "zones" - accountOrZoneID = params.ZoneID + accountOrZoneID = body.ZoneID } path := fmt.Sprintf("%s/%s/logpush/jobs/%v", accountOrZone, accountOrZoneID, jobID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) @@ -588,17 +588,12 @@ type JobListParams struct { } type JobDeleteParams struct { - Body interface{} `json:"body,required"` // The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. AccountID param.Field[string] `path:"account_id"` // The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. ZoneID param.Field[string] `path:"zone_id"` } -func (r JobDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) -} - type JobDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` diff --git a/logpush/job_test.go b/logpush/job_test.go index b1793153a7..0e4ae154ef 100644 --- a/logpush/job_test.go +++ b/logpush/job_test.go @@ -157,7 +157,6 @@ func TestJobDeleteWithOptionalParams(t *testing.T) { context.TODO(), int64(1), logpush.JobDeleteParams{ - Body: map[string]interface{}{}, AccountID: cloudflare.F("string"), ZoneID: cloudflare.F("string"), }, diff --git a/logs/controlcmbconfig.go b/logs/controlcmbconfig.go index cfbda10594..1677c46114 100644 --- a/logs/controlcmbconfig.go +++ b/logs/controlcmbconfig.go @@ -46,10 +46,10 @@ func (r *ControlCmbConfigService) New(ctx context.Context, params ControlCmbConf } // Deletes CMB config. -func (r *ControlCmbConfigService) Delete(ctx context.Context, params ControlCmbConfigDeleteParams, opts ...option.RequestOption) (res *ControlCmbConfigDeleteResponse, err error) { +func (r *ControlCmbConfigService) Delete(ctx context.Context, body ControlCmbConfigDeleteParams, opts ...option.RequestOption) (res *ControlCmbConfigDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env ControlCmbConfigDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/logs/control/cmb/config", params.AccountID) + path := fmt.Sprintf("accounts/%s/logs/control/cmb/config", body.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -159,11 +159,6 @@ func (r ControlCmbConfigNewResponseEnvelopeSuccess) IsKnown() bool { type ControlCmbConfigDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r ControlCmbConfigDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type ControlCmbConfigDeleteResponseEnvelope struct { diff --git a/logs/controlcmbconfig_test.go b/logs/controlcmbconfig_test.go index adad27d923..54d324e229 100644 --- a/logs/controlcmbconfig_test.go +++ b/logs/controlcmbconfig_test.go @@ -59,7 +59,6 @@ func TestControlCmbConfigDelete(t *testing.T) { ) _, err := client.Logs.Control.Cmb.Config.Delete(context.TODO(), logs.ControlCmbConfigDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }) if err != nil { var apierr *cloudflare.Error diff --git a/magic_network_monitoring/config.go b/magic_network_monitoring/config.go index 8a0e76206c..1a6284909d 100644 --- a/magic_network_monitoring/config.go +++ b/magic_network_monitoring/config.go @@ -61,10 +61,10 @@ func (r *ConfigService) Update(ctx context.Context, params ConfigUpdateParams, o } // Delete an existing network monitoring configuration. -func (r *ConfigService) Delete(ctx context.Context, params ConfigDeleteParams, opts ...option.RequestOption) (res *Configuration, err error) { +func (r *ConfigService) Delete(ctx context.Context, body ConfigDeleteParams, opts ...option.RequestOption) (res *Configuration, err error) { opts = append(r.Options[:], opts...) var env ConfigDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/mnm/config", params.AccountID) + path := fmt.Sprintf("accounts/%s/mnm/config", body.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -232,11 +232,6 @@ func (r ConfigUpdateResponseEnvelopeSuccess) IsKnown() bool { type ConfigDeleteParams struct { AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r ConfigDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type ConfigDeleteResponseEnvelope struct { diff --git a/magic_network_monitoring/config_test.go b/magic_network_monitoring/config_test.go index 7cc445edfb..43e250192e 100644 --- a/magic_network_monitoring/config_test.go +++ b/magic_network_monitoring/config_test.go @@ -84,7 +84,6 @@ func TestConfigDelete(t *testing.T) { ) _, err := client.MagicNetworkMonitoring.Configs.Delete(context.TODO(), magic_network_monitoring.ConfigDeleteParams{ AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"), - Body: map[string]interface{}{}, }) if err != nil { var apierr *cloudflare.Error diff --git a/magic_network_monitoring/rule.go b/magic_network_monitoring/rule.go index 54f907a8f6..9b1636452f 100644 --- a/magic_network_monitoring/rule.go +++ b/magic_network_monitoring/rule.go @@ -85,10 +85,10 @@ func (r *RuleService) ListAutoPaging(ctx context.Context, query RuleListParams, } // Delete a network monitoring rule for account. -func (r *RuleService) Delete(ctx context.Context, ruleID string, params RuleDeleteParams, opts ...option.RequestOption) (res *MagicNetworkMonitoringRule, err error) { +func (r *RuleService) Delete(ctx context.Context, ruleID string, body RuleDeleteParams, opts ...option.RequestOption) (res *MagicNetworkMonitoringRule, err error) { opts = append(r.Options[:], opts...) var env RuleDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/mnm/rules/%s", params.AccountID, ruleID) + path := fmt.Sprintf("accounts/%s/mnm/rules/%s", body.AccountID, ruleID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -282,11 +282,6 @@ type RuleListParams struct { type RuleDeleteParams struct { AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r RuleDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type RuleDeleteResponseEnvelope struct { diff --git a/magic_network_monitoring/rule_test.go b/magic_network_monitoring/rule_test.go index 711b273f82..3d302fa13f 100644 --- a/magic_network_monitoring/rule_test.go +++ b/magic_network_monitoring/rule_test.go @@ -113,7 +113,6 @@ func TestRuleDelete(t *testing.T) { "2890e6fa406311ed9b5a23f70f6fb8cf", magic_network_monitoring.RuleDeleteParams{ AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/magic_transit/gretunnel.go b/magic_transit/gretunnel.go index 7e522ece0e..9e07a41d29 100644 --- a/magic_transit/gretunnel.go +++ b/magic_transit/gretunnel.go @@ -75,10 +75,10 @@ func (r *GRETunnelService) List(ctx context.Context, query GRETunnelListParams, // Disables and removes a specific static GRE tunnel. Use `?validate_only=true` as // an optional query parameter to only run validation without persisting changes. -func (r *GRETunnelService) Delete(ctx context.Context, tunnelIdentifier string, params GRETunnelDeleteParams, opts ...option.RequestOption) (res *GRETunnelDeleteResponse, err error) { +func (r *GRETunnelService) Delete(ctx context.Context, tunnelIdentifier string, body GRETunnelDeleteParams, opts ...option.RequestOption) (res *GRETunnelDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env GRETunnelDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/magic/gre_tunnels/%s", params.AccountID, tunnelIdentifier) + path := fmt.Sprintf("accounts/%s/magic/gre_tunnels/%s", body.AccountID, tunnelIdentifier) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -494,11 +494,6 @@ func (r GRETunnelListResponseEnvelopeSuccess) IsKnown() bool { type GRETunnelDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r GRETunnelDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type GRETunnelDeleteResponseEnvelope struct { diff --git a/magic_transit/gretunnel_test.go b/magic_transit/gretunnel_test.go index 585c40d1c3..4c1fc00b4f 100644 --- a/magic_transit/gretunnel_test.go +++ b/magic_transit/gretunnel_test.go @@ -130,7 +130,6 @@ func TestGRETunnelDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", magic_transit.GRETunnelDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/magic_transit/ipsectunnel.go b/magic_transit/ipsectunnel.go index ce23c8d77c..f436e585c6 100644 --- a/magic_transit/ipsectunnel.go +++ b/magic_transit/ipsectunnel.go @@ -79,10 +79,10 @@ func (r *IPSECTunnelService) List(ctx context.Context, query IPSECTunnelListPara // Disables and removes a specific static IPsec Tunnel associated with an account. // Use `?validate_only=true` as an optional query parameter to only run validation // without persisting changes. -func (r *IPSECTunnelService) Delete(ctx context.Context, tunnelIdentifier string, params IPSECTunnelDeleteParams, opts ...option.RequestOption) (res *IPSECTunnelDeleteResponse, err error) { +func (r *IPSECTunnelService) Delete(ctx context.Context, tunnelIdentifier string, body IPSECTunnelDeleteParams, opts ...option.RequestOption) (res *IPSECTunnelDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env IPSECTunnelDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/magic/ipsec_tunnels/%s", params.AccountID, tunnelIdentifier) + path := fmt.Sprintf("accounts/%s/magic/ipsec_tunnels/%s", body.AccountID, tunnelIdentifier) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -657,11 +657,6 @@ func (r IPSECTunnelListResponseEnvelopeSuccess) IsKnown() bool { type IPSECTunnelDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r IPSECTunnelDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type IPSECTunnelDeleteResponseEnvelope struct { diff --git a/magic_transit/ipsectunnel_test.go b/magic_transit/ipsectunnel_test.go index 535200851f..db0d620d47 100644 --- a/magic_transit/ipsectunnel_test.go +++ b/magic_transit/ipsectunnel_test.go @@ -143,7 +143,6 @@ func TestIPSECTunnelDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", magic_transit.IPSECTunnelDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/magic_transit/route.go b/magic_transit/route.go index 7f1a252d67..620707b7bd 100644 --- a/magic_transit/route.go +++ b/magic_transit/route.go @@ -74,10 +74,10 @@ func (r *RouteService) List(ctx context.Context, query RouteListParams, opts ... } // Disable and remove a specific Magic static route. -func (r *RouteService) Delete(ctx context.Context, routeIdentifier string, params RouteDeleteParams, opts ...option.RequestOption) (res *RouteDeleteResponse, err error) { +func (r *RouteService) Delete(ctx context.Context, routeIdentifier string, body RouteDeleteParams, opts ...option.RequestOption) (res *RouteDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env RouteDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/magic/routes/%s", params.AccountID, routeIdentifier) + path := fmt.Sprintf("accounts/%s/magic/routes/%s", body.AccountID, routeIdentifier) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -87,11 +87,11 @@ func (r *RouteService) Delete(ctx context.Context, routeIdentifier string, param } // Delete multiple Magic static routes. -func (r *RouteService) Empty(ctx context.Context, params RouteEmptyParams, opts ...option.RequestOption) (res *RouteEmptyResponse, err error) { +func (r *RouteService) Empty(ctx context.Context, body RouteEmptyParams, opts ...option.RequestOption) (res *RouteEmptyResponse, err error) { opts = append(r.Options[:], opts...) var env RouteEmptyResponseEnvelope - path := fmt.Sprintf("accounts/%s/magic/routes", params.AccountID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, params, &env, opts...) + path := fmt.Sprintf("accounts/%s/magic/routes", body.AccountID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return } @@ -112,21 +112,13 @@ func (r *RouteService) Get(ctx context.Context, routeIdentifier string, query Ro return } -type ColoName []string - -type ColoNameParam []string - -type ColoRegion []string - -type ColoRegionParam []string - // Used only for ECMP routes. type Scope struct { // List of colo names for the ECMP scope. - ColoNames ColoName `json:"colo_names"` + ColoNames []string `json:"colo_names"` // List of colo regions for the ECMP scope. - ColoRegions ColoRegion `json:"colo_regions"` - JSON scopeJSON `json:"-"` + ColoRegions []string `json:"colo_regions"` + JSON scopeJSON `json:"-"` } // scopeJSON contains the JSON metadata for the struct [Scope] @@ -148,9 +140,9 @@ func (r scopeJSON) RawJSON() string { // Used only for ECMP routes. type ScopeParam struct { // List of colo names for the ECMP scope. - ColoNames param.Field[ColoNameParam] `json:"colo_names"` + ColoNames param.Field[[]string] `json:"colo_names"` // List of colo regions for the ECMP scope. - ColoRegions param.Field[ColoRegionParam] `json:"colo_regions"` + ColoRegions param.Field[[]string] `json:"colo_regions"` } func (r ScopeParam) MarshalJSON() (data []byte, err error) { @@ -549,11 +541,6 @@ func (r RouteListResponseEnvelopeSuccess) IsKnown() bool { type RouteDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r RouteDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type RouteDeleteResponseEnvelope struct { @@ -601,19 +588,7 @@ func (r RouteDeleteResponseEnvelopeSuccess) IsKnown() bool { type RouteEmptyParams struct { // Identifier - AccountID param.Field[string] `path:"account_id,required"` - Routes param.Field[[]RouteEmptyParamsRoute] `json:"routes,required"` -} - -func (r RouteEmptyParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type RouteEmptyParamsRoute struct { -} - -func (r RouteEmptyParamsRoute) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) + AccountID param.Field[string] `path:"account_id,required"` } type RouteEmptyResponseEnvelope struct { diff --git a/magic_transit/route_test.go b/magic_transit/route_test.go index bf86a596a0..f7d3643936 100644 --- a/magic_transit/route_test.go +++ b/magic_transit/route_test.go @@ -125,7 +125,6 @@ func TestRouteDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", magic_transit.RouteDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { @@ -153,7 +152,6 @@ func TestRouteEmpty(t *testing.T) { ) _, err := client.MagicTransit.Routes.Empty(context.TODO(), magic_transit.RouteEmptyParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Routes: cloudflare.F([]magic_transit.RouteEmptyParamsRoute{{}, {}, {}}), }) if err != nil { var apierr *cloudflare.Error diff --git a/magic_transit/site.go b/magic_transit/site.go index e5f320a267..b1e1020e33 100644 --- a/magic_transit/site.go +++ b/magic_transit/site.go @@ -94,10 +94,10 @@ func (r *SiteService) ListAutoPaging(ctx context.Context, params SiteListParams, } // Remove a specific Site. -func (r *SiteService) Delete(ctx context.Context, siteID string, params SiteDeleteParams, opts ...option.RequestOption) (res *Site, err error) { +func (r *SiteService) Delete(ctx context.Context, siteID string, body SiteDeleteParams, opts ...option.RequestOption) (res *Site, err error) { opts = append(r.Options[:], opts...) var env SiteDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/magic/sites/%s", params.AccountID, siteID) + path := fmt.Sprintf("accounts/%s/magic/sites/%s", body.AccountID, siteID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -338,11 +338,6 @@ func (r SiteListParams) URLQuery() (v url.Values) { type SiteDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r SiteDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type SiteDeleteResponseEnvelope struct { diff --git a/magic_transit/site_test.go b/magic_transit/site_test.go index eac5b8ab0b..564504ec54 100644 --- a/magic_transit/site_test.go +++ b/magic_transit/site_test.go @@ -133,7 +133,6 @@ func TestSiteDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", magic_transit.SiteDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/magic_transit/siteacl.go b/magic_transit/siteacl.go index 186b4b1c85..1ccb1c427f 100644 --- a/magic_transit/siteacl.go +++ b/magic_transit/siteacl.go @@ -84,10 +84,10 @@ func (r *SiteACLService) ListAutoPaging(ctx context.Context, siteID string, quer } // Remove a specific Site ACL. -func (r *SiteACLService) Delete(ctx context.Context, siteID string, aclIdentifier string, params SiteACLDeleteParams, opts ...option.RequestOption) (res *ACL, err error) { +func (r *SiteACLService) Delete(ctx context.Context, siteID string, aclIdentifier string, body SiteACLDeleteParams, opts ...option.RequestOption) (res *ACL, err error) { opts = append(r.Options[:], opts...) var env SiteACLDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/magic/sites/%s/acls/%s", params.AccountID, siteID, aclIdentifier) + path := fmt.Sprintf("accounts/%s/magic/sites/%s/acls/%s", body.AccountID, siteID, aclIdentifier) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -384,11 +384,6 @@ type SiteACLListParams struct { type SiteACLDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r SiteACLDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type SiteACLDeleteResponseEnvelope struct { diff --git a/magic_transit/siteacl_test.go b/magic_transit/siteacl_test.go index 1170652240..2879fe2244 100644 --- a/magic_transit/siteacl_test.go +++ b/magic_transit/siteacl_test.go @@ -158,7 +158,6 @@ func TestSiteACLDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", magic_transit.SiteACLDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/magic_transit/sitelan.go b/magic_transit/sitelan.go index 171caa1bf4..2e46b370c7 100644 --- a/magic_transit/sitelan.go +++ b/magic_transit/sitelan.go @@ -83,10 +83,10 @@ func (r *SiteLANService) ListAutoPaging(ctx context.Context, siteID string, quer } // Remove a specific LAN. -func (r *SiteLANService) Delete(ctx context.Context, siteID string, lanID string, params SiteLANDeleteParams, opts ...option.RequestOption) (res *LAN, err error) { +func (r *SiteLANService) Delete(ctx context.Context, siteID string, lanID string, body SiteLANDeleteParams, opts ...option.RequestOption) (res *LAN, err error) { opts = append(r.Options[:], opts...) var env SiteLANDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/magic/sites/%s/lans/%s", params.AccountID, siteID, lanID) + path := fmt.Sprintf("accounts/%s/magic/sites/%s/lans/%s", body.AccountID, siteID, lanID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -483,11 +483,6 @@ type SiteLANListParams struct { type SiteLANDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r SiteLANDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type SiteLANDeleteResponseEnvelope struct { diff --git a/magic_transit/sitelan_test.go b/magic_transit/sitelan_test.go index 8ea86cbfc6..6b7a1b2033 100644 --- a/magic_transit/sitelan_test.go +++ b/magic_transit/sitelan_test.go @@ -210,7 +210,6 @@ func TestSiteLANDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", magic_transit.SiteLANDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/magic_transit/sitewan.go b/magic_transit/sitewan.go index 31cdc76d3d..6753d907fe 100644 --- a/magic_transit/sitewan.go +++ b/magic_transit/sitewan.go @@ -82,10 +82,10 @@ func (r *SiteWANService) ListAutoPaging(ctx context.Context, siteID string, quer } // Remove a specific WAN. -func (r *SiteWANService) Delete(ctx context.Context, siteID string, wanID string, params SiteWANDeleteParams, opts ...option.RequestOption) (res *WAN, err error) { +func (r *SiteWANService) Delete(ctx context.Context, siteID string, wanID string, body SiteWANDeleteParams, opts ...option.RequestOption) (res *WAN, err error) { opts = append(r.Options[:], opts...) var env SiteWANDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/magic/sites/%s/wans/%s", params.AccountID, siteID, wanID) + path := fmt.Sprintf("accounts/%s/magic/sites/%s/wans/%s", body.AccountID, siteID, wanID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -318,11 +318,6 @@ type SiteWANListParams struct { type SiteWANDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r SiteWANDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type SiteWANDeleteResponseEnvelope struct { diff --git a/magic_transit/sitewan_test.go b/magic_transit/sitewan_test.go index 2961c1ac37..3942bdc7dd 100644 --- a/magic_transit/sitewan_test.go +++ b/magic_transit/sitewan_test.go @@ -143,7 +143,6 @@ func TestSiteWANDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", magic_transit.SiteWANDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/memberships/membership.go b/memberships/membership.go index 2d2c95a52a..cf6ea93d26 100644 --- a/memberships/membership.go +++ b/memberships/membership.go @@ -74,7 +74,7 @@ func (r *MembershipService) ListAutoPaging(ctx context.Context, query Membership } // Remove the associated member from an account. -func (r *MembershipService) Delete(ctx context.Context, membershipID string, body MembershipDeleteParams, opts ...option.RequestOption) (res *MembershipDeleteResponse, err error) { +func (r *MembershipService) Delete(ctx context.Context, membershipID string, opts ...option.RequestOption) (res *MembershipDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env MembershipDeleteResponseEnvelope path := fmt.Sprintf("memberships/%s", membershipID) @@ -411,14 +411,6 @@ func (r MembershipListParamsStatus) IsKnown() bool { return false } -type MembershipDeleteParams struct { - Body interface{} `json:"body,required"` -} - -func (r MembershipDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) -} - type MembershipDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` diff --git a/memberships/membership_test.go b/memberships/membership_test.go index cd5c30699e..0181c24d7f 100644 --- a/memberships/membership_test.go +++ b/memberships/membership_test.go @@ -92,13 +92,7 @@ func TestMembershipDelete(t *testing.T) { option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), option.WithAPIEmail("user@example.com"), ) - _, err := client.Memberships.Delete( - context.TODO(), - "4536bcfad5faccb111b47003c79917fa", - memberships.MembershipDeleteParams{ - Body: map[string]interface{}{}, - }, - ) + _, err := client.Memberships.Delete(context.TODO(), "4536bcfad5faccb111b47003c79917fa") if err != nil { var apierr *cloudflare.Error if errors.As(err, &apierr) { diff --git a/mtls_certificates/mtlscertificate.go b/mtls_certificates/mtlscertificate.go index f6edb7beb2..35b54e47ae 100644 --- a/mtls_certificates/mtlscertificate.go +++ b/mtls_certificates/mtlscertificate.go @@ -74,10 +74,10 @@ func (r *MTLSCertificateService) ListAutoPaging(ctx context.Context, query MTLSC // Deletes the mTLS certificate unless the certificate is in use by one or more // Cloudflare services. -func (r *MTLSCertificateService) Delete(ctx context.Context, mtlsCertificateID string, params MTLSCertificateDeleteParams, opts ...option.RequestOption) (res *MTLSCertificate, err error) { +func (r *MTLSCertificateService) Delete(ctx context.Context, mtlsCertificateID string, body MTLSCertificateDeleteParams, opts ...option.RequestOption) (res *MTLSCertificate, err error) { opts = append(r.Options[:], opts...) var env MTLSCertificateDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/mtls_certificates/%s", params.AccountID, mtlsCertificateID) + path := fmt.Sprintf("accounts/%s/mtls_certificates/%s", body.AccountID, mtlsCertificateID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -261,11 +261,6 @@ type MTLSCertificateListParams struct { type MTLSCertificateDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r MTLSCertificateDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type MTLSCertificateDeleteResponseEnvelope struct { diff --git a/mtls_certificates/mtlscertificate_test.go b/mtls_certificates/mtlscertificate_test.go index 339b113e18..7646b992b4 100644 --- a/mtls_certificates/mtlscertificate_test.go +++ b/mtls_certificates/mtlscertificate_test.go @@ -89,7 +89,6 @@ func TestMTLSCertificateDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", mtls_certificates.MTLSCertificateDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/origin_ca_certificates/origincacertificate.go b/origin_ca_certificates/origincacertificate.go index 53660efd00..fa40626675 100644 --- a/origin_ca_certificates/origincacertificate.go +++ b/origin_ca_certificates/origincacertificate.go @@ -82,7 +82,7 @@ func (r *OriginCACertificateService) ListAutoPaging(ctx context.Context, query O // Revoke an existing Origin CA certificate by its serial number. Use your Origin // CA Key as your User Service Key when calling this endpoint // ([see above](#requests)). -func (r *OriginCACertificateService) Delete(ctx context.Context, certificateID string, body OriginCACertificateDeleteParams, opts ...option.RequestOption) (res *OriginCACertificateDeleteResponse, err error) { +func (r *OriginCACertificateService) Delete(ctx context.Context, certificateID string, opts ...option.RequestOption) (res *OriginCACertificateDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env OriginCACertificateDeleteResponseEnvelope path := fmt.Sprintf("certificates/%s", certificateID) @@ -361,14 +361,6 @@ func (r OriginCACertificateListParams) URLQuery() (v url.Values) { }) } -type OriginCACertificateDeleteParams struct { - Body interface{} `json:"body,required"` -} - -func (r OriginCACertificateDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) -} - type OriginCACertificateDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` diff --git a/origin_ca_certificates/origincacertificate_test.go b/origin_ca_certificates/origincacertificate_test.go index d9697157fb..ba20e6d961 100644 --- a/origin_ca_certificates/origincacertificate_test.go +++ b/origin_ca_certificates/origincacertificate_test.go @@ -83,13 +83,7 @@ func TestOriginCACertificateDelete(t *testing.T) { option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), option.WithAPIEmail("user@example.com"), ) - _, err := client.OriginCACertificates.Delete( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - origin_ca_certificates.OriginCACertificateDeleteParams{ - Body: map[string]interface{}{}, - }, - ) + _, err := client.OriginCACertificates.Delete(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") if err != nil { var apierr *cloudflare.Error if errors.As(err, &apierr) { diff --git a/origin_tls_client_auth/hostnamecertificate.go b/origin_tls_client_auth/hostnamecertificate.go index 5682c21ec3..84d8914cd7 100644 --- a/origin_tls_client_auth/hostnamecertificate.go +++ b/origin_tls_client_auth/hostnamecertificate.go @@ -72,10 +72,10 @@ func (r *HostnameCertificateService) ListAutoPaging(ctx context.Context, query H } // Delete Hostname Client Certificate -func (r *HostnameCertificateService) Delete(ctx context.Context, certificateID string, params HostnameCertificateDeleteParams, opts ...option.RequestOption) (res *HostnameCertificateDeleteResponse, err error) { +func (r *HostnameCertificateService) Delete(ctx context.Context, certificateID string, body HostnameCertificateDeleteParams, opts ...option.RequestOption) (res *HostnameCertificateDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env HostnameCertificateDeleteResponseEnvelope - path := fmt.Sprintf("zones/%s/origin_tls_client_auth/hostnames/certificates/%s", params.ZoneID, certificateID) + path := fmt.Sprintf("zones/%s/origin_tls_client_auth/hostnames/certificates/%s", body.ZoneID, certificateID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -353,11 +353,6 @@ type HostnameCertificateListParams struct { type HostnameCertificateDeleteParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` - Body interface{} `json:"body,required"` -} - -func (r HostnameCertificateDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type HostnameCertificateDeleteResponseEnvelope struct { diff --git a/origin_tls_client_auth/hostnamecertificate_test.go b/origin_tls_client_auth/hostnamecertificate_test.go index 28868c3714..6af3d9f65f 100644 --- a/origin_tls_client_auth/hostnamecertificate_test.go +++ b/origin_tls_client_auth/hostnamecertificate_test.go @@ -87,7 +87,6 @@ func TestHostnameCertificateDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", origin_tls_client_auth.HostnameCertificateDeleteParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/origin_tls_client_auth/origintlsclientauth.go b/origin_tls_client_auth/origintlsclientauth.go index 1c8f62d967..26512d5daf 100644 --- a/origin_tls_client_auth/origintlsclientauth.go +++ b/origin_tls_client_auth/origintlsclientauth.go @@ -81,10 +81,10 @@ func (r *OriginTLSClientAuthService) ListAutoPaging(ctx context.Context, query O } // Delete Certificate -func (r *OriginTLSClientAuthService) Delete(ctx context.Context, certificateID string, params OriginTLSClientAuthDeleteParams, opts ...option.RequestOption) (res *OriginTLSClientAuthDeleteResponseUnion, err error) { +func (r *OriginTLSClientAuthService) Delete(ctx context.Context, certificateID string, body OriginTLSClientAuthDeleteParams, opts ...option.RequestOption) (res *OriginTLSClientAuthDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) var env OriginTLSClientAuthDeleteResponseEnvelope - path := fmt.Sprintf("zones/%s/origin_tls_client_auth/%s", params.ZoneID, certificateID) + path := fmt.Sprintf("zones/%s/origin_tls_client_auth/%s", body.ZoneID, certificateID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -285,11 +285,6 @@ type OriginTLSClientAuthListParams struct { type OriginTLSClientAuthDeleteParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` - Body interface{} `json:"body,required"` -} - -func (r OriginTLSClientAuthDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type OriginTLSClientAuthDeleteResponseEnvelope struct { diff --git a/origin_tls_client_auth/origintlsclientauth_test.go b/origin_tls_client_auth/origintlsclientauth_test.go index a35d31223c..2f058c9f0f 100644 --- a/origin_tls_client_auth/origintlsclientauth_test.go +++ b/origin_tls_client_auth/origintlsclientauth_test.go @@ -87,7 +87,6 @@ func TestOriginTLSClientAuthDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", origin_tls_client_auth.OriginTLSClientAuthDeleteParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/pagerules/pagerule.go b/pagerules/pagerule.go index 552195ead4..9f7a4a6486 100644 --- a/pagerules/pagerule.go +++ b/pagerules/pagerule.go @@ -79,10 +79,10 @@ func (r *PageruleService) List(ctx context.Context, params PageruleListParams, o } // Deletes an existing Page Rule. -func (r *PageruleService) Delete(ctx context.Context, pageruleID string, params PageruleDeleteParams, opts ...option.RequestOption) (res *PageruleDeleteResponse, err error) { +func (r *PageruleService) Delete(ctx context.Context, pageruleID string, body PageruleDeleteParams, opts ...option.RequestOption) (res *PageruleDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env PageruleDeleteResponseEnvelope - path := fmt.Sprintf("zones/%s/pagerules/%s", params.ZoneID, pageruleID) + path := fmt.Sprintf("zones/%s/pagerules/%s", body.ZoneID, pageruleID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -777,11 +777,6 @@ func (r PageruleListResponseEnvelopeSuccess) IsKnown() bool { type PageruleDeleteParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` - Body interface{} `json:"body,required"` -} - -func (r PageruleDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type PageruleDeleteResponseEnvelope struct { diff --git a/pagerules/pagerule_test.go b/pagerules/pagerule_test.go index 6901225ca6..96ad36c20d 100644 --- a/pagerules/pagerule_test.go +++ b/pagerules/pagerule_test.go @@ -151,7 +151,6 @@ func TestPageruleDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", pagerules.PageruleDeleteParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/pages/project.go b/pages/project.go index 39d9745112..d98a5825a0 100644 --- a/pages/project.go +++ b/pages/project.go @@ -76,9 +76,9 @@ func (r *ProjectService) ListAutoPaging(ctx context.Context, query ProjectListPa } // Delete a project by name. -func (r *ProjectService) Delete(ctx context.Context, projectName string, params ProjectDeleteParams, opts ...option.RequestOption) (res *ProjectDeleteResponse, err error) { +func (r *ProjectService) Delete(ctx context.Context, projectName string, body ProjectDeleteParams, opts ...option.RequestOption) (res *ProjectDeleteResponse, err error) { opts = append(r.Options[:], opts...) - path := fmt.Sprintf("accounts/%s/pages/projects/%s", params.AccountID, projectName) + path := fmt.Sprintf("accounts/%s/pages/projects/%s", body.AccountID, projectName) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -2572,11 +2572,6 @@ type ProjectListParams struct { type ProjectDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r ProjectDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type ProjectEditParams struct { diff --git a/pages/project_test.go b/pages/project_test.go index 5b8aab66c8..5d11449b58 100644 --- a/pages/project_test.go +++ b/pages/project_test.go @@ -247,7 +247,6 @@ func TestProjectDelete(t *testing.T) { "this-is-my-project-01", pages.ProjectDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/pages/projectdeployment.go b/pages/projectdeployment.go index 2504a97fce..3e55eacc5f 100644 --- a/pages/projectdeployment.go +++ b/pages/projectdeployment.go @@ -75,9 +75,9 @@ func (r *ProjectDeploymentService) ListAutoPaging(ctx context.Context, projectNa } // Delete a deployment. -func (r *ProjectDeploymentService) Delete(ctx context.Context, projectName string, deploymentID string, params ProjectDeploymentDeleteParams, opts ...option.RequestOption) (res *ProjectDeploymentDeleteResponse, err error) { +func (r *ProjectDeploymentService) Delete(ctx context.Context, projectName string, deploymentID string, body ProjectDeploymentDeleteParams, opts ...option.RequestOption) (res *ProjectDeploymentDeleteResponse, err error) { opts = append(r.Options[:], opts...) - path := fmt.Sprintf("accounts/%s/pages/projects/%s/deployments/%s", params.AccountID, projectName, deploymentID) + path := fmt.Sprintf("accounts/%s/pages/projects/%s/deployments/%s", body.AccountID, projectName, deploymentID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -214,11 +214,6 @@ func (r ProjectDeploymentListParamsEnv) IsKnown() bool { type ProjectDeploymentDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r ProjectDeploymentDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type ProjectDeploymentGetParams struct { diff --git a/pages/projectdeployment_test.go b/pages/projectdeployment_test.go index cd560bf279..7481b12c29 100644 --- a/pages/projectdeployment_test.go +++ b/pages/projectdeployment_test.go @@ -96,7 +96,6 @@ func TestProjectDeploymentDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", pages.ProjectDeploymentDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/pages/projectdomain.go b/pages/projectdomain.go index 6e86b6b117..735a064968 100644 --- a/pages/projectdomain.go +++ b/pages/projectdomain.go @@ -72,9 +72,9 @@ func (r *ProjectDomainService) ListAutoPaging(ctx context.Context, projectName s } // Delete a Pages project's domain. -func (r *ProjectDomainService) Delete(ctx context.Context, projectName string, domainName string, params ProjectDomainDeleteParams, opts ...option.RequestOption) (res *ProjectDomainDeleteResponse, err error) { +func (r *ProjectDomainService) Delete(ctx context.Context, projectName string, domainName string, body ProjectDomainDeleteParams, opts ...option.RequestOption) (res *ProjectDomainDeleteResponse, err error) { opts = append(r.Options[:], opts...) - path := fmt.Sprintf("accounts/%s/pages/projects/%s/domains/%s", params.AccountID, projectName, domainName) + path := fmt.Sprintf("accounts/%s/pages/projects/%s/domains/%s", body.AccountID, projectName, domainName) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -245,11 +245,6 @@ type ProjectDomainListParams struct { type ProjectDomainDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r ProjectDomainDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type ProjectDomainEditParams struct { diff --git a/pages/projectdomain_test.go b/pages/projectdomain_test.go index 6e54698b56..8f543d7230 100644 --- a/pages/projectdomain_test.go +++ b/pages/projectdomain_test.go @@ -97,7 +97,6 @@ func TestProjectDomainDelete(t *testing.T) { "this-is-my-domain-01.com", pages.ProjectDomainDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/queues/consumer.go b/queues/consumer.go index 9ada172c59..0a7e02681f 100644 --- a/queues/consumer.go +++ b/queues/consumer.go @@ -60,10 +60,10 @@ func (r *ConsumerService) Update(ctx context.Context, queueID string, consumerID } // Deletes the consumer for a queue. -func (r *ConsumerService) Delete(ctx context.Context, queueID string, consumerID string, params ConsumerDeleteParams, opts ...option.RequestOption) (res *ConsumerDeleteResponseUnion, err error) { +func (r *ConsumerService) Delete(ctx context.Context, queueID string, consumerID string, body ConsumerDeleteParams, opts ...option.RequestOption) (res *ConsumerDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) var env ConsumerDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/queues/%s/consumers/%s", params.AccountID, queueID, consumerID) + path := fmt.Sprintf("accounts/%s/queues/%s/consumers/%s", body.AccountID, queueID, consumerID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -472,11 +472,6 @@ func (r consumerUpdateResponseEnvelopeResultInfoJSON) RawJSON() string { type ConsumerDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r ConsumerDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type ConsumerDeleteResponseEnvelope struct { diff --git a/queues/consumer_test.go b/queues/consumer_test.go index 3abbbcf1c4..82e01dc451 100644 --- a/queues/consumer_test.go +++ b/queues/consumer_test.go @@ -114,7 +114,6 @@ func TestConsumerDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", queues.ConsumerDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/queues/queue.go b/queues/queue.go index c8ca1468ac..b28e5b17f9 100644 --- a/queues/queue.go +++ b/queues/queue.go @@ -88,10 +88,10 @@ func (r *QueueService) ListAutoPaging(ctx context.Context, query QueueListParams } // Deletes a queue. -func (r *QueueService) Delete(ctx context.Context, queueID string, params QueueDeleteParams, opts ...option.RequestOption) (res *QueueDeleteResponseUnion, err error) { +func (r *QueueService) Delete(ctx context.Context, queueID string, body QueueDeleteParams, opts ...option.RequestOption) (res *QueueDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) var env QueueDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/queues/%s", params.AccountID, queueID) + path := fmt.Sprintf("accounts/%s/queues/%s", body.AccountID, queueID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -420,11 +420,6 @@ type QueueListParams struct { type QueueDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r QueueDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type QueueDeleteResponseEnvelope struct { diff --git a/queues/queue_test.go b/queues/queue_test.go index 3cf77ee881..f8c3f0a63a 100644 --- a/queues/queue_test.go +++ b/queues/queue_test.go @@ -121,7 +121,6 @@ func TestQueueDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", queues.QueueDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/rate_limits/ratelimit.go b/rate_limits/ratelimit.go index 4e8b4936a6..2d2e0ba4c8 100644 --- a/rate_limits/ratelimit.go +++ b/rate_limits/ratelimit.go @@ -74,7 +74,7 @@ func (r *RateLimitService) ListAutoPaging(ctx context.Context, zoneIdentifier st } // Deletes an existing rate limit. -func (r *RateLimitService) Delete(ctx context.Context, zoneIdentifier string, id string, body RateLimitDeleteParams, opts ...option.RequestOption) (res *RateLimitDeleteResponse, err error) { +func (r *RateLimitService) Delete(ctx context.Context, zoneIdentifier string, id string, opts ...option.RequestOption) (res *RateLimitDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env RateLimitDeleteResponseEnvelope path := fmt.Sprintf("zones/%s/rate_limits/%s", zoneIdentifier, id) @@ -599,14 +599,6 @@ func (r RateLimitListParams) URLQuery() (v url.Values) { }) } -type RateLimitDeleteParams struct { - Body interface{} `json:"body,required"` -} - -func (r RateLimitDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) -} - type RateLimitDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` diff --git a/rate_limits/ratelimit_test.go b/rate_limits/ratelimit_test.go index 596ab863a0..bf8bb692a0 100644 --- a/rate_limits/ratelimit_test.go +++ b/rate_limits/ratelimit_test.go @@ -93,9 +93,6 @@ func TestRateLimitDelete(t *testing.T) { context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353", "372e67954025e0ba6aaa6d586b9e0b59", - rate_limits.RateLimitDeleteParams{ - Body: map[string]interface{}{}, - }, ) if err != nil { var apierr *cloudflare.Error diff --git a/rules/list.go b/rules/list.go index 4310bf410b..b143ac6c31 100644 --- a/rules/list.go +++ b/rules/list.go @@ -86,10 +86,10 @@ func (r *ListService) ListAutoPaging(ctx context.Context, query ListListParams, } // Deletes a specific list and all its items. -func (r *ListService) Delete(ctx context.Context, listID string, params ListDeleteParams, opts ...option.RequestOption) (res *ListDeleteResponse, err error) { +func (r *ListService) Delete(ctx context.Context, listID string, body ListDeleteParams, opts ...option.RequestOption) (res *ListDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env ListDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/rules/lists/%s", params.AccountID, listID) + path := fmt.Sprintf("accounts/%s/rules/lists/%s", body.AccountID, listID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -442,11 +442,6 @@ type ListListParams struct { type ListDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r ListDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type ListDeleteResponseEnvelope struct { diff --git a/rules/list_test.go b/rules/list_test.go index 9273ae14fb..746f9149ea 100644 --- a/rules/list_test.go +++ b/rules/list_test.go @@ -119,7 +119,6 @@ func TestListDelete(t *testing.T) { "2c0fc9fa937b11eaa1b71c4d701ab86e", rules.ListDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/rules/listitem.go b/rules/listitem.go index 365a28b491..b2ba1e4de4 100644 --- a/rules/listitem.go +++ b/rules/listitem.go @@ -99,11 +99,11 @@ func (r *ListItemService) ListAutoPaging(ctx context.Context, listID string, par // This operation is asynchronous. To get current the operation status, invoke the // [Get bulk operation status](/operations/lists-get-bulk-operation-status) // endpoint with the returned `operation_id`. -func (r *ListItemService) Delete(ctx context.Context, listID string, params ListItemDeleteParams, opts ...option.RequestOption) (res *ListItemDeleteResponse, err error) { +func (r *ListItemService) Delete(ctx context.Context, listID string, body ListItemDeleteParams, opts ...option.RequestOption) (res *ListItemDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env ListItemDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/rules/lists/%s/items", params.AccountID, listID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, params, &env, opts...) + path := fmt.Sprintf("accounts/%s/rules/lists/%s/items", body.AccountID, listID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return } @@ -417,21 +417,7 @@ func (r ListItemListParams) URLQuery() (v url.Values) { type ListItemDeleteParams struct { // Identifier - AccountID param.Field[string] `path:"account_id,required"` - Items param.Field[[]ListItemDeleteParamsItem] `json:"items"` -} - -func (r ListItemDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type ListItemDeleteParamsItem struct { - // The unique ID of the item in the List. - ID param.Field[string] `json:"id"` -} - -func (r ListItemDeleteParamsItem) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) + AccountID param.Field[string] `path:"account_id,required"` } type ListItemDeleteResponseEnvelope struct { diff --git a/rules/listitem_test.go b/rules/listitem_test.go index f7e0ccdb4d..09100e76c3 100644 --- a/rules/listitem_test.go +++ b/rules/listitem_test.go @@ -205,7 +205,7 @@ func TestListItemListWithOptionalParams(t *testing.T) { } } -func TestListItemDeleteWithOptionalParams(t *testing.T) { +func TestListItemDelete(t *testing.T) { t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { @@ -224,9 +224,6 @@ func TestListItemDeleteWithOptionalParams(t *testing.T) { "2c0fc9fa937b11eaa1b71c4d701ab86e", rules.ListItemDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Items: cloudflare.F([]rules.ListItemDeleteParamsItem{{ - ID: cloudflare.F("34b12448945f11eaa1b71c4d701ab86e"), - }}), }, ) if err != nil { diff --git a/secondary_dns/acl.go b/secondary_dns/acl.go index 1631e014aa..75c19e0115 100644 --- a/secondary_dns/acl.go +++ b/secondary_dns/acl.go @@ -82,10 +82,10 @@ func (r *ACLService) ListAutoPaging(ctx context.Context, query ACLListParams, op } // Delete ACL. -func (r *ACLService) Delete(ctx context.Context, aclID string, params ACLDeleteParams, opts ...option.RequestOption) (res *ACLDeleteResponse, err error) { +func (r *ACLService) Delete(ctx context.Context, aclID string, body ACLDeleteParams, opts ...option.RequestOption) (res *ACLDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env ACLDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/secondary_dns/acls/%s", params.AccountID, aclID) + path := fmt.Sprintf("accounts/%s/secondary_dns/acls/%s", body.AccountID, aclID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -283,11 +283,6 @@ type ACLListParams struct { type ACLDeleteParams struct { AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r ACLDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type ACLDeleteResponseEnvelope struct { diff --git a/secondary_dns/acl_test.go b/secondary_dns/acl_test.go index c63989f7f3..226e9054d7 100644 --- a/secondary_dns/acl_test.go +++ b/secondary_dns/acl_test.go @@ -120,7 +120,6 @@ func TestACLDelete(t *testing.T) { "23ff594956f20c2a721606e94745a8aa", secondary_dns.ACLDeleteParams{ AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/secondary_dns/incoming.go b/secondary_dns/incoming.go index 035ee3e097..46f5784fc7 100644 --- a/secondary_dns/incoming.go +++ b/secondary_dns/incoming.go @@ -58,10 +58,10 @@ func (r *IncomingService) Update(ctx context.Context, params IncomingUpdateParam } // Delete secondary zone configuration for incoming zone transfers. -func (r *IncomingService) Delete(ctx context.Context, params IncomingDeleteParams, opts ...option.RequestOption) (res *IncomingDeleteResponse, err error) { +func (r *IncomingService) Delete(ctx context.Context, body IncomingDeleteParams, opts ...option.RequestOption) (res *IncomingDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env IncomingDeleteResponseEnvelope - path := fmt.Sprintf("zones/%s/secondary_dns/incoming", params.ZoneID) + path := fmt.Sprintf("zones/%s/secondary_dns/incoming", body.ZoneID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -351,11 +351,6 @@ func (r IncomingUpdateResponseEnvelopeSuccess) IsKnown() bool { type IncomingDeleteParams struct { ZoneID param.Field[string] `path:"zone_id,required"` - Body interface{} `json:"body,required"` -} - -func (r IncomingDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type IncomingDeleteResponseEnvelope struct { diff --git a/secondary_dns/incoming_test.go b/secondary_dns/incoming_test.go index 14759a57c9..589d132d81 100644 --- a/secondary_dns/incoming_test.go +++ b/secondary_dns/incoming_test.go @@ -88,7 +88,6 @@ func TestIncomingDelete(t *testing.T) { ) _, err := client.SecondaryDNS.Incoming.Delete(context.TODO(), secondary_dns.IncomingDeleteParams{ ZoneID: cloudflare.F("269d8f4853475ca241c4e730be286b20"), - Body: map[string]interface{}{}, }) if err != nil { var apierr *cloudflare.Error diff --git a/secondary_dns/outgoing.go b/secondary_dns/outgoing.go index 07fbc7492d..3a7d5fbb31 100644 --- a/secondary_dns/outgoing.go +++ b/secondary_dns/outgoing.go @@ -60,10 +60,10 @@ func (r *OutgoingService) Update(ctx context.Context, params OutgoingUpdateParam } // Delete primary zone configuration for outgoing zone transfers. -func (r *OutgoingService) Delete(ctx context.Context, params OutgoingDeleteParams, opts ...option.RequestOption) (res *OutgoingDeleteResponse, err error) { +func (r *OutgoingService) Delete(ctx context.Context, body OutgoingDeleteParams, opts ...option.RequestOption) (res *OutgoingDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env OutgoingDeleteResponseEnvelope - path := fmt.Sprintf("zones/%s/secondary_dns/outgoing", params.ZoneID) + path := fmt.Sprintf("zones/%s/secondary_dns/outgoing", body.ZoneID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -379,11 +379,6 @@ func (r OutgoingUpdateResponseEnvelopeSuccess) IsKnown() bool { type OutgoingDeleteParams struct { ZoneID param.Field[string] `path:"zone_id,required"` - Body interface{} `json:"body,required"` -} - -func (r OutgoingDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type OutgoingDeleteResponseEnvelope struct { diff --git a/secondary_dns/outgoing_test.go b/secondary_dns/outgoing_test.go index b8354c9045..2d3f6116b9 100644 --- a/secondary_dns/outgoing_test.go +++ b/secondary_dns/outgoing_test.go @@ -86,7 +86,6 @@ func TestOutgoingDelete(t *testing.T) { ) _, err := client.SecondaryDNS.Outgoing.Delete(context.TODO(), secondary_dns.OutgoingDeleteParams{ ZoneID: cloudflare.F("269d8f4853475ca241c4e730be286b20"), - Body: map[string]interface{}{}, }) if err != nil { var apierr *cloudflare.Error diff --git a/secondary_dns/peer.go b/secondary_dns/peer.go index b5b4009f3b..12ebc0271f 100644 --- a/secondary_dns/peer.go +++ b/secondary_dns/peer.go @@ -82,10 +82,10 @@ func (r *PeerService) ListAutoPaging(ctx context.Context, query PeerListParams, } // Delete Peer. -func (r *PeerService) Delete(ctx context.Context, peerID string, params PeerDeleteParams, opts ...option.RequestOption) (res *PeerDeleteResponse, err error) { +func (r *PeerService) Delete(ctx context.Context, peerID string, body PeerDeleteParams, opts ...option.RequestOption) (res *PeerDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env PeerDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/secondary_dns/peers/%s", params.AccountID, peerID) + path := fmt.Sprintf("accounts/%s/secondary_dns/peers/%s", body.AccountID, peerID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -302,11 +302,6 @@ type PeerListParams struct { type PeerDeleteParams struct { AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r PeerDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type PeerDeleteResponseEnvelope struct { diff --git a/secondary_dns/peer_test.go b/secondary_dns/peer_test.go index 0142a0d7ae..c16d3599ed 100644 --- a/secondary_dns/peer_test.go +++ b/secondary_dns/peer_test.go @@ -123,7 +123,6 @@ func TestPeerDelete(t *testing.T) { "23ff594956f20c2a721606e94745a8aa", secondary_dns.PeerDeleteParams{ AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/secondary_dns/tsig.go b/secondary_dns/tsig.go index 53fcb94cb7..59882e5769 100644 --- a/secondary_dns/tsig.go +++ b/secondary_dns/tsig.go @@ -82,10 +82,10 @@ func (r *TSIGService) ListAutoPaging(ctx context.Context, query TSIGListParams, } // Delete TSIG. -func (r *TSIGService) Delete(ctx context.Context, tsigID string, params TSIGDeleteParams, opts ...option.RequestOption) (res *TSIGDeleteResponse, err error) { +func (r *TSIGService) Delete(ctx context.Context, tsigID string, body TSIGDeleteParams, opts ...option.RequestOption) (res *TSIGDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env TSIGDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/secondary_dns/tsigs/%s", params.AccountID, tsigID) + path := fmt.Sprintf("accounts/%s/secondary_dns/tsigs/%s", body.AccountID, tsigID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -280,11 +280,6 @@ type TSIGListParams struct { type TSIGDeleteParams struct { AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r TSIGDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type TSIGDeleteResponseEnvelope struct { diff --git a/secondary_dns/tsig_test.go b/secondary_dns/tsig_test.go index a3777afb61..02a8e9174e 100644 --- a/secondary_dns/tsig_test.go +++ b/secondary_dns/tsig_test.go @@ -125,7 +125,6 @@ func TestTSIGDelete(t *testing.T) { "69cd1e104af3e6ed3cb344f263fd0d5a", secondary_dns.TSIGDeleteParams{ AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/spectrum/app.go b/spectrum/app.go index 7bc2913704..20a12da1b0 100644 --- a/spectrum/app.go +++ b/spectrum/app.go @@ -89,7 +89,7 @@ func (r *AppService) ListAutoPaging(ctx context.Context, zone string, query AppL } // Deletes a previously existing application. -func (r *AppService) Delete(ctx context.Context, zone string, appID string, body AppDeleteParams, opts ...option.RequestOption) (res *AppDeleteResponse, err error) { +func (r *AppService) Delete(ctx context.Context, zone string, appID string, opts ...option.RequestOption) (res *AppDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env AppDeleteResponseEnvelope path := fmt.Sprintf("zones/%s/spectrum/apps/%s", zone, appID) @@ -761,14 +761,6 @@ func (r AppListParamsOrder) IsKnown() bool { return false } -type AppDeleteParams struct { - Body interface{} `json:"body,required"` -} - -func (r AppDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) -} - type AppDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` diff --git a/spectrum/app_test.go b/spectrum/app_test.go index ed334b07c3..6248900fba 100644 --- a/spectrum/app_test.go +++ b/spectrum/app_test.go @@ -165,9 +165,6 @@ func TestAppDelete(t *testing.T) { context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353", "ea95132c15732412d22c1476fa83f27a", - spectrum.AppDeleteParams{ - Body: map[string]interface{}{}, - }, ) if err != nil { var apierr *cloudflare.Error diff --git a/ssl/certificatepack.go b/ssl/certificatepack.go index ce48fca68f..e55389a4c2 100644 --- a/ssl/certificatepack.go +++ b/ssl/certificatepack.go @@ -65,10 +65,10 @@ func (r *CertificatePackService) ListAutoPaging(ctx context.Context, params Cert } // For a given zone, delete an advanced certificate pack. -func (r *CertificatePackService) Delete(ctx context.Context, certificatePackID string, params CertificatePackDeleteParams, opts ...option.RequestOption) (res *CertificatePackDeleteResponse, err error) { +func (r *CertificatePackService) Delete(ctx context.Context, certificatePackID string, body CertificatePackDeleteParams, opts ...option.RequestOption) (res *CertificatePackDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env CertificatePackDeleteResponseEnvelope - path := fmt.Sprintf("zones/%s/ssl/certificate_packs/%s", params.ZoneID, certificatePackID) + path := fmt.Sprintf("zones/%s/ssl/certificate_packs/%s", body.ZoneID, certificatePackID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -334,11 +334,6 @@ func (r CertificatePackListParamsStatus) IsKnown() bool { type CertificatePackDeleteParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` - Body interface{} `json:"body,required"` -} - -func (r CertificatePackDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type CertificatePackDeleteResponseEnvelope struct { diff --git a/ssl/certificatepack_test.go b/ssl/certificatepack_test.go index b4b2204543..f3141fe265 100644 --- a/ssl/certificatepack_test.go +++ b/ssl/certificatepack_test.go @@ -60,7 +60,6 @@ func TestCertificatePackDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", ssl.CertificatePackDeleteParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/stream/captionlanguage.go b/stream/captionlanguage.go index b43d91ad17..70e8b6918b 100644 --- a/stream/captionlanguage.go +++ b/stream/captionlanguage.go @@ -49,10 +49,10 @@ func (r *CaptionLanguageService) Update(ctx context.Context, identifier string, } // Removes the captions or subtitles from a video. -func (r *CaptionLanguageService) Delete(ctx context.Context, identifier string, language string, params CaptionLanguageDeleteParams, opts ...option.RequestOption) (res *string, err error) { +func (r *CaptionLanguageService) Delete(ctx context.Context, identifier string, language string, body CaptionLanguageDeleteParams, opts ...option.RequestOption) (res *string, err error) { opts = append(r.Options[:], opts...) var env CaptionLanguageDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/stream/%s/captions/%s", params.AccountID, identifier, language) + path := fmt.Sprintf("accounts/%s/stream/%s/captions/%s", body.AccountID, identifier, language) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -131,11 +131,6 @@ func (r CaptionLanguageUpdateResponseEnvelopeSuccess) IsKnown() bool { type CaptionLanguageDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r CaptionLanguageDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type CaptionLanguageDeleteResponseEnvelope struct { diff --git a/stream/captionlanguage_test.go b/stream/captionlanguage_test.go index 6ee9346253..fcea8218c5 100644 --- a/stream/captionlanguage_test.go +++ b/stream/captionlanguage_test.go @@ -66,7 +66,6 @@ func TestCaptionLanguageDelete(t *testing.T) { "tr", stream.CaptionLanguageDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/stream/key.go b/stream/key.go index 83440e41b7..112d0ad3e5 100644 --- a/stream/key.go +++ b/stream/key.go @@ -50,10 +50,10 @@ func (r *KeyService) New(ctx context.Context, params KeyNewParams, opts ...optio } // Deletes signing keys and revokes all signed URLs generated with the key. -func (r *KeyService) Delete(ctx context.Context, identifier string, params KeyDeleteParams, opts ...option.RequestOption) (res *KeyDeleteResponseUnion, err error) { +func (r *KeyService) Delete(ctx context.Context, identifier string, body KeyDeleteParams, opts ...option.RequestOption) (res *KeyDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) var env KeyDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/stream/keys/%s", params.AccountID, identifier) + path := fmt.Sprintf("accounts/%s/stream/keys/%s", body.AccountID, identifier) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -201,11 +201,6 @@ func (r KeyNewResponseEnvelopeSuccess) IsKnown() bool { type KeyDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r KeyDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type KeyDeleteResponseEnvelope struct { diff --git a/stream/key_test.go b/stream/key_test.go index b644d70ddf..ea0359c7aa 100644 --- a/stream/key_test.go +++ b/stream/key_test.go @@ -60,7 +60,6 @@ func TestKeyDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", stream.KeyDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/stream/liveinput.go b/stream/liveinput.go index f3fe6c6646..d58a63f5b4 100644 --- a/stream/liveinput.go +++ b/stream/liveinput.go @@ -79,10 +79,10 @@ func (r *LiveInputService) List(ctx context.Context, params LiveInputListParams, // Prevents a live input from being streamed to and makes the live input // inaccessible to any future API calls. -func (r *LiveInputService) Delete(ctx context.Context, liveInputIdentifier string, params LiveInputDeleteParams, opts ...option.RequestOption) (err error) { +func (r *LiveInputService) Delete(ctx context.Context, liveInputIdentifier string, body LiveInputDeleteParams, opts ...option.RequestOption) (err error) { opts = append(r.Options[:], opts...) opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...) - path := fmt.Sprintf("accounts/%s/stream/live_inputs/%s", params.AccountID, liveInputIdentifier) + path := fmt.Sprintf("accounts/%s/stream/live_inputs/%s", body.AccountID, liveInputIdentifier) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, nil, opts...) return } @@ -752,11 +752,6 @@ func (r LiveInputListResponseEnvelopeSuccess) IsKnown() bool { type LiveInputDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r LiveInputDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type LiveInputGetParams struct { diff --git a/stream/liveinput_test.go b/stream/liveinput_test.go index 60c0c11215..e34ae98265 100644 --- a/stream/liveinput_test.go +++ b/stream/liveinput_test.go @@ -138,7 +138,6 @@ func TestLiveInputDelete(t *testing.T) { "66be4bf738797e01e1fca35a7bdecdcd", stream.LiveInputDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/stream/liveinputoutput.go b/stream/liveinputoutput.go index 979da0c653..8f777332c3 100644 --- a/stream/liveinputoutput.go +++ b/stream/liveinputoutput.go @@ -85,10 +85,10 @@ func (r *LiveInputOutputService) ListAutoPaging(ctx context.Context, liveInputId } // Deletes an output and removes it from the associated live input. -func (r *LiveInputOutputService) Delete(ctx context.Context, liveInputIdentifier string, outputIdentifier string, params LiveInputOutputDeleteParams, opts ...option.RequestOption) (err error) { +func (r *LiveInputOutputService) Delete(ctx context.Context, liveInputIdentifier string, outputIdentifier string, body LiveInputOutputDeleteParams, opts ...option.RequestOption) (err error) { opts = append(r.Options[:], opts...) opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...) - path := fmt.Sprintf("accounts/%s/stream/live_inputs/%s/outputs/%s", params.AccountID, liveInputIdentifier, outputIdentifier) + path := fmt.Sprintf("accounts/%s/stream/live_inputs/%s/outputs/%s", body.AccountID, liveInputIdentifier, outputIdentifier) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, nil, opts...) return } @@ -255,9 +255,4 @@ type LiveInputOutputListParams struct { type LiveInputOutputDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r LiveInputOutputDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } diff --git a/stream/liveinputoutput_test.go b/stream/liveinputoutput_test.go index 91f851fb5e..9aa171cb88 100644 --- a/stream/liveinputoutput_test.go +++ b/stream/liveinputoutput_test.go @@ -129,7 +129,6 @@ func TestLiveInputOutputDelete(t *testing.T) { "baea4d9c515887b80289d5c33cf01145", stream.LiveInputOutputDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/stream/stream.go b/stream/stream.go index 122bb94ceb..487349cb2b 100644 --- a/stream/stream.go +++ b/stream/stream.go @@ -99,10 +99,10 @@ func (r *StreamService) ListAutoPaging(ctx context.Context, params StreamListPar } // Deletes a video and its copies from Cloudflare Stream. -func (r *StreamService) Delete(ctx context.Context, identifier string, params StreamDeleteParams, opts ...option.RequestOption) (err error) { +func (r *StreamService) Delete(ctx context.Context, identifier string, body StreamDeleteParams, opts ...option.RequestOption) (err error) { opts = append(r.Options[:], opts...) opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...) - path := fmt.Sprintf("accounts/%s/stream/%s", params.AccountID, identifier) + path := fmt.Sprintf("accounts/%s/stream/%s", body.AccountID, identifier) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, nil, opts...) return } @@ -430,11 +430,6 @@ func (r StreamListParamsStatus) IsKnown() bool { type StreamDeleteParams struct { // The account identifier tag. AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r StreamDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type StreamGetParams struct { diff --git a/stream/stream_test.go b/stream/stream_test.go index 5cffd01134..221367bea0 100644 --- a/stream/stream_test.go +++ b/stream/stream_test.go @@ -99,7 +99,6 @@ func TestStreamDelete(t *testing.T) { "ea95132c15732412d22c1476fa83f27a", stream.StreamDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/stream/watermark.go b/stream/watermark.go index 188470410a..0c296e6559 100644 --- a/stream/watermark.go +++ b/stream/watermark.go @@ -73,10 +73,10 @@ func (r *WatermarkService) ListAutoPaging(ctx context.Context, query WatermarkLi } // Deletes a watermark profile. -func (r *WatermarkService) Delete(ctx context.Context, identifier string, params WatermarkDeleteParams, opts ...option.RequestOption) (res *WatermarkDeleteResponseUnion, err error) { +func (r *WatermarkService) Delete(ctx context.Context, identifier string, body WatermarkDeleteParams, opts ...option.RequestOption) (res *WatermarkDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) var env WatermarkDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/stream/watermarks/%s", params.AccountID, identifier) + path := fmt.Sprintf("accounts/%s/stream/watermarks/%s", body.AccountID, identifier) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -257,11 +257,6 @@ type WatermarkListParams struct { type WatermarkDeleteParams struct { // The account identifier tag. AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r WatermarkDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type WatermarkDeleteResponseEnvelope struct { diff --git a/stream/watermark_test.go b/stream/watermark_test.go index 325aa80c31..b09a8b5283 100644 --- a/stream/watermark_test.go +++ b/stream/watermark_test.go @@ -91,7 +91,6 @@ func TestWatermarkDelete(t *testing.T) { "ea95132c15732412d22c1476fa83f27a", stream.WatermarkDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/stream/webhook.go b/stream/webhook.go index 6ebdf1846a..77ccd997a8 100644 --- a/stream/webhook.go +++ b/stream/webhook.go @@ -47,10 +47,10 @@ func (r *WebhookService) Update(ctx context.Context, params WebhookUpdateParams, } // Deletes a webhook. -func (r *WebhookService) Delete(ctx context.Context, params WebhookDeleteParams, opts ...option.RequestOption) (res *WebhookDeleteResponseUnion, err error) { +func (r *WebhookService) Delete(ctx context.Context, body WebhookDeleteParams, opts ...option.RequestOption) (res *WebhookDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) var env WebhookDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/stream/webhook", params.AccountID) + path := fmt.Sprintf("accounts/%s/stream/webhook", body.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -179,11 +179,6 @@ func (r WebhookUpdateResponseEnvelopeSuccess) IsKnown() bool { type WebhookDeleteParams struct { // The account identifier tag. AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r WebhookDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type WebhookDeleteResponseEnvelope struct { diff --git a/stream/webhook_test.go b/stream/webhook_test.go index 2f7d92d5bd..c5af189540 100644 --- a/stream/webhook_test.go +++ b/stream/webhook_test.go @@ -57,7 +57,6 @@ func TestWebhookDelete(t *testing.T) { ) _, err := client.Stream.Webhooks.Delete(context.TODO(), stream.WebhookDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }) if err != nil { var apierr *cloudflare.Error diff --git a/subscriptions/subscription.go b/subscriptions/subscription.go index ab4eda8708..66de38011e 100644 --- a/subscriptions/subscription.go +++ b/subscriptions/subscription.go @@ -85,7 +85,7 @@ func (r *SubscriptionService) ListAutoPaging(ctx context.Context, accountIdentif } // Deletes an account's subscription. -func (r *SubscriptionService) Delete(ctx context.Context, accountIdentifier string, subscriptionIdentifier string, body SubscriptionDeleteParams, opts ...option.RequestOption) (res *SubscriptionDeleteResponse, err error) { +func (r *SubscriptionService) Delete(ctx context.Context, accountIdentifier string, subscriptionIdentifier string, opts ...option.RequestOption) (res *SubscriptionDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env SubscriptionDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/subscriptions/%s", accountIdentifier, subscriptionIdentifier) @@ -285,14 +285,6 @@ func (r SubscriptionUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } -type SubscriptionDeleteParams struct { - Body interface{} `json:"body,required"` -} - -func (r SubscriptionDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) -} - type SubscriptionDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` diff --git a/subscriptions/subscription_test.go b/subscriptions/subscription_test.go index 13885f10cb..036b589bdb 100644 --- a/subscriptions/subscription_test.go +++ b/subscriptions/subscription_test.go @@ -180,9 +180,6 @@ func TestSubscriptionDelete(t *testing.T) { context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353", "506e3185e9c882d175a2d0cb0093d9f2", - subscriptions.SubscriptionDeleteParams{ - Body: map[string]interface{}{}, - }, ) if err != nil { var apierr *cloudflare.Error diff --git a/user/organization.go b/user/organization.go index 56bcfa5484..8caa44de84 100644 --- a/user/organization.go +++ b/user/organization.go @@ -61,7 +61,7 @@ func (r *OrganizationService) ListAutoPaging(ctx context.Context, query Organiza } // Removes association to an organization. -func (r *OrganizationService) Delete(ctx context.Context, organizationID string, body OrganizationDeleteParams, opts ...option.RequestOption) (res *OrganizationDeleteResponse, err error) { +func (r *OrganizationService) Delete(ctx context.Context, organizationID string, opts ...option.RequestOption) (res *OrganizationDeleteResponse, err error) { opts = append(r.Options[:], opts...) path := fmt.Sprintf("user/organizations/%s", organizationID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) @@ -259,14 +259,6 @@ func (r OrganizationListParamsStatus) IsKnown() bool { return false } -type OrganizationDeleteParams struct { - Body interface{} `json:"body,required"` -} - -func (r OrganizationDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) -} - type OrganizationGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` diff --git a/user/organization_test.go b/user/organization_test.go index bb3adc45ea..a4792578a7 100644 --- a/user/organization_test.go +++ b/user/organization_test.go @@ -60,13 +60,7 @@ func TestOrganizationDelete(t *testing.T) { option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), option.WithAPIEmail("user@example.com"), ) - _, err := client.User.Organizations.Delete( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - user.OrganizationDeleteParams{ - Body: map[string]interface{}{}, - }, - ) + _, err := client.User.Organizations.Delete(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") if err != nil { var apierr *cloudflare.Error if errors.As(err, &apierr) { diff --git a/user/subscription.go b/user/subscription.go index 7e37ade6c7..a266dee5a2 100644 --- a/user/subscription.go +++ b/user/subscription.go @@ -49,7 +49,7 @@ func (r *SubscriptionService) Update(ctx context.Context, identifier string, bod } // Deletes a user's subscription. -func (r *SubscriptionService) Delete(ctx context.Context, identifier string, body SubscriptionDeleteParams, opts ...option.RequestOption) (res *SubscriptionDeleteResponse, err error) { +func (r *SubscriptionService) Delete(ctx context.Context, identifier string, opts ...option.RequestOption) (res *SubscriptionDeleteResponse, err error) { opts = append(r.Options[:], opts...) path := fmt.Sprintf("user/subscriptions/%s", identifier) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) @@ -469,14 +469,6 @@ func (r SubscriptionUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } -type SubscriptionDeleteParams struct { - Body interface{} `json:"body,required"` -} - -func (r SubscriptionDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) -} - type SubscriptionEditParams struct { Subscription SubscriptionParam `json:"subscription,required"` } diff --git a/user/subscription_test.go b/user/subscription_test.go index d4462742dd..ad4fe2835b 100644 --- a/user/subscription_test.go +++ b/user/subscription_test.go @@ -89,13 +89,7 @@ func TestSubscriptionDelete(t *testing.T) { option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), option.WithAPIEmail("user@example.com"), ) - _, err := client.User.Subscriptions.Delete( - context.TODO(), - "506e3185e9c882d175a2d0cb0093d9f2", - user.SubscriptionDeleteParams{ - Body: map[string]interface{}{}, - }, - ) + _, err := client.User.Subscriptions.Delete(context.TODO(), "506e3185e9c882d175a2d0cb0093d9f2") if err != nil { var apierr *cloudflare.Error if errors.As(err, &apierr) { diff --git a/user/token.go b/user/token.go index 398f295ac6..e78260116f 100644 --- a/user/token.go +++ b/user/token.go @@ -91,7 +91,7 @@ func (r *TokenService) ListAutoPaging(ctx context.Context, query TokenListParams } // Destroy a token. -func (r *TokenService) Delete(ctx context.Context, tokenID interface{}, body TokenDeleteParams, opts ...option.RequestOption) (res *TokenDeleteResponse, err error) { +func (r *TokenService) Delete(ctx context.Context, tokenID interface{}, opts ...option.RequestOption) (res *TokenDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env TokenDeleteResponseEnvelope path := fmt.Sprintf("user/tokens/%v", tokenID) @@ -518,14 +518,6 @@ func (r TokenListParamsDirection) IsKnown() bool { return false } -type TokenDeleteParams struct { - Body interface{} `json:"body,required"` -} - -func (r TokenDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) -} - type TokenDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` diff --git a/user/token_test.go b/user/token_test.go index 39570f7838..471d5ade56 100644 --- a/user/token_test.go +++ b/user/token_test.go @@ -176,13 +176,7 @@ func TestTokenDelete(t *testing.T) { option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), option.WithAPIEmail("user@example.com"), ) - _, err := client.User.Tokens.Delete( - context.TODO(), - map[string]interface{}{}, - user.TokenDeleteParams{ - Body: map[string]interface{}{}, - }, - ) + _, err := client.User.Tokens.Delete(context.TODO(), map[string]interface{}{}) if err != nil { var apierr *cloudflare.Error if errors.As(err, &apierr) { diff --git a/waiting_rooms/event.go b/waiting_rooms/event.go index 1faff34ac5..d17cad8dac 100644 --- a/waiting_rooms/event.go +++ b/waiting_rooms/event.go @@ -91,10 +91,10 @@ func (r *EventService) ListAutoPaging(ctx context.Context, waitingRoomID string, } // Deletes an event for a waiting room. -func (r *EventService) Delete(ctx context.Context, waitingRoomID string, eventID string, params EventDeleteParams, opts ...option.RequestOption) (res *EventDeleteResponse, err error) { +func (r *EventService) Delete(ctx context.Context, waitingRoomID string, eventID string, body EventDeleteParams, opts ...option.RequestOption) (res *EventDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env EventDeleteResponseEnvelope - path := fmt.Sprintf("zones/%s/waiting_rooms/%s/events/%s", params.ZoneID, waitingRoomID, eventID) + path := fmt.Sprintf("zones/%s/waiting_rooms/%s/events/%s", body.ZoneID, waitingRoomID, eventID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -326,11 +326,6 @@ func (r EventListParams) URLQuery() (v url.Values) { type EventDeleteParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` - Body interface{} `json:"body,required"` -} - -func (r EventDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type EventDeleteResponseEnvelope struct { diff --git a/waiting_rooms/event_test.go b/waiting_rooms/event_test.go index df298de4ef..92fa209797 100644 --- a/waiting_rooms/event_test.go +++ b/waiting_rooms/event_test.go @@ -157,7 +157,6 @@ func TestEventDelete(t *testing.T) { "25756b2dfe6e378a06b033b670413757", waiting_rooms.EventDeleteParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/waiting_rooms/rule.go b/waiting_rooms/rule.go index 9e3df89625..20e834b612 100644 --- a/waiting_rooms/rule.go +++ b/waiting_rooms/rule.go @@ -85,10 +85,10 @@ func (r *RuleService) ListAutoPaging(ctx context.Context, waitingRoomID string, } // Deletes a rule for a waiting room. -func (r *RuleService) Delete(ctx context.Context, waitingRoomID string, ruleID string, params RuleDeleteParams, opts ...option.RequestOption) (res *[]WaitingRoomRule, err error) { +func (r *RuleService) Delete(ctx context.Context, waitingRoomID string, ruleID string, body RuleDeleteParams, opts ...option.RequestOption) (res *[]WaitingRoomRule, err error) { opts = append(r.Options[:], opts...) var env RuleDeleteResponseEnvelope - path := fmt.Sprintf("zones/%s/waiting_rooms/%s/rules/%s", params.ZoneID, waitingRoomID, ruleID) + path := fmt.Sprintf("zones/%s/waiting_rooms/%s/rules/%s", body.ZoneID, waitingRoomID, ruleID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -395,11 +395,6 @@ type RuleListParams struct { type RuleDeleteParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` - Body interface{} `json:"body,required"` -} - -func (r RuleDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type RuleDeleteResponseEnvelope struct { diff --git a/waiting_rooms/rule_test.go b/waiting_rooms/rule_test.go index 5535ce64df..aeadc331f1 100644 --- a/waiting_rooms/rule_test.go +++ b/waiting_rooms/rule_test.go @@ -144,7 +144,6 @@ func TestRuleDelete(t *testing.T) { "25756b2dfe6e378a06b033b670413757", waiting_rooms.RuleDeleteParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/waiting_rooms/waitingroom.go b/waiting_rooms/waitingroom.go index 164249c28a..e07bf44f54 100644 --- a/waiting_rooms/waitingroom.go +++ b/waiting_rooms/waitingroom.go @@ -95,10 +95,10 @@ func (r *WaitingRoomService) ListAutoPaging(ctx context.Context, params WaitingR } // Deletes a waiting room. -func (r *WaitingRoomService) Delete(ctx context.Context, waitingRoomID string, params WaitingRoomDeleteParams, opts ...option.RequestOption) (res *WaitingRoomDeleteResponse, err error) { +func (r *WaitingRoomService) Delete(ctx context.Context, waitingRoomID string, body WaitingRoomDeleteParams, opts ...option.RequestOption) (res *WaitingRoomDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env WaitingRoomDeleteResponseEnvelope - path := fmt.Sprintf("zones/%s/waiting_rooms/%s", params.ZoneID, waitingRoomID) + path := fmt.Sprintf("zones/%s/waiting_rooms/%s", body.ZoneID, waitingRoomID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -1140,11 +1140,6 @@ func (r WaitingRoomListParams) URLQuery() (v url.Values) { type WaitingRoomDeleteParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` - Body interface{} `json:"body,required"` -} - -func (r WaitingRoomDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type WaitingRoomDeleteResponseEnvelope struct { diff --git a/waiting_rooms/waitingroom_test.go b/waiting_rooms/waitingroom_test.go index c67d532b91..ee16c604c3 100644 --- a/waiting_rooms/waitingroom_test.go +++ b/waiting_rooms/waitingroom_test.go @@ -181,7 +181,6 @@ func TestWaitingRoomDelete(t *testing.T) { "699d98642c564d2e855e9661899b7252", waiting_rooms.WaitingRoomDeleteParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/warp_connector/warpconnector.go b/warp_connector/warpconnector.go index 0f93121958..e1e480fe99 100644 --- a/warp_connector/warpconnector.go +++ b/warp_connector/warpconnector.go @@ -75,11 +75,11 @@ func (r *WARPConnectorService) ListAutoPaging(ctx context.Context, params WARPCo } // Deletes a Warp Connector Tunnel from an account. -func (r *WARPConnectorService) Delete(ctx context.Context, tunnelID string, params WARPConnectorDeleteParams, opts ...option.RequestOption) (res *WARPConnectorDeleteResponse, err error) { +func (r *WARPConnectorService) Delete(ctx context.Context, tunnelID string, body WARPConnectorDeleteParams, opts ...option.RequestOption) (res *WARPConnectorDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env WARPConnectorDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/warp_connector/%s", params.AccountID, tunnelID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, params, &env, opts...) + path := fmt.Sprintf("accounts/%s/warp_connector/%s", body.AccountID, tunnelID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return } @@ -1442,11 +1442,6 @@ func (r WARPConnectorListParams) URLQuery() (v url.Values) { type WARPConnectorDeleteParams struct { // Cloudflare account ID AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r WARPConnectorDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type WARPConnectorDeleteResponseEnvelope struct { diff --git a/warp_connector/warpconnector_test.go b/warp_connector/warpconnector_test.go index 4a52ce9e49..f50b0d0659 100644 --- a/warp_connector/warpconnector_test.go +++ b/warp_connector/warpconnector_test.go @@ -97,7 +97,6 @@ func TestWARPConnectorDelete(t *testing.T) { "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", warp_connector.WARPConnectorDeleteParams{ AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/web3/hostname.go b/web3/hostname.go index 8ab0466100..c9cf85275e 100644 --- a/web3/hostname.go +++ b/web3/hostname.go @@ -72,7 +72,7 @@ func (r *HostnameService) ListAutoPaging(ctx context.Context, zoneIdentifier str } // Delete Web3 Hostname -func (r *HostnameService) Delete(ctx context.Context, zoneIdentifier string, identifier string, body HostnameDeleteParams, opts ...option.RequestOption) (res *HostnameDeleteResponse, err error) { +func (r *HostnameService) Delete(ctx context.Context, zoneIdentifier string, identifier string, opts ...option.RequestOption) (res *HostnameDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env HostnameDeleteResponseEnvelope path := fmt.Sprintf("zones/%s/web3/hostnames/%s", zoneIdentifier, identifier) @@ -282,14 +282,6 @@ func (r HostnameNewResponseEnvelopeSuccess) IsKnown() bool { return false } -type HostnameDeleteParams struct { - Body interface{} `json:"body,required"` -} - -func (r HostnameDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) -} - type HostnameDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` diff --git a/web3/hostname_test.go b/web3/hostname_test.go index f8881dd858..e91b06efcf 100644 --- a/web3/hostname_test.go +++ b/web3/hostname_test.go @@ -88,9 +88,6 @@ func TestHostnameDelete(t *testing.T) { context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353", "023e105f4ecef8ad9ca31a8372d0c353", - web3.HostnameDeleteParams{ - Body: map[string]interface{}{}, - }, ) if err != nil { var apierr *cloudflare.Error diff --git a/web3/hostnameipfsuniversalpathcontentlistentry.go b/web3/hostnameipfsuniversalpathcontentlistentry.go index b47006fe67..18cc92b4e8 100644 --- a/web3/hostnameipfsuniversalpathcontentlistentry.go +++ b/web3/hostnameipfsuniversalpathcontentlistentry.go @@ -74,7 +74,7 @@ func (r *HostnameIPFSUniversalPathContentListEntryService) List(ctx context.Cont } // Delete IPFS Universal Path Gateway Content List Entry -func (r *HostnameIPFSUniversalPathContentListEntryService) Delete(ctx context.Context, zoneIdentifier string, identifier string, contentListEntryIdentifier string, body HostnameIPFSUniversalPathContentListEntryDeleteParams, opts ...option.RequestOption) (res *HostnameIPFSUniversalPathContentListEntryDeleteResponse, err error) { +func (r *HostnameIPFSUniversalPathContentListEntryService) Delete(ctx context.Context, zoneIdentifier string, identifier string, contentListEntryIdentifier string, opts ...option.RequestOption) (res *HostnameIPFSUniversalPathContentListEntryDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env HostnameIPFSUniversalPathContentListEntryDeleteResponseEnvelope path := fmt.Sprintf("zones/%s/web3/hostnames/%s/ipfs_universal_path/content_list/entries/%s", zoneIdentifier, identifier, contentListEntryIdentifier) @@ -580,14 +580,6 @@ func (r hostnameIPFSUniversalPathContentListEntryListResponseEnvelopeResultInfoJ return r.raw } -type HostnameIPFSUniversalPathContentListEntryDeleteParams struct { - Body interface{} `json:"body,required"` -} - -func (r HostnameIPFSUniversalPathContentListEntryDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) -} - type HostnameIPFSUniversalPathContentListEntryDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` diff --git a/web3/hostnameipfsuniversalpathcontentlistentry_test.go b/web3/hostnameipfsuniversalpathcontentlistentry_test.go index be6989fa6d..486cd5d768 100644 --- a/web3/hostnameipfsuniversalpathcontentlistentry_test.go +++ b/web3/hostnameipfsuniversalpathcontentlistentry_test.go @@ -128,9 +128,6 @@ func TestHostnameIPFSUniversalPathContentListEntryDelete(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", "023e105f4ecef8ad9ca31a8372d0c353", "023e105f4ecef8ad9ca31a8372d0c353", - web3.HostnameIPFSUniversalPathContentListEntryDeleteParams{ - Body: map[string]interface{}{}, - }, ) if err != nil { var apierr *cloudflare.Error diff --git a/workers/domain.go b/workers/domain.go index f4b5984b1b..bda5bf24c9 100644 --- a/workers/domain.go +++ b/workers/domain.go @@ -71,10 +71,10 @@ func (r *DomainService) ListAutoPaging(ctx context.Context, params DomainListPar } // Detaches a Worker from a zone and hostname. -func (r *DomainService) Delete(ctx context.Context, domainID string, params DomainDeleteParams, opts ...option.RequestOption) (err error) { +func (r *DomainService) Delete(ctx context.Context, domainID string, body DomainDeleteParams, opts ...option.RequestOption) (err error) { opts = append(r.Options[:], opts...) opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...) - path := fmt.Sprintf("accounts/%s/workers/domains/%s", params.AccountID, domainID) + path := fmt.Sprintf("accounts/%s/workers/domains/%s", body.AccountID, domainID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, nil, opts...) return } @@ -211,11 +211,6 @@ func (r DomainListParams) URLQuery() (v url.Values) { type DomainDeleteParams struct { AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r DomainDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type DomainGetParams struct { diff --git a/workers/domain_test.go b/workers/domain_test.go index a2a6e5ba3c..6f04843c1f 100644 --- a/workers/domain_test.go +++ b/workers/domain_test.go @@ -94,7 +94,6 @@ func TestDomainDelete(t *testing.T) { "dbe10b4bc17c295377eabd600e1787fd", workers.DomainDeleteParams{ AccountID: cloudflare.F("9a7806061c88ada191ed06f989cc3dac"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/workers/script.go b/workers/script.go index 9d61c719e1..d54505ddb1 100644 --- a/workers/script.go +++ b/workers/script.go @@ -389,17 +389,12 @@ type ScriptListParams struct { type ScriptDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` // If set to true, delete will not be stopped by associated service binding, // durable object, or other binding. Any of these associated bindings/durable // objects will be deleted along with the script. Force param.Field[bool] `query:"force"` } -func (r ScriptDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) -} - // URLQuery serializes [ScriptDeleteParams]'s query parameters as `url.Values`. func (r ScriptDeleteParams) URLQuery() (v url.Values) { return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ diff --git a/workers/script_test.go b/workers/script_test.go index 95c8c9fd2d..252df12eab 100644 --- a/workers/script_test.go +++ b/workers/script_test.go @@ -158,7 +158,6 @@ func TestScriptDeleteWithOptionalParams(t *testing.T) { "this-is_my_script-01", workers.ScriptDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, Force: cloudflare.F(true), }, ) diff --git a/workers/scripttail.go b/workers/scripttail.go index 5abc1c6222..ab150b3528 100644 --- a/workers/scripttail.go +++ b/workers/scripttail.go @@ -45,9 +45,9 @@ func (r *ScriptTailService) New(ctx context.Context, scriptName string, params S } // Deletes a tail from a Worker. -func (r *ScriptTailService) Delete(ctx context.Context, scriptName string, id string, params ScriptTailDeleteParams, opts ...option.RequestOption) (res *ScriptTailDeleteResponse, err error) { +func (r *ScriptTailService) Delete(ctx context.Context, scriptName string, id string, body ScriptTailDeleteParams, opts ...option.RequestOption) (res *ScriptTailDeleteResponse, err error) { opts = append(r.Options[:], opts...) - path := fmt.Sprintf("accounts/%s/workers/scripts/%s/tails/%s", params.AccountID, scriptName, id) + path := fmt.Sprintf("accounts/%s/workers/scripts/%s/tails/%s", body.AccountID, scriptName, id) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -254,11 +254,6 @@ func (r ScriptTailNewResponseEnvelopeSuccess) IsKnown() bool { type ScriptTailDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r ScriptTailDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type ScriptTailGetParams struct { diff --git a/workers/scripttail_test.go b/workers/scripttail_test.go index 42b6671626..4bdff3a9c3 100644 --- a/workers/scripttail_test.go +++ b/workers/scripttail_test.go @@ -65,7 +65,6 @@ func TestScriptTailDelete(t *testing.T) { "03dc9f77817b488fb26c5861ec18f791", workers.ScriptTailDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/workers_for_platforms/dispatchnamespacescript.go b/workers_for_platforms/dispatchnamespacescript.go index 8a2b443332..e7a528834e 100644 --- a/workers_for_platforms/dispatchnamespacescript.go +++ b/workers_for_platforms/dispatchnamespacescript.go @@ -311,17 +311,12 @@ func (r DispatchNamespaceScriptUpdateResponseEnvelopeSuccess) IsKnown() bool { type DispatchNamespaceScriptDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` // If set to true, delete will not be stopped by associated service binding, // durable object, or other binding. Any of these associated bindings/durable // objects will be deleted along with the script. Force param.Field[bool] `query:"force"` } -func (r DispatchNamespaceScriptDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) -} - // URLQuery serializes [DispatchNamespaceScriptDeleteParams]'s query parameters as // `url.Values`. func (r DispatchNamespaceScriptDeleteParams) URLQuery() (v url.Values) { diff --git a/workers_for_platforms/dispatchnamespacescript_test.go b/workers_for_platforms/dispatchnamespacescript_test.go index 5d77cc1d49..9b0683a414 100644 --- a/workers_for_platforms/dispatchnamespacescript_test.go +++ b/workers_for_platforms/dispatchnamespacescript_test.go @@ -132,7 +132,6 @@ func TestDispatchNamespaceScriptDeleteWithOptionalParams(t *testing.T) { "this-is_my_script-01", workers_for_platforms.DispatchNamespaceScriptDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, Force: cloudflare.F(true), }, ) diff --git a/zero_trust/accessbookmark.go b/zero_trust/accessbookmark.go index 0d3bc0c05c..44e8bf2423 100644 --- a/zero_trust/accessbookmark.go +++ b/zero_trust/accessbookmark.go @@ -83,7 +83,7 @@ func (r *AccessBookmarkService) ListAutoPaging(ctx context.Context, identifier s } // Deletes a Bookmark application. -func (r *AccessBookmarkService) Delete(ctx context.Context, identifier string, uuid string, body AccessBookmarkDeleteParams, opts ...option.RequestOption) (res *AccessBookmarkDeleteResponse, err error) { +func (r *AccessBookmarkService) Delete(ctx context.Context, identifier string, uuid string, opts ...option.RequestOption) (res *AccessBookmarkDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env AccessBookmarkDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/access/bookmarks/%s", identifier, uuid) @@ -269,14 +269,6 @@ func (r AccessBookmarkUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } -type AccessBookmarkDeleteParams struct { - Body interface{} `json:"body,required"` -} - -func (r AccessBookmarkDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) -} - type AccessBookmarkDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` diff --git a/zero_trust/accessbookmark_test.go b/zero_trust/accessbookmark_test.go index 98f7e866fe..88e4a7d598 100644 --- a/zero_trust/accessbookmark_test.go +++ b/zero_trust/accessbookmark_test.go @@ -118,9 +118,6 @@ func TestAccessBookmarkDelete(t *testing.T) { context.TODO(), "699d98642c564d2e855e9661899b7252", "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - zero_trust.AccessBookmarkDeleteParams{ - Body: map[string]interface{}{}, - }, ) if err != nil { var apierr *cloudflare.Error diff --git a/zero_trust/devicenetwork.go b/zero_trust/devicenetwork.go index 151d3cdbe8..fdd03d86c1 100644 --- a/zero_trust/devicenetwork.go +++ b/zero_trust/devicenetwork.go @@ -84,10 +84,10 @@ func (r *DeviceNetworkService) ListAutoPaging(ctx context.Context, query DeviceN // Deletes a device managed network and fetches a list of the remaining device // managed networks for an account. -func (r *DeviceNetworkService) Delete(ctx context.Context, networkID string, params DeviceNetworkDeleteParams, opts ...option.RequestOption) (res *[]DeviceNetwork, err error) { +func (r *DeviceNetworkService) Delete(ctx context.Context, networkID string, body DeviceNetworkDeleteParams, opts ...option.RequestOption) (res *[]DeviceNetwork, err error) { opts = append(r.Options[:], opts...) var env DeviceNetworkDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/devices/networks/%s", params.AccountID, networkID) + path := fmt.Sprintf("accounts/%s/devices/networks/%s", body.AccountID, networkID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -369,11 +369,6 @@ type DeviceNetworkListParams struct { type DeviceNetworkDeleteParams struct { AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r DeviceNetworkDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type DeviceNetworkDeleteResponseEnvelope struct { diff --git a/zero_trust/devicenetwork_test.go b/zero_trust/devicenetwork_test.go index f897bd17f7..ef5b7f7e10 100644 --- a/zero_trust/devicenetwork_test.go +++ b/zero_trust/devicenetwork_test.go @@ -127,7 +127,6 @@ func TestDeviceNetworkDelete(t *testing.T) { "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.DeviceNetworkDeleteParams{ AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/zero_trust/devicepolicy.go b/zero_trust/devicepolicy.go index f76fcf349a..9247cc6629 100644 --- a/zero_trust/devicepolicy.go +++ b/zero_trust/devicepolicy.go @@ -80,10 +80,10 @@ func (r *DevicePolicyService) ListAutoPaging(ctx context.Context, query DevicePo // Deletes a device settings profile and fetches a list of the remaining profiles // for an account. -func (r *DevicePolicyService) Delete(ctx context.Context, policyID string, params DevicePolicyDeleteParams, opts ...option.RequestOption) (res *[]SettingsPolicy, err error) { +func (r *DevicePolicyService) Delete(ctx context.Context, policyID string, body DevicePolicyDeleteParams, opts ...option.RequestOption) (res *[]SettingsPolicy, err error) { opts = append(r.Options[:], opts...) var env DevicePolicyDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/devices/policy/%s", params.AccountID, policyID) + path := fmt.Sprintf("accounts/%s/devices/policy/%s", body.AccountID, policyID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -408,11 +408,6 @@ type DevicePolicyListParams struct { type DevicePolicyDeleteParams struct { AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r DevicePolicyDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type DevicePolicyDeleteResponseEnvelope struct { diff --git a/zero_trust/devicepolicy_test.go b/zero_trust/devicepolicy_test.go index bf407178c6..b3e6a6b85f 100644 --- a/zero_trust/devicepolicy_test.go +++ b/zero_trust/devicepolicy_test.go @@ -105,7 +105,6 @@ func TestDevicePolicyDelete(t *testing.T) { "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.DevicePolicyDeleteParams{ AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/zero_trust/deviceposture.go b/zero_trust/deviceposture.go index 1c0bb0fcc7..5c0b4c55e8 100644 --- a/zero_trust/deviceposture.go +++ b/zero_trust/deviceposture.go @@ -87,10 +87,10 @@ func (r *DevicePostureService) ListAutoPaging(ctx context.Context, query DeviceP } // Deletes a device posture rule. -func (r *DevicePostureService) Delete(ctx context.Context, ruleID string, params DevicePostureDeleteParams, opts ...option.RequestOption) (res *DevicePostureDeleteResponse, err error) { +func (r *DevicePostureService) Delete(ctx context.Context, ruleID string, body DevicePostureDeleteParams, opts ...option.RequestOption) (res *DevicePostureDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env DevicePostureDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/devices/posture/%s", params.AccountID, ruleID) + path := fmt.Sprintf("accounts/%s/devices/posture/%s", body.AccountID, ruleID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -2090,11 +2090,6 @@ type DevicePostureListParams struct { type DevicePostureDeleteParams struct { AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r DevicePostureDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type DevicePostureDeleteResponseEnvelope struct { diff --git a/zero_trust/deviceposture_test.go b/zero_trust/deviceposture_test.go index 09ef0eda59..15128ba1d7 100644 --- a/zero_trust/deviceposture_test.go +++ b/zero_trust/deviceposture_test.go @@ -153,7 +153,6 @@ func TestDevicePostureDelete(t *testing.T) { "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.DevicePostureDeleteParams{ AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/zero_trust/devicepostureintegration.go b/zero_trust/devicepostureintegration.go index 020bfceae3..59e65131e7 100644 --- a/zero_trust/devicepostureintegration.go +++ b/zero_trust/devicepostureintegration.go @@ -72,10 +72,10 @@ func (r *DevicePostureIntegrationService) ListAutoPaging(ctx context.Context, qu } // Delete a configured device posture integration. -func (r *DevicePostureIntegrationService) Delete(ctx context.Context, integrationID string, params DevicePostureIntegrationDeleteParams, opts ...option.RequestOption) (res *DevicePostureIntegrationDeleteResponseUnion, err error) { +func (r *DevicePostureIntegrationService) Delete(ctx context.Context, integrationID string, body DevicePostureIntegrationDeleteParams, opts ...option.RequestOption) (res *DevicePostureIntegrationDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) var env DevicePostureIntegrationDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/devices/posture/integration/%s", params.AccountID, integrationID) + path := fmt.Sprintf("accounts/%s/devices/posture/integration/%s", body.AccountID, integrationID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -460,11 +460,6 @@ type DevicePostureIntegrationListParams struct { type DevicePostureIntegrationDeleteParams struct { AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r DevicePostureIntegrationDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type DevicePostureIntegrationDeleteResponseEnvelope struct { diff --git a/zero_trust/devicepostureintegration_test.go b/zero_trust/devicepostureintegration_test.go index dcb58a0734..03a998fb1e 100644 --- a/zero_trust/devicepostureintegration_test.go +++ b/zero_trust/devicepostureintegration_test.go @@ -94,7 +94,6 @@ func TestDevicePostureIntegrationDelete(t *testing.T) { "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.DevicePostureIntegrationDeleteParams{ AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/zero_trust/dlpprofilecustom.go b/zero_trust/dlpprofilecustom.go index b07dedce7b..794f360cf4 100644 --- a/zero_trust/dlpprofilecustom.go +++ b/zero_trust/dlpprofilecustom.go @@ -57,10 +57,10 @@ func (r *DLPProfileCustomService) Update(ctx context.Context, profileID string, } // Deletes a DLP custom profile. -func (r *DLPProfileCustomService) Delete(ctx context.Context, profileID string, params DLPProfileCustomDeleteParams, opts ...option.RequestOption) (res *DLPProfileCustomDeleteResponseUnion, err error) { +func (r *DLPProfileCustomService) Delete(ctx context.Context, profileID string, body DLPProfileCustomDeleteParams, opts ...option.RequestOption) (res *DLPProfileCustomDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) var env DLPProfileCustomDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/dlp/profiles/custom/%s", params.AccountID, profileID) + path := fmt.Sprintf("accounts/%s/dlp/profiles/custom/%s", body.AccountID, profileID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -474,11 +474,6 @@ func (r DLPProfileCustomUpdateParamsSharedEntriesDLPSharedEntryUpdateIntegration type DLPProfileCustomDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r DLPProfileCustomDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type DLPProfileCustomDeleteResponseEnvelope struct { diff --git a/zero_trust/dlpprofilecustom_test.go b/zero_trust/dlpprofilecustom_test.go index 64cea9e783..22ea6b4022 100644 --- a/zero_trust/dlpprofilecustom_test.go +++ b/zero_trust/dlpprofilecustom_test.go @@ -231,7 +231,6 @@ func TestDLPProfileCustomDelete(t *testing.T) { "384e129d-25bd-403c-8019-bc19eb7a8a5f", zero_trust.DLPProfileCustomDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/zero_trust/gatewaylist.go b/zero_trust/gatewaylist.go index f6ec411ce3..f1255d7816 100644 --- a/zero_trust/gatewaylist.go +++ b/zero_trust/gatewaylist.go @@ -88,10 +88,10 @@ func (r *GatewayListService) ListAutoPaging(ctx context.Context, query GatewayLi } // Deletes a Zero Trust list. -func (r *GatewayListService) Delete(ctx context.Context, listID string, params GatewayListDeleteParams, opts ...option.RequestOption) (res *GatewayListDeleteResponseUnion, err error) { +func (r *GatewayListService) Delete(ctx context.Context, listID string, body GatewayListDeleteParams, opts ...option.RequestOption) (res *GatewayListDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) var env GatewayListDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/gateway/lists/%s", params.AccountID, listID) + path := fmt.Sprintf("accounts/%s/gateway/lists/%s", body.AccountID, listID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -427,11 +427,6 @@ type GatewayListListParams struct { type GatewayListDeleteParams struct { AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r GatewayListDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type GatewayListDeleteResponseEnvelope struct { diff --git a/zero_trust/gatewaylist_test.go b/zero_trust/gatewaylist_test.go index 3dc8766ef9..f6c6d94647 100644 --- a/zero_trust/gatewaylist_test.go +++ b/zero_trust/gatewaylist_test.go @@ -127,7 +127,6 @@ func TestGatewayListDelete(t *testing.T) { "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.GatewayListDeleteParams{ AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/zero_trust/gatewaylocation.go b/zero_trust/gatewaylocation.go index fcb9ff2e4e..66a8dee81c 100644 --- a/zero_trust/gatewaylocation.go +++ b/zero_trust/gatewaylocation.go @@ -86,10 +86,10 @@ func (r *GatewayLocationService) ListAutoPaging(ctx context.Context, query Gatew } // Deletes a configured Zero Trust Gateway location. -func (r *GatewayLocationService) Delete(ctx context.Context, locationID string, params GatewayLocationDeleteParams, opts ...option.RequestOption) (res *GatewayLocationDeleteResponseUnion, err error) { +func (r *GatewayLocationService) Delete(ctx context.Context, locationID string, body GatewayLocationDeleteParams, opts ...option.RequestOption) (res *GatewayLocationDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) var env GatewayLocationDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/gateway/locations/%s", params.AccountID, locationID) + path := fmt.Sprintf("accounts/%s/gateway/locations/%s", body.AccountID, locationID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -327,11 +327,6 @@ type GatewayLocationListParams struct { type GatewayLocationDeleteParams struct { AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r GatewayLocationDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type GatewayLocationDeleteResponseEnvelope struct { diff --git a/zero_trust/gatewaylocation_test.go b/zero_trust/gatewaylocation_test.go index e0b1ef6b2d..87f8bc3542 100644 --- a/zero_trust/gatewaylocation_test.go +++ b/zero_trust/gatewaylocation_test.go @@ -135,7 +135,6 @@ func TestGatewayLocationDelete(t *testing.T) { "ed35569b41ce4d1facfe683550f54086", zero_trust.GatewayLocationDeleteParams{ AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/zero_trust/gatewayproxyendpoint.go b/zero_trust/gatewayproxyendpoint.go index 13423654be..bcd61fca34 100644 --- a/zero_trust/gatewayproxyendpoint.go +++ b/zero_trust/gatewayproxyendpoint.go @@ -73,10 +73,10 @@ func (r *GatewayProxyEndpointService) ListAutoPaging(ctx context.Context, query } // Deletes a configured Zero Trust Gateway proxy endpoint. -func (r *GatewayProxyEndpointService) Delete(ctx context.Context, proxyEndpointID string, params GatewayProxyEndpointDeleteParams, opts ...option.RequestOption) (res *GatewayProxyEndpointDeleteResponseUnion, err error) { +func (r *GatewayProxyEndpointService) Delete(ctx context.Context, proxyEndpointID string, body GatewayProxyEndpointDeleteParams, opts ...option.RequestOption) (res *GatewayProxyEndpointDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) var env GatewayProxyEndpointDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/gateway/proxy_endpoints/%s", params.AccountID, proxyEndpointID) + path := fmt.Sprintf("accounts/%s/gateway/proxy_endpoints/%s", body.AccountID, proxyEndpointID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -226,11 +226,6 @@ type GatewayProxyEndpointListParams struct { type GatewayProxyEndpointDeleteParams struct { AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r GatewayProxyEndpointDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type GatewayProxyEndpointDeleteResponseEnvelope struct { diff --git a/zero_trust/gatewayproxyendpoint_test.go b/zero_trust/gatewayproxyendpoint_test.go index f522e8ef5a..194ca3e6f1 100644 --- a/zero_trust/gatewayproxyendpoint_test.go +++ b/zero_trust/gatewayproxyendpoint_test.go @@ -87,7 +87,6 @@ func TestGatewayProxyEndpointDelete(t *testing.T) { "ed35569b41ce4d1facfe683550f54086", zero_trust.GatewayProxyEndpointDeleteParams{ AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/zero_trust/gatewayrule.go b/zero_trust/gatewayrule.go index 7af70bddc0..bd08793fcb 100644 --- a/zero_trust/gatewayrule.go +++ b/zero_trust/gatewayrule.go @@ -86,10 +86,10 @@ func (r *GatewayRuleService) ListAutoPaging(ctx context.Context, query GatewayRu } // Deletes a Zero Trust Gateway rule. -func (r *GatewayRuleService) Delete(ctx context.Context, ruleID string, params GatewayRuleDeleteParams, opts ...option.RequestOption) (res *GatewayRuleDeleteResponseUnion, err error) { +func (r *GatewayRuleService) Delete(ctx context.Context, ruleID string, body GatewayRuleDeleteParams, opts ...option.RequestOption) (res *GatewayRuleDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) var env GatewayRuleDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/gateway/rules/%s", params.AccountID, ruleID) + path := fmt.Sprintf("accounts/%s/gateway/rules/%s", body.AccountID, ruleID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -1210,11 +1210,6 @@ type GatewayRuleListParams struct { type GatewayRuleDeleteParams struct { AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r GatewayRuleDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type GatewayRuleDeleteResponseEnvelope struct { diff --git a/zero_trust/gatewayrule_test.go b/zero_trust/gatewayrule_test.go index 1b39f4bbb9..2a12870620 100644 --- a/zero_trust/gatewayrule_test.go +++ b/zero_trust/gatewayrule_test.go @@ -331,7 +331,6 @@ func TestGatewayRuleDelete(t *testing.T) { "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.GatewayRuleDeleteParams{ AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/zero_trust/networkvirtualnetwork.go b/zero_trust/networkvirtualnetwork.go index 792ea65fe6..7cbdd8b597 100644 --- a/zero_trust/networkvirtualnetwork.go +++ b/zero_trust/networkvirtualnetwork.go @@ -75,10 +75,10 @@ func (r *NetworkVirtualNetworkService) ListAutoPaging(ctx context.Context, param } // Deletes an existing virtual network. -func (r *NetworkVirtualNetworkService) Delete(ctx context.Context, virtualNetworkID string, params NetworkVirtualNetworkDeleteParams, opts ...option.RequestOption) (res *NetworkVirtualNetworkDeleteResponseUnion, err error) { +func (r *NetworkVirtualNetworkService) Delete(ctx context.Context, virtualNetworkID string, body NetworkVirtualNetworkDeleteParams, opts ...option.RequestOption) (res *NetworkVirtualNetworkDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) var env NetworkVirtualNetworkDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/teamnet/virtual_networks/%s", params.AccountID, virtualNetworkID) + path := fmt.Sprintf("accounts/%s/teamnet/virtual_networks/%s", body.AccountID, virtualNetworkID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -300,11 +300,6 @@ func (r NetworkVirtualNetworkListParams) URLQuery() (v url.Values) { type NetworkVirtualNetworkDeleteParams struct { // Cloudflare account ID AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r NetworkVirtualNetworkDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type NetworkVirtualNetworkDeleteResponseEnvelope struct { diff --git a/zero_trust/networkvirtualnetwork_test.go b/zero_trust/networkvirtualnetwork_test.go index 1acfc05579..6e58a63a84 100644 --- a/zero_trust/networkvirtualnetwork_test.go +++ b/zero_trust/networkvirtualnetwork_test.go @@ -92,7 +92,6 @@ func TestNetworkVirtualNetworkDelete(t *testing.T) { "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", zero_trust.NetworkVirtualNetworkDeleteParams{ AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/zero_trust/tunnel.go b/zero_trust/tunnel.go index 197ec971de..b0572eadce 100644 --- a/zero_trust/tunnel.go +++ b/zero_trust/tunnel.go @@ -84,11 +84,11 @@ func (r *TunnelService) ListAutoPaging(ctx context.Context, params TunnelListPar } // Deletes an Argo Tunnel from an account. -func (r *TunnelService) Delete(ctx context.Context, tunnelID string, params TunnelDeleteParams, opts ...option.RequestOption) (res *TunnelDeleteResponse, err error) { +func (r *TunnelService) Delete(ctx context.Context, tunnelID string, body TunnelDeleteParams, opts ...option.RequestOption) (res *TunnelDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env TunnelDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/tunnels/%s", params.AccountID, tunnelID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, params, &env, opts...) + path := fmt.Sprintf("accounts/%s/tunnels/%s", body.AccountID, tunnelID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return } @@ -826,11 +826,6 @@ func (r TunnelListParams) URLQuery() (v url.Values) { type TunnelDeleteParams struct { // Cloudflare account ID AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r TunnelDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type TunnelDeleteResponseEnvelope struct { diff --git a/zero_trust/tunnel_test.go b/zero_trust/tunnel_test.go index 3894d09ba1..155ee91419 100644 --- a/zero_trust/tunnel_test.go +++ b/zero_trust/tunnel_test.go @@ -99,7 +99,6 @@ func TestTunnelDelete(t *testing.T) { "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", zero_trust.TunnelDeleteParams{ AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/zero_trust/tunnelconnection.go b/zero_trust/tunnelconnection.go index 7285f174de..598984b8a3 100644 --- a/zero_trust/tunnelconnection.go +++ b/zero_trust/tunnelconnection.go @@ -37,11 +37,11 @@ func NewTunnelConnectionService(opts ...option.RequestOption) (r *TunnelConnecti // Removes connections that are in a disconnected or pending reconnect state. We // recommend running this command after shutting down a tunnel. -func (r *TunnelConnectionService) Delete(ctx context.Context, tunnelID string, params TunnelConnectionDeleteParams, opts ...option.RequestOption) (res *TunnelConnectionDeleteResponseUnion, err error) { +func (r *TunnelConnectionService) Delete(ctx context.Context, tunnelID string, body TunnelConnectionDeleteParams, opts ...option.RequestOption) (res *TunnelConnectionDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) var env TunnelConnectionDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/tunnels/%s/connections", params.AccountID, tunnelID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, params, &env, opts...) + path := fmt.Sprintf("accounts/%s/tunnels/%s/connections", body.AccountID, tunnelID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return } @@ -178,11 +178,6 @@ func (r TunnelConnectionDeleteResponseArray) ImplementsZeroTrustTunnelConnection type TunnelConnectionDeleteParams struct { // Cloudflare account ID AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r TunnelConnectionDeleteParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type TunnelConnectionDeleteResponseEnvelope struct { diff --git a/zero_trust/tunnelconnection_test.go b/zero_trust/tunnelconnection_test.go index bbb7625efa..abb16e4e20 100644 --- a/zero_trust/tunnelconnection_test.go +++ b/zero_trust/tunnelconnection_test.go @@ -33,7 +33,6 @@ func TestTunnelConnectionDelete(t *testing.T) { "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", zero_trust.TunnelConnectionDeleteParams{ AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), - Body: map[string]interface{}{}, }, ) if err != nil { From e1ec709087a2b01a555b7a85aa8a188e79d7595d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 25 Apr 2024 04:47:33 +0000 Subject: [PATCH 004/127] feat(api): update via SDK Studio (#1844) --- accounts/member.go | 22 +++++++++---------- accounts/member_test.go | 10 ++++----- accounts/role.go | 10 ++++----- accounts/role_test.go | 4 ++-- addressing/addressmap.go | 2 +- addressing/addressmapaccount.go | 2 +- addressing/addressmapip.go | 2 +- addressing/addressmapzone.go | 2 +- addressing/prefix.go | 2 +- addressing/prefixbgpbinding.go | 2 +- addressing/prefixbgpprefix.go | 2 +- addressing/prefixdelegation.go | 2 +- addressing/service.go | 2 +- alerting/destinationwebhook.go | 2 +- alerting/policy.go | 2 +- cache/cachereserve.go | 2 +- calls/call.go | 2 +- custom_nameservers/customnameserver.go | 2 +- dns/record.go | 2 +- durable_objects/namespace.go | 2 +- email_routing/emailrouting.go | 4 ++-- hyperdrive/config.go | 2 +- intel/indicatorfeed.go | 2 +- intel/sinkhole.go | 2 +- internal/apijson/encoder.go | 3 +++ internal/apijson/port.go | 13 +++++++++-- keyless_certificates/keylesscertificate.go | 2 +- load_balancers/loadbalancer.go | 2 +- load_balancers/monitor.go | 2 +- logpush/job.go | 2 +- magic_network_monitoring/config.go | 6 ++--- magic_network_monitoring/rule.go | 8 +++---- magic_network_monitoring/ruleadvertisement.go | 2 +- magic_transit/ipsectunnel.go | 2 +- magic_transit/siteacl.go | 2 +- magic_transit/sitelan.go | 2 +- magic_transit/sitewan.go | 2 +- mtls_certificates/mtlscertificate.go | 2 +- origin_tls_client_auth/hostnamecertificate.go | 2 +- origin_tls_client_auth/origintlsclientauth.go | 2 +- page_shield/policy.go | 2 +- pages/project.go | 2 +- pages/projectdeployment.go | 4 ++-- pages/projectdomain.go | 4 ++-- pcaps/pcap.go | 2 +- queues/queue.go | 2 +- registrar/domain.go | 2 +- rules/list.go | 2 +- rulesets/phaseversion.go | 2 +- rulesets/ruleset.go | 2 +- rulesets/version.go | 2 +- secondary_dns/acl.go | 2 +- secondary_dns/forceaxfr.go | 2 +- secondary_dns/outgoing.go | 6 ++--- secondary_dns/peer.go | 2 +- secondary_dns/tsig.go | 2 +- speed/page.go | 2 +- ssl/certificatepack.go | 2 +- stream/download.go | 2 +- stream/key.go | 2 +- stream/liveinputoutput.go | 2 +- stream/stream.go | 2 +- stream/watermark.go | 2 +- vectorize/index.go | 2 +- waiting_rooms/rule.go | 2 +- workers/script.go | 2 +- workers/scripttail.go | 2 +- workers_for_platforms/dispatchnamespace.go | 2 +- .../dispatchnamespacescriptsecret.go | 2 +- .../dispatchnamespacescripttag.go | 2 +- zero_trust/accessapplication.go | 2 +- zero_trust/accessapplicationca.go | 2 +- zero_trust/accessapplicationpolicy.go | 2 +- zero_trust/accessbookmark.go | 4 ++-- zero_trust/accesscertificate.go | 2 +- zero_trust/accessgroup.go | 2 +- zero_trust/accessservicetoken.go | 2 +- zero_trust/device.go | 2 +- zero_trust/devicedextest.go | 2 +- zero_trust/devicenetwork.go | 2 +- zero_trust/devicepolicy.go | 2 +- zero_trust/devicepolicyexclude.go | 2 +- zero_trust/devicepolicyfallbackdomain.go | 2 +- zero_trust/devicepolicyinclude.go | 2 +- zero_trust/deviceposture.go | 2 +- zero_trust/devicepostureintegration.go | 2 +- zero_trust/dlpdataset.go | 2 +- zero_trust/dlpprofile.go | 2 +- zero_trust/gatewayapptype.go | 2 +- zero_trust/gatewaycategory.go | 2 +- zero_trust/gatewaylist.go | 2 +- zero_trust/gatewaylistitem.go | 2 +- zero_trust/gatewaylocation.go | 2 +- zero_trust/gatewayproxyendpoint.go | 2 +- zero_trust/gatewayrule.go | 2 +- zero_trust/identityprovider.go | 2 +- 96 files changed, 138 insertions(+), 126 deletions(-) diff --git a/accounts/member.go b/accounts/member.go index 950e329bd8..2d75a8e6e6 100644 --- a/accounts/member.go +++ b/accounts/member.go @@ -38,7 +38,7 @@ func NewMemberService(opts ...option.RequestOption) (r *MemberService) { func (r *MemberService) New(ctx context.Context, params MemberNewParams, opts ...option.RequestOption) (res *UserWithInviteCode, err error) { opts = append(r.Options[:], opts...) var env MemberNewResponseEnvelope - path := fmt.Sprintf("accounts/%v/members", params.AccountID) + path := fmt.Sprintf("accounts/%s/members", params.AccountID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return @@ -51,7 +51,7 @@ func (r *MemberService) New(ctx context.Context, params MemberNewParams, opts .. func (r *MemberService) Update(ctx context.Context, memberID string, params MemberUpdateParams, opts ...option.RequestOption) (res *shared.Member, err error) { opts = append(r.Options[:], opts...) var env MemberUpdateResponseEnvelope - path := fmt.Sprintf("accounts/%v/members/%s", params.AccountID, memberID) + path := fmt.Sprintf("accounts/%s/members/%s", params.AccountID, memberID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) if err != nil { return @@ -65,7 +65,7 @@ func (r *MemberService) List(ctx context.Context, params MemberListParams, opts var raw *http.Response opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) - path := fmt.Sprintf("accounts/%v/members", params.AccountID) + path := fmt.Sprintf("accounts/%s/members", params.AccountID) cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, params, &res, opts...) if err != nil { return nil, err @@ -87,7 +87,7 @@ func (r *MemberService) ListAutoPaging(ctx context.Context, params MemberListPar func (r *MemberService) Delete(ctx context.Context, memberID string, body MemberDeleteParams, opts ...option.RequestOption) (res *MemberDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env MemberDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%v/members/%s", body.AccountID, memberID) + path := fmt.Sprintf("accounts/%s/members/%s", body.AccountID, memberID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) if err != nil { return @@ -100,7 +100,7 @@ func (r *MemberService) Delete(ctx context.Context, memberID string, body Member func (r *MemberService) Get(ctx context.Context, memberID string, query MemberGetParams, opts ...option.RequestOption) (res *shared.Member, err error) { opts = append(r.Options[:], opts...) var env MemberGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/members/%s", query.AccountID, memberID) + path := fmt.Sprintf("accounts/%s/members/%s", query.AccountID, memberID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -322,7 +322,7 @@ func (r memberDeleteResponseJSON) RawJSON() string { } type MemberNewParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // The contact email address of the user. Email param.Field[string] `json:"email,required"` // Array of roles associated with this member. @@ -393,8 +393,8 @@ func (r MemberNewResponseEnvelopeSuccess) IsKnown() bool { } type MemberUpdateParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` - Member shared.MemberParam `json:"member,required"` + AccountID param.Field[string] `path:"account_id,required"` + Member shared.MemberParam `json:"member,required"` } func (r MemberUpdateParams) MarshalJSON() (data []byte, err error) { @@ -445,7 +445,7 @@ func (r MemberUpdateResponseEnvelopeSuccess) IsKnown() bool { } type MemberListParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` // Direction to order results. Direction param.Field[MemberListParamsDirection] `query:"direction"` // Field to order results by. @@ -518,7 +518,7 @@ func (r MemberListParamsStatus) IsKnown() bool { } type MemberDeleteParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type MemberDeleteResponseEnvelope struct { @@ -565,7 +565,7 @@ func (r MemberDeleteResponseEnvelopeSuccess) IsKnown() bool { } type MemberGetParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type MemberGetResponseEnvelope struct { diff --git a/accounts/member_test.go b/accounts/member_test.go index 8052d0be66..b91557567f 100644 --- a/accounts/member_test.go +++ b/accounts/member_test.go @@ -30,7 +30,7 @@ func TestMemberNewWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.Accounts.Members.New(context.TODO(), accounts.MemberNewParams{ - AccountID: cloudflare.F[any](map[string]interface{}{}), + AccountID: cloudflare.F("string"), Email: cloudflare.F("user@example.com"), Roles: cloudflare.F([]string{"3536bcfad5faccb999b47003c79917fb", "3536bcfad5faccb999b47003c79917fb", "3536bcfad5faccb999b47003c79917fb"}), Status: cloudflare.F(accounts.MemberNewParamsStatusAccepted), @@ -62,7 +62,7 @@ func TestMemberUpdate(t *testing.T) { context.TODO(), "4536bcfad5faccb111b47003c79917fa", accounts.MemberUpdateParams{ - AccountID: cloudflare.F[any](map[string]interface{}{}), + AccountID: cloudflare.F("string"), Member: shared.MemberParam{ Roles: cloudflare.F([]shared.MemberRoleParam{{ ID: cloudflare.F("3536bcfad5faccb999b47003c79917fb"), @@ -98,7 +98,7 @@ func TestMemberListWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.Accounts.Members.List(context.TODO(), accounts.MemberListParams{ - AccountID: cloudflare.F[any](map[string]interface{}{}), + AccountID: cloudflare.F("string"), Direction: cloudflare.F(accounts.MemberListParamsDirectionDesc), Order: cloudflare.F(accounts.MemberListParamsOrderStatus), Page: cloudflare.F(1.000000), @@ -132,7 +132,7 @@ func TestMemberDelete(t *testing.T) { context.TODO(), "4536bcfad5faccb111b47003c79917fa", accounts.MemberDeleteParams{ - AccountID: cloudflare.F[any](map[string]interface{}{}), + AccountID: cloudflare.F("string"), }, ) if err != nil { @@ -162,7 +162,7 @@ func TestMemberGet(t *testing.T) { context.TODO(), "4536bcfad5faccb111b47003c79917fa", accounts.MemberGetParams{ - AccountID: cloudflare.F[any](map[string]interface{}{}), + AccountID: cloudflare.F("string"), }, ) if err != nil { diff --git a/accounts/role.go b/accounts/role.go index 7f17cfabe5..98b6d1de08 100644 --- a/accounts/role.go +++ b/accounts/role.go @@ -39,8 +39,8 @@ func (r *RoleService) List(ctx context.Context, query RoleListParams, opts ...op var raw *http.Response opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) - path := fmt.Sprintf("accounts/%v/roles", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + path := fmt.Sprintf("accounts/%s/roles", query.AccountID) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } @@ -61,7 +61,7 @@ func (r *RoleService) ListAutoPaging(ctx context.Context, query RoleListParams, func (r *RoleService) Get(ctx context.Context, roleID interface{}, query RoleGetParams, opts ...option.RequestOption) (res *RoleGetResponseUnion, err error) { opts = append(r.Options[:], opts...) var env RoleGetResponseEnvelope - path := fmt.Sprintf("accounts/%v/roles/%v", query.AccountID, roleID) + path := fmt.Sprintf("accounts/%s/roles/%v", query.AccountID, roleID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) if err != nil { return @@ -87,11 +87,11 @@ func init() { } type RoleListParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type RoleGetParams struct { - AccountID param.Field[interface{}] `path:"account_id,required"` + AccountID param.Field[string] `path:"account_id,required"` } type RoleGetResponseEnvelope struct { diff --git a/accounts/role_test.go b/accounts/role_test.go index 27a107f5a3..ddce75d5fc 100644 --- a/accounts/role_test.go +++ b/accounts/role_test.go @@ -29,7 +29,7 @@ func TestRoleList(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.Accounts.Roles.List(context.TODO(), accounts.RoleListParams{ - AccountID: cloudflare.F[any](map[string]interface{}{}), + AccountID: cloudflare.F("string"), }) if err != nil { var apierr *cloudflare.Error @@ -58,7 +58,7 @@ func TestRoleGet(t *testing.T) { context.TODO(), map[string]interface{}{}, accounts.RoleGetParams{ - AccountID: cloudflare.F[any](map[string]interface{}{}), + AccountID: cloudflare.F("string"), }, ) if err != nil { diff --git a/addressing/addressmap.go b/addressing/addressmap.go index c553728bdc..c7a09e7aac 100644 --- a/addressing/addressmap.go +++ b/addressing/addressmap.go @@ -58,7 +58,7 @@ func (r *AddressMapService) List(ctx context.Context, query AddressMapListParams opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/addressing/address_maps", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/addressing/addressmapaccount.go b/addressing/addressmapaccount.go index 163abe8b4b..a5ff7d6029 100644 --- a/addressing/addressmapaccount.go +++ b/addressing/addressmapaccount.go @@ -37,7 +37,7 @@ func (r *AddressMapAccountService) Update(ctx context.Context, addressMapID stri opts = append(r.Options[:], opts...) var env AddressMapAccountUpdateResponseEnvelope path := fmt.Sprintf("accounts/%s/addressing/address_maps/%s/accounts/%s", params.AccountID, addressMapID, params.AccountID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) if err != nil { return } diff --git a/addressing/addressmapip.go b/addressing/addressmapip.go index 16ac5eb17c..ac741780f3 100644 --- a/addressing/addressmapip.go +++ b/addressing/addressmapip.go @@ -37,7 +37,7 @@ func (r *AddressMapIPService) Update(ctx context.Context, addressMapID string, i opts = append(r.Options[:], opts...) var env AddressMapIPUpdateResponseEnvelope path := fmt.Sprintf("accounts/%s/addressing/address_maps/%s/ips/%s", params.AccountID, addressMapID, ipAddress) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) if err != nil { return } diff --git a/addressing/addressmapzone.go b/addressing/addressmapzone.go index af09239319..eba7004705 100644 --- a/addressing/addressmapzone.go +++ b/addressing/addressmapzone.go @@ -37,7 +37,7 @@ func (r *AddressMapZoneService) Update(ctx context.Context, addressMapID string, opts = append(r.Options[:], opts...) var env AddressMapZoneUpdateResponseEnvelope path := fmt.Sprintf("accounts/%s/addressing/address_maps/%s/zones/%s", params.AccountID, addressMapID, params.ZoneID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) if err != nil { return } diff --git a/addressing/prefix.go b/addressing/prefix.go index ea500057f6..4fee390071 100644 --- a/addressing/prefix.go +++ b/addressing/prefix.go @@ -56,7 +56,7 @@ func (r *PrefixService) List(ctx context.Context, query PrefixListParams, opts . opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/addressing/prefixes", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/addressing/prefixbgpbinding.go b/addressing/prefixbgpbinding.go index a8ab60987c..33c30ed607 100644 --- a/addressing/prefixbgpbinding.go +++ b/addressing/prefixbgpbinding.go @@ -60,7 +60,7 @@ func (r *PrefixBGPBindingService) List(ctx context.Context, prefixID string, que opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/addressing/prefixes/%s/bindings", query.AccountID, prefixID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/addressing/prefixbgpprefix.go b/addressing/prefixbgpprefix.go index 69a3dad350..b5517c5cf0 100644 --- a/addressing/prefixbgpprefix.go +++ b/addressing/prefixbgpprefix.go @@ -43,7 +43,7 @@ func (r *PrefixBGPPrefixService) List(ctx context.Context, prefixID string, quer opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/addressing/prefixes/%s/bgp/prefixes", query.AccountID, prefixID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/addressing/prefixdelegation.go b/addressing/prefixdelegation.go index 687dfabbb3..1c06793af8 100644 --- a/addressing/prefixdelegation.go +++ b/addressing/prefixdelegation.go @@ -53,7 +53,7 @@ func (r *PrefixDelegationService) List(ctx context.Context, prefixID string, que opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/addressing/prefixes/%s/delegations", query.AccountID, prefixID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/addressing/service.go b/addressing/service.go index 65fb179785..f3094982f5 100644 --- a/addressing/service.go +++ b/addressing/service.go @@ -40,7 +40,7 @@ func (r *ServiceService) List(ctx context.Context, query ServiceListParams, opts opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/addressing/services", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/alerting/destinationwebhook.go b/alerting/destinationwebhook.go index 060e9ede6e..6af2ac3718 100644 --- a/alerting/destinationwebhook.go +++ b/alerting/destinationwebhook.go @@ -68,7 +68,7 @@ func (r *DestinationWebhookService) List(ctx context.Context, query DestinationW opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/alerting/v3/destinations/webhooks", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/alerting/policy.go b/alerting/policy.go index 1009e7e72c..7b3f763b58 100644 --- a/alerting/policy.go +++ b/alerting/policy.go @@ -67,7 +67,7 @@ func (r *PolicyService) List(ctx context.Context, query PolicyListParams, opts . opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/alerting/v3/policies", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/cache/cachereserve.go b/cache/cachereserve.go index 030d60b4f5..4b580bcfee 100644 --- a/cache/cachereserve.go +++ b/cache/cachereserve.go @@ -41,7 +41,7 @@ func (r *CacheReserveService) Clear(ctx context.Context, params CacheReserveClea opts = append(r.Options[:], opts...) var env CacheReserveClearResponseEnvelope path := fmt.Sprintf("zones/%s/cache/cache_reserve_clear", params.ZoneID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return } diff --git a/calls/call.go b/calls/call.go index 693a135c81..5583c5671e 100644 --- a/calls/call.go +++ b/calls/call.go @@ -66,7 +66,7 @@ func (r *CallService) List(ctx context.Context, query CallListParams, opts ...op opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/calls/apps", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/custom_nameservers/customnameserver.go b/custom_nameservers/customnameserver.go index f0cb850d8e..e59bbde653 100644 --- a/custom_nameservers/customnameserver.go +++ b/custom_nameservers/customnameserver.go @@ -91,7 +91,7 @@ func (r *CustomNameserverService) Verify(ctx context.Context, params CustomNames opts = append(r.Options[:], opts...) var env CustomNameserverVerifyResponseEnvelope path := fmt.Sprintf("accounts/%s/custom_ns/verify", params.AccountID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return } diff --git a/dns/record.go b/dns/record.go index cf0d62f731..15e7aa914b 100644 --- a/dns/record.go +++ b/dns/record.go @@ -183,7 +183,7 @@ func (r *RecordService) Scan(ctx context.Context, params RecordScanParams, opts opts = append(r.Options[:], opts...) var env RecordScanResponseEnvelope path := fmt.Sprintf("zones/%s/dns_records/scan", params.ZoneID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return } diff --git a/durable_objects/namespace.go b/durable_objects/namespace.go index dca9761392..8805cd4abd 100644 --- a/durable_objects/namespace.go +++ b/durable_objects/namespace.go @@ -39,7 +39,7 @@ func (r *NamespaceService) List(ctx context.Context, query NamespaceListParams, opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/workers/durable_objects/namespaces", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/email_routing/emailrouting.go b/email_routing/emailrouting.go index 35bded23be..2bfa8518ec 100644 --- a/email_routing/emailrouting.go +++ b/email_routing/emailrouting.go @@ -44,7 +44,7 @@ func (r *EmailRoutingService) Disable(ctx context.Context, zoneIdentifier string opts = append(r.Options[:], opts...) var env EmailRoutingDisableResponseEnvelope path := fmt.Sprintf("zones/%s/email/routing/disable", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &env, opts...) if err != nil { return } @@ -57,7 +57,7 @@ func (r *EmailRoutingService) Enable(ctx context.Context, zoneIdentifier string, opts = append(r.Options[:], opts...) var env EmailRoutingEnableResponseEnvelope path := fmt.Sprintf("zones/%s/email/routing/enable", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &env, opts...) if err != nil { return } diff --git a/hyperdrive/config.go b/hyperdrive/config.go index 47b9116f50..7a3854d5e4 100644 --- a/hyperdrive/config.go +++ b/hyperdrive/config.go @@ -66,7 +66,7 @@ func (r *ConfigService) List(ctx context.Context, query ConfigListParams, opts . opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/hyperdrive/configs", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/intel/indicatorfeed.go b/intel/indicatorfeed.go index 87296245c6..118c02147a 100644 --- a/intel/indicatorfeed.go +++ b/intel/indicatorfeed.go @@ -68,7 +68,7 @@ func (r *IndicatorFeedService) List(ctx context.Context, query IndicatorFeedList opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/intel/indicator-feeds", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/intel/sinkhole.go b/intel/sinkhole.go index 726252fb5c..859afefefb 100644 --- a/intel/sinkhole.go +++ b/intel/sinkhole.go @@ -38,7 +38,7 @@ func (r *SinkholeService) List(ctx context.Context, query SinkholeListParams, op opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/intel/sinkholes", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/internal/apijson/encoder.go b/internal/apijson/encoder.go index 3f164898b4..ac5c84ddcd 100644 --- a/internal/apijson/encoder.go +++ b/internal/apijson/encoder.go @@ -359,6 +359,9 @@ func (e *encoder) encodeMapEntries(json []byte, v reflect.Value) ([]byte, error) if err != nil { return nil, err } + if len(encodedValue) == 0 { + continue + } json, err = sjson.SetRawBytes(json, string(p.key), encodedValue) if err != nil { return nil, err diff --git a/internal/apijson/port.go b/internal/apijson/port.go index e3dc59f2cf..3ef39df17e 100644 --- a/internal/apijson/port.go +++ b/internal/apijson/port.go @@ -63,9 +63,18 @@ func Port(from any, to any) error { } if value, ok := values[ptag.name]; ok { delete(values, ptag.name) - if value.Kind() == reflect.String { + switch value.Kind() { + case reflect.String: toVal.Field(i).SetString(value.String()) - } else { + case reflect.Bool: + toVal.Field(i).SetBool(value.Bool()) + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + toVal.Field(i).SetInt(value.Int()) + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + toVal.Field(i).SetUint(value.Uint()) + case reflect.Float32, reflect.Float64: + toVal.Field(i).SetFloat(value.Float()) + default: toVal.Field(i).Set(value) } } diff --git a/keyless_certificates/keylesscertificate.go b/keyless_certificates/keylesscertificate.go index 610a8d75f1..de5cce6cd9 100644 --- a/keyless_certificates/keylesscertificate.go +++ b/keyless_certificates/keylesscertificate.go @@ -54,7 +54,7 @@ func (r *KeylessCertificateService) List(ctx context.Context, query KeylessCerti opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("zones/%s/keyless_certificates", query.ZoneID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/load_balancers/loadbalancer.go b/load_balancers/loadbalancer.go index 30b089522c..69bfb735b0 100644 --- a/load_balancers/loadbalancer.go +++ b/load_balancers/loadbalancer.go @@ -76,7 +76,7 @@ func (r *LoadBalancerService) List(ctx context.Context, query LoadBalancerListPa opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("zones/%s/load_balancers", query.ZoneID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/load_balancers/monitor.go b/load_balancers/monitor.go index 4691e2e59f..b9de94ff2c 100644 --- a/load_balancers/monitor.go +++ b/load_balancers/monitor.go @@ -69,7 +69,7 @@ func (r *MonitorService) List(ctx context.Context, query MonitorListParams, opts opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/load_balancers/monitors", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/logpush/job.go b/logpush/job.go index d97768d62a..1b37b0c158 100644 --- a/logpush/job.go +++ b/logpush/job.go @@ -92,7 +92,7 @@ func (r *JobService) List(ctx context.Context, query JobListParams, opts ...opti accountOrZoneID = query.ZoneID } path := fmt.Sprintf("%s/%s/logpush/jobs", accountOrZone, accountOrZoneID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/magic_network_monitoring/config.go b/magic_network_monitoring/config.go index 1a6284909d..a75f40f931 100644 --- a/magic_network_monitoring/config.go +++ b/magic_network_monitoring/config.go @@ -38,7 +38,7 @@ func (r *ConfigService) New(ctx context.Context, params ConfigNewParams, opts .. opts = append(r.Options[:], opts...) var env ConfigNewResponseEnvelope path := fmt.Sprintf("accounts/%s/mnm/config", params.AccountID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return } @@ -52,7 +52,7 @@ func (r *ConfigService) Update(ctx context.Context, params ConfigUpdateParams, o opts = append(r.Options[:], opts...) var env ConfigUpdateResponseEnvelope path := fmt.Sprintf("accounts/%s/mnm/config", params.AccountID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) if err != nil { return } @@ -78,7 +78,7 @@ func (r *ConfigService) Edit(ctx context.Context, params ConfigEditParams, opts opts = append(r.Options[:], opts...) var env ConfigEditResponseEnvelope path := fmt.Sprintf("accounts/%s/mnm/config", params.AccountID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, params, &env, opts...) if err != nil { return } diff --git a/magic_network_monitoring/rule.go b/magic_network_monitoring/rule.go index 9b1636452f..dcc19007bb 100644 --- a/magic_network_monitoring/rule.go +++ b/magic_network_monitoring/rule.go @@ -40,7 +40,7 @@ func (r *RuleService) New(ctx context.Context, params RuleNewParams, opts ...opt opts = append(r.Options[:], opts...) var env RuleNewResponseEnvelope path := fmt.Sprintf("accounts/%s/mnm/rules", params.AccountID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return } @@ -53,7 +53,7 @@ func (r *RuleService) Update(ctx context.Context, params RuleUpdateParams, opts opts = append(r.Options[:], opts...) var env RuleUpdateResponseEnvelope path := fmt.Sprintf("accounts/%s/mnm/rules", params.AccountID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) if err != nil { return } @@ -67,7 +67,7 @@ func (r *RuleService) List(ctx context.Context, query RuleListParams, opts ...op opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/mnm/rules", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } @@ -102,7 +102,7 @@ func (r *RuleService) Edit(ctx context.Context, ruleID string, params RuleEditPa opts = append(r.Options[:], opts...) var env RuleEditResponseEnvelope path := fmt.Sprintf("accounts/%s/mnm/rules/%s", params.AccountID, ruleID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, params, &env, opts...) if err != nil { return } diff --git a/magic_network_monitoring/ruleadvertisement.go b/magic_network_monitoring/ruleadvertisement.go index a3ccf7f6bf..256a567b67 100644 --- a/magic_network_monitoring/ruleadvertisement.go +++ b/magic_network_monitoring/ruleadvertisement.go @@ -37,7 +37,7 @@ func (r *RuleAdvertisementService) Edit(ctx context.Context, ruleID string, para opts = append(r.Options[:], opts...) var env RuleAdvertisementEditResponseEnvelope path := fmt.Sprintf("accounts/%s/mnm/rules/%s/advertisement", params.AccountID, ruleID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, params, &env, opts...) if err != nil { return } diff --git a/magic_transit/ipsectunnel.go b/magic_transit/ipsectunnel.go index f436e585c6..02a4745c1c 100644 --- a/magic_transit/ipsectunnel.go +++ b/magic_transit/ipsectunnel.go @@ -113,7 +113,7 @@ func (r *IPSECTunnelService) PSKGenerate(ctx context.Context, tunnelIdentifier s opts = append(r.Options[:], opts...) var env IPSECTunnelPSKGenerateResponseEnvelope path := fmt.Sprintf("accounts/%s/magic/ipsec_tunnels/%s/psk_generate", params.AccountID, tunnelIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return } diff --git a/magic_transit/siteacl.go b/magic_transit/siteacl.go index 1ccb1c427f..7aa8fca433 100644 --- a/magic_transit/siteacl.go +++ b/magic_transit/siteacl.go @@ -66,7 +66,7 @@ func (r *SiteACLService) List(ctx context.Context, siteID string, query SiteACLL opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/magic/sites/%s/acls", query.AccountID, siteID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/magic_transit/sitelan.go b/magic_transit/sitelan.go index 2e46b370c7..d0ba98f4c9 100644 --- a/magic_transit/sitelan.go +++ b/magic_transit/sitelan.go @@ -65,7 +65,7 @@ func (r *SiteLANService) List(ctx context.Context, siteID string, query SiteLANL opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/magic/sites/%s/lans", query.AccountID, siteID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/magic_transit/sitewan.go b/magic_transit/sitewan.go index 6753d907fe..efd1c422b6 100644 --- a/magic_transit/sitewan.go +++ b/magic_transit/sitewan.go @@ -64,7 +64,7 @@ func (r *SiteWANService) List(ctx context.Context, siteID string, query SiteWANL opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/magic/sites/%s/wans", query.AccountID, siteID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/mtls_certificates/mtlscertificate.go b/mtls_certificates/mtlscertificate.go index 35b54e47ae..e03028dd96 100644 --- a/mtls_certificates/mtlscertificate.go +++ b/mtls_certificates/mtlscertificate.go @@ -55,7 +55,7 @@ func (r *MTLSCertificateService) List(ctx context.Context, query MTLSCertificate opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/mtls_certificates", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/origin_tls_client_auth/hostnamecertificate.go b/origin_tls_client_auth/hostnamecertificate.go index 84d8914cd7..8d9142dd1f 100644 --- a/origin_tls_client_auth/hostnamecertificate.go +++ b/origin_tls_client_auth/hostnamecertificate.go @@ -54,7 +54,7 @@ func (r *HostnameCertificateService) List(ctx context.Context, query HostnameCer opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("zones/%s/origin_tls_client_auth/hostnames/certificates", query.ZoneID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/origin_tls_client_auth/origintlsclientauth.go b/origin_tls_client_auth/origintlsclientauth.go index 26512d5daf..0b0a82dd7c 100644 --- a/origin_tls_client_auth/origintlsclientauth.go +++ b/origin_tls_client_auth/origintlsclientauth.go @@ -63,7 +63,7 @@ func (r *OriginTLSClientAuthService) List(ctx context.Context, query OriginTLSCl opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("zones/%s/origin_tls_client_auth", query.ZoneID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/page_shield/policy.go b/page_shield/policy.go index 6ff4f55dd9..fe3e9f50d6 100644 --- a/page_shield/policy.go +++ b/page_shield/policy.go @@ -53,7 +53,7 @@ func (r *PolicyService) List(ctx context.Context, query PolicyListParams, opts . opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("zones/%s/page_shield/policies", query.ZoneID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/pages/project.go b/pages/project.go index d98a5825a0..5cf0e6e0fa 100644 --- a/pages/project.go +++ b/pages/project.go @@ -58,7 +58,7 @@ func (r *ProjectService) List(ctx context.Context, query ProjectListParams, opts opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/pages/projects", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/pages/projectdeployment.go b/pages/projectdeployment.go index 3e55eacc5f..d5a509bfb9 100644 --- a/pages/projectdeployment.go +++ b/pages/projectdeployment.go @@ -100,7 +100,7 @@ func (r *ProjectDeploymentService) Retry(ctx context.Context, projectName string opts = append(r.Options[:], opts...) var env ProjectDeploymentRetryResponseEnvelope path := fmt.Sprintf("accounts/%s/pages/projects/%s/deployments/%s/retry", params.AccountID, projectName, deploymentID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return } @@ -114,7 +114,7 @@ func (r *ProjectDeploymentService) Rollback(ctx context.Context, projectName str opts = append(r.Options[:], opts...) var env ProjectDeploymentRollbackResponseEnvelope path := fmt.Sprintf("accounts/%s/pages/projects/%s/deployments/%s/rollback", params.AccountID, projectName, deploymentID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return } diff --git a/pages/projectdomain.go b/pages/projectdomain.go index 735a064968..652b761a50 100644 --- a/pages/projectdomain.go +++ b/pages/projectdomain.go @@ -54,7 +54,7 @@ func (r *ProjectDomainService) List(ctx context.Context, projectName string, que opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/pages/projects/%s/domains", query.AccountID, projectName) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } @@ -84,7 +84,7 @@ func (r *ProjectDomainService) Edit(ctx context.Context, projectName string, dom opts = append(r.Options[:], opts...) var env ProjectDomainEditResponseEnvelope path := fmt.Sprintf("accounts/%s/pages/projects/%s/domains/%s", params.AccountID, projectName, domainName) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, params, &env, opts...) if err != nil { return } diff --git a/pcaps/pcap.go b/pcaps/pcap.go index 90893ef50b..a804445ffa 100644 --- a/pcaps/pcap.go +++ b/pcaps/pcap.go @@ -57,7 +57,7 @@ func (r *PCAPService) List(ctx context.Context, query PCAPListParams, opts ...op opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/pcaps", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/queues/queue.go b/queues/queue.go index b28e5b17f9..d90f3d624b 100644 --- a/queues/queue.go +++ b/queues/queue.go @@ -70,7 +70,7 @@ func (r *QueueService) List(ctx context.Context, query QueueListParams, opts ... opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/queues", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/registrar/domain.go b/registrar/domain.go index ee7071b636..ab4541786b 100644 --- a/registrar/domain.go +++ b/registrar/domain.go @@ -54,7 +54,7 @@ func (r *DomainService) List(ctx context.Context, query DomainListParams, opts . opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/registrar/domains", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/rules/list.go b/rules/list.go index b143ac6c31..fc46d1cd83 100644 --- a/rules/list.go +++ b/rules/list.go @@ -68,7 +68,7 @@ func (r *ListService) List(ctx context.Context, query ListListParams, opts ...op opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/rules/lists", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/rulesets/phaseversion.go b/rulesets/phaseversion.go index aec42b76ac..0515679216 100644 --- a/rulesets/phaseversion.go +++ b/rulesets/phaseversion.go @@ -50,7 +50,7 @@ func (r *PhaseVersionService) List(ctx context.Context, rulesetPhase PhaseVersio accountOrZoneID = query.ZoneID } path := fmt.Sprintf("%s/%s/rulesets/phases/%v/entrypoint/versions", accountOrZone, accountOrZoneID, rulesetPhase) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/rulesets/ruleset.go b/rulesets/ruleset.go index 1084ed2a79..8a2364d370 100644 --- a/rulesets/ruleset.go +++ b/rulesets/ruleset.go @@ -99,7 +99,7 @@ func (r *RulesetService) List(ctx context.Context, query RulesetListParams, opts accountOrZoneID = query.ZoneID } path := fmt.Sprintf("%s/%s/rulesets", accountOrZone, accountOrZoneID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/rulesets/version.go b/rulesets/version.go index f664a61c90..3107bd4ac0 100644 --- a/rulesets/version.go +++ b/rulesets/version.go @@ -51,7 +51,7 @@ func (r *VersionService) List(ctx context.Context, rulesetID string, query Versi accountOrZoneID = query.ZoneID } path := fmt.Sprintf("%s/%s/rulesets/%s/versions", accountOrZone, accountOrZoneID, rulesetID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/secondary_dns/acl.go b/secondary_dns/acl.go index 75c19e0115..533458d1e6 100644 --- a/secondary_dns/acl.go +++ b/secondary_dns/acl.go @@ -64,7 +64,7 @@ func (r *ACLService) List(ctx context.Context, query ACLListParams, opts ...opti opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/secondary_dns/acls", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/secondary_dns/forceaxfr.go b/secondary_dns/forceaxfr.go index 062942ae14..cd3baeff34 100644 --- a/secondary_dns/forceaxfr.go +++ b/secondary_dns/forceaxfr.go @@ -36,7 +36,7 @@ func (r *ForceAXFRService) New(ctx context.Context, params ForceAXFRNewParams, o opts = append(r.Options[:], opts...) var env ForceAXFRNewResponseEnvelope path := fmt.Sprintf("zones/%s/secondary_dns/force_axfr", params.ZoneID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return } diff --git a/secondary_dns/outgoing.go b/secondary_dns/outgoing.go index 3a7d5fbb31..e3ab029a74 100644 --- a/secondary_dns/outgoing.go +++ b/secondary_dns/outgoing.go @@ -78,7 +78,7 @@ func (r *OutgoingService) Disable(ctx context.Context, params OutgoingDisablePar opts = append(r.Options[:], opts...) var env OutgoingDisableResponseEnvelope path := fmt.Sprintf("zones/%s/secondary_dns/outgoing/disable", params.ZoneID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return } @@ -91,7 +91,7 @@ func (r *OutgoingService) Enable(ctx context.Context, params OutgoingEnableParam opts = append(r.Options[:], opts...) var env OutgoingEnableResponseEnvelope path := fmt.Sprintf("zones/%s/secondary_dns/outgoing/enable", params.ZoneID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return } @@ -104,7 +104,7 @@ func (r *OutgoingService) ForceNotify(ctx context.Context, params OutgoingForceN opts = append(r.Options[:], opts...) var env OutgoingForceNotifyResponseEnvelope path := fmt.Sprintf("zones/%s/secondary_dns/outgoing/force_notify", params.ZoneID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return } diff --git a/secondary_dns/peer.go b/secondary_dns/peer.go index 12ebc0271f..89b35d8047 100644 --- a/secondary_dns/peer.go +++ b/secondary_dns/peer.go @@ -64,7 +64,7 @@ func (r *PeerService) List(ctx context.Context, query PeerListParams, opts ...op opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/secondary_dns/peers", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/secondary_dns/tsig.go b/secondary_dns/tsig.go index 59882e5769..aec07a6264 100644 --- a/secondary_dns/tsig.go +++ b/secondary_dns/tsig.go @@ -64,7 +64,7 @@ func (r *TSIGService) List(ctx context.Context, query TSIGListParams, opts ...op opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/secondary_dns/tsigs", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/speed/page.go b/speed/page.go index e47d8762e9..65b2d3dad1 100644 --- a/speed/page.go +++ b/speed/page.go @@ -37,7 +37,7 @@ func (r *PageService) List(ctx context.Context, query PageListParams, opts ...op opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("zones/%s/speed_api/pages", query.ZoneID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/ssl/certificatepack.go b/ssl/certificatepack.go index e55389a4c2..afff49b1b5 100644 --- a/ssl/certificatepack.go +++ b/ssl/certificatepack.go @@ -84,7 +84,7 @@ func (r *CertificatePackService) Edit(ctx context.Context, certificatePackID str opts = append(r.Options[:], opts...) var env CertificatePackEditResponseEnvelope path := fmt.Sprintf("zones/%s/ssl/certificate_packs/%s", params.ZoneID, certificatePackID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, params, &env, opts...) if err != nil { return } diff --git a/stream/download.go b/stream/download.go index a3ba065e33..b81e63a972 100644 --- a/stream/download.go +++ b/stream/download.go @@ -38,7 +38,7 @@ func (r *DownloadService) New(ctx context.Context, identifier string, params Dow opts = append(r.Options[:], opts...) var env DownloadNewResponseEnvelope path := fmt.Sprintf("accounts/%s/stream/%s/downloads", params.AccountID, identifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return } diff --git a/stream/key.go b/stream/key.go index 112d0ad3e5..6062aa863d 100644 --- a/stream/key.go +++ b/stream/key.go @@ -41,7 +41,7 @@ func (r *KeyService) New(ctx context.Context, params KeyNewParams, opts ...optio opts = append(r.Options[:], opts...) var env KeyNewResponseEnvelope path := fmt.Sprintf("accounts/%s/stream/keys", params.AccountID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return } diff --git a/stream/liveinputoutput.go b/stream/liveinputoutput.go index 8f777332c3..b1fb961b9d 100644 --- a/stream/liveinputoutput.go +++ b/stream/liveinputoutput.go @@ -67,7 +67,7 @@ func (r *LiveInputOutputService) List(ctx context.Context, liveInputIdentifier s opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/stream/live_inputs/%s/outputs", query.AccountID, liveInputIdentifier) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/stream/stream.go b/stream/stream.go index 487349cb2b..6c2e289db6 100644 --- a/stream/stream.go +++ b/stream/stream.go @@ -69,7 +69,7 @@ func (r *StreamService) New(ctx context.Context, params StreamNewParams, opts .. opts = append(r.Options[:], opts...) opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...) path := fmt.Sprintf("accounts/%s/stream", params.AccountID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, nil, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, nil, opts...) return } diff --git a/stream/watermark.go b/stream/watermark.go index 0c296e6559..bd09ec8c4a 100644 --- a/stream/watermark.go +++ b/stream/watermark.go @@ -55,7 +55,7 @@ func (r *WatermarkService) List(ctx context.Context, query WatermarkListParams, opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/stream/watermarks", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/vectorize/index.go b/vectorize/index.go index 9002e01466..95244eb71a 100644 --- a/vectorize/index.go +++ b/vectorize/index.go @@ -66,7 +66,7 @@ func (r *IndexService) List(ctx context.Context, query IndexListParams, opts ... opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/vectorize/indexes", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/waiting_rooms/rule.go b/waiting_rooms/rule.go index 20e834b612..078db98c28 100644 --- a/waiting_rooms/rule.go +++ b/waiting_rooms/rule.go @@ -67,7 +67,7 @@ func (r *RuleService) List(ctx context.Context, waitingRoomID string, query Rule opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("zones/%s/waiting_rooms/%s/rules", query.ZoneID, waitingRoomID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/workers/script.go b/workers/script.go index d54505ddb1..7549e91854 100644 --- a/workers/script.go +++ b/workers/script.go @@ -70,7 +70,7 @@ func (r *ScriptService) List(ctx context.Context, query ScriptListParams, opts . opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/workers/scripts", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/workers/scripttail.go b/workers/scripttail.go index ab150b3528..9956201452 100644 --- a/workers/scripttail.go +++ b/workers/scripttail.go @@ -36,7 +36,7 @@ func (r *ScriptTailService) New(ctx context.Context, scriptName string, params S opts = append(r.Options[:], opts...) var env ScriptTailNewResponseEnvelope path := fmt.Sprintf("accounts/%s/workers/scripts/%s/tails", params.AccountID, scriptName) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) if err != nil { return } diff --git a/workers_for_platforms/dispatchnamespace.go b/workers_for_platforms/dispatchnamespace.go index 8335dfecb9..5ca71f33e0 100644 --- a/workers_for_platforms/dispatchnamespace.go +++ b/workers_for_platforms/dispatchnamespace.go @@ -55,7 +55,7 @@ func (r *DispatchNamespaceService) List(ctx context.Context, query DispatchNames opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/workers/dispatch/namespaces", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/workers_for_platforms/dispatchnamespacescriptsecret.go b/workers_for_platforms/dispatchnamespacescriptsecret.go index bb5f4bfe9c..d1c07accfd 100644 --- a/workers_for_platforms/dispatchnamespacescriptsecret.go +++ b/workers_for_platforms/dispatchnamespacescriptsecret.go @@ -52,7 +52,7 @@ func (r *DispatchNamespaceScriptSecretService) List(ctx context.Context, dispatc opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/workers/dispatch/namespaces/%s/scripts/%s/secrets", query.AccountID, dispatchNamespace, scriptName) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/workers_for_platforms/dispatchnamespacescripttag.go b/workers_for_platforms/dispatchnamespacescripttag.go index 2cbec1b431..67dde28605 100644 --- a/workers_for_platforms/dispatchnamespacescripttag.go +++ b/workers_for_platforms/dispatchnamespacescripttag.go @@ -52,7 +52,7 @@ func (r *DispatchNamespaceScriptTagService) List(ctx context.Context, dispatchNa opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/workers/dispatch/namespaces/%s/scripts/%s/tags", query.AccountID, dispatchNamespace, scriptName) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/zero_trust/accessapplication.go b/zero_trust/accessapplication.go index 22e54143da..9b53e6009d 100644 --- a/zero_trust/accessapplication.go +++ b/zero_trust/accessapplication.go @@ -101,7 +101,7 @@ func (r *AccessApplicationService) List(ctx context.Context, query AccessApplica accountOrZoneID = query.ZoneID } path := fmt.Sprintf("%s/%s/access/apps", accountOrZone, accountOrZoneID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/zero_trust/accessapplicationca.go b/zero_trust/accessapplicationca.go index c5f7a8ea58..39c2459850 100644 --- a/zero_trust/accessapplicationca.go +++ b/zero_trust/accessapplicationca.go @@ -72,7 +72,7 @@ func (r *AccessApplicationCAService) List(ctx context.Context, query AccessAppli accountOrZoneID = query.ZoneID } path := fmt.Sprintf("%s/%s/access/apps/ca", accountOrZone, accountOrZoneID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/zero_trust/accessapplicationpolicy.go b/zero_trust/accessapplicationpolicy.go index 04736e07ab..61b309a191 100644 --- a/zero_trust/accessapplicationpolicy.go +++ b/zero_trust/accessapplicationpolicy.go @@ -93,7 +93,7 @@ func (r *AccessApplicationPolicyService) List(ctx context.Context, uuid string, accountOrZoneID = query.ZoneID } path := fmt.Sprintf("%s/%s/access/apps/%s/policies", accountOrZone, accountOrZoneID, uuid) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/zero_trust/accessbookmark.go b/zero_trust/accessbookmark.go index 44e8bf2423..d843720a4c 100644 --- a/zero_trust/accessbookmark.go +++ b/zero_trust/accessbookmark.go @@ -38,7 +38,7 @@ func (r *AccessBookmarkService) New(ctx context.Context, identifier string, uuid opts = append(r.Options[:], opts...) var env AccessBookmarkNewResponseEnvelope path := fmt.Sprintf("accounts/%s/access/bookmarks/%s", identifier, uuid) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &env, opts...) if err != nil { return } @@ -51,7 +51,7 @@ func (r *AccessBookmarkService) Update(ctx context.Context, identifier string, u opts = append(r.Options[:], opts...) var env AccessBookmarkUpdateResponseEnvelope path := fmt.Sprintf("accounts/%s/access/bookmarks/%s", identifier, uuid) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, nil, &env, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &env, opts...) if err != nil { return } diff --git a/zero_trust/accesscertificate.go b/zero_trust/accesscertificate.go index eece81cc34..a97210c0a2 100644 --- a/zero_trust/accesscertificate.go +++ b/zero_trust/accesscertificate.go @@ -95,7 +95,7 @@ func (r *AccessCertificateService) List(ctx context.Context, query AccessCertifi accountOrZoneID = query.ZoneID } path := fmt.Sprintf("%s/%s/access/certificates", accountOrZone, accountOrZoneID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/zero_trust/accessgroup.go b/zero_trust/accessgroup.go index 4145e5778e..f19ce25b68 100644 --- a/zero_trust/accessgroup.go +++ b/zero_trust/accessgroup.go @@ -93,7 +93,7 @@ func (r *AccessGroupService) List(ctx context.Context, query AccessGroupListPara accountOrZoneID = query.ZoneID } path := fmt.Sprintf("%s/%s/access/groups", accountOrZone, accountOrZoneID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/zero_trust/accessservicetoken.go b/zero_trust/accessservicetoken.go index d58de5ac48..d77728c45b 100644 --- a/zero_trust/accessservicetoken.go +++ b/zero_trust/accessservicetoken.go @@ -95,7 +95,7 @@ func (r *AccessServiceTokenService) List(ctx context.Context, query AccessServic accountOrZoneID = query.ZoneID } path := fmt.Sprintf("%s/%s/access/service_tokens", accountOrZone, accountOrZoneID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/zero_trust/device.go b/zero_trust/device.go index 27a823d046..5225bc3cc2 100644 --- a/zero_trust/device.go +++ b/zero_trust/device.go @@ -57,7 +57,7 @@ func (r *DeviceService) List(ctx context.Context, query DeviceListParams, opts . opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/devices", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/zero_trust/devicedextest.go b/zero_trust/devicedextest.go index 633b440e34..39307e758b 100644 --- a/zero_trust/devicedextest.go +++ b/zero_trust/devicedextest.go @@ -65,7 +65,7 @@ func (r *DeviceDEXTestService) List(ctx context.Context, query DeviceDEXTestList opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/devices/dex_tests", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/zero_trust/devicenetwork.go b/zero_trust/devicenetwork.go index fdd03d86c1..12b47db6db 100644 --- a/zero_trust/devicenetwork.go +++ b/zero_trust/devicenetwork.go @@ -65,7 +65,7 @@ func (r *DeviceNetworkService) List(ctx context.Context, query DeviceNetworkList opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/devices/networks", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/zero_trust/devicepolicy.go b/zero_trust/devicepolicy.go index 9247cc6629..e632f96890 100644 --- a/zero_trust/devicepolicy.go +++ b/zero_trust/devicepolicy.go @@ -61,7 +61,7 @@ func (r *DevicePolicyService) List(ctx context.Context, query DevicePolicyListPa opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/devices/policies", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/zero_trust/devicepolicyexclude.go b/zero_trust/devicepolicyexclude.go index 4dd7ce3bce..ed841852d7 100644 --- a/zero_trust/devicepolicyexclude.go +++ b/zero_trust/devicepolicyexclude.go @@ -52,7 +52,7 @@ func (r *DevicePolicyExcludeService) List(ctx context.Context, query DevicePolic opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/devices/policy/exclude", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/zero_trust/devicepolicyfallbackdomain.go b/zero_trust/devicepolicyfallbackdomain.go index 960bf9903d..2cab25d9e4 100644 --- a/zero_trust/devicepolicyfallbackdomain.go +++ b/zero_trust/devicepolicyfallbackdomain.go @@ -55,7 +55,7 @@ func (r *DevicePolicyFallbackDomainService) List(ctx context.Context, query Devi opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/devices/policy/fallback_domains", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/zero_trust/devicepolicyinclude.go b/zero_trust/devicepolicyinclude.go index 86528171c3..e05de5d8ac 100644 --- a/zero_trust/devicepolicyinclude.go +++ b/zero_trust/devicepolicyinclude.go @@ -52,7 +52,7 @@ func (r *DevicePolicyIncludeService) List(ctx context.Context, query DevicePolic opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/devices/policy/include", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/zero_trust/deviceposture.go b/zero_trust/deviceposture.go index 5c0b4c55e8..4af60fea3f 100644 --- a/zero_trust/deviceposture.go +++ b/zero_trust/deviceposture.go @@ -69,7 +69,7 @@ func (r *DevicePostureService) List(ctx context.Context, query DevicePostureList opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/devices/posture", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/zero_trust/devicepostureintegration.go b/zero_trust/devicepostureintegration.go index 59e65131e7..0f93017ef4 100644 --- a/zero_trust/devicepostureintegration.go +++ b/zero_trust/devicepostureintegration.go @@ -54,7 +54,7 @@ func (r *DevicePostureIntegrationService) List(ctx context.Context, query Device opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/devices/posture/integration", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/zero_trust/dlpdataset.go b/zero_trust/dlpdataset.go index 92ea4f3234..4edac8a8e5 100644 --- a/zero_trust/dlpdataset.go +++ b/zero_trust/dlpdataset.go @@ -67,7 +67,7 @@ func (r *DLPDatasetService) List(ctx context.Context, query DLPDatasetListParams opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/dlp/datasets", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/zero_trust/dlpprofile.go b/zero_trust/dlpprofile.go index e96d9b5c22..5e8dc18cc3 100644 --- a/zero_trust/dlpprofile.go +++ b/zero_trust/dlpprofile.go @@ -45,7 +45,7 @@ func (r *DLPProfileService) List(ctx context.Context, query DLPProfileListParams opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/dlp/profiles", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/zero_trust/gatewayapptype.go b/zero_trust/gatewayapptype.go index 99ee621724..c624b08456 100644 --- a/zero_trust/gatewayapptype.go +++ b/zero_trust/gatewayapptype.go @@ -41,7 +41,7 @@ func (r *GatewayAppTypeService) List(ctx context.Context, query GatewayAppTypeLi opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/gateway/app_types", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/zero_trust/gatewaycategory.go b/zero_trust/gatewaycategory.go index 66975e2256..8f83dd39cc 100644 --- a/zero_trust/gatewaycategory.go +++ b/zero_trust/gatewaycategory.go @@ -38,7 +38,7 @@ func (r *GatewayCategoryService) List(ctx context.Context, query GatewayCategory opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/gateway/categories", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/zero_trust/gatewaylist.go b/zero_trust/gatewaylist.go index f1255d7816..ceefe7f5f2 100644 --- a/zero_trust/gatewaylist.go +++ b/zero_trust/gatewaylist.go @@ -70,7 +70,7 @@ func (r *GatewayListService) List(ctx context.Context, query GatewayListListPara opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/gateway/lists", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/zero_trust/gatewaylistitem.go b/zero_trust/gatewaylistitem.go index 93aa8795e6..51c0f687a3 100644 --- a/zero_trust/gatewaylistitem.go +++ b/zero_trust/gatewaylistitem.go @@ -37,7 +37,7 @@ func (r *GatewayListItemService) List(ctx context.Context, listID string, query opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/gateway/lists/%s/items", query.AccountID, listID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/zero_trust/gatewaylocation.go b/zero_trust/gatewaylocation.go index 66a8dee81c..5b1f9eac5b 100644 --- a/zero_trust/gatewaylocation.go +++ b/zero_trust/gatewaylocation.go @@ -68,7 +68,7 @@ func (r *GatewayLocationService) List(ctx context.Context, query GatewayLocation opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/gateway/locations", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/zero_trust/gatewayproxyendpoint.go b/zero_trust/gatewayproxyendpoint.go index bcd61fca34..982e597b70 100644 --- a/zero_trust/gatewayproxyendpoint.go +++ b/zero_trust/gatewayproxyendpoint.go @@ -55,7 +55,7 @@ func (r *GatewayProxyEndpointService) List(ctx context.Context, query GatewayPro opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/gateway/proxy_endpoints", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/zero_trust/gatewayrule.go b/zero_trust/gatewayrule.go index bd08793fcb..f73356b983 100644 --- a/zero_trust/gatewayrule.go +++ b/zero_trust/gatewayrule.go @@ -68,7 +68,7 @@ func (r *GatewayRuleService) List(ctx context.Context, query GatewayRuleListPara opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) path := fmt.Sprintf("accounts/%s/gateway/rules", query.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } diff --git a/zero_trust/identityprovider.go b/zero_trust/identityprovider.go index 1a751fe3c2..723e3f0c9d 100644 --- a/zero_trust/identityprovider.go +++ b/zero_trust/identityprovider.go @@ -94,7 +94,7 @@ func (r *IdentityProviderService) List(ctx context.Context, query IdentityProvid accountOrZoneID = query.ZoneID } path := fmt.Sprintf("%s/%s/access/identity_providers", accountOrZone, accountOrZoneID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) if err != nil { return nil, err } From b8d823ddb4d720f83e3d5eddb06a03f401c0e7b3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Apr 2024 22:13:19 +0000 Subject: [PATCH 005/127] feat(api): OpenAPI spec update via Stainless API (#1846) --- .stats.yml | 1 + accounts/account.go | 2 +- accounts/aliases.go | 2 +- accounts/member.go | 2 +- accounts/member_test.go | 2 +- accounts/role.go | 2 +- acm/aliases.go | 2 +- acm/totaltls.go | 2 +- addressing/addressmap.go | 2 +- addressing/addressmapaccount.go | 2 +- addressing/addressmapip.go | 2 +- addressing/addressmapzone.go | 2 +- addressing/aliases.go | 2 +- addressing/loadocument.go | 2 +- addressing/prefix.go | 2 +- addressing/prefixbgpbinding.go | 2 +- addressing/prefixbgpprefix.go | 2 +- addressing/prefixbgpstatus.go | 2 +- addressing/prefixdelegation.go | 2 +- alerting/aliases.go | 2 +- alerting/availablealert.go | 2 +- alerting/destinationeligible.go | 2 +- alerting/destinationpagerduty.go | 2 +- alerting/destinationwebhook.go | 2 +- alerting/policy.go | 2 +- alerting/policy_test.go | 2 +- aliases.go | 2 +- api.md | 38 +++++++++---------- argo/aliases.go | 2 +- argo/smartrouting.go | 2 +- argo/tieredcaching.go | 2 +- audit_logs/aliases.go | 2 +- audit_logs/auditlog.go | 2 +- billing/aliases.go | 2 +- billing/profile.go | 2 +- bot_management/aliases.go | 2 +- bot_management/botmanagement.go | 2 +- brand_protection/aliases.go | 2 +- brand_protection/brandprotection.go | 2 +- cache/aliases.go | 2 +- cache/cache.go | 2 +- cache/cachereserve.go | 2 +- cache/regionaltieredcache.go | 2 +- cache/smarttieredcache.go | 2 +- cache/variant.go | 2 +- calls/aliases.go | 2 +- calls/call.go | 2 +- certificate_authorities/aliases.go | 2 +- .../hostnameassociation.go | 2 +- challenges/aliases.go | 2 +- challenges/widget.go | 2 +- client_certificates/aliases.go | 2 +- client_certificates/clientcertificate.go | 2 +- cloudforce_one/aliases.go | 2 +- cloudforce_one/request.go | 2 +- cloudforce_one/requestmessage.go | 2 +- cloudforce_one/requestpriority.go | 2 +- custom_certificates/aliases.go | 2 +- custom_certificates/customcertificate.go | 2 +- custom_certificates/prioritize.go | 2 +- custom_hostnames/aliases.go | 2 +- custom_hostnames/customhostname.go | 2 +- custom_hostnames/fallbackorigin.go | 2 +- custom_nameservers/aliases.go | 2 +- custom_nameservers/customnameserver.go | 2 +- d1/aliases.go | 2 +- d1/database.go | 2 +- dcv_delegation/aliases.go | 2 +- dcv_delegation/uuid.go | 2 +- diagnostics/aliases.go | 2 +- diagnostics/traceroute.go | 2 +- dns/aliases.go | 2 +- dns/analyticsreport.go | 2 +- dns/analyticsreportbytime.go | 2 +- dns/firewall.go | 2 +- dns/firewall_test.go | 2 +- dns/firewallanalyticsreport.go | 2 +- dns/firewallanalyticsreportbytime.go | 2 +- dns/record.go | 2 +- dns/record_test.go | 2 +- dnssec/aliases.go | 2 +- dnssec/dnssec.go | 2 +- durable_objects/aliases.go | 2 +- email_routing/address.go | 2 +- email_routing/aliases.go | 2 +- email_routing/dns.go | 2 +- email_routing/emailrouting.go | 2 +- email_routing/rule.go | 2 +- email_routing/rulecatchall.go | 2 +- event_notifications/aliases.go | 2 +- event_notifications/r2configuration.go | 2 +- event_notifications/r2configurationqueue.go | 2 +- filters/aliases.go | 2 +- filters/filter.go | 2 +- firewall/accessrule.go | 2 +- firewall/aliases.go | 2 +- firewall/lockdown.go | 2 +- firewall/rule.go | 2 +- firewall/uarule.go | 2 +- firewall/wafoverride.go | 2 +- firewall/wafpackage.go | 2 +- firewall/wafpackagegroup.go | 2 +- firewall/wafpackagerule.go | 2 +- healthchecks/aliases.go | 2 +- healthchecks/healthcheck.go | 2 +- healthchecks/preview.go | 2 +- hostnames/aliases.go | 2 +- hostnames/settingtls.go | 2 +- hyperdrive/aliases.go | 2 +- hyperdrive/config.go | 2 +- images/aliases.go | 2 +- images/v1.go | 2 +- images/v1key.go | 2 +- images/v1stat.go | 2 +- images/v1variant.go | 2 +- images/v2.go | 2 +- images/v2directupload.go | 2 +- intel/aliases.go | 2 +- intel/asn.go | 2 +- intel/asnsubnet.go | 2 +- intel/attacksurfacereportissue.go | 2 +- intel/attacksurfacereportissuetype.go | 2 +- intel/dns.go | 2 +- intel/domain.go | 2 +- intel/domainbulk.go | 2 +- intel/domainhistory.go | 2 +- intel/indicatorfeed.go | 2 +- intel/indicatorfeedpermission.go | 2 +- intel/ip.go | 2 +- intel/iplist.go | 2 +- intel/miscategorization.go | 2 +- intel/whois.go | 2 +- internal/apierror/apierror.go | 2 +- ips/aliases.go | 2 +- ips/ip.go | 2 +- keyless_certificates/aliases.go | 2 +- keyless_certificates/keylesscertificate.go | 2 +- kv/aliases.go | 2 +- kv/namespace.go | 2 +- kv/namespacebulk.go | 2 +- kv/namespacemetadata.go | 2 +- kv/namespacevalue.go | 2 +- load_balancers/aliases.go | 2 +- load_balancers/loadbalancer.go | 2 +- load_balancers/monitor.go | 2 +- load_balancers/monitorpreview.go | 2 +- load_balancers/monitorreference.go | 2 +- load_balancers/pool.go | 2 +- load_balancers/poolhealth.go | 2 +- load_balancers/poolreference.go | 2 +- load_balancers/preview.go | 2 +- load_balancers/region.go | 2 +- load_balancers/search.go | 2 +- logpush/aliases.go | 2 +- logpush/datasetfield.go | 2 +- logpush/datasetjob.go | 2 +- logpush/edge.go | 2 +- logpush/job.go | 2 +- logpush/ownership.go | 2 +- logpush/validate.go | 2 +- logs/aliases.go | 2 +- logs/controlcmbconfig.go | 2 +- logs/controlretentionflag.go | 2 +- logs/rayid.go | 2 +- logs/received.go | 2 +- logs/received_test.go | 2 +- magic_network_monitoring/aliases.go | 2 +- magic_network_monitoring/config.go | 2 +- magic_network_monitoring/configfull.go | 2 +- magic_network_monitoring/rule.go | 2 +- magic_network_monitoring/ruleadvertisement.go | 2 +- magic_transit/aliases.go | 2 +- magic_transit/cfinterconnect.go | 2 +- magic_transit/gretunnel.go | 2 +- magic_transit/ipsectunnel.go | 2 +- magic_transit/route.go | 2 +- magic_transit/site.go | 2 +- magic_transit/siteacl.go | 2 +- magic_transit/siteacl_test.go | 2 +- magic_transit/sitelan.go | 2 +- magic_transit/sitewan.go | 2 +- managed_headers/aliases.go | 2 +- memberships/aliases.go | 2 +- memberships/membership.go | 2 +- mtls_certificates/aliases.go | 2 +- mtls_certificates/association.go | 2 +- mtls_certificates/mtlscertificate.go | 2 +- origin_ca_certificates/aliases.go | 2 +- origin_ca_certificates/origincacertificate.go | 2 +- origin_post_quantum_encryption/aliases.go | 2 +- .../originpostquantumencryption.go | 2 +- origin_tls_client_auth/aliases.go | 2 +- origin_tls_client_auth/hostname.go | 2 +- origin_tls_client_auth/hostnamecertificate.go | 2 +- origin_tls_client_auth/origintlsclientauth.go | 2 +- origin_tls_client_auth/setting.go | 2 +- page_shield/aliases.go | 2 +- page_shield/pageshield.go | 2 +- pagerules/aliases.go | 2 +- pagerules/pagerule.go | 2 +- pagerules/setting.go | 2 +- pages/aliases.go | 2 +- pages/project.go | 2 +- pages/projectdeployment.go | 2 +- pages/projectdeploymenthistorylog.go | 2 +- pages/projectdomain.go | 2 +- pcaps/aliases.go | 2 +- pcaps/ownership.go | 2 +- pcaps/pcap.go | 2 +- plans/aliases.go | 2 +- plans/plan.go | 2 +- queues/aliases.go | 2 +- queues/consumer.go | 2 +- queues/message.go | 2 +- queues/queue.go | 2 +- r2/aliases.go | 2 +- r2/bucket.go | 2 +- r2/sippy.go | 2 +- radar/aliases.go | 2 +- radar/ranking.go | 2 +- rate_limits/aliases.go | 2 +- rate_limits/ratelimit.go | 2 +- rate_plans/aliases.go | 2 +- rate_plans/rateplan.go | 2 +- registrar/aliases.go | 2 +- registrar/domain.go | 2 +- request_tracers/aliases.go | 2 +- request_tracers/trace.go | 2 +- rules/aliases.go | 2 +- rules/list.go | 2 +- rules/listbulkoperation.go | 2 +- rules/listitem.go | 2 +- rulesets/aliases.go | 2 +- rum/aliases.go | 2 +- secondary_dns/acl.go | 2 +- secondary_dns/aliases.go | 2 +- secondary_dns/forceaxfr.go | 2 +- secondary_dns/incoming.go | 2 +- secondary_dns/outgoing.go | 2 +- secondary_dns/outgoingstatus.go | 2 +- secondary_dns/peer.go | 2 +- secondary_dns/tsig.go | 2 +- {internal/shared => shared}/shared.go | 0 {internal/shared => shared}/union.go | 0 snippets/aliases.go | 2 +- snippets/rule.go | 2 +- snippets/snippet.go | 2 +- spectrum/aliases.go | 2 +- spectrum/analyticsaggregatecurrent.go | 2 +- spectrum/analyticseventbytime.go | 2 +- spectrum/analyticseventsummary.go | 2 +- spectrum/app.go | 2 +- spectrum/app_test.go | 2 +- spectrum/spectrum.go | 2 +- speed/aliases.go | 2 +- speed/test.go | 2 +- ssl/aliases.go | 2 +- ssl/analyze.go | 2 +- ssl/certificatepack.go | 2 +- ssl/certificatepackorder.go | 2 +- ssl/certificatepackquota.go | 2 +- ssl/recommendation.go | 2 +- ssl/universalsetting.go | 2 +- ssl/verification.go | 2 +- storage/aliases.go | 2 +- storage/analytics.go | 2 +- stream/aliases.go | 2 +- stream/audiotrack.go | 2 +- stream/caption.go | 2 +- stream/captionlanguage.go | 2 +- stream/clip.go | 2 +- stream/copy.go | 2 +- stream/directupload.go | 2 +- stream/download.go | 2 +- stream/key.go | 2 +- stream/liveinput.go | 2 +- stream/liveinputoutput.go | 2 +- stream/stream.go | 2 +- stream/token.go | 2 +- stream/video.go | 2 +- stream/watermark.go | 2 +- stream/webhook.go | 2 +- subscriptions/aliases.go | 2 +- subscriptions/subscription.go | 2 +- url_normalization/aliases.go | 2 +- url_scanner/aliases.go | 2 +- user/aliases.go | 2 +- user/auditlog.go | 2 +- user/billingprofile.go | 2 +- user/invite.go | 2 +- user/organization.go | 2 +- user/subscription.go | 2 +- user/token.go | 2 +- user/tokenvalue.go | 2 +- user/user.go | 2 +- vectorize/aliases.go | 2 +- vectorize/index.go | 2 +- waiting_rooms/aliases.go | 2 +- waiting_rooms/rule.go | 2 +- warp_connector/aliases.go | 2 +- warp_connector/warpconnector.go | 2 +- web3/aliases.go | 2 +- web3/hostname.go | 2 +- web3/hostnameipfsuniversalpathcontentlist.go | 2 +- ...stnameipfsuniversalpathcontentlistentry.go | 2 +- workers/accountsetting.go | 2 +- workers/ai.go | 2 +- workers/aliases.go | 2 +- workers/domain.go | 2 +- workers/script.go | 2 +- workers/scriptcontent.go | 2 +- workers/scriptdeployment.go | 2 +- workers/scriptschedule.go | 2 +- workers/scriptsetting.go | 2 +- workers/scripttail.go | 2 +- workers/scriptversion.go | 2 +- workers/subdomain.go | 2 +- workers_for_platforms/aliases.go | 2 +- workers_for_platforms/dispatchnamespace.go | 2 +- .../dispatchnamespacescript.go | 2 +- .../dispatchnamespacescriptbinding.go | 2 +- .../dispatchnamespacescriptcontent.go | 2 +- .../dispatchnamespacescriptsecret.go | 2 +- .../dispatchnamespacescriptsetting.go | 2 +- .../dispatchnamespacescripttag.go | 2 +- zero_trust/accessapplication.go | 2 +- zero_trust/accessapplication_test.go | 2 +- zero_trust/accessapplicationca.go | 2 +- zero_trust/accessapplicationpolicy.go | 2 +- .../accessapplicationuserpolicycheck.go | 2 +- .../accessapplicationuserpolicycheck_test.go | 2 +- zero_trust/accessbookmark.go | 2 +- zero_trust/accesscertificate.go | 2 +- zero_trust/accesscertificatesetting.go | 2 +- zero_trust/accesscustompage.go | 2 +- zero_trust/accessgroup.go | 2 +- zero_trust/accesskey.go | 2 +- zero_trust/accesslogaccessrequest.go | 2 +- zero_trust/accessservicetoken.go | 2 +- zero_trust/accesstag.go | 2 +- zero_trust/accessuseractivesession.go | 2 +- zero_trust/accessuserlastseenidentity.go | 2 +- zero_trust/aliases.go | 2 +- zero_trust/connectivitysetting.go | 2 +- zero_trust/device.go | 2 +- zero_trust/devicedextest.go | 2 +- zero_trust/devicenetwork.go | 2 +- zero_trust/deviceoverridecode.go | 2 +- zero_trust/devicepolicy.go | 2 +- zero_trust/devicepolicydefaultpolicy.go | 2 +- zero_trust/devicepolicyexclude.go | 2 +- zero_trust/devicepolicyfallbackdomain.go | 2 +- zero_trust/devicepolicyinclude.go | 2 +- zero_trust/deviceposture.go | 2 +- zero_trust/devicepostureintegration.go | 2 +- zero_trust/devicerevoke.go | 2 +- zero_trust/devicesetting.go | 2 +- zero_trust/deviceunrevoke.go | 2 +- zero_trust/dexfleetstatus.go | 2 +- zero_trust/dexhttptest.go | 2 +- zero_trust/dexhttptestpercentile.go | 2 +- zero_trust/dextest.go | 2 +- zero_trust/dextestuniquedevice.go | 2 +- zero_trust/dextraceroutetest.go | 2 +- .../dextraceroutetestresultnetworkpath.go | 2 +- zero_trust/dlpdataset.go | 2 +- zero_trust/dlpdatasetupload.go | 2 +- zero_trust/dlppattern.go | 2 +- zero_trust/dlppayloadlog.go | 2 +- zero_trust/dlpprofile.go | 2 +- zero_trust/dlpprofilecustom.go | 2 +- zero_trust/dlpprofilepredefined.go | 2 +- zero_trust/gateway.go | 2 +- zero_trust/gatewayauditsshsetting.go | 2 +- zero_trust/gatewayconfiguration.go | 2 +- zero_trust/gatewaylist.go | 2 +- zero_trust/gatewaylocation.go | 2 +- zero_trust/gatewaylogging.go | 2 +- zero_trust/gatewayproxyendpoint.go | 2 +- zero_trust/gatewayrule.go | 2 +- zero_trust/identityprovider.go | 2 +- zero_trust/networkroute.go | 2 +- zero_trust/networkrouteip.go | 2 +- zero_trust/networkroutenetwork.go | 2 +- zero_trust/networkvirtualnetwork.go | 2 +- zero_trust/organization.go | 2 +- zero_trust/riskscoring.go | 2 +- zero_trust/riskscoringbehaviour.go | 2 +- zero_trust/riskscoringsummary.go | 2 +- zero_trust/seat.go | 2 +- zero_trust/tunnel.go | 2 +- zero_trust/tunnelconfiguration.go | 2 +- zero_trust/tunnelconnection.go | 2 +- zero_trust/tunnelconnector.go | 2 +- zero_trust/tunnelmanagement.go | 2 +- zero_trust/tunneltoken.go | 2 +- zones/activationcheck.go | 2 +- zones/aliases.go | 2 +- zones/customnameserver.go | 2 +- zones/dnssetting.go | 2 +- zones/hold.go | 2 +- zones/settingadvancedddos.go | 2 +- zones/settingalwaysonline.go | 2 +- zones/settingalwaysusehttps.go | 2 +- zones/settingautomatichttpsrewrite.go | 2 +- zones/settingautomaticplatformoptimization.go | 2 +- zones/settingbrotli.go | 2 +- zones/settingbrowsercachettl.go | 2 +- zones/settingbrowsercheck.go | 2 +- zones/settingcachelevel.go | 2 +- zones/settingchallengettl.go | 2 +- zones/settingcipher.go | 2 +- zones/settingdevelopmentmode.go | 2 +- zones/settingearlyhint.go | 2 +- zones/settingemailobfuscation.go | 2 +- zones/settingfontsetting.go | 2 +- zones/settingh2prioritization.go | 2 +- zones/settinghotlinkprotection.go | 2 +- zones/settinghttp2.go | 2 +- zones/settinghttp3.go | 2 +- zones/settingimageresizing.go | 2 +- zones/settingipgeolocation.go | 2 +- zones/settingipv6.go | 2 +- zones/settingminify.go | 2 +- zones/settingmintlsversion.go | 2 +- zones/settingmirage.go | 2 +- zones/settingmobileredirect.go | 2 +- zones/settingnel.go | 2 +- zones/settingopportunisticencryption.go | 2 +- zones/settingopportunisticonion.go | 2 +- zones/settingorangetoorange.go | 2 +- zones/settingoriginerrorpagepassthru.go | 2 +- zones/settingoriginmaxhttpversion.go | 2 +- zones/settingpolish.go | 2 +- zones/settingprefetchpreload.go | 2 +- zones/settingproxyreadtimeout.go | 2 +- zones/settingpseudoipv4.go | 2 +- zones/settingresponsebuffering.go | 2 +- zones/settingrocketloader.go | 2 +- zones/settingsecurityheader.go | 2 +- zones/settingsecuritylevel.go | 2 +- zones/settingserversideexclude.go | 2 +- zones/settingsortquerystringforcache.go | 2 +- zones/settingssl.go | 2 +- zones/settingsslrecommender.go | 2 +- zones/settingtls13.go | 2 +- zones/settingtlsclientauth.go | 2 +- zones/settingtrueclientipheader.go | 2 +- zones/settingwaf.go | 2 +- zones/settingwebp.go | 2 +- zones/settingwebsocket.go | 2 +- zones/settingzerortt.go | 2 +- zones/subscription.go | 2 +- zones/zone.go | 8 ++-- 454 files changed, 474 insertions(+), 471 deletions(-) rename {internal/shared => shared}/shared.go (100%) rename {internal/shared => shared}/union.go (100%) diff --git a/.stats.yml b/.stats.yml index 860345bb66..67e4f500c5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1 +1,2 @@ configured_endpoints: 1266 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e202d9b1bb049167a2efb5c3981c53af7bab82b6411bbbd684557eef5b435880.yml diff --git a/accounts/account.go b/accounts/account.go index 2c5c9edd16..02c84b6b0a 100644 --- a/accounts/account.go +++ b/accounts/account.go @@ -15,8 +15,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/accounts/aliases.go b/accounts/aliases.go index a4796e4838..4f29b455d2 100644 --- a/accounts/aliases.go +++ b/accounts/aliases.go @@ -4,7 +4,7 @@ package accounts import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/accounts/member.go b/accounts/member.go index 2d75a8e6e6..28cdcf290c 100644 --- a/accounts/member.go +++ b/accounts/member.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // MemberService contains methods and other services that help with interacting diff --git a/accounts/member_test.go b/accounts/member_test.go index b91557567f..19fae4994a 100644 --- a/accounts/member_test.go +++ b/accounts/member_test.go @@ -10,9 +10,9 @@ import ( "github.com/cloudflare/cloudflare-go/v2" "github.com/cloudflare/cloudflare-go/v2/accounts" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" "github.com/cloudflare/cloudflare-go/v2/internal/testutil" "github.com/cloudflare/cloudflare-go/v2/option" + "github.com/cloudflare/cloudflare-go/v2/shared" ) func TestMemberNewWithOptionalParams(t *testing.T) { diff --git a/accounts/role.go b/accounts/role.go index 98b6d1de08..51db4d4a85 100644 --- a/accounts/role.go +++ b/accounts/role.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/acm/aliases.go b/acm/aliases.go index 7276335dd9..e78ba3d1a9 100644 --- a/acm/aliases.go +++ b/acm/aliases.go @@ -4,7 +4,7 @@ package acm import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/acm/totaltls.go b/acm/totaltls.go index 67c685dd2a..3750802ac1 100644 --- a/acm/totaltls.go +++ b/acm/totaltls.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // TotalTLSService contains methods and other services that help with interacting diff --git a/addressing/addressmap.go b/addressing/addressmap.go index c7a09e7aac..44aa60b6d6 100644 --- a/addressing/addressmap.go +++ b/addressing/addressmap.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // AddressMapService contains methods and other services that help with interacting diff --git a/addressing/addressmapaccount.go b/addressing/addressmapaccount.go index a5ff7d6029..e462f4ff76 100644 --- a/addressing/addressmapaccount.go +++ b/addressing/addressmapaccount.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // AddressMapAccountService contains methods and other services that help with diff --git a/addressing/addressmapip.go b/addressing/addressmapip.go index ac741780f3..8bc0f75a62 100644 --- a/addressing/addressmapip.go +++ b/addressing/addressmapip.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // AddressMapIPService contains methods and other services that help with diff --git a/addressing/addressmapzone.go b/addressing/addressmapzone.go index eba7004705..e1feaf2a6f 100644 --- a/addressing/addressmapzone.go +++ b/addressing/addressmapzone.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // AddressMapZoneService contains methods and other services that help with diff --git a/addressing/aliases.go b/addressing/aliases.go index 89ec357fd1..d308babcea 100644 --- a/addressing/aliases.go +++ b/addressing/aliases.go @@ -4,7 +4,7 @@ package addressing import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/addressing/loadocument.go b/addressing/loadocument.go index 85aac0bcbc..2d819b564b 100644 --- a/addressing/loadocument.go +++ b/addressing/loadocument.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // LOADocumentService contains methods and other services that help with diff --git a/addressing/prefix.go b/addressing/prefix.go index 4fee390071..f480eb577f 100644 --- a/addressing/prefix.go +++ b/addressing/prefix.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // PrefixService contains methods and other services that help with interacting diff --git a/addressing/prefixbgpbinding.go b/addressing/prefixbgpbinding.go index 33c30ed607..e1f0a20de5 100644 --- a/addressing/prefixbgpbinding.go +++ b/addressing/prefixbgpbinding.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // PrefixBGPBindingService contains methods and other services that help with diff --git a/addressing/prefixbgpprefix.go b/addressing/prefixbgpprefix.go index b5517c5cf0..a6db712d33 100644 --- a/addressing/prefixbgpprefix.go +++ b/addressing/prefixbgpprefix.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // PrefixBGPPrefixService contains methods and other services that help with diff --git a/addressing/prefixbgpstatus.go b/addressing/prefixbgpstatus.go index 0a68c435f3..31d42e75fc 100644 --- a/addressing/prefixbgpstatus.go +++ b/addressing/prefixbgpstatus.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // PrefixBGPStatusService contains methods and other services that help with diff --git a/addressing/prefixdelegation.go b/addressing/prefixdelegation.go index 1c06793af8..d5d5ddc1af 100644 --- a/addressing/prefixdelegation.go +++ b/addressing/prefixdelegation.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // PrefixDelegationService contains methods and other services that help with diff --git a/alerting/aliases.go b/alerting/aliases.go index c6270ab5d1..d8733c40ff 100644 --- a/alerting/aliases.go +++ b/alerting/aliases.go @@ -4,7 +4,7 @@ package alerting import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/alerting/availablealert.go b/alerting/availablealert.go index c836f1eee4..d106c8d941 100644 --- a/alerting/availablealert.go +++ b/alerting/availablealert.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/alerting/destinationeligible.go b/alerting/destinationeligible.go index 15b7b3bb43..9838012ca8 100644 --- a/alerting/destinationeligible.go +++ b/alerting/destinationeligible.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/alerting/destinationpagerduty.go b/alerting/destinationpagerduty.go index a177defba2..a9e3f47abb 100644 --- a/alerting/destinationpagerduty.go +++ b/alerting/destinationpagerduty.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/alerting/destinationwebhook.go b/alerting/destinationwebhook.go index 6af2ac3718..362dd8c801 100644 --- a/alerting/destinationwebhook.go +++ b/alerting/destinationwebhook.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/alerting/policy.go b/alerting/policy.go index 7b3f763b58..4f79212b5f 100644 --- a/alerting/policy.go +++ b/alerting/policy.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/alerting/policy_test.go b/alerting/policy_test.go index 6684d15480..bcc2df68c4 100644 --- a/alerting/policy_test.go +++ b/alerting/policy_test.go @@ -10,9 +10,9 @@ import ( "github.com/cloudflare/cloudflare-go/v2" "github.com/cloudflare/cloudflare-go/v2/alerting" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" "github.com/cloudflare/cloudflare-go/v2/internal/testutil" "github.com/cloudflare/cloudflare-go/v2/option" + "github.com/cloudflare/cloudflare-go/v2/shared" ) func TestPolicyNewWithOptionalParams(t *testing.T) { diff --git a/aliases.go b/aliases.go index 51c3d9713b..0d6e3454c7 100644 --- a/aliases.go +++ b/aliases.go @@ -4,7 +4,7 @@ package cloudflare import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/api.md b/api.md index fc990f01d0..1ab636bfe9 100644 --- a/api.md +++ b/api.md @@ -1,20 +1,20 @@ # Shared Params Types -- shared.ASNParam -- shared.MemberParam -- shared.PermissionGrantParam +- shared.ASNParam +- shared.MemberParam +- shared.PermissionGrantParam # Shared Response Types -- shared.ASN -- shared.AuditLog -- shared.CloudflareTunnel -- shared.ErrorData -- shared.Member -- shared.Permission -- shared.PermissionGrant -- shared.ResponseInfo -- shared.Role +- shared.ASN +- shared.AuditLog +- shared.CloudflareTunnel +- shared.ErrorData +- shared.Member +- shared.Permission +- shared.PermissionGrant +- shared.ResponseInfo +- shared.Role # Accounts @@ -46,10 +46,10 @@ Response Types: Methods: - client.Accounts.Members.New(ctx context.Context, params accounts.MemberNewParams) (accounts.UserWithInviteCode, error) -- client.Accounts.Members.Update(ctx context.Context, memberID string, params accounts.MemberUpdateParams) (shared.Member, error) +- client.Accounts.Members.Update(ctx context.Context, memberID string, params accounts.MemberUpdateParams) (shared.Member, error) - client.Accounts.Members.List(ctx context.Context, params accounts.MemberListParams) (pagination.V4PagePaginationArray[accounts.MemberListResponse], error) - client.Accounts.Members.Delete(ctx context.Context, memberID string, body accounts.MemberDeleteParams) (accounts.MemberDeleteResponse, error) -- client.Accounts.Members.Get(ctx context.Context, memberID string, query accounts.MemberGetParams) (shared.Member, error) +- client.Accounts.Members.Get(ctx context.Context, memberID string, query accounts.MemberGetParams) (shared.Member, error) ## Roles @@ -59,7 +59,7 @@ Response Types: Methods: -- client.Accounts.Roles.List(ctx context.Context, query accounts.RoleListParams) (pagination.SinglePage[shared.Role], error) +- client.Accounts.Roles.List(ctx context.Context, query accounts.RoleListParams) (pagination.SinglePage[shared.Role], error) - client.Accounts.Roles.Get(ctx context.Context, roleID interface{}, query accounts.RoleGetParams) (accounts.RoleGetResponseUnion, error) # OriginCACertificates @@ -122,7 +122,7 @@ Methods: Methods: -- client.User.AuditLogs.List(ctx context.Context, query user.AuditLogListParams) (pagination.V4PagePaginationArray[shared.AuditLog], error) +- client.User.AuditLogs.List(ctx context.Context, query user.AuditLogListParams) (pagination.V4PagePaginationArray[shared.AuditLog], error) ## Billing @@ -3122,7 +3122,7 @@ Methods: Methods: -- client.AuditLogs.List(ctx context.Context, params audit_logs.AuditLogListParams) (pagination.V4PagePaginationArray[shared.AuditLog], error) +- client.AuditLogs.List(ctx context.Context, params audit_logs.AuditLogListParams) (pagination.V4PagePaginationArray[shared.AuditLog], error) # Billing @@ -3256,7 +3256,7 @@ Methods: Methods: -- client.Intel.ASN.Get(ctx context.Context, asn shared.ASNParam, query intel.ASNGetParams) (shared.ASN, error) +- client.Intel.ASN.Get(ctx context.Context, asn shared.ASNParam, query intel.ASNGetParams) (shared.ASN, error) ### Subnets @@ -3266,7 +3266,7 @@ Response Types: Methods: -- client.Intel.ASN.Subnets.Get(ctx context.Context, asn shared.ASNParam, query intel.ASNSubnetGetParams) (intel.ASNSubnetGetResponse, error) +- client.Intel.ASN.Subnets.Get(ctx context.Context, asn shared.ASNParam, query intel.ASNSubnetGetParams) (intel.ASNSubnetGetResponse, error) ## DNS diff --git a/argo/aliases.go b/argo/aliases.go index d2d5ea03ec..4e590d1fc5 100644 --- a/argo/aliases.go +++ b/argo/aliases.go @@ -4,7 +4,7 @@ package argo import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/argo/smartrouting.go b/argo/smartrouting.go index 35fea9775b..d652fadebe 100644 --- a/argo/smartrouting.go +++ b/argo/smartrouting.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/argo/tieredcaching.go b/argo/tieredcaching.go index 1d14668241..061b25474c 100644 --- a/argo/tieredcaching.go +++ b/argo/tieredcaching.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/audit_logs/aliases.go b/audit_logs/aliases.go index d995027d8c..496e4bf315 100644 --- a/audit_logs/aliases.go +++ b/audit_logs/aliases.go @@ -4,7 +4,7 @@ package audit_logs import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/audit_logs/auditlog.go b/audit_logs/auditlog.go index d203c9f73e..f15dc8a207 100644 --- a/audit_logs/auditlog.go +++ b/audit_logs/auditlog.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // AuditLogService contains methods and other services that help with interacting diff --git a/billing/aliases.go b/billing/aliases.go index 8fccb49406..7b658c85a5 100644 --- a/billing/aliases.go +++ b/billing/aliases.go @@ -4,7 +4,7 @@ package billing import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/billing/profile.go b/billing/profile.go index 1e8861be59..8218a24bba 100644 --- a/billing/profile.go +++ b/billing/profile.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "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/shared" "github.com/tidwall/gjson" ) diff --git a/bot_management/aliases.go b/bot_management/aliases.go index 56cf5711b1..dda99f755b 100644 --- a/bot_management/aliases.go +++ b/bot_management/aliases.go @@ -4,7 +4,7 @@ package bot_management import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/bot_management/botmanagement.go b/bot_management/botmanagement.go index a1f392c142..c188f273fe 100644 --- a/bot_management/botmanagement.go +++ b/bot_management/botmanagement.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/brand_protection/aliases.go b/brand_protection/aliases.go index cdf7261418..61705c2892 100644 --- a/brand_protection/aliases.go +++ b/brand_protection/aliases.go @@ -4,7 +4,7 @@ package brand_protection import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/brand_protection/brandprotection.go b/brand_protection/brandprotection.go index 607899dbc7..5826d60f9f 100644 --- a/brand_protection/brandprotection.go +++ b/brand_protection/brandprotection.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // BrandProtectionService contains methods and other services that help with diff --git a/cache/aliases.go b/cache/aliases.go index 8827f486a6..39f25d5123 100644 --- a/cache/aliases.go +++ b/cache/aliases.go @@ -4,7 +4,7 @@ package cache import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/cache/cache.go b/cache/cache.go index e2ca758e71..e2f4a59b09 100644 --- a/cache/cache.go +++ b/cache/cache.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // CacheService contains methods and other services that help with interacting with diff --git a/cache/cachereserve.go b/cache/cachereserve.go index 4b580bcfee..aabdf90707 100644 --- a/cache/cachereserve.go +++ b/cache/cachereserve.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // CacheReserveService contains methods and other services that help with diff --git a/cache/regionaltieredcache.go b/cache/regionaltieredcache.go index ac03f6bf3e..3939827079 100644 --- a/cache/regionaltieredcache.go +++ b/cache/regionaltieredcache.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // RegionalTieredCacheService contains methods and other services that help with diff --git a/cache/smarttieredcache.go b/cache/smarttieredcache.go index d98fc64467..374102250d 100644 --- a/cache/smarttieredcache.go +++ b/cache/smarttieredcache.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/cache/variant.go b/cache/variant.go index 4b1afc13a1..e29a7718ed 100644 --- a/cache/variant.go +++ b/cache/variant.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // VariantService contains methods and other services that help with interacting diff --git a/calls/aliases.go b/calls/aliases.go index 6264bd17aa..6985787d90 100644 --- a/calls/aliases.go +++ b/calls/aliases.go @@ -4,7 +4,7 @@ package calls import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/calls/call.go b/calls/call.go index 5583c5671e..f231ab239a 100644 --- a/calls/call.go +++ b/calls/call.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // CallService contains methods and other services that help with interacting with diff --git a/certificate_authorities/aliases.go b/certificate_authorities/aliases.go index 328c01a55d..f2b9b1768e 100644 --- a/certificate_authorities/aliases.go +++ b/certificate_authorities/aliases.go @@ -4,7 +4,7 @@ package certificate_authorities import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/certificate_authorities/hostnameassociation.go b/certificate_authorities/hostnameassociation.go index 9ac2362bd9..54d6aeceec 100644 --- a/certificate_authorities/hostnameassociation.go +++ b/certificate_authorities/hostnameassociation.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // HostnameAssociationService contains methods and other services that help with diff --git a/challenges/aliases.go b/challenges/aliases.go index a7b3b45cf0..4c54c4d5ca 100644 --- a/challenges/aliases.go +++ b/challenges/aliases.go @@ -4,7 +4,7 @@ package challenges import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/challenges/widget.go b/challenges/widget.go index f90f2aa08d..a69b92339e 100644 --- a/challenges/widget.go +++ b/challenges/widget.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // WidgetService contains methods and other services that help with interacting diff --git a/client_certificates/aliases.go b/client_certificates/aliases.go index 43adaaea18..1caca50040 100644 --- a/client_certificates/aliases.go +++ b/client_certificates/aliases.go @@ -4,7 +4,7 @@ package client_certificates import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/client_certificates/clientcertificate.go b/client_certificates/clientcertificate.go index f606f442ab..61598cb1aa 100644 --- a/client_certificates/clientcertificate.go +++ b/client_certificates/clientcertificate.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // ClientCertificateService contains methods and other services that help with diff --git a/cloudforce_one/aliases.go b/cloudforce_one/aliases.go index 49542c8198..d6a74a8caa 100644 --- a/cloudforce_one/aliases.go +++ b/cloudforce_one/aliases.go @@ -4,7 +4,7 @@ package cloudforce_one import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/cloudforce_one/request.go b/cloudforce_one/request.go index 34545b10e2..ce028e3612 100644 --- a/cloudforce_one/request.go +++ b/cloudforce_one/request.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/cloudforce_one/requestmessage.go b/cloudforce_one/requestmessage.go index 1d1fd45828..b5a88e43b5 100644 --- a/cloudforce_one/requestmessage.go +++ b/cloudforce_one/requestmessage.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/cloudforce_one/requestpriority.go b/cloudforce_one/requestpriority.go index c11633c765..702df8b577 100644 --- a/cloudforce_one/requestpriority.go +++ b/cloudforce_one/requestpriority.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/custom_certificates/aliases.go b/custom_certificates/aliases.go index 08bf4fd221..4da6b1368c 100644 --- a/custom_certificates/aliases.go +++ b/custom_certificates/aliases.go @@ -4,7 +4,7 @@ package custom_certificates import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/custom_certificates/customcertificate.go b/custom_certificates/customcertificate.go index 56595280d4..ee67ded407 100644 --- a/custom_certificates/customcertificate.go +++ b/custom_certificates/customcertificate.go @@ -16,9 +16,9 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" "github.com/cloudflare/cloudflare-go/v2/keyless_certificates" "github.com/cloudflare/cloudflare-go/v2/option" + "github.com/cloudflare/cloudflare-go/v2/shared" "github.com/tidwall/gjson" ) diff --git a/custom_certificates/prioritize.go b/custom_certificates/prioritize.go index e482e72387..66ab1d76aa 100644 --- a/custom_certificates/prioritize.go +++ b/custom_certificates/prioritize.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // PrioritizeService contains methods and other services that help with interacting diff --git a/custom_hostnames/aliases.go b/custom_hostnames/aliases.go index dde8525828..dcd0aaa51f 100644 --- a/custom_hostnames/aliases.go +++ b/custom_hostnames/aliases.go @@ -4,7 +4,7 @@ package custom_hostnames import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/custom_hostnames/customhostname.go b/custom_hostnames/customhostname.go index 97618af8be..a7c54fc51e 100644 --- a/custom_hostnames/customhostname.go +++ b/custom_hostnames/customhostname.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // CustomHostnameService contains methods and other services that help with diff --git a/custom_hostnames/fallbackorigin.go b/custom_hostnames/fallbackorigin.go index c5e283ca84..20a8e10969 100644 --- a/custom_hostnames/fallbackorigin.go +++ b/custom_hostnames/fallbackorigin.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/custom_nameservers/aliases.go b/custom_nameservers/aliases.go index 8bb76f0783..d247d088b5 100644 --- a/custom_nameservers/aliases.go +++ b/custom_nameservers/aliases.go @@ -4,7 +4,7 @@ package custom_nameservers import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/custom_nameservers/customnameserver.go b/custom_nameservers/customnameserver.go index e59bbde653..13c4b21f5d 100644 --- a/custom_nameservers/customnameserver.go +++ b/custom_nameservers/customnameserver.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/d1/aliases.go b/d1/aliases.go index 7f8f3a3dee..44e64bc418 100644 --- a/d1/aliases.go +++ b/d1/aliases.go @@ -4,7 +4,7 @@ package d1 import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/d1/database.go b/d1/database.go index a37699d1b8..10b1718a89 100644 --- a/d1/database.go +++ b/d1/database.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/dcv_delegation/aliases.go b/dcv_delegation/aliases.go index 14f905e7e2..b14d7f9bdd 100644 --- a/dcv_delegation/aliases.go +++ b/dcv_delegation/aliases.go @@ -4,7 +4,7 @@ package dcv_delegation import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/dcv_delegation/uuid.go b/dcv_delegation/uuid.go index 6e51a39cc9..6c7bcc9dcc 100644 --- a/dcv_delegation/uuid.go +++ b/dcv_delegation/uuid.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // UUIDService contains methods and other services that help with interacting with diff --git a/diagnostics/aliases.go b/diagnostics/aliases.go index 6aef22300e..4d3dfc2a32 100644 --- a/diagnostics/aliases.go +++ b/diagnostics/aliases.go @@ -4,7 +4,7 @@ package diagnostics import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/diagnostics/traceroute.go b/diagnostics/traceroute.go index 44e880a10a..9bd9915ff3 100644 --- a/diagnostics/traceroute.go +++ b/diagnostics/traceroute.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // TracerouteService contains methods and other services that help with interacting diff --git a/dns/aliases.go b/dns/aliases.go index 6dacb5bd01..17e7ff0fdb 100644 --- a/dns/aliases.go +++ b/dns/aliases.go @@ -4,7 +4,7 @@ package dns import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/dns/analyticsreport.go b/dns/analyticsreport.go index 048c10cc4a..848216c35f 100644 --- a/dns/analyticsreport.go +++ b/dns/analyticsreport.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // AnalyticsReportService contains methods and other services that help with diff --git a/dns/analyticsreportbytime.go b/dns/analyticsreportbytime.go index ef59b9073a..0eb4449939 100644 --- a/dns/analyticsreportbytime.go +++ b/dns/analyticsreportbytime.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // AnalyticsReportBytimeService contains methods and other services that help with diff --git a/dns/firewall.go b/dns/firewall.go index 872e6a6911..cb6cae2f0b 100644 --- a/dns/firewall.go +++ b/dns/firewall.go @@ -15,8 +15,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/dns/firewall_test.go b/dns/firewall_test.go index afda2009e4..397d65f656 100644 --- a/dns/firewall_test.go +++ b/dns/firewall_test.go @@ -10,9 +10,9 @@ import ( "github.com/cloudflare/cloudflare-go/v2" "github.com/cloudflare/cloudflare-go/v2/dns" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" "github.com/cloudflare/cloudflare-go/v2/internal/testutil" "github.com/cloudflare/cloudflare-go/v2/option" + "github.com/cloudflare/cloudflare-go/v2/shared" ) func TestFirewallNewWithOptionalParams(t *testing.T) { diff --git a/dns/firewallanalyticsreport.go b/dns/firewallanalyticsreport.go index 613717a647..8f23076610 100644 --- a/dns/firewallanalyticsreport.go +++ b/dns/firewallanalyticsreport.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // FirewallAnalyticsReportService contains methods and other services that help diff --git a/dns/firewallanalyticsreportbytime.go b/dns/firewallanalyticsreportbytime.go index 8d25287742..57681e71b5 100644 --- a/dns/firewallanalyticsreportbytime.go +++ b/dns/firewallanalyticsreportbytime.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // FirewallAnalyticsReportBytimeService contains methods and other services that diff --git a/dns/record.go b/dns/record.go index 15e7aa914b..05bb51034c 100644 --- a/dns/record.go +++ b/dns/record.go @@ -15,8 +15,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/dns/record_test.go b/dns/record_test.go index 9c8fdac419..1c3af875ed 100644 --- a/dns/record_test.go +++ b/dns/record_test.go @@ -10,9 +10,9 @@ import ( "github.com/cloudflare/cloudflare-go/v2" "github.com/cloudflare/cloudflare-go/v2/dns" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" "github.com/cloudflare/cloudflare-go/v2/internal/testutil" "github.com/cloudflare/cloudflare-go/v2/option" + "github.com/cloudflare/cloudflare-go/v2/shared" ) func TestRecordNewWithOptionalParams(t *testing.T) { diff --git a/dnssec/aliases.go b/dnssec/aliases.go index ed730a1382..195a7d4c15 100644 --- a/dnssec/aliases.go +++ b/dnssec/aliases.go @@ -4,7 +4,7 @@ package dnssec import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/dnssec/dnssec.go b/dnssec/dnssec.go index eaa93042af..42dcdc6222 100644 --- a/dnssec/dnssec.go +++ b/dnssec/dnssec.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/durable_objects/aliases.go b/durable_objects/aliases.go index 41c3b68a48..7159319288 100644 --- a/durable_objects/aliases.go +++ b/durable_objects/aliases.go @@ -4,7 +4,7 @@ package durable_objects import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/email_routing/address.go b/email_routing/address.go index f1644572a7..6fad22ad3a 100644 --- a/email_routing/address.go +++ b/email_routing/address.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // AddressService contains methods and other services that help with interacting diff --git a/email_routing/aliases.go b/email_routing/aliases.go index 8674f4034a..499339e815 100644 --- a/email_routing/aliases.go +++ b/email_routing/aliases.go @@ -4,7 +4,7 @@ package email_routing import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/email_routing/dns.go b/email_routing/dns.go index 3eb565abce..2f8f54538d 100644 --- a/email_routing/dns.go +++ b/email_routing/dns.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "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/shared" "github.com/tidwall/gjson" ) diff --git a/email_routing/emailrouting.go b/email_routing/emailrouting.go index 2bfa8518ec..fbc67c2e27 100644 --- a/email_routing/emailrouting.go +++ b/email_routing/emailrouting.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "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/shared" ) // EmailRoutingService contains methods and other services that help with diff --git a/email_routing/rule.go b/email_routing/rule.go index bd8ca9b70a..0616dc5c57 100644 --- a/email_routing/rule.go +++ b/email_routing/rule.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // RuleService contains methods and other services that help with interacting with diff --git a/email_routing/rulecatchall.go b/email_routing/rulecatchall.go index e05779bd78..583748feb0 100644 --- a/email_routing/rulecatchall.go +++ b/email_routing/rulecatchall.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // RuleCatchAllService contains methods and other services that help with diff --git a/event_notifications/aliases.go b/event_notifications/aliases.go index 21ddf22f76..30f8ad4d04 100644 --- a/event_notifications/aliases.go +++ b/event_notifications/aliases.go @@ -4,7 +4,7 @@ package event_notifications import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/event_notifications/r2configuration.go b/event_notifications/r2configuration.go index 840b87d100..7c69c92376 100644 --- a/event_notifications/r2configuration.go +++ b/event_notifications/r2configuration.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // R2ConfigurationService contains methods and other services that help with diff --git a/event_notifications/r2configurationqueue.go b/event_notifications/r2configurationqueue.go index f1d4c6f5ad..fd4617bd28 100644 --- a/event_notifications/r2configurationqueue.go +++ b/event_notifications/r2configurationqueue.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/filters/aliases.go b/filters/aliases.go index 93c946ad4c..63bb4d4110 100644 --- a/filters/aliases.go +++ b/filters/aliases.go @@ -4,7 +4,7 @@ package filters import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/filters/filter.go b/filters/filter.go index 2af2a1f328..7883efa1a2 100644 --- a/filters/filter.go +++ b/filters/filter.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // FilterService contains methods and other services that help with interacting diff --git a/firewall/accessrule.go b/firewall/accessrule.go index 8d1045f5e1..38f8d59c03 100644 --- a/firewall/accessrule.go +++ b/firewall/accessrule.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/firewall/aliases.go b/firewall/aliases.go index 942b054ca9..049c2258f5 100644 --- a/firewall/aliases.go +++ b/firewall/aliases.go @@ -4,7 +4,7 @@ package firewall import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/firewall/lockdown.go b/firewall/lockdown.go index 08f6666864..d884a8291d 100644 --- a/firewall/lockdown.go +++ b/firewall/lockdown.go @@ -15,8 +15,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/firewall/rule.go b/firewall/rule.go index edf49e4137..c6c27b01ef 100644 --- a/firewall/rule.go +++ b/firewall/rule.go @@ -15,9 +15,9 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/rate_limits" + "github.com/cloudflare/cloudflare-go/v2/shared" "github.com/tidwall/gjson" ) diff --git a/firewall/uarule.go b/firewall/uarule.go index 66e488898e..ab6b26aa5e 100644 --- a/firewall/uarule.go +++ b/firewall/uarule.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/firewall/wafoverride.go b/firewall/wafoverride.go index 319f248664..6ad6729648 100644 --- a/firewall/wafoverride.go +++ b/firewall/wafoverride.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // WAFOverrideService contains methods and other services that help with diff --git a/firewall/wafpackage.go b/firewall/wafpackage.go index ae9b1a2842..0b84efe913 100644 --- a/firewall/wafpackage.go +++ b/firewall/wafpackage.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/firewall/wafpackagegroup.go b/firewall/wafpackagegroup.go index 13c542f25f..7fbe514fe0 100644 --- a/firewall/wafpackagegroup.go +++ b/firewall/wafpackagegroup.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/firewall/wafpackagerule.go b/firewall/wafpackagerule.go index 50481126a4..e182908ad7 100644 --- a/firewall/wafpackagerule.go +++ b/firewall/wafpackagerule.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/healthchecks/aliases.go b/healthchecks/aliases.go index 9884095cb8..0b2147b672 100644 --- a/healthchecks/aliases.go +++ b/healthchecks/aliases.go @@ -4,7 +4,7 @@ package healthchecks import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/healthchecks/healthcheck.go b/healthchecks/healthcheck.go index 2dfd51db83..01a7f544a9 100644 --- a/healthchecks/healthcheck.go +++ b/healthchecks/healthcheck.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // HealthcheckService contains methods and other services that help with diff --git a/healthchecks/preview.go b/healthchecks/preview.go index 4a2bb591a6..12929aa480 100644 --- a/healthchecks/preview.go +++ b/healthchecks/preview.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // PreviewService contains methods and other services that help with interacting diff --git a/hostnames/aliases.go b/hostnames/aliases.go index 33c2b4381f..acf5c0d226 100644 --- a/hostnames/aliases.go +++ b/hostnames/aliases.go @@ -4,7 +4,7 @@ package hostnames import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/hostnames/settingtls.go b/hostnames/settingtls.go index 207abfb50a..f5cc028953 100644 --- a/hostnames/settingtls.go +++ b/hostnames/settingtls.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/hyperdrive/aliases.go b/hyperdrive/aliases.go index 69c8bf6b02..9cba85768b 100644 --- a/hyperdrive/aliases.go +++ b/hyperdrive/aliases.go @@ -4,7 +4,7 @@ package hyperdrive import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/hyperdrive/config.go b/hyperdrive/config.go index 7a3854d5e4..a0381faac5 100644 --- a/hyperdrive/config.go +++ b/hyperdrive/config.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/images/aliases.go b/images/aliases.go index 9a9ac5f5af..24c94298fc 100644 --- a/images/aliases.go +++ b/images/aliases.go @@ -4,7 +4,7 @@ package images import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/images/v1.go b/images/v1.go index 2724307ce1..01f9ed0413 100644 --- a/images/v1.go +++ b/images/v1.go @@ -15,8 +15,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/images/v1key.go b/images/v1key.go index 706ddc05ad..3ac957bce6 100644 --- a/images/v1key.go +++ b/images/v1key.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // V1KeyService contains methods and other services that help with interacting with diff --git a/images/v1stat.go b/images/v1stat.go index eb1dcc0094..bfeaf0d5f5 100644 --- a/images/v1stat.go +++ b/images/v1stat.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // V1StatService contains methods and other services that help with interacting diff --git a/images/v1variant.go b/images/v1variant.go index dc461ae067..21fe4af4e9 100644 --- a/images/v1variant.go +++ b/images/v1variant.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/images/v2.go b/images/v2.go index 335c89a0e2..9110704bf2 100644 --- a/images/v2.go +++ b/images/v2.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // V2Service contains methods and other services that help with interacting with diff --git a/images/v2directupload.go b/images/v2directupload.go index 8bc3f3edb5..ba55009eff 100644 --- a/images/v2directupload.go +++ b/images/v2directupload.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // V2DirectUploadService contains methods and other services that help with diff --git a/intel/aliases.go b/intel/aliases.go index 3e135f8477..0a7f65568d 100644 --- a/intel/aliases.go +++ b/intel/aliases.go @@ -4,7 +4,7 @@ package intel import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/intel/asn.go b/intel/asn.go index dd2e71d463..95f2469909 100644 --- a/intel/asn.go +++ b/intel/asn.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // ASNService contains methods and other services that help with interacting with diff --git a/intel/asnsubnet.go b/intel/asnsubnet.go index 5132a2f398..245d30e60a 100644 --- a/intel/asnsubnet.go +++ b/intel/asnsubnet.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // ASNSubnetService contains methods and other services that help with interacting diff --git a/intel/attacksurfacereportissue.go b/intel/attacksurfacereportissue.go index a0d9008419..d8e56e28c1 100644 --- a/intel/attacksurfacereportissue.go +++ b/intel/attacksurfacereportissue.go @@ -15,8 +15,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/intel/attacksurfacereportissuetype.go b/intel/attacksurfacereportissuetype.go index af9df35cd0..d1e6b95a80 100644 --- a/intel/attacksurfacereportissuetype.go +++ b/intel/attacksurfacereportissuetype.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // AttackSurfaceReportIssueTypeService contains methods and other services that diff --git a/intel/dns.go b/intel/dns.go index 58d25b3731..d155942803 100644 --- a/intel/dns.go +++ b/intel/dns.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DNSService contains methods and other services that help with interacting with diff --git a/intel/domain.go b/intel/domain.go index 61baec6214..5824bca805 100644 --- a/intel/domain.go +++ b/intel/domain.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DomainService contains methods and other services that help with interacting diff --git a/intel/domainbulk.go b/intel/domainbulk.go index ee3d9225a5..4fff085181 100644 --- a/intel/domainbulk.go +++ b/intel/domainbulk.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DomainBulkService contains methods and other services that help with interacting diff --git a/intel/domainhistory.go b/intel/domainhistory.go index 552c9695c6..71238dafd2 100644 --- a/intel/domainhistory.go +++ b/intel/domainhistory.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DomainHistoryService contains methods and other services that help with diff --git a/intel/indicatorfeed.go b/intel/indicatorfeed.go index 118c02147a..1fff0aaad4 100644 --- a/intel/indicatorfeed.go +++ b/intel/indicatorfeed.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // IndicatorFeedService contains methods and other services that help with diff --git a/intel/indicatorfeedpermission.go b/intel/indicatorfeedpermission.go index ae962e755b..347ff965b6 100644 --- a/intel/indicatorfeedpermission.go +++ b/intel/indicatorfeedpermission.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // IndicatorFeedPermissionService contains methods and other services that help diff --git a/intel/ip.go b/intel/ip.go index ad18b856d6..f440a67225 100644 --- a/intel/ip.go +++ b/intel/ip.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/intel/iplist.go b/intel/iplist.go index 4f727dba9c..4f32bc4d88 100644 --- a/intel/iplist.go +++ b/intel/iplist.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // IPListService contains methods and other services that help with interacting diff --git a/intel/miscategorization.go b/intel/miscategorization.go index 4a3b7217fe..ec1f16730c 100644 --- a/intel/miscategorization.go +++ b/intel/miscategorization.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/intel/whois.go b/intel/whois.go index f30bca89a6..d4b016424d 100644 --- a/intel/whois.go +++ b/intel/whois.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // WhoisService contains methods and other services that help with interacting with diff --git a/internal/apierror/apierror.go b/internal/apierror/apierror.go index 6e3ecaf72d..070e2f2e15 100644 --- a/internal/apierror/apierror.go +++ b/internal/apierror/apierror.go @@ -9,7 +9,7 @@ import ( "net/http/httputil" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) // Error represents an error that originates from the API, i.e. when a request is diff --git a/ips/aliases.go b/ips/aliases.go index aa9a5b80cc..9cc921eb39 100644 --- a/ips/aliases.go +++ b/ips/aliases.go @@ -4,7 +4,7 @@ package ips import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/ips/ip.go b/ips/ip.go index 06513d4043..151438d6c3 100644 --- a/ips/ip.go +++ b/ips/ip.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/keyless_certificates/aliases.go b/keyless_certificates/aliases.go index 376e523b59..a760f7d911 100644 --- a/keyless_certificates/aliases.go +++ b/keyless_certificates/aliases.go @@ -4,7 +4,7 @@ package keyless_certificates import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/keyless_certificates/keylesscertificate.go b/keyless_certificates/keylesscertificate.go index de5cce6cd9..3844dce7a9 100644 --- a/keyless_certificates/keylesscertificate.go +++ b/keyless_certificates/keylesscertificate.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // KeylessCertificateService contains methods and other services that help with diff --git a/kv/aliases.go b/kv/aliases.go index 31cccb8343..36cde081d0 100644 --- a/kv/aliases.go +++ b/kv/aliases.go @@ -4,7 +4,7 @@ package kv import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/kv/namespace.go b/kv/namespace.go index 745f08a6fa..60e77ab31b 100644 --- a/kv/namespace.go +++ b/kv/namespace.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/kv/namespacebulk.go b/kv/namespacebulk.go index 00f4f5c2d5..b98188bf0b 100644 --- a/kv/namespacebulk.go +++ b/kv/namespacebulk.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/kv/namespacemetadata.go b/kv/namespacemetadata.go index fc4e631f59..fba0471fff 100644 --- a/kv/namespacemetadata.go +++ b/kv/namespacemetadata.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // NamespaceMetadataService contains methods and other services that help with diff --git a/kv/namespacevalue.go b/kv/namespacevalue.go index 2563520d36..6dec74a0e4 100644 --- a/kv/namespacevalue.go +++ b/kv/namespacevalue.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/load_balancers/aliases.go b/load_balancers/aliases.go index bc826c228a..a21059946b 100644 --- a/load_balancers/aliases.go +++ b/load_balancers/aliases.go @@ -4,7 +4,7 @@ package load_balancers import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/load_balancers/loadbalancer.go b/load_balancers/loadbalancer.go index 69bfb735b0..e8e72e1f4c 100644 --- a/load_balancers/loadbalancer.go +++ b/load_balancers/loadbalancer.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // LoadBalancerService contains methods and other services that help with diff --git a/load_balancers/monitor.go b/load_balancers/monitor.go index b9de94ff2c..81f532ee4c 100644 --- a/load_balancers/monitor.go +++ b/load_balancers/monitor.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // MonitorService contains methods and other services that help with interacting diff --git a/load_balancers/monitorpreview.go b/load_balancers/monitorpreview.go index 23d97881a8..322b247b0b 100644 --- a/load_balancers/monitorpreview.go +++ b/load_balancers/monitorpreview.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // MonitorPreviewService contains methods and other services that help with diff --git a/load_balancers/monitorreference.go b/load_balancers/monitorreference.go index 07d46aa5b0..71d2e74002 100644 --- a/load_balancers/monitorreference.go +++ b/load_balancers/monitorreference.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // MonitorReferenceService contains methods and other services that help with diff --git a/load_balancers/pool.go b/load_balancers/pool.go index b790ff98dd..baa3941080 100644 --- a/load_balancers/pool.go +++ b/load_balancers/pool.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // PoolService contains methods and other services that help with interacting with diff --git a/load_balancers/poolhealth.go b/load_balancers/poolhealth.go index a6a7af8531..c5da2b72d1 100644 --- a/load_balancers/poolhealth.go +++ b/load_balancers/poolhealth.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/load_balancers/poolreference.go b/load_balancers/poolreference.go index a58458f9b8..74bef01122 100644 --- a/load_balancers/poolreference.go +++ b/load_balancers/poolreference.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // PoolReferenceService contains methods and other services that help with diff --git a/load_balancers/preview.go b/load_balancers/preview.go index ac4930978c..59c33a7eaa 100644 --- a/load_balancers/preview.go +++ b/load_balancers/preview.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // PreviewService contains methods and other services that help with interacting diff --git a/load_balancers/region.go b/load_balancers/region.go index 11438b4449..2fbfc850f6 100644 --- a/load_balancers/region.go +++ b/load_balancers/region.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/load_balancers/search.go b/load_balancers/search.go index 7ea13c9920..53ebc0f144 100644 --- a/load_balancers/search.go +++ b/load_balancers/search.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SearchService contains methods and other services that help with interacting diff --git a/logpush/aliases.go b/logpush/aliases.go index b4daa4f02c..747b23a710 100644 --- a/logpush/aliases.go +++ b/logpush/aliases.go @@ -4,7 +4,7 @@ package logpush import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/logpush/datasetfield.go b/logpush/datasetfield.go index 5928d2e80e..adc5fd1155 100644 --- a/logpush/datasetfield.go +++ b/logpush/datasetfield.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DatasetFieldService contains methods and other services that help with diff --git a/logpush/datasetjob.go b/logpush/datasetjob.go index 935adf7dfb..4214a408a4 100644 --- a/logpush/datasetjob.go +++ b/logpush/datasetjob.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DatasetJobService contains methods and other services that help with interacting diff --git a/logpush/edge.go b/logpush/edge.go index 6c36a6197d..85feef6401 100644 --- a/logpush/edge.go +++ b/logpush/edge.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // EdgeService contains methods and other services that help with interacting with diff --git a/logpush/job.go b/logpush/job.go index 1b37b0c158..795655c835 100644 --- a/logpush/job.go +++ b/logpush/job.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // JobService contains methods and other services that help with interacting with diff --git a/logpush/ownership.go b/logpush/ownership.go index b42013b6e5..3a90a58749 100644 --- a/logpush/ownership.go +++ b/logpush/ownership.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // OwnershipService contains methods and other services that help with interacting diff --git a/logpush/validate.go b/logpush/validate.go index 0c8c8640ed..bc5192e7ab 100644 --- a/logpush/validate.go +++ b/logpush/validate.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // ValidateService contains methods and other services that help with interacting diff --git a/logs/aliases.go b/logs/aliases.go index 20a6801c2b..4beb1f64a0 100644 --- a/logs/aliases.go +++ b/logs/aliases.go @@ -4,7 +4,7 @@ package logs import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/logs/controlcmbconfig.go b/logs/controlcmbconfig.go index 1677c46114..24b3b6e4a6 100644 --- a/logs/controlcmbconfig.go +++ b/logs/controlcmbconfig.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // ControlCmbConfigService contains methods and other services that help with diff --git a/logs/controlretentionflag.go b/logs/controlretentionflag.go index 72dcc38ab6..fb8dbd94ca 100644 --- a/logs/controlretentionflag.go +++ b/logs/controlretentionflag.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // ControlRetentionFlagService contains methods and other services that help with diff --git a/logs/rayid.go b/logs/rayid.go index 4b17d837d4..619c1b6c39 100644 --- a/logs/rayid.go +++ b/logs/rayid.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/logs/received.go b/logs/received.go index 6455449648..5579de2660 100644 --- a/logs/received.go +++ b/logs/received.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/logs/received_test.go b/logs/received_test.go index 9f22f9694f..247857a308 100644 --- a/logs/received_test.go +++ b/logs/received_test.go @@ -9,10 +9,10 @@ import ( "testing" "github.com/cloudflare/cloudflare-go/v2" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" "github.com/cloudflare/cloudflare-go/v2/internal/testutil" "github.com/cloudflare/cloudflare-go/v2/logs" "github.com/cloudflare/cloudflare-go/v2/option" + "github.com/cloudflare/cloudflare-go/v2/shared" ) func TestReceivedGetWithOptionalParams(t *testing.T) { diff --git a/magic_network_monitoring/aliases.go b/magic_network_monitoring/aliases.go index 488c89b0ac..d4119a69f4 100644 --- a/magic_network_monitoring/aliases.go +++ b/magic_network_monitoring/aliases.go @@ -4,7 +4,7 @@ package magic_network_monitoring import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/magic_network_monitoring/config.go b/magic_network_monitoring/config.go index a75f40f931..7564bc0d3f 100644 --- a/magic_network_monitoring/config.go +++ b/magic_network_monitoring/config.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // ConfigService contains methods and other services that help with interacting diff --git a/magic_network_monitoring/configfull.go b/magic_network_monitoring/configfull.go index 29d06bff15..080c597912 100644 --- a/magic_network_monitoring/configfull.go +++ b/magic_network_monitoring/configfull.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // ConfigFullService contains methods and other services that help with interacting diff --git a/magic_network_monitoring/rule.go b/magic_network_monitoring/rule.go index dcc19007bb..6993b0e93a 100644 --- a/magic_network_monitoring/rule.go +++ b/magic_network_monitoring/rule.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // RuleService contains methods and other services that help with interacting with diff --git a/magic_network_monitoring/ruleadvertisement.go b/magic_network_monitoring/ruleadvertisement.go index 256a567b67..a974fca1c1 100644 --- a/magic_network_monitoring/ruleadvertisement.go +++ b/magic_network_monitoring/ruleadvertisement.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // RuleAdvertisementService contains methods and other services that help with diff --git a/magic_transit/aliases.go b/magic_transit/aliases.go index 598d4371f1..1cb7876dcc 100644 --- a/magic_transit/aliases.go +++ b/magic_transit/aliases.go @@ -4,7 +4,7 @@ package magic_transit import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/magic_transit/cfinterconnect.go b/magic_transit/cfinterconnect.go index 02d3c17f6e..b13dfbff92 100644 --- a/magic_transit/cfinterconnect.go +++ b/magic_transit/cfinterconnect.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // CfInterconnectService contains methods and other services that help with diff --git a/magic_transit/gretunnel.go b/magic_transit/gretunnel.go index 9e07a41d29..ab0a9a644d 100644 --- a/magic_transit/gretunnel.go +++ b/magic_transit/gretunnel.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // GRETunnelService contains methods and other services that help with interacting diff --git a/magic_transit/ipsectunnel.go b/magic_transit/ipsectunnel.go index 02a4745c1c..b11f508e5b 100644 --- a/magic_transit/ipsectunnel.go +++ b/magic_transit/ipsectunnel.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // IPSECTunnelService contains methods and other services that help with diff --git a/magic_transit/route.go b/magic_transit/route.go index 620707b7bd..8806c5695f 100644 --- a/magic_transit/route.go +++ b/magic_transit/route.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // RouteService contains methods and other services that help with interacting with diff --git a/magic_transit/site.go b/magic_transit/site.go index b1e1020e33..0e22094010 100644 --- a/magic_transit/site.go +++ b/magic_transit/site.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SiteService contains methods and other services that help with interacting with diff --git a/magic_transit/siteacl.go b/magic_transit/siteacl.go index 7aa8fca433..9a6c304592 100644 --- a/magic_transit/siteacl.go +++ b/magic_transit/siteacl.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/magic_transit/siteacl_test.go b/magic_transit/siteacl_test.go index 2879fe2244..cb46352647 100644 --- a/magic_transit/siteacl_test.go +++ b/magic_transit/siteacl_test.go @@ -9,10 +9,10 @@ import ( "testing" "github.com/cloudflare/cloudflare-go/v2" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" "github.com/cloudflare/cloudflare-go/v2/internal/testutil" "github.com/cloudflare/cloudflare-go/v2/magic_transit" "github.com/cloudflare/cloudflare-go/v2/option" + "github.com/cloudflare/cloudflare-go/v2/shared" ) func TestSiteACLNewWithOptionalParams(t *testing.T) { diff --git a/magic_transit/sitelan.go b/magic_transit/sitelan.go index d0ba98f4c9..63839363c6 100644 --- a/magic_transit/sitelan.go +++ b/magic_transit/sitelan.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SiteLANService contains methods and other services that help with interacting diff --git a/magic_transit/sitewan.go b/magic_transit/sitewan.go index efd1c422b6..b3013766df 100644 --- a/magic_transit/sitewan.go +++ b/magic_transit/sitewan.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SiteWANService contains methods and other services that help with interacting diff --git a/managed_headers/aliases.go b/managed_headers/aliases.go index cc969d8958..684ad169d6 100644 --- a/managed_headers/aliases.go +++ b/managed_headers/aliases.go @@ -4,7 +4,7 @@ package managed_headers import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/memberships/aliases.go b/memberships/aliases.go index 0a6a12ddde..07c45e3c8a 100644 --- a/memberships/aliases.go +++ b/memberships/aliases.go @@ -4,7 +4,7 @@ package memberships import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/memberships/membership.go b/memberships/membership.go index cf6ea93d26..42bd5eef08 100644 --- a/memberships/membership.go +++ b/memberships/membership.go @@ -15,8 +15,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/mtls_certificates/aliases.go b/mtls_certificates/aliases.go index 7cb164be62..4196b32264 100644 --- a/mtls_certificates/aliases.go +++ b/mtls_certificates/aliases.go @@ -4,7 +4,7 @@ package mtls_certificates import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/mtls_certificates/association.go b/mtls_certificates/association.go index 4cf3e76279..e040290cda 100644 --- a/mtls_certificates/association.go +++ b/mtls_certificates/association.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // AssociationService contains methods and other services that help with diff --git a/mtls_certificates/mtlscertificate.go b/mtls_certificates/mtlscertificate.go index e03028dd96..7fd705d9ef 100644 --- a/mtls_certificates/mtlscertificate.go +++ b/mtls_certificates/mtlscertificate.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // MTLSCertificateService contains methods and other services that help with diff --git a/origin_ca_certificates/aliases.go b/origin_ca_certificates/aliases.go index b508bda940..9e24da6c52 100644 --- a/origin_ca_certificates/aliases.go +++ b/origin_ca_certificates/aliases.go @@ -4,7 +4,7 @@ package origin_ca_certificates import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/origin_ca_certificates/origincacertificate.go b/origin_ca_certificates/origincacertificate.go index fa40626675..cb9609892c 100644 --- a/origin_ca_certificates/origincacertificate.go +++ b/origin_ca_certificates/origincacertificate.go @@ -15,8 +15,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/origin_post_quantum_encryption/aliases.go b/origin_post_quantum_encryption/aliases.go index f4243425a8..c5ef686eaa 100644 --- a/origin_post_quantum_encryption/aliases.go +++ b/origin_post_quantum_encryption/aliases.go @@ -4,7 +4,7 @@ package origin_post_quantum_encryption import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/origin_post_quantum_encryption/originpostquantumencryption.go b/origin_post_quantum_encryption/originpostquantumencryption.go index 19f69f1f49..4c6f26627c 100644 --- a/origin_post_quantum_encryption/originpostquantumencryption.go +++ b/origin_post_quantum_encryption/originpostquantumencryption.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/origin_tls_client_auth/aliases.go b/origin_tls_client_auth/aliases.go index 1aa003da3a..4c689b51dc 100644 --- a/origin_tls_client_auth/aliases.go +++ b/origin_tls_client_auth/aliases.go @@ -4,7 +4,7 @@ package origin_tls_client_auth import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/origin_tls_client_auth/hostname.go b/origin_tls_client_auth/hostname.go index ad17b87d8f..e5c3bdc948 100644 --- a/origin_tls_client_auth/hostname.go +++ b/origin_tls_client_auth/hostname.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // HostnameService contains methods and other services that help with interacting diff --git a/origin_tls_client_auth/hostnamecertificate.go b/origin_tls_client_auth/hostnamecertificate.go index 8d9142dd1f..16929ae86c 100644 --- a/origin_tls_client_auth/hostnamecertificate.go +++ b/origin_tls_client_auth/hostnamecertificate.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // HostnameCertificateService contains methods and other services that help with diff --git a/origin_tls_client_auth/origintlsclientauth.go b/origin_tls_client_auth/origintlsclientauth.go index 0b0a82dd7c..b1485268ce 100644 --- a/origin_tls_client_auth/origintlsclientauth.go +++ b/origin_tls_client_auth/origintlsclientauth.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/origin_tls_client_auth/setting.go b/origin_tls_client_auth/setting.go index e24df19eb4..f873c6de30 100644 --- a/origin_tls_client_auth/setting.go +++ b/origin_tls_client_auth/setting.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingService contains methods and other services that help with interacting diff --git a/page_shield/aliases.go b/page_shield/aliases.go index 38acbe4104..40cac14bd5 100644 --- a/page_shield/aliases.go +++ b/page_shield/aliases.go @@ -4,7 +4,7 @@ package page_shield import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/page_shield/pageshield.go b/page_shield/pageshield.go index 8d66f7775a..c01d5d13fa 100644 --- a/page_shield/pageshield.go +++ b/page_shield/pageshield.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // PageShieldService contains methods and other services that help with interacting diff --git a/pagerules/aliases.go b/pagerules/aliases.go index 0c103619f8..39e79549a0 100644 --- a/pagerules/aliases.go +++ b/pagerules/aliases.go @@ -4,7 +4,7 @@ package pagerules import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/pagerules/pagerule.go b/pagerules/pagerule.go index 9f7a4a6486..2f28d9c101 100644 --- a/pagerules/pagerule.go +++ b/pagerules/pagerule.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/pagerules/setting.go b/pagerules/setting.go index 4532f44bc6..2a24d56bdd 100644 --- a/pagerules/setting.go +++ b/pagerules/setting.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingService contains methods and other services that help with interacting diff --git a/pages/aliases.go b/pages/aliases.go index b75f140bf4..15b96ebb30 100644 --- a/pages/aliases.go +++ b/pages/aliases.go @@ -4,7 +4,7 @@ package pages import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/pages/project.go b/pages/project.go index 5cf0e6e0fa..9670d32388 100644 --- a/pages/project.go +++ b/pages/project.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/pages/projectdeployment.go b/pages/projectdeployment.go index d5a509bfb9..b0a274eff0 100644 --- a/pages/projectdeployment.go +++ b/pages/projectdeployment.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // ProjectDeploymentService contains methods and other services that help with diff --git a/pages/projectdeploymenthistorylog.go b/pages/projectdeploymenthistorylog.go index fb7d86be7b..d04b57dadc 100644 --- a/pages/projectdeploymenthistorylog.go +++ b/pages/projectdeploymenthistorylog.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/pages/projectdomain.go b/pages/projectdomain.go index 652b761a50..5a8ab732bf 100644 --- a/pages/projectdomain.go +++ b/pages/projectdomain.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/pcaps/aliases.go b/pcaps/aliases.go index b09195da28..43d425c680 100644 --- a/pcaps/aliases.go +++ b/pcaps/aliases.go @@ -4,7 +4,7 @@ package pcaps import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/pcaps/ownership.go b/pcaps/ownership.go index e664fb9185..efaa4e0a83 100644 --- a/pcaps/ownership.go +++ b/pcaps/ownership.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // OwnershipService contains methods and other services that help with interacting diff --git a/pcaps/pcap.go b/pcaps/pcap.go index a804445ffa..bc090151d3 100644 --- a/pcaps/pcap.go +++ b/pcaps/pcap.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/plans/aliases.go b/plans/aliases.go index 7ece902336..5e0b397282 100644 --- a/plans/aliases.go +++ b/plans/aliases.go @@ -4,7 +4,7 @@ package plans import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/plans/plan.go b/plans/plan.go index 326175834b..309d7231b8 100644 --- a/plans/plan.go +++ b/plans/plan.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "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/shared" ) // PlanService contains methods and other services that help with interacting with diff --git a/queues/aliases.go b/queues/aliases.go index 8494dfdff8..39bea750c6 100644 --- a/queues/aliases.go +++ b/queues/aliases.go @@ -4,7 +4,7 @@ package queues import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/queues/consumer.go b/queues/consumer.go index 0a7e02681f..1682d7ca03 100644 --- a/queues/consumer.go +++ b/queues/consumer.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/queues/message.go b/queues/message.go index 476acdeae8..2a55005e35 100644 --- a/queues/message.go +++ b/queues/message.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // MessageService contains methods and other services that help with interacting diff --git a/queues/queue.go b/queues/queue.go index d90f3d624b..260484b5a8 100644 --- a/queues/queue.go +++ b/queues/queue.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/r2/aliases.go b/r2/aliases.go index 57bf17772d..2665cfc73e 100644 --- a/r2/aliases.go +++ b/r2/aliases.go @@ -4,7 +4,7 @@ package r2 import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/r2/bucket.go b/r2/bucket.go index de053114c5..034cb98aa8 100644 --- a/r2/bucket.go +++ b/r2/bucket.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // BucketService contains methods and other services that help with interacting diff --git a/r2/sippy.go b/r2/sippy.go index 747a71e64c..71d2a14301 100644 --- a/r2/sippy.go +++ b/r2/sippy.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SippyService contains methods and other services that help with interacting with diff --git a/radar/aliases.go b/radar/aliases.go index 66c90b1450..22b205a2bd 100644 --- a/radar/aliases.go +++ b/radar/aliases.go @@ -4,7 +4,7 @@ package radar import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/radar/ranking.go b/radar/ranking.go index d86a9cb487..6697966d44 100644 --- a/radar/ranking.go +++ b/radar/ranking.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/rate_limits/aliases.go b/rate_limits/aliases.go index 11982770e4..50b59c8707 100644 --- a/rate_limits/aliases.go +++ b/rate_limits/aliases.go @@ -4,7 +4,7 @@ package rate_limits import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/rate_limits/ratelimit.go b/rate_limits/ratelimit.go index 2d2e0ba4c8..b874df9aa4 100644 --- a/rate_limits/ratelimit.go +++ b/rate_limits/ratelimit.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/rate_plans/aliases.go b/rate_plans/aliases.go index f4d52d12f0..0d9d6f325f 100644 --- a/rate_plans/aliases.go +++ b/rate_plans/aliases.go @@ -4,7 +4,7 @@ package rate_plans import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/rate_plans/rateplan.go b/rate_plans/rateplan.go index 8ccba47272..f55bf99972 100644 --- a/rate_plans/rateplan.go +++ b/rate_plans/rateplan.go @@ -9,8 +9,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "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/shared" ) // RatePlanService contains methods and other services that help with interacting diff --git a/registrar/aliases.go b/registrar/aliases.go index a79a9f2a4f..203fce4f20 100644 --- a/registrar/aliases.go +++ b/registrar/aliases.go @@ -4,7 +4,7 @@ package registrar import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/registrar/domain.go b/registrar/domain.go index ab4541786b..c811196825 100644 --- a/registrar/domain.go +++ b/registrar/domain.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/request_tracers/aliases.go b/request_tracers/aliases.go index a0a5811075..89c56346ee 100644 --- a/request_tracers/aliases.go +++ b/request_tracers/aliases.go @@ -4,7 +4,7 @@ package request_tracers import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/request_tracers/trace.go b/request_tracers/trace.go index f65644276f..a69014b705 100644 --- a/request_tracers/trace.go +++ b/request_tracers/trace.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // TraceService contains methods and other services that help with interacting with diff --git a/rules/aliases.go b/rules/aliases.go index 70443fcf6e..644ad6aaf7 100644 --- a/rules/aliases.go +++ b/rules/aliases.go @@ -4,7 +4,7 @@ package rules import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/rules/list.go b/rules/list.go index fc46d1cd83..0f097ab10e 100644 --- a/rules/list.go +++ b/rules/list.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // ListService contains methods and other services that help with interacting with diff --git a/rules/listbulkoperation.go b/rules/listbulkoperation.go index 4a65fdcaa6..1b5ecd57fb 100644 --- a/rules/listbulkoperation.go +++ b/rules/listbulkoperation.go @@ -9,8 +9,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "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/shared" ) // ListBulkOperationService contains methods and other services that help with diff --git a/rules/listitem.go b/rules/listitem.go index b2ba1e4de4..1731ee4b9b 100644 --- a/rules/listitem.go +++ b/rules/listitem.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/rulesets/aliases.go b/rulesets/aliases.go index c382a432ba..f32a225e20 100644 --- a/rulesets/aliases.go +++ b/rulesets/aliases.go @@ -4,7 +4,7 @@ package rulesets import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/rum/aliases.go b/rum/aliases.go index 4449cec432..5b1b15c889 100644 --- a/rum/aliases.go +++ b/rum/aliases.go @@ -4,7 +4,7 @@ package rum import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/secondary_dns/acl.go b/secondary_dns/acl.go index 533458d1e6..a16b3e3fc5 100644 --- a/secondary_dns/acl.go +++ b/secondary_dns/acl.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // ACLService contains methods and other services that help with interacting with diff --git a/secondary_dns/aliases.go b/secondary_dns/aliases.go index badae85025..92b7ce1758 100644 --- a/secondary_dns/aliases.go +++ b/secondary_dns/aliases.go @@ -4,7 +4,7 @@ package secondary_dns import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/secondary_dns/forceaxfr.go b/secondary_dns/forceaxfr.go index cd3baeff34..8d28c18ced 100644 --- a/secondary_dns/forceaxfr.go +++ b/secondary_dns/forceaxfr.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // ForceAXFRService contains methods and other services that help with interacting diff --git a/secondary_dns/incoming.go b/secondary_dns/incoming.go index 46f5784fc7..f215f88c2d 100644 --- a/secondary_dns/incoming.go +++ b/secondary_dns/incoming.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // IncomingService contains methods and other services that help with interacting diff --git a/secondary_dns/outgoing.go b/secondary_dns/outgoing.go index e3ab029a74..890d5af87f 100644 --- a/secondary_dns/outgoing.go +++ b/secondary_dns/outgoing.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // OutgoingService contains methods and other services that help with interacting diff --git a/secondary_dns/outgoingstatus.go b/secondary_dns/outgoingstatus.go index 98adf9d707..e8f05f8ca9 100644 --- a/secondary_dns/outgoingstatus.go +++ b/secondary_dns/outgoingstatus.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // OutgoingStatusService contains methods and other services that help with diff --git a/secondary_dns/peer.go b/secondary_dns/peer.go index 89b35d8047..a4757733df 100644 --- a/secondary_dns/peer.go +++ b/secondary_dns/peer.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // PeerService contains methods and other services that help with interacting with diff --git a/secondary_dns/tsig.go b/secondary_dns/tsig.go index aec07a6264..6acb8a4e68 100644 --- a/secondary_dns/tsig.go +++ b/secondary_dns/tsig.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // TSIGService contains methods and other services that help with interacting with diff --git a/internal/shared/shared.go b/shared/shared.go similarity index 100% rename from internal/shared/shared.go rename to shared/shared.go diff --git a/internal/shared/union.go b/shared/union.go similarity index 100% rename from internal/shared/union.go rename to shared/union.go diff --git a/snippets/aliases.go b/snippets/aliases.go index 8434e36088..03e8215e70 100644 --- a/snippets/aliases.go +++ b/snippets/aliases.go @@ -4,7 +4,7 @@ package snippets import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/snippets/rule.go b/snippets/rule.go index 49334ec5b9..1cd73b9a24 100644 --- a/snippets/rule.go +++ b/snippets/rule.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // RuleService contains methods and other services that help with interacting with diff --git a/snippets/snippet.go b/snippets/snippet.go index 42096a6146..e6d72ea38c 100644 --- a/snippets/snippet.go +++ b/snippets/snippet.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/spectrum/aliases.go b/spectrum/aliases.go index 1f52ccd3de..c1d37ab2da 100644 --- a/spectrum/aliases.go +++ b/spectrum/aliases.go @@ -4,7 +4,7 @@ package spectrum import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/spectrum/analyticsaggregatecurrent.go b/spectrum/analyticsaggregatecurrent.go index 6672c89eb3..a01611cc50 100644 --- a/spectrum/analyticsaggregatecurrent.go +++ b/spectrum/analyticsaggregatecurrent.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // AnalyticsAggregateCurrentService contains methods and other services that help diff --git a/spectrum/analyticseventbytime.go b/spectrum/analyticseventbytime.go index 4edef0db69..a28e680e44 100644 --- a/spectrum/analyticseventbytime.go +++ b/spectrum/analyticseventbytime.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/spectrum/analyticseventsummary.go b/spectrum/analyticseventsummary.go index ce125d821a..97dd6702a8 100644 --- a/spectrum/analyticseventsummary.go +++ b/spectrum/analyticseventsummary.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/spectrum/app.go b/spectrum/app.go index 20a12da1b0..ff8eeac402 100644 --- a/spectrum/app.go +++ b/spectrum/app.go @@ -15,8 +15,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/spectrum/app_test.go b/spectrum/app_test.go index 6248900fba..0dd7c95733 100644 --- a/spectrum/app_test.go +++ b/spectrum/app_test.go @@ -9,9 +9,9 @@ import ( "testing" "github.com/cloudflare/cloudflare-go/v2" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" "github.com/cloudflare/cloudflare-go/v2/internal/testutil" "github.com/cloudflare/cloudflare-go/v2/option" + "github.com/cloudflare/cloudflare-go/v2/shared" "github.com/cloudflare/cloudflare-go/v2/spectrum" ) diff --git a/spectrum/spectrum.go b/spectrum/spectrum.go index 0545338560..3610116b96 100644 --- a/spectrum/spectrum.go +++ b/spectrum/spectrum.go @@ -7,8 +7,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" "github.com/cloudflare/cloudflare-go/v2/option" + "github.com/cloudflare/cloudflare-go/v2/shared" "github.com/tidwall/gjson" ) diff --git a/speed/aliases.go b/speed/aliases.go index 14e2012f25..02be0b57ff 100644 --- a/speed/aliases.go +++ b/speed/aliases.go @@ -4,7 +4,7 @@ package speed import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/speed/test.go b/speed/test.go index 5b96920fb2..e97b41dea9 100644 --- a/speed/test.go +++ b/speed/test.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // TestService contains methods and other services that help with interacting with diff --git a/ssl/aliases.go b/ssl/aliases.go index d522763bc4..515de20f50 100644 --- a/ssl/aliases.go +++ b/ssl/aliases.go @@ -4,7 +4,7 @@ package ssl import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/ssl/analyze.go b/ssl/analyze.go index a75c605641..ae1b61c4a3 100644 --- a/ssl/analyze.go +++ b/ssl/analyze.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/ssl/certificatepack.go b/ssl/certificatepack.go index afff49b1b5..208035831d 100644 --- a/ssl/certificatepack.go +++ b/ssl/certificatepack.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/ssl/certificatepackorder.go b/ssl/certificatepackorder.go index 7a2d6c5393..2fb0a6119a 100644 --- a/ssl/certificatepackorder.go +++ b/ssl/certificatepackorder.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // CertificatePackOrderService contains methods and other services that help with diff --git a/ssl/certificatepackquota.go b/ssl/certificatepackquota.go index 3f4f44cc9f..9eab428c8c 100644 --- a/ssl/certificatepackquota.go +++ b/ssl/certificatepackquota.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // CertificatePackQuotaService contains methods and other services that help with diff --git a/ssl/recommendation.go b/ssl/recommendation.go index 9bdbed3b4c..834b905463 100644 --- a/ssl/recommendation.go +++ b/ssl/recommendation.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "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/shared" ) // RecommendationService contains methods and other services that help with diff --git a/ssl/universalsetting.go b/ssl/universalsetting.go index 680b55681c..8278e2bf15 100644 --- a/ssl/universalsetting.go +++ b/ssl/universalsetting.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // UniversalSettingService contains methods and other services that help with diff --git a/ssl/verification.go b/ssl/verification.go index 2667948053..53561d7294 100644 --- a/ssl/verification.go +++ b/ssl/verification.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // VerificationService contains methods and other services that help with diff --git a/storage/aliases.go b/storage/aliases.go index 8c1547d8d7..6a3906b4b8 100644 --- a/storage/aliases.go +++ b/storage/aliases.go @@ -4,7 +4,7 @@ package storage import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/storage/analytics.go b/storage/analytics.go index f499ba582a..722b2f1927 100644 --- a/storage/analytics.go +++ b/storage/analytics.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // AnalyticsService contains methods and other services that help with interacting diff --git a/stream/aliases.go b/stream/aliases.go index 3fb40fe13b..55e16a500e 100644 --- a/stream/aliases.go +++ b/stream/aliases.go @@ -4,7 +4,7 @@ package stream import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/stream/audiotrack.go b/stream/audiotrack.go index 20c8e4e816..4a8a004367 100644 --- a/stream/audiotrack.go +++ b/stream/audiotrack.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/stream/caption.go b/stream/caption.go index f1c395b5cc..741ce32dd8 100644 --- a/stream/caption.go +++ b/stream/caption.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // CaptionService contains methods and other services that help with interacting diff --git a/stream/captionlanguage.go b/stream/captionlanguage.go index 70e8b6918b..ea2dc3b76b 100644 --- a/stream/captionlanguage.go +++ b/stream/captionlanguage.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // CaptionLanguageService contains methods and other services that help with diff --git a/stream/clip.go b/stream/clip.go index fdea7a7af6..19f7a1d019 100644 --- a/stream/clip.go +++ b/stream/clip.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // ClipService contains methods and other services that help with interacting with diff --git a/stream/copy.go b/stream/copy.go index 18da331a34..917614f533 100644 --- a/stream/copy.go +++ b/stream/copy.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // CopyService contains methods and other services that help with interacting with diff --git a/stream/directupload.go b/stream/directupload.go index 736a8ebdf9..7cd447f725 100644 --- a/stream/directupload.go +++ b/stream/directupload.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DirectUploadService contains methods and other services that help with diff --git a/stream/download.go b/stream/download.go index b81e63a972..e9d52ec101 100644 --- a/stream/download.go +++ b/stream/download.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/stream/key.go b/stream/key.go index 6062aa863d..cc56dcb0eb 100644 --- a/stream/key.go +++ b/stream/key.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/stream/liveinput.go b/stream/liveinput.go index d58a63f5b4..5348ed5240 100644 --- a/stream/liveinput.go +++ b/stream/liveinput.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // LiveInputService contains methods and other services that help with interacting diff --git a/stream/liveinputoutput.go b/stream/liveinputoutput.go index b1fb961b9d..8334c95541 100644 --- a/stream/liveinputoutput.go +++ b/stream/liveinputoutput.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // LiveInputOutputService contains methods and other services that help with diff --git a/stream/stream.go b/stream/stream.go index 6c2e289db6..79f649bba1 100644 --- a/stream/stream.go +++ b/stream/stream.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // StreamService contains methods and other services that help with interacting diff --git a/stream/token.go b/stream/token.go index 7b4ba4e7d9..3e2aab2c9e 100644 --- a/stream/token.go +++ b/stream/token.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // TokenService contains methods and other services that help with interacting with diff --git a/stream/video.go b/stream/video.go index 35675997c2..f57a3efb59 100644 --- a/stream/video.go +++ b/stream/video.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // VideoService contains methods and other services that help with interacting with diff --git a/stream/watermark.go b/stream/watermark.go index bd09ec8c4a..3bae47a596 100644 --- a/stream/watermark.go +++ b/stream/watermark.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/stream/webhook.go b/stream/webhook.go index 77ccd997a8..59d254e81b 100644 --- a/stream/webhook.go +++ b/stream/webhook.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/subscriptions/aliases.go b/subscriptions/aliases.go index 9fd719e4e5..8f6c1908a0 100644 --- a/subscriptions/aliases.go +++ b/subscriptions/aliases.go @@ -4,7 +4,7 @@ package subscriptions import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/subscriptions/subscription.go b/subscriptions/subscription.go index 66de38011e..84e209e5b7 100644 --- a/subscriptions/subscription.go +++ b/subscriptions/subscription.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "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/shared" "github.com/cloudflare/cloudflare-go/v2/user" "github.com/tidwall/gjson" ) diff --git a/url_normalization/aliases.go b/url_normalization/aliases.go index 9cde81ec89..2d1a205dbc 100644 --- a/url_normalization/aliases.go +++ b/url_normalization/aliases.go @@ -4,7 +4,7 @@ package url_normalization import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/url_scanner/aliases.go b/url_scanner/aliases.go index d795833420..c493589f26 100644 --- a/url_scanner/aliases.go +++ b/url_scanner/aliases.go @@ -4,7 +4,7 @@ package url_scanner import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/user/aliases.go b/user/aliases.go index c41ea93453..dd4de0e629 100644 --- a/user/aliases.go +++ b/user/aliases.go @@ -4,7 +4,7 @@ package user import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/user/auditlog.go b/user/auditlog.go index 79c3271681..69860ed5a6 100644 --- a/user/auditlog.go +++ b/user/auditlog.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // AuditLogService contains methods and other services that help with interacting diff --git a/user/billingprofile.go b/user/billingprofile.go index c5df086587..a8bb4b844c 100644 --- a/user/billingprofile.go +++ b/user/billingprofile.go @@ -9,8 +9,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "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/shared" "github.com/tidwall/gjson" ) diff --git a/user/invite.go b/user/invite.go index 2922a20cd0..d983835f15 100644 --- a/user/invite.go +++ b/user/invite.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/user/organization.go b/user/organization.go index 8caa44de84..c971b63d0f 100644 --- a/user/organization.go +++ b/user/organization.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/user/subscription.go b/user/subscription.go index a266dee5a2..bffbb6e805 100644 --- a/user/subscription.go +++ b/user/subscription.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/user/token.go b/user/token.go index e78260116f..75be3ccb1a 100644 --- a/user/token.go +++ b/user/token.go @@ -15,8 +15,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/user/tokenvalue.go b/user/tokenvalue.go index 5b599a4c7e..fb8acf0ba6 100644 --- a/user/tokenvalue.go +++ b/user/tokenvalue.go @@ -9,8 +9,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "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/shared" ) // TokenValueService contains methods and other services that help with interacting diff --git a/user/user.go b/user/user.go index 6fdc60fb55..901363d421 100644 --- a/user/user.go +++ b/user/user.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/vectorize/aliases.go b/vectorize/aliases.go index 0ac5d9b351..7efa29e0f5 100644 --- a/vectorize/aliases.go +++ b/vectorize/aliases.go @@ -4,7 +4,7 @@ package vectorize import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/vectorize/index.go b/vectorize/index.go index 95244eb71a..75b4fd47a9 100644 --- a/vectorize/index.go +++ b/vectorize/index.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/waiting_rooms/aliases.go b/waiting_rooms/aliases.go index 45113caf6f..7ef6f422b1 100644 --- a/waiting_rooms/aliases.go +++ b/waiting_rooms/aliases.go @@ -4,7 +4,7 @@ package waiting_rooms import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/waiting_rooms/rule.go b/waiting_rooms/rule.go index 078db98c28..11640ea5c1 100644 --- a/waiting_rooms/rule.go +++ b/waiting_rooms/rule.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // RuleService contains methods and other services that help with interacting with diff --git a/warp_connector/aliases.go b/warp_connector/aliases.go index 4789a8ca55..a1bcffc90e 100644 --- a/warp_connector/aliases.go +++ b/warp_connector/aliases.go @@ -4,7 +4,7 @@ package warp_connector import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/warp_connector/warpconnector.go b/warp_connector/warpconnector.go index e1e480fe99..1d514c318f 100644 --- a/warp_connector/warpconnector.go +++ b/warp_connector/warpconnector.go @@ -15,8 +15,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/web3/aliases.go b/web3/aliases.go index 1a275d0507..5f0052c24f 100644 --- a/web3/aliases.go +++ b/web3/aliases.go @@ -4,7 +4,7 @@ package web3 import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/web3/hostname.go b/web3/hostname.go index c9cf85275e..1580dbdba3 100644 --- a/web3/hostname.go +++ b/web3/hostname.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // HostnameService contains methods and other services that help with interacting diff --git a/web3/hostnameipfsuniversalpathcontentlist.go b/web3/hostnameipfsuniversalpathcontentlist.go index dfb3add0f6..9ea2cdec0e 100644 --- a/web3/hostnameipfsuniversalpathcontentlist.go +++ b/web3/hostnameipfsuniversalpathcontentlist.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // HostnameIPFSUniversalPathContentListService contains methods and other services diff --git a/web3/hostnameipfsuniversalpathcontentlistentry.go b/web3/hostnameipfsuniversalpathcontentlistentry.go index 18cc92b4e8..384c9dc57c 100644 --- a/web3/hostnameipfsuniversalpathcontentlistentry.go +++ b/web3/hostnameipfsuniversalpathcontentlistentry.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // HostnameIPFSUniversalPathContentListEntryService contains methods and other diff --git a/workers/accountsetting.go b/workers/accountsetting.go index 42bda6ba2d..c9414d96d0 100644 --- a/workers/accountsetting.go +++ b/workers/accountsetting.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // AccountSettingService contains methods and other services that help with diff --git a/workers/ai.go b/workers/ai.go index 89f20dedfe..72088ae256 100644 --- a/workers/ai.go +++ b/workers/ai.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/workers/aliases.go b/workers/aliases.go index 1e8b8a2cc1..5701515e93 100644 --- a/workers/aliases.go +++ b/workers/aliases.go @@ -4,7 +4,7 @@ package workers import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/workers/domain.go b/workers/domain.go index bda5bf24c9..29204c3d72 100644 --- a/workers/domain.go +++ b/workers/domain.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DomainService contains methods and other services that help with interacting diff --git a/workers/script.go b/workers/script.go index 7549e91854..87c2a8f4db 100644 --- a/workers/script.go +++ b/workers/script.go @@ -18,8 +18,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // ScriptService contains methods and other services that help with interacting diff --git a/workers/scriptcontent.go b/workers/scriptcontent.go index 646520b0cb..79a9192aac 100644 --- a/workers/scriptcontent.go +++ b/workers/scriptcontent.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // ScriptContentService contains methods and other services that help with diff --git a/workers/scriptdeployment.go b/workers/scriptdeployment.go index 3a57927f9a..20f0cc1c8f 100644 --- a/workers/scriptdeployment.go +++ b/workers/scriptdeployment.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // ScriptDeploymentService contains methods and other services that help with diff --git a/workers/scriptschedule.go b/workers/scriptschedule.go index a85e3a0e95..fead8c460d 100644 --- a/workers/scriptschedule.go +++ b/workers/scriptschedule.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // ScriptScheduleService contains methods and other services that help with diff --git a/workers/scriptsetting.go b/workers/scriptsetting.go index ba6b484e37..1b087071d3 100644 --- a/workers/scriptsetting.go +++ b/workers/scriptsetting.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // ScriptSettingService contains methods and other services that help with diff --git a/workers/scripttail.go b/workers/scripttail.go index 9956201452..3419b0e5eb 100644 --- a/workers/scripttail.go +++ b/workers/scripttail.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // ScriptTailService contains methods and other services that help with interacting diff --git a/workers/scriptversion.go b/workers/scriptversion.go index 44623661d9..77015ae95e 100644 --- a/workers/scriptversion.go +++ b/workers/scriptversion.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // ScriptVersionService contains methods and other services that help with diff --git a/workers/subdomain.go b/workers/subdomain.go index b79b628002..88f64e8181 100644 --- a/workers/subdomain.go +++ b/workers/subdomain.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SubdomainService contains methods and other services that help with interacting diff --git a/workers_for_platforms/aliases.go b/workers_for_platforms/aliases.go index 2d1d83f433..b3419dd934 100644 --- a/workers_for_platforms/aliases.go +++ b/workers_for_platforms/aliases.go @@ -4,7 +4,7 @@ package workers_for_platforms import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/workers_for_platforms/dispatchnamespace.go b/workers_for_platforms/dispatchnamespace.go index 5ca71f33e0..b2bab3fc4c 100644 --- a/workers_for_platforms/dispatchnamespace.go +++ b/workers_for_platforms/dispatchnamespace.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DispatchNamespaceService contains methods and other services that help with diff --git a/workers_for_platforms/dispatchnamespacescript.go b/workers_for_platforms/dispatchnamespacescript.go index e7a528834e..e9b375a581 100644 --- a/workers_for_platforms/dispatchnamespacescript.go +++ b/workers_for_platforms/dispatchnamespacescript.go @@ -17,8 +17,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/cloudflare/cloudflare-go/v2/workers" ) diff --git a/workers_for_platforms/dispatchnamespacescriptbinding.go b/workers_for_platforms/dispatchnamespacescriptbinding.go index b5fa1a12cc..20064d9f8a 100644 --- a/workers_for_platforms/dispatchnamespacescriptbinding.go +++ b/workers_for_platforms/dispatchnamespacescriptbinding.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/cloudflare/cloudflare-go/v2/workers" ) diff --git a/workers_for_platforms/dispatchnamespacescriptcontent.go b/workers_for_platforms/dispatchnamespacescriptcontent.go index e9b858c5fa..b7a2972966 100644 --- a/workers_for_platforms/dispatchnamespacescriptcontent.go +++ b/workers_for_platforms/dispatchnamespacescriptcontent.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/cloudflare/cloudflare-go/v2/workers" ) diff --git a/workers_for_platforms/dispatchnamespacescriptsecret.go b/workers_for_platforms/dispatchnamespacescriptsecret.go index d1c07accfd..6ba7644f3c 100644 --- a/workers_for_platforms/dispatchnamespacescriptsecret.go +++ b/workers_for_platforms/dispatchnamespacescriptsecret.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DispatchNamespaceScriptSecretService contains methods and other services that diff --git a/workers_for_platforms/dispatchnamespacescriptsetting.go b/workers_for_platforms/dispatchnamespacescriptsetting.go index 96f4abb07e..217fc9f9c8 100644 --- a/workers_for_platforms/dispatchnamespacescriptsetting.go +++ b/workers_for_platforms/dispatchnamespacescriptsetting.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/cloudflare/cloudflare-go/v2/workers" "github.com/tidwall/gjson" ) diff --git a/workers_for_platforms/dispatchnamespacescripttag.go b/workers_for_platforms/dispatchnamespacescripttag.go index 67dde28605..b976a92b6f 100644 --- a/workers_for_platforms/dispatchnamespacescripttag.go +++ b/workers_for_platforms/dispatchnamespacescripttag.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DispatchNamespaceScriptTagService contains methods and other services that help diff --git a/zero_trust/accessapplication.go b/zero_trust/accessapplication.go index 9b53e6009d..d095018da5 100644 --- a/zero_trust/accessapplication.go +++ b/zero_trust/accessapplication.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/zero_trust/accessapplication_test.go b/zero_trust/accessapplication_test.go index b4e3766470..3db409ac56 100644 --- a/zero_trust/accessapplication_test.go +++ b/zero_trust/accessapplication_test.go @@ -9,9 +9,9 @@ import ( "testing" "github.com/cloudflare/cloudflare-go/v2" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" "github.com/cloudflare/cloudflare-go/v2/internal/testutil" "github.com/cloudflare/cloudflare-go/v2/option" + "github.com/cloudflare/cloudflare-go/v2/shared" "github.com/cloudflare/cloudflare-go/v2/zero_trust" ) diff --git a/zero_trust/accessapplicationca.go b/zero_trust/accessapplicationca.go index 39c2459850..f2bc848857 100644 --- a/zero_trust/accessapplicationca.go +++ b/zero_trust/accessapplicationca.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/zero_trust/accessapplicationpolicy.go b/zero_trust/accessapplicationpolicy.go index 61b309a191..15f2d8b9f9 100644 --- a/zero_trust/accessapplicationpolicy.go +++ b/zero_trust/accessapplicationpolicy.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // AccessApplicationPolicyService contains methods and other services that help diff --git a/zero_trust/accessapplicationuserpolicycheck.go b/zero_trust/accessapplicationuserpolicycheck.go index b87554c7cb..b45b77a25e 100644 --- a/zero_trust/accessapplicationuserpolicycheck.go +++ b/zero_trust/accessapplicationuserpolicycheck.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // AccessApplicationUserPolicyCheckService contains methods and other services that diff --git a/zero_trust/accessapplicationuserpolicycheck_test.go b/zero_trust/accessapplicationuserpolicycheck_test.go index 0e5c9ae469..9c107f7ddb 100644 --- a/zero_trust/accessapplicationuserpolicycheck_test.go +++ b/zero_trust/accessapplicationuserpolicycheck_test.go @@ -9,9 +9,9 @@ import ( "testing" "github.com/cloudflare/cloudflare-go/v2" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" "github.com/cloudflare/cloudflare-go/v2/internal/testutil" "github.com/cloudflare/cloudflare-go/v2/option" + "github.com/cloudflare/cloudflare-go/v2/shared" "github.com/cloudflare/cloudflare-go/v2/zero_trust" ) diff --git a/zero_trust/accessbookmark.go b/zero_trust/accessbookmark.go index d843720a4c..5258626bac 100644 --- a/zero_trust/accessbookmark.go +++ b/zero_trust/accessbookmark.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "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/shared" ) // AccessBookmarkService contains methods and other services that help with diff --git a/zero_trust/accesscertificate.go b/zero_trust/accesscertificate.go index a97210c0a2..3fe731ae8e 100644 --- a/zero_trust/accesscertificate.go +++ b/zero_trust/accesscertificate.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // AccessCertificateService contains methods and other services that help with diff --git a/zero_trust/accesscertificatesetting.go b/zero_trust/accesscertificatesetting.go index 80805149e1..af2b9aee3a 100644 --- a/zero_trust/accesscertificatesetting.go +++ b/zero_trust/accesscertificatesetting.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // AccessCertificateSettingService contains methods and other services that help diff --git a/zero_trust/accesscustompage.go b/zero_trust/accesscustompage.go index 707a91f524..c74d12418b 100644 --- a/zero_trust/accesscustompage.go +++ b/zero_trust/accesscustompage.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // AccessCustomPageService contains methods and other services that help with diff --git a/zero_trust/accessgroup.go b/zero_trust/accessgroup.go index f19ce25b68..6cbdc42c18 100644 --- a/zero_trust/accessgroup.go +++ b/zero_trust/accessgroup.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // AccessGroupService contains methods and other services that help with diff --git a/zero_trust/accesskey.go b/zero_trust/accesskey.go index e054adca37..b03dfbec68 100644 --- a/zero_trust/accesskey.go +++ b/zero_trust/accesskey.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/zero_trust/accesslogaccessrequest.go b/zero_trust/accesslogaccessrequest.go index 26c1febd61..de2c5b3bbb 100644 --- a/zero_trust/accesslogaccessrequest.go +++ b/zero_trust/accesslogaccessrequest.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "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/shared" ) // AccessLogAccessRequestService contains methods and other services that help with diff --git a/zero_trust/accessservicetoken.go b/zero_trust/accessservicetoken.go index d77728c45b..8fb6a486a3 100644 --- a/zero_trust/accessservicetoken.go +++ b/zero_trust/accessservicetoken.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // AccessServiceTokenService contains methods and other services that help with diff --git a/zero_trust/accesstag.go b/zero_trust/accesstag.go index 2ebbc75bab..4ad2a618f0 100644 --- a/zero_trust/accesstag.go +++ b/zero_trust/accesstag.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // AccessTagService contains methods and other services that help with interacting diff --git a/zero_trust/accessuseractivesession.go b/zero_trust/accessuseractivesession.go index 8d76cae67a..9b3b0d11c6 100644 --- a/zero_trust/accessuseractivesession.go +++ b/zero_trust/accessuseractivesession.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "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/shared" ) // AccessUserActiveSessionService contains methods and other services that help diff --git a/zero_trust/accessuserlastseenidentity.go b/zero_trust/accessuserlastseenidentity.go index 33cfce3f71..8671076cd5 100644 --- a/zero_trust/accessuserlastseenidentity.go +++ b/zero_trust/accessuserlastseenidentity.go @@ -9,8 +9,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "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/shared" ) // AccessUserLastSeenIdentityService contains methods and other services that help diff --git a/zero_trust/aliases.go b/zero_trust/aliases.go index 0789d130ce..436d2e0ce6 100644 --- a/zero_trust/aliases.go +++ b/zero_trust/aliases.go @@ -4,7 +4,7 @@ package zero_trust import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/zero_trust/connectivitysetting.go b/zero_trust/connectivitysetting.go index a376a94b5a..34ec4e73e1 100644 --- a/zero_trust/connectivitysetting.go +++ b/zero_trust/connectivitysetting.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // ConnectivitySettingService contains methods and other services that help with diff --git a/zero_trust/device.go b/zero_trust/device.go index 5225bc3cc2..b50ae8e8b1 100644 --- a/zero_trust/device.go +++ b/zero_trust/device.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/zero_trust/devicedextest.go b/zero_trust/devicedextest.go index 39307e758b..5f07412901 100644 --- a/zero_trust/devicedextest.go +++ b/zero_trust/devicedextest.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DeviceDEXTestService contains methods and other services that help with diff --git a/zero_trust/devicenetwork.go b/zero_trust/devicenetwork.go index 12b47db6db..fe9a6a9916 100644 --- a/zero_trust/devicenetwork.go +++ b/zero_trust/devicenetwork.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DeviceNetworkService contains methods and other services that help with diff --git a/zero_trust/deviceoverridecode.go b/zero_trust/deviceoverridecode.go index ffb1207a66..dc56d7d601 100644 --- a/zero_trust/deviceoverridecode.go +++ b/zero_trust/deviceoverridecode.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DeviceOverrideCodeService contains methods and other services that help with diff --git a/zero_trust/devicepolicy.go b/zero_trust/devicepolicy.go index e632f96890..8142564f7d 100644 --- a/zero_trust/devicepolicy.go +++ b/zero_trust/devicepolicy.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DevicePolicyService contains methods and other services that help with diff --git a/zero_trust/devicepolicydefaultpolicy.go b/zero_trust/devicepolicydefaultpolicy.go index ff8284d2e4..df0bccd9a5 100644 --- a/zero_trust/devicepolicydefaultpolicy.go +++ b/zero_trust/devicepolicydefaultpolicy.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DevicePolicyDefaultPolicyService contains methods and other services that help diff --git a/zero_trust/devicepolicyexclude.go b/zero_trust/devicepolicyexclude.go index ed841852d7..5e0c2c1d9c 100644 --- a/zero_trust/devicepolicyexclude.go +++ b/zero_trust/devicepolicyexclude.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DevicePolicyExcludeService contains methods and other services that help with diff --git a/zero_trust/devicepolicyfallbackdomain.go b/zero_trust/devicepolicyfallbackdomain.go index 2cab25d9e4..1da0cbd4d4 100644 --- a/zero_trust/devicepolicyfallbackdomain.go +++ b/zero_trust/devicepolicyfallbackdomain.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DevicePolicyFallbackDomainService contains methods and other services that help diff --git a/zero_trust/devicepolicyinclude.go b/zero_trust/devicepolicyinclude.go index e05de5d8ac..4bd61e3799 100644 --- a/zero_trust/devicepolicyinclude.go +++ b/zero_trust/devicepolicyinclude.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DevicePolicyIncludeService contains methods and other services that help with diff --git a/zero_trust/deviceposture.go b/zero_trust/deviceposture.go index 4af60fea3f..2f82260a8b 100644 --- a/zero_trust/deviceposture.go +++ b/zero_trust/deviceposture.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/zero_trust/devicepostureintegration.go b/zero_trust/devicepostureintegration.go index 0f93017ef4..67880d333d 100644 --- a/zero_trust/devicepostureintegration.go +++ b/zero_trust/devicepostureintegration.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/zero_trust/devicerevoke.go b/zero_trust/devicerevoke.go index 6dfeef7304..6a5a81e626 100644 --- a/zero_trust/devicerevoke.go +++ b/zero_trust/devicerevoke.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/zero_trust/devicesetting.go b/zero_trust/devicesetting.go index 8238a8f3d9..b2f1442024 100644 --- a/zero_trust/devicesetting.go +++ b/zero_trust/devicesetting.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DeviceSettingService contains methods and other services that help with diff --git a/zero_trust/deviceunrevoke.go b/zero_trust/deviceunrevoke.go index f2bcd4e770..ac28cd0323 100644 --- a/zero_trust/deviceunrevoke.go +++ b/zero_trust/deviceunrevoke.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/zero_trust/dexfleetstatus.go b/zero_trust/dexfleetstatus.go index d93ccb0521..e80e430179 100644 --- a/zero_trust/dexfleetstatus.go +++ b/zero_trust/dexfleetstatus.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DEXFleetStatusService contains methods and other services that help with diff --git a/zero_trust/dexhttptest.go b/zero_trust/dexhttptest.go index 0277a2c09a..0d9f539d8e 100644 --- a/zero_trust/dexhttptest.go +++ b/zero_trust/dexhttptest.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DEXHTTPTestService contains methods and other services that help with diff --git a/zero_trust/dexhttptestpercentile.go b/zero_trust/dexhttptestpercentile.go index 5cbb9016fc..b89caa2aab 100644 --- a/zero_trust/dexhttptestpercentile.go +++ b/zero_trust/dexhttptestpercentile.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DEXHTTPTestPercentileService contains methods and other services that help with diff --git a/zero_trust/dextest.go b/zero_trust/dextest.go index c715d7f738..616212e3f9 100644 --- a/zero_trust/dextest.go +++ b/zero_trust/dextest.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DEXTestService contains methods and other services that help with interacting diff --git a/zero_trust/dextestuniquedevice.go b/zero_trust/dextestuniquedevice.go index c7a7c8fc6e..317f8e28ef 100644 --- a/zero_trust/dextestuniquedevice.go +++ b/zero_trust/dextestuniquedevice.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DEXTestUniqueDeviceService contains methods and other services that help with diff --git a/zero_trust/dextraceroutetest.go b/zero_trust/dextraceroutetest.go index f17d11fdbf..e475c65a78 100644 --- a/zero_trust/dextraceroutetest.go +++ b/zero_trust/dextraceroutetest.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DEXTracerouteTestService contains methods and other services that help with diff --git a/zero_trust/dextraceroutetestresultnetworkpath.go b/zero_trust/dextraceroutetestresultnetworkpath.go index e84d879172..fd5743f15a 100644 --- a/zero_trust/dextraceroutetestresultnetworkpath.go +++ b/zero_trust/dextraceroutetestresultnetworkpath.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DEXTracerouteTestResultNetworkPathService contains methods and other services diff --git a/zero_trust/dlpdataset.go b/zero_trust/dlpdataset.go index 4edac8a8e5..3f66152766 100644 --- a/zero_trust/dlpdataset.go +++ b/zero_trust/dlpdataset.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DLPDatasetService contains methods and other services that help with interacting diff --git a/zero_trust/dlpdatasetupload.go b/zero_trust/dlpdatasetupload.go index 6f17dd6f6a..18fe28a341 100644 --- a/zero_trust/dlpdatasetupload.go +++ b/zero_trust/dlpdatasetupload.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DLPDatasetUploadService contains methods and other services that help with diff --git a/zero_trust/dlppattern.go b/zero_trust/dlppattern.go index 55606e98fd..147daef220 100644 --- a/zero_trust/dlppattern.go +++ b/zero_trust/dlppattern.go @@ -10,9 +10,9 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" "github.com/cloudflare/cloudflare-go/v2/logpush" "github.com/cloudflare/cloudflare-go/v2/option" + "github.com/cloudflare/cloudflare-go/v2/shared" ) // DLPPatternService contains methods and other services that help with interacting diff --git a/zero_trust/dlppayloadlog.go b/zero_trust/dlppayloadlog.go index d5884b7236..c3b034ad7b 100644 --- a/zero_trust/dlppayloadlog.go +++ b/zero_trust/dlppayloadlog.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DLPPayloadLogService contains methods and other services that help with diff --git a/zero_trust/dlpprofile.go b/zero_trust/dlpprofile.go index 5e8dc18cc3..b70c46874d 100644 --- a/zero_trust/dlpprofile.go +++ b/zero_trust/dlpprofile.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/zero_trust/dlpprofilecustom.go b/zero_trust/dlpprofilecustom.go index 794f360cf4..cce984607d 100644 --- a/zero_trust/dlpprofilecustom.go +++ b/zero_trust/dlpprofilecustom.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/zero_trust/dlpprofilepredefined.go b/zero_trust/dlpprofilepredefined.go index 0a382f5ca9..66ba754db1 100644 --- a/zero_trust/dlpprofilepredefined.go +++ b/zero_trust/dlpprofilepredefined.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DLPProfilePredefinedService contains methods and other services that help with diff --git a/zero_trust/gateway.go b/zero_trust/gateway.go index 25284bb80b..130da700b9 100644 --- a/zero_trust/gateway.go +++ b/zero_trust/gateway.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // GatewayService contains methods and other services that help with interacting diff --git a/zero_trust/gatewayauditsshsetting.go b/zero_trust/gatewayauditsshsetting.go index a4415d57ab..784afebddf 100644 --- a/zero_trust/gatewayauditsshsetting.go +++ b/zero_trust/gatewayauditsshsetting.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // GatewayAuditSSHSettingService contains methods and other services that help with diff --git a/zero_trust/gatewayconfiguration.go b/zero_trust/gatewayconfiguration.go index 8151e7dd53..db7c6bd62d 100644 --- a/zero_trust/gatewayconfiguration.go +++ b/zero_trust/gatewayconfiguration.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // GatewayConfigurationService contains methods and other services that help with diff --git a/zero_trust/gatewaylist.go b/zero_trust/gatewaylist.go index ceefe7f5f2..787b004fa1 100644 --- a/zero_trust/gatewaylist.go +++ b/zero_trust/gatewaylist.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/zero_trust/gatewaylocation.go b/zero_trust/gatewaylocation.go index 5b1f9eac5b..534409ac1c 100644 --- a/zero_trust/gatewaylocation.go +++ b/zero_trust/gatewaylocation.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/zero_trust/gatewaylogging.go b/zero_trust/gatewaylogging.go index ce1a5f9282..2e271ead0d 100644 --- a/zero_trust/gatewaylogging.go +++ b/zero_trust/gatewaylogging.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // GatewayLoggingService contains methods and other services that help with diff --git a/zero_trust/gatewayproxyendpoint.go b/zero_trust/gatewayproxyendpoint.go index 982e597b70..9a01e7b1d2 100644 --- a/zero_trust/gatewayproxyendpoint.go +++ b/zero_trust/gatewayproxyendpoint.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/zero_trust/gatewayrule.go b/zero_trust/gatewayrule.go index f73356b983..fd12752d5e 100644 --- a/zero_trust/gatewayrule.go +++ b/zero_trust/gatewayrule.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/zero_trust/identityprovider.go b/zero_trust/identityprovider.go index 723e3f0c9d..d4f4aaaa9e 100644 --- a/zero_trust/identityprovider.go +++ b/zero_trust/identityprovider.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/zero_trust/networkroute.go b/zero_trust/networkroute.go index 890e8c1dec..2578c7d731 100644 --- a/zero_trust/networkroute.go +++ b/zero_trust/networkroute.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // NetworkRouteService contains methods and other services that help with diff --git a/zero_trust/networkrouteip.go b/zero_trust/networkrouteip.go index 72867fc846..b7d794ade4 100644 --- a/zero_trust/networkrouteip.go +++ b/zero_trust/networkrouteip.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // NetworkRouteIPService contains methods and other services that help with diff --git a/zero_trust/networkroutenetwork.go b/zero_trust/networkroutenetwork.go index bf359c60e4..7c7964c29d 100644 --- a/zero_trust/networkroutenetwork.go +++ b/zero_trust/networkroutenetwork.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // NetworkRouteNetworkService contains methods and other services that help with diff --git a/zero_trust/networkvirtualnetwork.go b/zero_trust/networkvirtualnetwork.go index 7cbdd8b597..59a2c2142d 100644 --- a/zero_trust/networkvirtualnetwork.go +++ b/zero_trust/networkvirtualnetwork.go @@ -15,8 +15,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/zero_trust/organization.go b/zero_trust/organization.go index c361263603..413b842ac4 100644 --- a/zero_trust/organization.go +++ b/zero_trust/organization.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // OrganizationService contains methods and other services that help with diff --git a/zero_trust/riskscoring.go b/zero_trust/riskscoring.go index bb004f6fa4..a7c079c43e 100644 --- a/zero_trust/riskscoring.go +++ b/zero_trust/riskscoring.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/zero_trust/riskscoringbehaviour.go b/zero_trust/riskscoringbehaviour.go index cfb0ac33a4..d2d976494c 100644 --- a/zero_trust/riskscoringbehaviour.go +++ b/zero_trust/riskscoringbehaviour.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // RiskScoringBehaviourService contains methods and other services that help with diff --git a/zero_trust/riskscoringsummary.go b/zero_trust/riskscoringsummary.go index 5e6119315a..adc66a8885 100644 --- a/zero_trust/riskscoringsummary.go +++ b/zero_trust/riskscoringsummary.go @@ -13,8 +13,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // RiskScoringSummaryService contains methods and other services that help with diff --git a/zero_trust/seat.go b/zero_trust/seat.go index 92fb1cf91e..fe3c0198be 100644 --- a/zero_trust/seat.go +++ b/zero_trust/seat.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SeatService contains methods and other services that help with interacting with diff --git a/zero_trust/tunnel.go b/zero_trust/tunnel.go index b0572eadce..69b5da8344 100644 --- a/zero_trust/tunnel.go +++ b/zero_trust/tunnel.go @@ -15,8 +15,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/zero_trust/tunnelconfiguration.go b/zero_trust/tunnelconfiguration.go index 7612c74a10..2419ee56fa 100644 --- a/zero_trust/tunnelconfiguration.go +++ b/zero_trust/tunnelconfiguration.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/zero_trust/tunnelconnection.go b/zero_trust/tunnelconnection.go index 598984b8a3..3fbf6bd339 100644 --- a/zero_trust/tunnelconnection.go +++ b/zero_trust/tunnelconnection.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/zero_trust/tunnelconnector.go b/zero_trust/tunnelconnector.go index a4cc03469d..961fa59b9f 100644 --- a/zero_trust/tunnelconnector.go +++ b/zero_trust/tunnelconnector.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // TunnelConnectorService contains methods and other services that help with diff --git a/zero_trust/tunnelmanagement.go b/zero_trust/tunnelmanagement.go index 50ae5c622b..bc048a8dea 100644 --- a/zero_trust/tunnelmanagement.go +++ b/zero_trust/tunnelmanagement.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/zero_trust/tunneltoken.go b/zero_trust/tunneltoken.go index 9a04ee5821..5fb11fb1c7 100644 --- a/zero_trust/tunneltoken.go +++ b/zero_trust/tunneltoken.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/zones/activationcheck.go b/zones/activationcheck.go index 99a82e212f..f2c5caeb8e 100644 --- a/zones/activationcheck.go +++ b/zones/activationcheck.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // ActivationCheckService contains methods and other services that help with diff --git a/zones/aliases.go b/zones/aliases.go index 30743453dd..03d6cb8d48 100644 --- a/zones/aliases.go +++ b/zones/aliases.go @@ -4,7 +4,7 @@ package zones import ( "github.com/cloudflare/cloudflare-go/v2/internal/apierror" - "github.com/cloudflare/cloudflare-go/v2/internal/shared" + "github.com/cloudflare/cloudflare-go/v2/shared" ) type Error = apierror.Error diff --git a/zones/customnameserver.go b/zones/customnameserver.go index 23509dbec0..5154e6ae28 100644 --- a/zones/customnameserver.go +++ b/zones/customnameserver.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" "github.com/tidwall/gjson" ) diff --git a/zones/dnssetting.go b/zones/dnssetting.go index 1044b66613..0e1515a747 100644 --- a/zones/dnssetting.go +++ b/zones/dnssetting.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // DNSSettingService contains methods and other services that help with interacting diff --git a/zones/hold.go b/zones/hold.go index 87d8a21972..631293a4c7 100644 --- a/zones/hold.go +++ b/zones/hold.go @@ -12,8 +12,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // HoldService contains methods and other services that help with interacting with diff --git a/zones/settingadvancedddos.go b/zones/settingadvancedddos.go index 5f27e94555..1cabb623e6 100644 --- a/zones/settingadvancedddos.go +++ b/zones/settingadvancedddos.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingAdvancedDDoSService contains methods and other services that help with diff --git a/zones/settingalwaysonline.go b/zones/settingalwaysonline.go index f26dafa202..ea29879df5 100644 --- a/zones/settingalwaysonline.go +++ b/zones/settingalwaysonline.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingAlwaysOnlineService contains methods and other services that help with diff --git a/zones/settingalwaysusehttps.go b/zones/settingalwaysusehttps.go index 5424a5fcbc..fb435bd6c6 100644 --- a/zones/settingalwaysusehttps.go +++ b/zones/settingalwaysusehttps.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingAlwaysUseHTTPSService contains methods and other services that help with diff --git a/zones/settingautomatichttpsrewrite.go b/zones/settingautomatichttpsrewrite.go index 77a1ec6479..0688439282 100644 --- a/zones/settingautomatichttpsrewrite.go +++ b/zones/settingautomatichttpsrewrite.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingAutomaticHTTPSRewriteService contains methods and other services that diff --git a/zones/settingautomaticplatformoptimization.go b/zones/settingautomaticplatformoptimization.go index 035347ea1b..8598923d71 100644 --- a/zones/settingautomaticplatformoptimization.go +++ b/zones/settingautomaticplatformoptimization.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingAutomaticPlatformOptimizationService contains methods and other services diff --git a/zones/settingbrotli.go b/zones/settingbrotli.go index 52d31f5acc..c6e6a1554d 100644 --- a/zones/settingbrotli.go +++ b/zones/settingbrotli.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingBrotliService contains methods and other services that help with diff --git a/zones/settingbrowsercachettl.go b/zones/settingbrowsercachettl.go index b87bf1500c..f336e22909 100644 --- a/zones/settingbrowsercachettl.go +++ b/zones/settingbrowsercachettl.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingBrowserCacheTTLService contains methods and other services that help with diff --git a/zones/settingbrowsercheck.go b/zones/settingbrowsercheck.go index da21bb032c..a4dd99068d 100644 --- a/zones/settingbrowsercheck.go +++ b/zones/settingbrowsercheck.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingBrowserCheckService contains methods and other services that help with diff --git a/zones/settingcachelevel.go b/zones/settingcachelevel.go index 67e74300d5..d595282abf 100644 --- a/zones/settingcachelevel.go +++ b/zones/settingcachelevel.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingCacheLevelService contains methods and other services that help with diff --git a/zones/settingchallengettl.go b/zones/settingchallengettl.go index c8c0da23cb..c74b9b939c 100644 --- a/zones/settingchallengettl.go +++ b/zones/settingchallengettl.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingChallengeTTLService contains methods and other services that help with diff --git a/zones/settingcipher.go b/zones/settingcipher.go index bf82b30ea0..a77fca14fc 100644 --- a/zones/settingcipher.go +++ b/zones/settingcipher.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingCipherService contains methods and other services that help with diff --git a/zones/settingdevelopmentmode.go b/zones/settingdevelopmentmode.go index 06cabcd39d..21f6d7a684 100644 --- a/zones/settingdevelopmentmode.go +++ b/zones/settingdevelopmentmode.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingDevelopmentModeService contains methods and other services that help with diff --git a/zones/settingearlyhint.go b/zones/settingearlyhint.go index 07b563de89..89c913fe14 100644 --- a/zones/settingearlyhint.go +++ b/zones/settingearlyhint.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingEarlyHintService contains methods and other services that help with diff --git a/zones/settingemailobfuscation.go b/zones/settingemailobfuscation.go index 9f1ef85559..7905ffe09a 100644 --- a/zones/settingemailobfuscation.go +++ b/zones/settingemailobfuscation.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingEmailObfuscationService contains methods and other services that help diff --git a/zones/settingfontsetting.go b/zones/settingfontsetting.go index 4a1d659b85..62d8739945 100644 --- a/zones/settingfontsetting.go +++ b/zones/settingfontsetting.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingFontSettingService contains methods and other services that help with diff --git a/zones/settingh2prioritization.go b/zones/settingh2prioritization.go index 016fe71a58..76ccde5057 100644 --- a/zones/settingh2prioritization.go +++ b/zones/settingh2prioritization.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingH2PrioritizationService contains methods and other services that help diff --git a/zones/settinghotlinkprotection.go b/zones/settinghotlinkprotection.go index 895c763212..a51fe2cf8c 100644 --- a/zones/settinghotlinkprotection.go +++ b/zones/settinghotlinkprotection.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingHotlinkProtectionService contains methods and other services that help diff --git a/zones/settinghttp2.go b/zones/settinghttp2.go index d237f94828..5992dd14d0 100644 --- a/zones/settinghttp2.go +++ b/zones/settinghttp2.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingHTTP2Service contains methods and other services that help with diff --git a/zones/settinghttp3.go b/zones/settinghttp3.go index 386c22759f..e98dce10af 100644 --- a/zones/settinghttp3.go +++ b/zones/settinghttp3.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingHTTP3Service contains methods and other services that help with diff --git a/zones/settingimageresizing.go b/zones/settingimageresizing.go index e400db1185..84824bf9ae 100644 --- a/zones/settingimageresizing.go +++ b/zones/settingimageresizing.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingImageResizingService contains methods and other services that help with diff --git a/zones/settingipgeolocation.go b/zones/settingipgeolocation.go index 848d34bcc8..733f15180d 100644 --- a/zones/settingipgeolocation.go +++ b/zones/settingipgeolocation.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingIPGeolocationService contains methods and other services that help with diff --git a/zones/settingipv6.go b/zones/settingipv6.go index 6e8457b519..b66112ef77 100644 --- a/zones/settingipv6.go +++ b/zones/settingipv6.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingIPV6Service contains methods and other services that help with diff --git a/zones/settingminify.go b/zones/settingminify.go index 444f491c30..91c9d7fb2c 100644 --- a/zones/settingminify.go +++ b/zones/settingminify.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingMinifyService contains methods and other services that help with diff --git a/zones/settingmintlsversion.go b/zones/settingmintlsversion.go index 09076d3eee..dae89bc1db 100644 --- a/zones/settingmintlsversion.go +++ b/zones/settingmintlsversion.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingMinTLSVersionService contains methods and other services that help with diff --git a/zones/settingmirage.go b/zones/settingmirage.go index 8e9997ae32..cc0963fbda 100644 --- a/zones/settingmirage.go +++ b/zones/settingmirage.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingMirageService contains methods and other services that help with diff --git a/zones/settingmobileredirect.go b/zones/settingmobileredirect.go index e6d1fbde6e..1973d3f8b5 100644 --- a/zones/settingmobileredirect.go +++ b/zones/settingmobileredirect.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingMobileRedirectService contains methods and other services that help with diff --git a/zones/settingnel.go b/zones/settingnel.go index 0d26f0d7d6..54076ed633 100644 --- a/zones/settingnel.go +++ b/zones/settingnel.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingNELService contains methods and other services that help with interacting diff --git a/zones/settingopportunisticencryption.go b/zones/settingopportunisticencryption.go index aee10ccd03..54a78c7f73 100644 --- a/zones/settingopportunisticencryption.go +++ b/zones/settingopportunisticencryption.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingOpportunisticEncryptionService contains methods and other services that diff --git a/zones/settingopportunisticonion.go b/zones/settingopportunisticonion.go index 6259431040..e26981541d 100644 --- a/zones/settingopportunisticonion.go +++ b/zones/settingopportunisticonion.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingOpportunisticOnionService contains methods and other services that help diff --git a/zones/settingorangetoorange.go b/zones/settingorangetoorange.go index 56e1c6d18a..fb2f2dd6b4 100644 --- a/zones/settingorangetoorange.go +++ b/zones/settingorangetoorange.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingOrangeToOrangeService contains methods and other services that help with diff --git a/zones/settingoriginerrorpagepassthru.go b/zones/settingoriginerrorpagepassthru.go index cfad8d96a5..dbf55d7829 100644 --- a/zones/settingoriginerrorpagepassthru.go +++ b/zones/settingoriginerrorpagepassthru.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingOriginErrorPagePassThruService contains methods and other services that diff --git a/zones/settingoriginmaxhttpversion.go b/zones/settingoriginmaxhttpversion.go index 66242bf3ab..c9b8e211d2 100644 --- a/zones/settingoriginmaxhttpversion.go +++ b/zones/settingoriginmaxhttpversion.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingOriginMaxHTTPVersionService contains methods and other services that help diff --git a/zones/settingpolish.go b/zones/settingpolish.go index 8952f4c2ff..4fcdf01541 100644 --- a/zones/settingpolish.go +++ b/zones/settingpolish.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingPolishService contains methods and other services that help with diff --git a/zones/settingprefetchpreload.go b/zones/settingprefetchpreload.go index a04e4601bd..6efce57a54 100644 --- a/zones/settingprefetchpreload.go +++ b/zones/settingprefetchpreload.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingPrefetchPreloadService contains methods and other services that help with diff --git a/zones/settingproxyreadtimeout.go b/zones/settingproxyreadtimeout.go index f224c58f92..a7bc549142 100644 --- a/zones/settingproxyreadtimeout.go +++ b/zones/settingproxyreadtimeout.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingProxyReadTimeoutService contains methods and other services that help diff --git a/zones/settingpseudoipv4.go b/zones/settingpseudoipv4.go index 3096f2f582..41afe25898 100644 --- a/zones/settingpseudoipv4.go +++ b/zones/settingpseudoipv4.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingPseudoIPV4Service contains methods and other services that help with diff --git a/zones/settingresponsebuffering.go b/zones/settingresponsebuffering.go index 4199ed956d..b00528882f 100644 --- a/zones/settingresponsebuffering.go +++ b/zones/settingresponsebuffering.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingResponseBufferingService contains methods and other services that help diff --git a/zones/settingrocketloader.go b/zones/settingrocketloader.go index 9aee7a9baa..b51a63ee63 100644 --- a/zones/settingrocketloader.go +++ b/zones/settingrocketloader.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingRocketLoaderService contains methods and other services that help with diff --git a/zones/settingsecurityheader.go b/zones/settingsecurityheader.go index 52447c988b..b480645f60 100644 --- a/zones/settingsecurityheader.go +++ b/zones/settingsecurityheader.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingSecurityHeaderService contains methods and other services that help with diff --git a/zones/settingsecuritylevel.go b/zones/settingsecuritylevel.go index 6242a6d343..9955e94771 100644 --- a/zones/settingsecuritylevel.go +++ b/zones/settingsecuritylevel.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingSecurityLevelService contains methods and other services that help with diff --git a/zones/settingserversideexclude.go b/zones/settingserversideexclude.go index 88a335e122..705f4b6fd6 100644 --- a/zones/settingserversideexclude.go +++ b/zones/settingserversideexclude.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingServerSideExcludeService contains methods and other services that help diff --git a/zones/settingsortquerystringforcache.go b/zones/settingsortquerystringforcache.go index 05466ecd1f..882427d1a6 100644 --- a/zones/settingsortquerystringforcache.go +++ b/zones/settingsortquerystringforcache.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingSortQueryStringForCacheService contains methods and other services that diff --git a/zones/settingssl.go b/zones/settingssl.go index 911c6074e6..af5e6111f3 100644 --- a/zones/settingssl.go +++ b/zones/settingssl.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingSSLService contains methods and other services that help with interacting diff --git a/zones/settingsslrecommender.go b/zones/settingsslrecommender.go index b560cdcff0..32bd1b6103 100644 --- a/zones/settingsslrecommender.go +++ b/zones/settingsslrecommender.go @@ -10,8 +10,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingSSLRecommenderService contains methods and other services that help with diff --git a/zones/settingtls13.go b/zones/settingtls13.go index ae4588277b..af48d573f1 100644 --- a/zones/settingtls13.go +++ b/zones/settingtls13.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingTLS1_3Service contains methods and other services that help with diff --git a/zones/settingtlsclientauth.go b/zones/settingtlsclientauth.go index dd66449018..ff1640cbc0 100644 --- a/zones/settingtlsclientauth.go +++ b/zones/settingtlsclientauth.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingTLSClientAuthService contains methods and other services that help with diff --git a/zones/settingtrueclientipheader.go b/zones/settingtrueclientipheader.go index 10fae504b7..f6151e714a 100644 --- a/zones/settingtrueclientipheader.go +++ b/zones/settingtrueclientipheader.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingTrueClientIPHeaderService contains methods and other services that help diff --git a/zones/settingwaf.go b/zones/settingwaf.go index 04e7866b47..505c2420a6 100644 --- a/zones/settingwaf.go +++ b/zones/settingwaf.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingWAFService contains methods and other services that help with interacting diff --git a/zones/settingwebp.go b/zones/settingwebp.go index 4d7bb7ac50..a3acddb9b0 100644 --- a/zones/settingwebp.go +++ b/zones/settingwebp.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingWebPService contains methods and other services that help with diff --git a/zones/settingwebsocket.go b/zones/settingwebsocket.go index 24b1f33c51..5233be31ae 100644 --- a/zones/settingwebsocket.go +++ b/zones/settingwebsocket.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingWebsocketService contains methods and other services that help with diff --git a/zones/settingzerortt.go b/zones/settingzerortt.go index 50780504a4..4a45e33226 100644 --- a/zones/settingzerortt.go +++ b/zones/settingzerortt.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // SettingZeroRTTService contains methods and other services that help with diff --git a/zones/subscription.go b/zones/subscription.go index d0a6ca1595..e38b4deb29 100644 --- a/zones/subscription.go +++ b/zones/subscription.go @@ -11,8 +11,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "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/shared" "github.com/cloudflare/cloudflare-go/v2/user" "github.com/tidwall/gjson" ) diff --git a/zones/zone.go b/zones/zone.go index e87b85ac19..8a385926b9 100644 --- a/zones/zone.go +++ b/zones/zone.go @@ -14,8 +14,8 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "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/shared" ) // ZoneService contains methods and other services that help with interacting with @@ -141,10 +141,11 @@ type Zone struct { ModifiedOn time.Time `json:"modified_on,required" format:"date-time"` // The domain name Name string `json:"name,required"` + // The name servers Cloudflare assigns to a zone + NameServers []string `json:"name_servers,required" format:"hostname"` // DNS host at the time of switching to Cloudflare OriginalDnshost string `json:"original_dnshost,required,nullable"` - // Original name servers before moving to Cloudflare Notes: Is this only available - // for full zones? + // Original name servers before moving to Cloudflare OriginalNameServers []string `json:"original_name_servers,required,nullable" format:"hostname"` // Registrar for the domain at the time of switching to Cloudflare OriginalRegistrar string `json:"original_registrar,required,nullable"` @@ -166,6 +167,7 @@ type zoneJSON struct { Meta apijson.Field ModifiedOn apijson.Field Name apijson.Field + NameServers apijson.Field OriginalDnshost apijson.Field OriginalNameServers apijson.Field OriginalRegistrar apijson.Field From 80de1e41bfa32404558211fe940994a04d756f77 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Apr 2024 22:14:56 +0000 Subject: [PATCH 006/127] feat(api): OpenAPI spec update via Stainless API (#1847) --- .stats.yml | 2 +- zones/zone.go | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index 67e4f500c5..b79bc305be 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1266 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e202d9b1bb049167a2efb5c3981c53af7bab82b6411bbbd684557eef5b435880.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e04cfc56c4a869fdc91838cb9891046cf1686ec4e45d7f7fa558cfc7e4072700.yml diff --git a/zones/zone.go b/zones/zone.go index 8a385926b9..3aad629264 100644 --- a/zones/zone.go +++ b/zones/zone.go @@ -141,11 +141,10 @@ type Zone struct { ModifiedOn time.Time `json:"modified_on,required" format:"date-time"` // The domain name Name string `json:"name,required"` - // The name servers Cloudflare assigns to a zone - NameServers []string `json:"name_servers,required" format:"hostname"` // DNS host at the time of switching to Cloudflare OriginalDnshost string `json:"original_dnshost,required,nullable"` - // Original name servers before moving to Cloudflare + // Original name servers before moving to Cloudflare Notes: Is this only available + // for full zones? OriginalNameServers []string `json:"original_name_servers,required,nullable" format:"hostname"` // Registrar for the domain at the time of switching to Cloudflare OriginalRegistrar string `json:"original_registrar,required,nullable"` @@ -167,7 +166,6 @@ type zoneJSON struct { Meta apijson.Field ModifiedOn apijson.Field Name apijson.Field - NameServers apijson.Field OriginalDnshost apijson.Field OriginalNameServers apijson.Field OriginalRegistrar apijson.Field From 563972540c6f58689b233ebc86d56d8b4bed12af Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Apr 2024 23:37:08 +0000 Subject: [PATCH 007/127] feat(api): OpenAPI spec update via Stainless API (#1848) --- .stats.yml | 2 +- zones/zone.go | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index b79bc305be..67e4f500c5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1266 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e04cfc56c4a869fdc91838cb9891046cf1686ec4e45d7f7fa558cfc7e4072700.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e202d9b1bb049167a2efb5c3981c53af7bab82b6411bbbd684557eef5b435880.yml diff --git a/zones/zone.go b/zones/zone.go index 3aad629264..8a385926b9 100644 --- a/zones/zone.go +++ b/zones/zone.go @@ -141,10 +141,11 @@ type Zone struct { ModifiedOn time.Time `json:"modified_on,required" format:"date-time"` // The domain name Name string `json:"name,required"` + // The name servers Cloudflare assigns to a zone + NameServers []string `json:"name_servers,required" format:"hostname"` // DNS host at the time of switching to Cloudflare OriginalDnshost string `json:"original_dnshost,required,nullable"` - // Original name servers before moving to Cloudflare Notes: Is this only available - // for full zones? + // Original name servers before moving to Cloudflare OriginalNameServers []string `json:"original_name_servers,required,nullable" format:"hostname"` // Registrar for the domain at the time of switching to Cloudflare OriginalRegistrar string `json:"original_registrar,required,nullable"` @@ -166,6 +167,7 @@ type zoneJSON struct { Meta apijson.Field ModifiedOn apijson.Field Name apijson.Field + NameServers apijson.Field OriginalDnshost apijson.Field OriginalNameServers apijson.Field OriginalRegistrar apijson.Field From c2df704abb15398046ed887063c607e0e1ee5c1c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Apr 2024 23:38:59 +0000 Subject: [PATCH 008/127] feat(api): OpenAPI spec update via Stainless API (#1849) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 67e4f500c5..83d1643a46 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1266 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e202d9b1bb049167a2efb5c3981c53af7bab82b6411bbbd684557eef5b435880.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ea285caeae39e684b320c55cf658a1ce9360e7737d2a13bbf9782459709ec55c.yml From df733af7c9ebc0f25242f833b73eac89672427ef Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 27 Apr 2024 23:05:00 +0000 Subject: [PATCH 009/127] feat(api): OpenAPI spec update via Stainless API (#1850) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 83d1643a46..67e4f500c5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1266 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ea285caeae39e684b320c55cf658a1ce9360e7737d2a13bbf9782459709ec55c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e202d9b1bb049167a2efb5c3981c53af7bab82b6411bbbd684557eef5b435880.yml From edc969b06ea5a130fed665f129f93c20c38677c1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 27 Apr 2024 23:06:37 +0000 Subject: [PATCH 010/127] feat(api): OpenAPI spec update via Stainless API (#1851) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 67e4f500c5..83d1643a46 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1266 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e202d9b1bb049167a2efb5c3981c53af7bab82b6411bbbd684557eef5b435880.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ea285caeae39e684b320c55cf658a1ce9360e7737d2a13bbf9782459709ec55c.yml From f7060f8bc683ccc1207d84424de855352ea8c9fc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 02:09:57 +0000 Subject: [PATCH 011/127] feat(api): update via SDK Studio (#1852) --- .stats.yml | 2 +- hyperdrive/config_test.go | 6 ++--- magic_transit/site_test.go | 8 +++---- page_shield/connection_test.go | 2 +- page_shield/script_test.go | 2 +- pagerules/pagerule_test.go | 36 ++++++++++++++++++++++++++++ radar/annotationoutage_test.go | 2 +- radar/bgproute_test.go | 4 ++-- radar/trafficanomaly_test.go | 2 +- zero_trust/dexhttptest_test.go | 4 ++-- zero_trust/dextraceroutetest_test.go | 8 +++---- 11 files changed, 56 insertions(+), 20 deletions(-) diff --git a/.stats.yml b/.stats.yml index 83d1643a46..909fd2a314 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1266 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ea285caeae39e684b320c55cf658a1ce9360e7737d2a13bbf9782459709ec55c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1117455d139246587bb583bb4cb4c402c3757e6ab4ad31d325b6657ac6fa6a0b.yml diff --git a/hyperdrive/config_test.go b/hyperdrive/config_test.go index 19dfd6b193..7e6b945ded 100644 --- a/hyperdrive/config_test.go +++ b/hyperdrive/config_test.go @@ -40,7 +40,7 @@ func TestConfigNewWithOptionalParams(t *testing.T) { Origin: cloudflare.F(hyperdrive.ConfigurationParam{ Database: cloudflare.F("postgres"), Host: cloudflare.F("database.example.com"), - Port: cloudflare.F(int64(0)), + Port: cloudflare.F(int64(5432)), Scheme: cloudflare.F(hyperdrive.ConfigurationSchemePostgres), User: cloudflare.F("postgres"), }), @@ -84,7 +84,7 @@ func TestConfigUpdateWithOptionalParams(t *testing.T) { Origin: cloudflare.F(hyperdrive.ConfigurationParam{ Database: cloudflare.F("postgres"), Host: cloudflare.F("database.example.com"), - Port: cloudflare.F(int64(0)), + Port: cloudflare.F(int64(5432)), Scheme: cloudflare.F(hyperdrive.ConfigurationSchemePostgres), User: cloudflare.F("postgres"), }), @@ -185,7 +185,7 @@ func TestConfigEditWithOptionalParams(t *testing.T) { Origin: cloudflare.F(hyperdrive.ConfigurationParam{ Database: cloudflare.F("postgres"), Host: cloudflare.F("database.example.com"), - Port: cloudflare.F(int64(0)), + Port: cloudflare.F(int64(5432)), Scheme: cloudflare.F(hyperdrive.ConfigurationSchemePostgres), User: cloudflare.F("postgres"), }), diff --git a/magic_transit/site_test.go b/magic_transit/site_test.go index 564504ec54..a0be47ba06 100644 --- a/magic_transit/site_test.go +++ b/magic_transit/site_test.go @@ -35,8 +35,8 @@ func TestSiteNewWithOptionalParams(t *testing.T) { Description: cloudflare.F("string"), HaMode: cloudflare.F(true), Location: cloudflare.F(magic_transit.SiteLocationParam{ - Lat: cloudflare.F("string"), - Lon: cloudflare.F("string"), + Lat: cloudflare.F("37.6192"), + Lon: cloudflare.F("122.3816"), }), SecondaryConnectorID: cloudflare.F("8d67040d3835dbcf46ce29da440dc482"), }) @@ -71,8 +71,8 @@ func TestSiteUpdateWithOptionalParams(t *testing.T) { ConnectorID: cloudflare.F("ac60d3d0435248289d446cedd870bcf4"), Description: cloudflare.F("string"), Location: cloudflare.F(magic_transit.SiteLocationParam{ - Lat: cloudflare.F("string"), - Lon: cloudflare.F("string"), + Lat: cloudflare.F("37.6192"), + Lon: cloudflare.F("122.3816"), }), Name: cloudflare.F("site_1"), SecondaryConnectorID: cloudflare.F("8d67040d3835dbcf46ce29da440dc482"), diff --git a/page_shield/connection_test.go b/page_shield/connection_test.go index 5fab545513..288a28035c 100644 --- a/page_shield/connection_test.go +++ b/page_shield/connection_test.go @@ -36,7 +36,7 @@ func TestConnectionListWithOptionalParams(t *testing.T) { Export: cloudflare.F(page_shield.ConnectionListParamsExportCsv), Hosts: cloudflare.F("blog.cloudflare.com,www.example*,*cloudflare.com"), OrderBy: cloudflare.F(page_shield.ConnectionListParamsOrderByFirstSeenAt), - Page: cloudflare.F("string"), + Page: cloudflare.F("2"), PageURL: cloudflare.F("example.com/page,*/checkout,example.com/*,*checkout*"), PerPage: cloudflare.F(100.000000), PrioritizeMalicious: cloudflare.F(true), diff --git a/page_shield/script_test.go b/page_shield/script_test.go index 17dcf95d88..794b5c473c 100644 --- a/page_shield/script_test.go +++ b/page_shield/script_test.go @@ -37,7 +37,7 @@ func TestScriptListWithOptionalParams(t *testing.T) { Export: cloudflare.F(page_shield.ScriptListParamsExportCsv), Hosts: cloudflare.F("blog.cloudflare.com,www.example*,*cloudflare.com"), OrderBy: cloudflare.F(page_shield.ScriptListParamsOrderByFirstSeenAt), - Page: cloudflare.F("string"), + Page: cloudflare.F("2"), PageURL: cloudflare.F("example.com/page,*/checkout,example.com/*,*checkout*"), PerPage: cloudflare.F(100.000000), PrioritizeMalicious: cloudflare.F(true), diff --git a/pagerules/pagerule_test.go b/pagerules/pagerule_test.go index 96ad36c20d..d14bbdf58f 100644 --- a/pagerules/pagerule_test.go +++ b/pagerules/pagerule_test.go @@ -36,6 +36,18 @@ func TestPageruleNewWithOptionalParams(t *testing.T) { Type: cloudflare.F(pagerules.RouteValueTypeTemporary), URL: cloudflare.F("http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3"), }), + }, { + Name: cloudflare.F(pagerules.RouteNameForwardURL), + Value: cloudflare.F(pagerules.RouteValueParam{ + Type: cloudflare.F(pagerules.RouteValueTypeTemporary), + URL: cloudflare.F("http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3"), + }), + }, { + Name: cloudflare.F(pagerules.RouteNameForwardURL), + Value: cloudflare.F(pagerules.RouteValueParam{ + Type: cloudflare.F(pagerules.RouteValueTypeTemporary), + URL: cloudflare.F("http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3"), + }), }}), Targets: cloudflare.F([]pagerules.TargetParam{{ Constraint: cloudflare.F(pagerules.TargetConstraintParam{ @@ -81,6 +93,18 @@ func TestPageruleUpdateWithOptionalParams(t *testing.T) { Type: cloudflare.F(pagerules.RouteValueTypeTemporary), URL: cloudflare.F("http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3"), }), + }, { + Name: cloudflare.F(pagerules.RouteNameForwardURL), + Value: cloudflare.F(pagerules.RouteValueParam{ + Type: cloudflare.F(pagerules.RouteValueTypeTemporary), + URL: cloudflare.F("http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3"), + }), + }, { + Name: cloudflare.F(pagerules.RouteNameForwardURL), + Value: cloudflare.F(pagerules.RouteValueParam{ + Type: cloudflare.F(pagerules.RouteValueTypeTemporary), + URL: cloudflare.F("http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3"), + }), }}), Targets: cloudflare.F([]pagerules.TargetParam{{ Constraint: cloudflare.F(pagerules.TargetConstraintParam{ @@ -187,6 +211,18 @@ func TestPageruleEditWithOptionalParams(t *testing.T) { Type: cloudflare.F(pagerules.RouteValueTypeTemporary), URL: cloudflare.F("http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3"), }), + }, { + Name: cloudflare.F(pagerules.RouteNameForwardURL), + Value: cloudflare.F(pagerules.RouteValueParam{ + Type: cloudflare.F(pagerules.RouteValueTypeTemporary), + URL: cloudflare.F("http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3"), + }), + }, { + Name: cloudflare.F(pagerules.RouteNameForwardURL), + Value: cloudflare.F(pagerules.RouteValueParam{ + Type: cloudflare.F(pagerules.RouteValueTypeTemporary), + URL: cloudflare.F("http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3"), + }), }}), Priority: cloudflare.F(int64(0)), Status: cloudflare.F(pagerules.PageruleEditParamsStatusActive), diff --git a/radar/annotationoutage_test.go b/radar/annotationoutage_test.go index 50606c824e..c173e6527a 100644 --- a/radar/annotationoutage_test.go +++ b/radar/annotationoutage_test.go @@ -30,7 +30,7 @@ func TestAnnotationOutageGetWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.Radar.Annotations.Outages.Get(context.TODO(), radar.AnnotationOutageGetParams{ - ASN: cloudflare.F(int64(0)), + ASN: cloudflare.F(int64(174)), DateEnd: cloudflare.F(time.Now()), DateRange: cloudflare.F(radar.AnnotationOutageGetParamsDateRange7d), DateStart: cloudflare.F(time.Now()), diff --git a/radar/bgproute_test.go b/radar/bgproute_test.go index b6da03886e..ea6e529d24 100644 --- a/radar/bgproute_test.go +++ b/radar/bgproute_test.go @@ -89,7 +89,7 @@ func TestBGPRouteStatsWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.Radar.BGP.Routes.Stats(context.TODO(), radar.BGPRouteStatsParams{ - ASN: cloudflare.F(int64(0)), + ASN: cloudflare.F(int64(174)), Format: cloudflare.F(radar.BGPRouteStatsParamsFormatJson), Location: cloudflare.F("US"), }) @@ -117,7 +117,7 @@ func TestBGPRouteTimeseriesWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.Radar.BGP.Routes.Timeseries(context.TODO(), radar.BGPRouteTimeseriesParams{ - ASN: cloudflare.F(int64(0)), + ASN: cloudflare.F(int64(174)), DateEnd: cloudflare.F(time.Now()), DateRange: cloudflare.F(radar.BGPRouteTimeseriesParamsDateRange7d), DateStart: cloudflare.F(time.Now()), diff --git a/radar/trafficanomaly_test.go b/radar/trafficanomaly_test.go index a253eab664..ed7eb4547c 100644 --- a/radar/trafficanomaly_test.go +++ b/radar/trafficanomaly_test.go @@ -30,7 +30,7 @@ func TestTrafficAnomalyGetWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.Radar.TrafficAnomalies.Get(context.TODO(), radar.TrafficAnomalyGetParams{ - ASN: cloudflare.F(int64(0)), + ASN: cloudflare.F(int64(174)), DateEnd: cloudflare.F(time.Now()), DateRange: cloudflare.F(radar.TrafficAnomalyGetParamsDateRange7d), DateStart: cloudflare.F(time.Now()), diff --git a/zero_trust/dexhttptest_test.go b/zero_trust/dexhttptest_test.go index 3af4078a3b..228bcf32ad 100644 --- a/zero_trust/dexhttptest_test.go +++ b/zero_trust/dexhttptest_test.go @@ -34,8 +34,8 @@ func TestDEXHTTPTestGetWithOptionalParams(t *testing.T) { zero_trust.DEXHTTPTestGetParams{ AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"), Interval: cloudflare.F(zero_trust.DexhttpTestGetParamsIntervalMinute), - TimeEnd: cloudflare.F("string"), - TimeStart: cloudflare.F("string"), + TimeEnd: cloudflare.F("1689606812000"), + TimeStart: cloudflare.F("1689520412000"), Colo: cloudflare.F("string"), DeviceID: cloudflare.F([]string{"string", "string", "string"}), }, diff --git a/zero_trust/dextraceroutetest_test.go b/zero_trust/dextraceroutetest_test.go index 937aabd6cf..f676550663 100644 --- a/zero_trust/dextraceroutetest_test.go +++ b/zero_trust/dextraceroutetest_test.go @@ -34,8 +34,8 @@ func TestDEXTracerouteTestGetWithOptionalParams(t *testing.T) { zero_trust.DEXTracerouteTestGetParams{ AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"), Interval: cloudflare.F(zero_trust.DEXTracerouteTestGetParamsIntervalMinute), - TimeEnd: cloudflare.F("string"), - TimeStart: cloudflare.F("string"), + TimeEnd: cloudflare.F("1689606812000"), + TimeStart: cloudflare.F("1689520412000"), Colo: cloudflare.F("string"), DeviceID: cloudflare.F([]string{"string", "string", "string"}), }, @@ -70,8 +70,8 @@ func TestDEXTracerouteTestNetworkPath(t *testing.T) { AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"), DeviceID: cloudflare.F("string"), Interval: cloudflare.F(zero_trust.DEXTracerouteTestNetworkPathParamsIntervalMinute), - TimeEnd: cloudflare.F("string"), - TimeStart: cloudflare.F("string"), + TimeEnd: cloudflare.F("1689606812000"), + TimeStart: cloudflare.F("1689520412000"), }, ) if err != nil { From 996eeec918c0a8f129096d0d7134634c39ec174c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 09:00:03 +0000 Subject: [PATCH 012/127] feat(api): OpenAPI spec update via Stainless API (#1853) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 909fd2a314..fc798ed397 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1266 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1117455d139246587bb583bb4cb4c402c3757e6ab4ad31d325b6657ac6fa6a0b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-49f76419cc2a59542243966b63bcf71aeac4f3106abae210208550330a30834a.yml From aa705007ed526f28ae9f18866850405ca59c29d3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 09:01:42 +0000 Subject: [PATCH 013/127] feat(api): OpenAPI spec update via Stainless API (#1854) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index fc798ed397..909fd2a314 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1266 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-49f76419cc2a59542243966b63bcf71aeac4f3106abae210208550330a30834a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1117455d139246587bb583bb4cb4c402c3757e6ab4ad31d325b6657ac6fa6a0b.yml From 1fa8a1ce2c22332eac846b93fa08049e00a3fe20 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 15:13:12 +0000 Subject: [PATCH 014/127] feat(api): OpenAPI spec update via Stainless API (#1855) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 909fd2a314..9cdccca94a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1266 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1117455d139246587bb583bb4cb4c402c3757e6ab4ad31d325b6657ac6fa6a0b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-266150f6704d884ab11a26e9d2277ad51eab84d4d1e1c2bb2fe53ccb059a3716.yml From e1b6ec936b95eda66bc2cb39244d802441286072 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 15:42:37 +0000 Subject: [PATCH 015/127] feat(api): OpenAPI spec update via Stainless API (#1856) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 9cdccca94a..113f130f45 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1266 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-266150f6704d884ab11a26e9d2277ad51eab84d4d1e1c2bb2fe53ccb059a3716.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4f0694869a2da3cbfcc749f0c718b6f45464c72e586046527d6e04c06210b0ca.yml From a7d27336921cc72a8c0e35e374d74a5d6416159b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 16:40:54 +0000 Subject: [PATCH 016/127] feat(api): OpenAPI spec update via Stainless API (#1857) --- .stats.yml | 2 +- bot_management/botmanagement.go | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.stats.yml b/.stats.yml index 113f130f45..8200d3d035 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1266 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4f0694869a2da3cbfcc749f0c718b6f45464c72e586046527d6e04c06210b0ca.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c4098fcb3861719a0115fe0bd93ede436f466e42ea623f1ed1feeb1f126d9c3d.yml diff --git a/bot_management/botmanagement.go b/bot_management/botmanagement.go index c188f273fe..ff991afe8b 100644 --- a/bot_management/botmanagement.go +++ b/bot_management/botmanagement.go @@ -796,11 +796,11 @@ func (r BotManagementUpdateParamsBodySBFMLikelyAutomated) IsKnown() bool { } type BotManagementUpdateResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result BotManagementUpdateResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success BotManagementUpdateResponseEnvelopeSuccess `json:"success,required"` + Result BotManagementUpdateResponse `json:"result"` JSON botManagementUpdateResponseEnvelopeJSON `json:"-"` } @@ -809,8 +809,8 @@ type BotManagementUpdateResponseEnvelope struct { type botManagementUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -844,11 +844,11 @@ type BotManagementGetParams struct { } type BotManagementGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result BotManagementGetResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success BotManagementGetResponseEnvelopeSuccess `json:"success,required"` + Result BotManagementGetResponse `json:"result"` JSON botManagementGetResponseEnvelopeJSON `json:"-"` } @@ -857,8 +857,8 @@ type BotManagementGetResponseEnvelope struct { type botManagementGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } From ee3b21ec7b9e00cf033160c5179ea66de2bf0d37 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 16:42:35 +0000 Subject: [PATCH 017/127] feat(api): OpenAPI spec update via Stainless API (#1858) --- .stats.yml | 2 +- bot_management/botmanagement.go | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8200d3d035..113f130f45 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1266 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c4098fcb3861719a0115fe0bd93ede436f466e42ea623f1ed1feeb1f126d9c3d.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4f0694869a2da3cbfcc749f0c718b6f45464c72e586046527d6e04c06210b0ca.yml diff --git a/bot_management/botmanagement.go b/bot_management/botmanagement.go index ff991afe8b..c188f273fe 100644 --- a/bot_management/botmanagement.go +++ b/bot_management/botmanagement.go @@ -796,11 +796,11 @@ func (r BotManagementUpdateParamsBodySBFMLikelyAutomated) IsKnown() bool { } type BotManagementUpdateResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result BotManagementUpdateResponse `json:"result,required"` // Whether the API call was successful Success BotManagementUpdateResponseEnvelopeSuccess `json:"success,required"` - Result BotManagementUpdateResponse `json:"result"` JSON botManagementUpdateResponseEnvelopeJSON `json:"-"` } @@ -809,8 +809,8 @@ type BotManagementUpdateResponseEnvelope struct { type botManagementUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -844,11 +844,11 @@ type BotManagementGetParams struct { } type BotManagementGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result BotManagementGetResponse `json:"result,required"` // Whether the API call was successful Success BotManagementGetResponseEnvelopeSuccess `json:"success,required"` - Result BotManagementGetResponse `json:"result"` JSON botManagementGetResponseEnvelopeJSON `json:"-"` } @@ -857,8 +857,8 @@ type BotManagementGetResponseEnvelope struct { type botManagementGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } From 1fb50751f2ad67e840f7e1dc8860fcef0622f29f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 16:53:14 +0000 Subject: [PATCH 018/127] feat(api): OpenAPI spec update via Stainless API (#1859) --- .stats.yml | 2 +- bot_management/botmanagement.go | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.stats.yml b/.stats.yml index 113f130f45..8200d3d035 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1266 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4f0694869a2da3cbfcc749f0c718b6f45464c72e586046527d6e04c06210b0ca.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c4098fcb3861719a0115fe0bd93ede436f466e42ea623f1ed1feeb1f126d9c3d.yml diff --git a/bot_management/botmanagement.go b/bot_management/botmanagement.go index c188f273fe..ff991afe8b 100644 --- a/bot_management/botmanagement.go +++ b/bot_management/botmanagement.go @@ -796,11 +796,11 @@ func (r BotManagementUpdateParamsBodySBFMLikelyAutomated) IsKnown() bool { } type BotManagementUpdateResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result BotManagementUpdateResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success BotManagementUpdateResponseEnvelopeSuccess `json:"success,required"` + Result BotManagementUpdateResponse `json:"result"` JSON botManagementUpdateResponseEnvelopeJSON `json:"-"` } @@ -809,8 +809,8 @@ type BotManagementUpdateResponseEnvelope struct { type botManagementUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -844,11 +844,11 @@ type BotManagementGetParams struct { } type BotManagementGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result BotManagementGetResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success BotManagementGetResponseEnvelopeSuccess `json:"success,required"` + Result BotManagementGetResponse `json:"result"` JSON botManagementGetResponseEnvelopeJSON `json:"-"` } @@ -857,8 +857,8 @@ type BotManagementGetResponseEnvelope struct { type botManagementGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } From 1f57de4f37dbb9626d115bd2b55a4e36bd0d0eed Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 16:54:56 +0000 Subject: [PATCH 019/127] feat(api): OpenAPI spec update via Stainless API (#1860) --- .stats.yml | 4 +- api.md | 26 ---- shared/union.go | 1 - snippets/content.go | 14 -- snippets/content_test.go | 56 -------- snippets/rule.go | 166 ----------------------- snippets/rule_test.go | 84 ------------ snippets/snippet.go | 276 --------------------------------------- snippets/snippet_test.go | 129 ------------------ 9 files changed, 2 insertions(+), 754 deletions(-) delete mode 100644 snippets/content_test.go delete mode 100644 snippets/rule_test.go delete mode 100644 snippets/snippet_test.go diff --git a/.stats.yml b/.stats.yml index 8200d3d035..a0d0f16ebb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1266 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c4098fcb3861719a0115fe0bd93ede436f466e42ea623f1ed1feeb1f126d9c3d.yml +configured_endpoints: 1259 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-eaeee7cb7327c83a8a9dca926a685e6e2aedc0f64ede2722f8a9004610dc8b3a.yml diff --git a/api.md b/api.md index 1ab636bfe9..142d07d832 100644 --- a/api.md +++ b/api.md @@ -6673,36 +6673,10 @@ Methods: # Snippets -Response Types: - -- snippets.Snippet -- snippets.SnippetDeleteResponseUnion - -Methods: - -- client.Snippets.Update(ctx context.Context, zoneIdentifier string, snippetName string, body snippets.SnippetUpdateParams) (snippets.Snippet, error) -- client.Snippets.List(ctx context.Context, zoneIdentifier string) (pagination.SinglePage[snippets.Snippet], error) -- client.Snippets.Delete(ctx context.Context, zoneIdentifier string, snippetName string) (snippets.SnippetDeleteResponseUnion, error) -- client.Snippets.Get(ctx context.Context, zoneIdentifier string, snippetName string) (snippets.Snippet, error) - ## Content -Methods: - -- client.Snippets.Content.Get(ctx context.Context, zoneIdentifier string, snippetName string) (http.Response, error) - ## Rules -Response Types: - -- snippets.RuleUpdateResponse -- snippets.RuleListResponse - -Methods: - -- client.Snippets.Rules.Update(ctx context.Context, zoneIdentifier string, body snippets.RuleUpdateParams) ([]snippets.RuleUpdateResponse, error) -- client.Snippets.Rules.List(ctx context.Context, zoneIdentifier string) (pagination.SinglePage[snippets.RuleListResponse], error) - # Calls Response Types: diff --git a/shared/union.go b/shared/union.go index a815e1fec6..d895ef68a2 100644 --- a/shared/union.go +++ b/shared/union.go @@ -165,7 +165,6 @@ func (UnionString) ImplementsOriginPostQuantumEncryptionOriginPostQuantumEncrypt } func (UnionString) ImplementsHostnamesSettingValueUnionParam() {} func (UnionString) ImplementsHostnamesSettingValueUnion() {} -func (UnionString) ImplementsSnippetsSnippetDeleteResponseUnion() {} func (UnionString) ImplementsCloudforceOneRequestDeleteResponseUnion() {} func (UnionString) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() {} func (UnionString) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() {} diff --git a/snippets/content.go b/snippets/content.go index 887a34ee66..fccdefc648 100644 --- a/snippets/content.go +++ b/snippets/content.go @@ -3,11 +3,6 @@ package snippets import ( - "context" - "fmt" - "net/http" - - "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" ) @@ -27,12 +22,3 @@ func NewContentService(opts ...option.RequestOption) (r *ContentService) { r.Options = opts return } - -// Snippet Content -func (r *ContentService) Get(ctx context.Context, zoneIdentifier string, snippetName string, opts ...option.RequestOption) (res *http.Response, err error) { - opts = append(r.Options[:], opts...) - opts = append([]option.RequestOption{option.WithHeader("Accept", "multipart/form-data")}, opts...) - path := fmt.Sprintf("zones/%s/snippets/%s/content", zoneIdentifier, snippetName) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) - return -} diff --git a/snippets/content_test.go b/snippets/content_test.go deleted file mode 100644 index b62bfc933b..0000000000 --- a/snippets/content_test.go +++ /dev/null @@ -1,56 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -package snippets_test - -import ( - "bytes" - "context" - "errors" - "io" - "net/http" - "net/http/httptest" - "testing" - - "github.com/cloudflare/cloudflare-go/v2" - "github.com/cloudflare/cloudflare-go/v2/option" -) - -func TestContentGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(200) - w.Write([]byte("abc")) - })) - defer server.Close() - baseURL := server.URL - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - resp, err := client.Snippets.Content.Get( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - "snippet_name_01", - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } - defer resp.Body.Close() - - b, err := io.ReadAll(resp.Body) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } - if !bytes.Equal(b, []byte("abc")) { - t.Fatalf("return value not %s: %s", "abc", b) - } -} diff --git a/snippets/rule.go b/snippets/rule.go index 1cd73b9a24..5504717e45 100644 --- a/snippets/rule.go +++ b/snippets/rule.go @@ -3,16 +3,7 @@ package snippets import ( - "context" - "fmt" - "net/http" - - "github.com/cloudflare/cloudflare-go/v2/internal/apijson" - "github.com/cloudflare/cloudflare-go/v2/internal/pagination" - "github.com/cloudflare/cloudflare-go/v2/internal/param" - "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" - "github.com/cloudflare/cloudflare-go/v2/shared" ) // RuleService contains methods and other services that help with interacting with @@ -31,160 +22,3 @@ func NewRuleService(opts ...option.RequestOption) (r *RuleService) { r.Options = opts return } - -// Put Rules -func (r *RuleService) Update(ctx context.Context, zoneIdentifier string, body RuleUpdateParams, opts ...option.RequestOption) (res *[]RuleUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - var env RuleUpdateResponseEnvelope - path := fmt.Sprintf("zones/%s/snippets/snippet_rules", zoneIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// Rules -func (r *RuleService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *pagination.SinglePage[RuleListResponse], err error) { - var raw *http.Response - opts = append(r.Options, opts...) - opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) - path := fmt.Sprintf("zones/%s/snippets/snippet_rules", zoneIdentifier) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) - if err != nil { - return nil, err - } - err = cfg.Execute() - if err != nil { - return nil, err - } - res.SetPageConfig(cfg, raw) - return res, nil -} - -// Rules -func (r *RuleService) ListAutoPaging(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) *pagination.SinglePageAutoPager[RuleListResponse] { - return pagination.NewSinglePageAutoPager(r.List(ctx, zoneIdentifier, opts...)) -} - -type RuleUpdateResponse struct { - Description string `json:"description"` - Enabled bool `json:"enabled"` - Expression string `json:"expression"` - // Snippet identifying name - SnippetName string `json:"snippet_name"` - JSON ruleUpdateResponseJSON `json:"-"` -} - -// ruleUpdateResponseJSON contains the JSON metadata for the struct -// [RuleUpdateResponse] -type ruleUpdateResponseJSON struct { - Description apijson.Field - Enabled apijson.Field - Expression apijson.Field - SnippetName apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RuleUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ruleUpdateResponseJSON) RawJSON() string { - return r.raw -} - -type RuleListResponse struct { - Description string `json:"description"` - Enabled bool `json:"enabled"` - Expression string `json:"expression"` - // Snippet identifying name - SnippetName string `json:"snippet_name"` - JSON ruleListResponseJSON `json:"-"` -} - -// ruleListResponseJSON contains the JSON metadata for the struct -// [RuleListResponse] -type ruleListResponseJSON struct { - Description apijson.Field - Enabled apijson.Field - Expression apijson.Field - SnippetName apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RuleListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ruleListResponseJSON) RawJSON() string { - return r.raw -} - -type RuleUpdateParams struct { - // List of snippet rules - Rules param.Field[[]RuleUpdateParamsRule] `json:"rules"` -} - -func (r RuleUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type RuleUpdateParamsRule struct { - Description param.Field[string] `json:"description"` - Enabled param.Field[bool] `json:"enabled"` - Expression param.Field[string] `json:"expression"` - // Snippet identifying name - SnippetName param.Field[string] `json:"snippet_name"` -} - -func (r RuleUpdateParamsRule) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type RuleUpdateResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // List of snippet rules - Result []RuleUpdateResponse `json:"result,required"` - // Whether the API call was successful - Success RuleUpdateResponseEnvelopeSuccess `json:"success,required"` - JSON ruleUpdateResponseEnvelopeJSON `json:"-"` -} - -// ruleUpdateResponseEnvelopeJSON contains the JSON metadata for the struct -// [RuleUpdateResponseEnvelope] -type ruleUpdateResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RuleUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r ruleUpdateResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RuleUpdateResponseEnvelopeSuccess bool - -const ( - RuleUpdateResponseEnvelopeSuccessTrue RuleUpdateResponseEnvelopeSuccess = true -) - -func (r RuleUpdateResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RuleUpdateResponseEnvelopeSuccessTrue: - return true - } - return false -} diff --git a/snippets/rule_test.go b/snippets/rule_test.go deleted file mode 100644 index 297ff78171..0000000000 --- a/snippets/rule_test.go +++ /dev/null @@ -1,84 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -package snippets_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-go/v2" - "github.com/cloudflare/cloudflare-go/v2/internal/testutil" - "github.com/cloudflare/cloudflare-go/v2/option" - "github.com/cloudflare/cloudflare-go/v2/snippets" -) - -func TestRuleUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.Snippets.Rules.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - snippets.RuleUpdateParams{ - Rules: cloudflare.F([]snippets.RuleUpdateParamsRule{{ - Description: cloudflare.F("Rule description"), - Enabled: cloudflare.F(true), - Expression: cloudflare.F("http.cookie eq \"a=b\""), - SnippetName: cloudflare.F("snippet_name_01"), - }, { - Description: cloudflare.F("Rule description"), - Enabled: cloudflare.F(true), - Expression: cloudflare.F("http.cookie eq \"a=b\""), - SnippetName: cloudflare.F("snippet_name_01"), - }, { - Description: cloudflare.F("Rule description"), - Enabled: cloudflare.F(true), - Expression: cloudflare.F("http.cookie eq \"a=b\""), - SnippetName: cloudflare.F("snippet_name_01"), - }}), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestRuleList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.Snippets.Rules.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/snippets/snippet.go b/snippets/snippet.go index e6d72ea38c..ae4c416e63 100644 --- a/snippets/snippet.go +++ b/snippets/snippet.go @@ -3,18 +3,7 @@ package snippets import ( - "context" - "fmt" - "net/http" - "reflect" - - "github.com/cloudflare/cloudflare-go/v2/internal/apijson" - "github.com/cloudflare/cloudflare-go/v2/internal/pagination" - "github.com/cloudflare/cloudflare-go/v2/internal/param" - "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" - "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // SnippetService contains methods and other services that help with interacting @@ -37,268 +26,3 @@ func NewSnippetService(opts ...option.RequestOption) (r *SnippetService) { r.Rules = NewRuleService(opts...) return } - -// Put Snippet -func (r *SnippetService) Update(ctx context.Context, zoneIdentifier string, snippetName string, body SnippetUpdateParams, opts ...option.RequestOption) (res *Snippet, err error) { - opts = append(r.Options[:], opts...) - var env SnippetUpdateResponseEnvelope - path := fmt.Sprintf("zones/%s/snippets/%s", zoneIdentifier, snippetName) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// All Snippets -func (r *SnippetService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *pagination.SinglePage[Snippet], err error) { - var raw *http.Response - opts = append(r.Options, opts...) - opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) - path := fmt.Sprintf("zones/%s/snippets", zoneIdentifier) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) - if err != nil { - return nil, err - } - err = cfg.Execute() - if err != nil { - return nil, err - } - res.SetPageConfig(cfg, raw) - return res, nil -} - -// All Snippets -func (r *SnippetService) ListAutoPaging(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Snippet] { - return pagination.NewSinglePageAutoPager(r.List(ctx, zoneIdentifier, opts...)) -} - -// Delete Snippet -func (r *SnippetService) Delete(ctx context.Context, zoneIdentifier string, snippetName string, opts ...option.RequestOption) (res *SnippetDeleteResponseUnion, err error) { - opts = append(r.Options[:], opts...) - var env SnippetDeleteResponseEnvelope - path := fmt.Sprintf("zones/%s/snippets/%s", zoneIdentifier, snippetName) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// Snippet -func (r *SnippetService) Get(ctx context.Context, zoneIdentifier string, snippetName string, opts ...option.RequestOption) (res *Snippet, err error) { - opts = append(r.Options[:], opts...) - var env SnippetGetResponseEnvelope - path := fmt.Sprintf("zones/%s/snippets/%s", zoneIdentifier, snippetName) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// Snippet Information -type Snippet struct { - // Creation time of the snippet - CreatedOn string `json:"created_on"` - // Modification time of the snippet - ModifiedOn string `json:"modified_on"` - // Snippet identifying name - SnippetName string `json:"snippet_name"` - JSON snippetJSON `json:"-"` -} - -// snippetJSON contains the JSON metadata for the struct [Snippet] -type snippetJSON struct { - CreatedOn apijson.Field - ModifiedOn apijson.Field - SnippetName apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *Snippet) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r snippetJSON) RawJSON() string { - return r.raw -} - -// Union satisfied by [snippets.SnippetDeleteResponseUnknown], -// [snippets.SnippetDeleteResponseArray] or [shared.UnionString]. -type SnippetDeleteResponseUnion interface { - ImplementsSnippetsSnippetDeleteResponseUnion() -} - -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*SnippetDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(SnippetDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) -} - -type SnippetDeleteResponseArray []interface{} - -func (r SnippetDeleteResponseArray) ImplementsSnippetsSnippetDeleteResponseUnion() {} - -type SnippetUpdateParams struct { - // Content files of uploaded snippet - Files param.Field[string] `json:"files"` - Metadata param.Field[SnippetUpdateParamsMetadata] `json:"metadata"` -} - -func (r SnippetUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type SnippetUpdateParamsMetadata struct { - // Main module name of uploaded snippet - MainModule param.Field[string] `json:"main_module"` -} - -func (r SnippetUpdateParamsMetadata) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type SnippetUpdateResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Snippet Information - Result Snippet `json:"result,required"` - // Whether the API call was successful - Success SnippetUpdateResponseEnvelopeSuccess `json:"success,required"` - JSON snippetUpdateResponseEnvelopeJSON `json:"-"` -} - -// snippetUpdateResponseEnvelopeJSON contains the JSON metadata for the struct -// [SnippetUpdateResponseEnvelope] -type snippetUpdateResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SnippetUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r snippetUpdateResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type SnippetUpdateResponseEnvelopeSuccess bool - -const ( - SnippetUpdateResponseEnvelopeSuccessTrue SnippetUpdateResponseEnvelopeSuccess = true -) - -func (r SnippetUpdateResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case SnippetUpdateResponseEnvelopeSuccessTrue: - return true - } - return false -} - -type SnippetDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result SnippetDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success SnippetDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON snippetDeleteResponseEnvelopeJSON `json:"-"` -} - -// snippetDeleteResponseEnvelopeJSON contains the JSON metadata for the struct -// [SnippetDeleteResponseEnvelope] -type snippetDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SnippetDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r snippetDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type SnippetDeleteResponseEnvelopeSuccess bool - -const ( - SnippetDeleteResponseEnvelopeSuccessTrue SnippetDeleteResponseEnvelopeSuccess = true -) - -func (r SnippetDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case SnippetDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - -type SnippetGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Snippet Information - Result Snippet `json:"result,required"` - // Whether the API call was successful - Success SnippetGetResponseEnvelopeSuccess `json:"success,required"` - JSON snippetGetResponseEnvelopeJSON `json:"-"` -} - -// snippetGetResponseEnvelopeJSON contains the JSON metadata for the struct -// [SnippetGetResponseEnvelope] -type snippetGetResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SnippetGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r snippetGetResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type SnippetGetResponseEnvelopeSuccess bool - -const ( - SnippetGetResponseEnvelopeSuccessTrue SnippetGetResponseEnvelopeSuccess = true -) - -func (r SnippetGetResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case SnippetGetResponseEnvelopeSuccessTrue: - return true - } - return false -} diff --git a/snippets/snippet_test.go b/snippets/snippet_test.go deleted file mode 100644 index a549e952c0..0000000000 --- a/snippets/snippet_test.go +++ /dev/null @@ -1,129 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -package snippets_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-go/v2" - "github.com/cloudflare/cloudflare-go/v2/internal/testutil" - "github.com/cloudflare/cloudflare-go/v2/option" - "github.com/cloudflare/cloudflare-go/v2/snippets" -) - -func TestSnippetUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.Snippets.Update( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - "snippet_name_01", - snippets.SnippetUpdateParams{ - Files: cloudflare.F("export { async function fetch(request, env) {return new Response('some_response') } }"), - Metadata: cloudflare.F(snippets.SnippetUpdateParamsMetadata{ - MainModule: cloudflare.F("main.js"), - }), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestSnippetList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.Snippets.List(context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353") - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestSnippetDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.Snippets.Delete( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - "snippet_name_01", - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestSnippetGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.Snippets.Get( - context.TODO(), - "023e105f4ecef8ad9ca31a8372d0c353", - "snippet_name_01", - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} From de62d6c1179a4edfe129b8da642cb09e5904ad25 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 17:14:57 +0000 Subject: [PATCH 020/127] feat(api): OpenAPI spec update via Stainless API (#1862) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index a0d0f16ebb..db4425733d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1259 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-eaeee7cb7327c83a8a9dca926a685e6e2aedc0f64ede2722f8a9004610dc8b3a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1f0167c5fee5c0cadf72c222f47f8fc3ba43905607b21f6a88853c061117b77b.yml From eea4b41517d42813f342ce912054e090ec2dde96 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 19:14:58 +0000 Subject: [PATCH 021/127] feat(api): OpenAPI spec update via Stainless API (#1863) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index db4425733d..a0d0f16ebb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1259 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1f0167c5fee5c0cadf72c222f47f8fc3ba43905607b21f6a88853c061117b77b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-eaeee7cb7327c83a8a9dca926a685e6e2aedc0f64ede2722f8a9004610dc8b3a.yml From 8baf2a6f4c7fc725ea449b61a70148fa0a33eb5d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 20:53:29 +0000 Subject: [PATCH 022/127] feat(api): OpenAPI spec update via Stainless API (#1864) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index a0d0f16ebb..db4425733d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1259 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-eaeee7cb7327c83a8a9dca926a685e6e2aedc0f64ede2722f8a9004610dc8b3a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1f0167c5fee5c0cadf72c222f47f8fc3ba43905607b21f6a88853c061117b77b.yml From 202f0843e5f0686ab738d98dcaa65ed86a62260d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 21:51:25 +0000 Subject: [PATCH 023/127] feat(api): update via SDK Studio (#1865) --- accounts/account_test.go | 3 --- accounts/member_test.go | 6 +----- accounts/role_test.go | 2 -- acm/totaltls_test.go | 2 -- addressing/addressmap_test.go | 5 ----- addressing/addressmapaccount_test.go | 2 -- addressing/addressmapip_test.go | 2 -- addressing/addressmapzone_test.go | 2 -- addressing/loadocument_test.go | 2 +- addressing/loadocumentdownload_test.go | 1 - addressing/prefix_test.go | 5 ----- addressing/prefixbgpbinding_test.go | 4 ---- addressing/prefixbgpprefix_test.go | 3 --- addressing/prefixbgpstatus_test.go | 2 -- addressing/prefixdelegation_test.go | 3 --- addressing/service_test.go | 1 - alerting/availablealert_test.go | 1 - alerting/destinationeligible_test.go | 1 - alerting/destinationpagerduty_test.go | 4 ---- alerting/destinationwebhook_test.go | 5 ----- alerting/history_test.go | 1 - alerting/policy_test.go | 5 ----- argo/smartrouting_test.go | 2 -- argo/tieredcaching_test.go | 2 -- audit_logs/auditlog_test.go | 1 - billing/profile_test.go | 1 - bot_management/botmanagement_test.go | 2 -- brand_protection/brandprotection_test.go | 2 -- cache/cache_test.go | 1 - cache/cachereserve_test.go | 4 ---- cache/regionaltieredcache_test.go | 2 -- cache/smarttieredcache_test.go | 3 --- cache/variant_test.go | 3 --- calls/call_test.go | 5 ----- certificate_authorities/hostnameassociation_test.go | 2 -- challenges/widget_test.go | 6 ------ client_certificates/clientcertificate_test.go | 5 ----- cloudforce_one/request_test.go | 8 -------- cloudforce_one/requestmessage_test.go | 4 ---- cloudforce_one/requestpriority_test.go | 5 ----- custom_certificates/customcertificate_test.go | 5 ----- custom_certificates/prioritize_test.go | 1 - custom_hostnames/customhostname_test.go | 5 ----- custom_hostnames/fallbackorigin_test.go | 3 --- custom_nameservers/customnameserver_test.go | 5 ----- d1/database_test.go | 5 ----- dcv_delegation/uuid_test.go | 1 - diagnostics/traceroute_test.go | 1 - dns/analyticsreport_test.go | 1 - dns/analyticsreportbytime_test.go | 1 - dns/firewall_test.go | 5 ----- dns/firewallanalyticsreport_test.go | 1 - dns/firewallanalyticsreportbytime_test.go | 1 - dns/record_test.go | 13 ++++--------- dnssec/dnssec_test.go | 3 --- durable_objects/namespace_test.go | 1 - durable_objects/namespaceobject_test.go | 1 - email_routing/address_test.go | 4 ---- email_routing/dns_test.go | 1 - email_routing/emailrouting_test.go | 3 --- email_routing/rule_test.go | 5 ----- email_routing/rulecatchall_test.go | 2 -- event_notifications/r2configuration_test.go | 1 - event_notifications/r2configurationqueue_test.go | 2 -- filters/filter_test.go | 7 ++----- firewall/accessrule_test.go | 10 +++++----- firewall/lockdown_test.go | 7 ++----- firewall/rule_test.go | 9 +++------ firewall/uarule_test.go | 7 ++----- firewall/wafoverride_test.go | 7 ++----- firewall/wafpackage_test.go | 3 +-- firewall/wafpackagegroup_test.go | 3 --- firewall/wafpackagerule_test.go | 3 --- healthchecks/healthcheck_test.go | 6 ------ healthchecks/preview_test.go | 3 --- hostnames/settingtls_test.go | 3 --- hyperdrive/config_test.go | 9 +++------ images/v1_test.go | 6 +----- images/v1blob_test.go | 1 - images/v1key_test.go | 3 --- images/v1stat_test.go | 1 - images/v1variant_test.go | 5 ----- images/v2_test.go | 1 - images/v2directupload_test.go | 2 +- intel/asn_test.go | 1 - intel/asnsubnet_test.go | 1 - intel/attacksurfacereportissue_test.go | 5 ----- intel/attacksurfacereportissuetype_test.go | 1 - intel/dns_test.go | 1 - intel/domain_test.go | 1 - intel/domainbulk_test.go | 1 - intel/domainhistory_test.go | 1 - intel/indicatorfeed_test.go | 6 +----- intel/indicatorfeedpermission_test.go | 3 --- intel/ip_test.go | 1 - intel/iplist_test.go | 1 - intel/miscategorization_test.go | 1 - intel/sinkhole_test.go | 1 - intel/whois_test.go | 1 - ips/ip_test.go | 1 - keyless_certificates/keylesscertificate_test.go | 5 ----- kv/namespace_test.go | 4 ---- kv/namespacebulk_test.go | 2 -- kv/namespacekey_test.go | 1 - kv/namespacemetadata_test.go | 1 - kv/namespacevalue_test.go | 4 +--- load_balancers/loadbalancer_test.go | 6 ------ load_balancers/monitor_test.go | 6 ------ load_balancers/monitorpreview_test.go | 1 - load_balancers/monitorreference_test.go | 1 - load_balancers/pool_test.go | 6 ------ load_balancers/poolhealth_test.go | 2 -- load_balancers/poolreference_test.go | 1 - load_balancers/preview_test.go | 1 - load_balancers/region_test.go | 2 -- load_balancers/search_test.go | 2 +- logpush/datasetfield_test.go | 2 +- logpush/datasetjob_test.go | 2 +- logpush/edge_test.go | 2 -- logpush/job_test.go | 10 +++++----- logpush/ownership_test.go | 4 ++-- logpush/validate_test.go | 4 ++-- logs/controlcmbconfig_test.go | 3 --- logs/controlretentionflag_test.go | 2 -- logs/rayid_test.go | 1 - logs/received_test.go | 1 - logs/receivedfield_test.go | 1 - magic_network_monitoring/config_test.go | 5 ----- magic_network_monitoring/configfull_test.go | 1 - magic_network_monitoring/rule_test.go | 6 ------ magic_network_monitoring/ruleadvertisement_test.go | 1 - magic_transit/cfinterconnect_test.go | 3 --- magic_transit/gretunnel_test.go | 6 +----- magic_transit/ipsectunnel_test.go | 6 ------ magic_transit/route_test.go | 7 +------ magic_transit/site_test.go | 5 ----- magic_transit/siteacl_test.go | 5 ----- magic_transit/sitelan_test.go | 5 ----- magic_transit/sitewan_test.go | 5 ----- managed_headers/managedheader_test.go | 2 -- memberships/membership_test.go | 4 ---- mtls_certificates/association_test.go | 1 - mtls_certificates/mtlscertificate_test.go | 4 ---- origin_ca_certificates/origincacertificate_test.go | 4 ---- .../originpostquantumencryption_test.go | 4 ++-- origin_tls_client_auth/hostname_test.go | 2 -- origin_tls_client_auth/hostnamecertificate_test.go | 4 ---- origin_tls_client_auth/origintlsclientauth_test.go | 4 ---- origin_tls_client_auth/setting_test.go | 2 -- page_shield/connection_test.go | 2 -- page_shield/pageshield_test.go | 2 -- page_shield/policy_test.go | 5 ----- page_shield/script_test.go | 2 -- pagerules/pagerule_test.go | 6 ------ pagerules/setting_test.go | 1 - pages/project_test.go | 6 ------ pages/projectdeployment_test.go | 7 +------ pages/projectdeploymenthistorylog_test.go | 1 - pages/projectdomain_test.go | 5 ----- pcaps/download_test.go | 1 - pcaps/ownership_test.go | 4 ---- pcaps/pcap_test.go | 3 --- plans/plan_test.go | 2 -- queues/consumer_test.go | 4 ---- queues/message_test.go | 2 -- queues/queue_test.go | 5 ----- r2/bucket_test.go | 4 ---- r2/sippy_test.go | 3 --- radar/annotationoutage_test.go | 2 -- radar/as112_test.go | 1 - radar/as112summary_test.go | 6 ------ radar/as112timeseriesgroup_test.go | 6 ------ radar/as112top_test.go | 4 ---- radar/attacklayer3_test.go | 1 - radar/attacklayer3summary_test.go | 6 ------ radar/attacklayer3timeseriesgroup_test.go | 8 -------- radar/attacklayer3top_test.go | 3 --- radar/attacklayer3toplocation_test.go | 2 -- radar/attacklayer7_test.go | 1 - radar/attacklayer7summary_test.go | 6 ------ radar/attacklayer7timeseriesgroup_test.go | 8 -------- radar/attacklayer7top_test.go | 3 --- radar/attacklayer7topase_test.go | 1 - radar/attacklayer7toplocation_test.go | 2 -- radar/bgp_test.go | 1 - radar/bgphijackevent_test.go | 1 - radar/bgpleakevent_test.go | 1 - radar/bgproute_test.go | 4 ---- radar/bgptop_test.go | 1 - radar/bgptopase_test.go | 2 -- radar/connectiontampering_test.go | 2 -- radar/dataset_test.go | 3 --- radar/dnstop_test.go | 2 -- radar/emailroutingsummary_test.go | 6 ------ radar/emailroutingtimeseriesgroup_test.go | 6 ------ radar/emailsecuritysummary_test.go | 9 --------- radar/emailsecuritytimeseriesgroup_test.go | 9 --------- radar/emailsecuritytoptld_test.go | 1 - radar/emailsecuritytoptldmalicious_test.go | 1 - radar/emailsecuritytoptldspam_test.go | 1 - radar/emailsecuritytoptldspoof_test.go | 1 - radar/entity_test.go | 1 - radar/entityasn_test.go | 4 ---- radar/entitylocation_test.go | 2 -- radar/httpase_test.go | 1 - radar/httpasebotclass_test.go | 1 - radar/httpasedevicetype_test.go | 1 - radar/httpasehttpmethod_test.go | 1 - radar/httpasehttpprotocol_test.go | 1 - radar/httpaseipversion_test.go | 1 - radar/httpaseos_test.go | 1 - radar/httpasetlsversion_test.go | 1 - radar/httplocation_test.go | 1 - radar/httplocationbotclass_test.go | 1 - radar/httplocationdevicetype_test.go | 1 - radar/httplocationhttpmethod_test.go | 1 - radar/httplocationhttpprotocol_test.go | 1 - radar/httplocationipversion_test.go | 1 - radar/httplocationos_test.go | 1 - radar/httplocationtlsversion_test.go | 1 - radar/httpsummary_test.go | 7 ------- radar/httptimeseriesgroup_test.go | 9 --------- radar/httptop_test.go | 2 -- radar/netflow_test.go | 1 - radar/netflowtop_test.go | 2 -- radar/qualityiqi_test.go | 2 -- radar/qualityspeed_test.go | 2 -- radar/qualityspeedtop_test.go | 2 -- radar/ranking_test.go | 2 -- radar/rankingdomain_test.go | 1 - radar/search_test.go | 1 - radar/trafficanomaly_test.go | 1 - radar/trafficanomalylocation_test.go | 1 - radar/verifiedbottop_test.go | 2 -- rate_limits/ratelimit_test.go | 7 ++----- rate_plans/rateplan_test.go | 1 - registrar/domain_test.go | 3 --- request_tracers/trace_test.go | 1 - rules/list_test.go | 8 +++----- rules/listbulkoperation_test.go | 1 - rules/listitem_test.go | 5 ----- rulesets/phase_test.go | 4 ++-- rulesets/phaseversion_test.go | 4 ++-- rulesets/rule_test.go | 6 +++--- rulesets/ruleset_test.go | 10 +++++----- rulesets/version_test.go | 6 +++--- rulesets/versionbytag_test.go | 1 - rum/rule_test.go | 4 ---- rum/siteinfo_test.go | 5 ----- secondary_dns/acl_test.go | 6 +----- secondary_dns/forceaxfr_test.go | 1 - secondary_dns/incoming_test.go | 4 ---- secondary_dns/outgoing_test.go | 7 ------- secondary_dns/outgoingstatus_test.go | 1 - secondary_dns/peer_test.go | 6 +----- secondary_dns/tsig_test.go | 5 ----- spectrum/analyticsaggregatecurrent_test.go | 1 - spectrum/analyticseventbytime_test.go | 1 - spectrum/analyticseventsummary_test.go | 1 - spectrum/app_test.go | 5 ----- speed/availability_test.go | 1 - speed/page_test.go | 1 - speed/schedule_test.go | 1 - speed/speed_test.go | 4 +--- speed/test_test.go | 4 ---- ssl/analyze_test.go | 1 - ssl/certificatepack_test.go | 4 ---- ssl/certificatepackorder_test.go | 1 - ssl/certificatepackquota_test.go | 1 - ssl/recommendation_test.go | 1 - ssl/universalsetting_test.go | 2 -- ssl/verification_test.go | 2 -- storage/analytics_test.go | 2 -- stream/audiotrack_test.go | 4 ---- stream/caption_test.go | 1 - stream/captionlanguage_test.go | 4 +--- stream/captionlanguagevtt_test.go | 1 - stream/clip_test.go | 1 - stream/copy_test.go | 1 - stream/directupload_test.go | 1 - stream/download_test.go | 3 --- stream/embed_test.go | 1 - stream/key_test.go | 3 --- stream/liveinput_test.go | 5 ----- stream/liveinputoutput_test.go | 4 ---- stream/stream_test.go | 5 +---- stream/token_test.go | 1 - stream/video_test.go | 1 - stream/watermark_test.go | 5 +---- stream/webhook_test.go | 3 --- subscriptions/subscription_test.go | 5 ----- url_normalization/urlnormalization_test.go | 2 -- url_scanner/scan_test.go | 4 ---- url_scanner/urlscanner_test.go | 1 - user/auditlog_test.go | 1 - user/billinghistory_test.go | 1 - user/billingprofile_test.go | 1 - user/invite_test.go | 3 --- user/organization_test.go | 3 --- user/subscription_test.go | 4 ---- user/token_test.go | 8 ++------ user/tokenpermissiongroup_test.go | 1 - user/tokenvalue_test.go | 1 - user/user_test.go | 2 -- vectorize/index_test.go | 12 ++---------- waiting_rooms/event_test.go | 6 ------ waiting_rooms/eventdetail_test.go | 1 - waiting_rooms/page_test.go | 1 - waiting_rooms/rule_test.go | 5 ----- waiting_rooms/setting_test.go | 3 --- waiting_rooms/status_test.go | 1 - waiting_rooms/waitingroom_test.go | 6 ------ warp_connector/warpconnector_test.go | 6 ------ web3/hostname_test.go | 5 ----- web3/hostnameipfsuniversalpathcontentlist_test.go | 2 -- ...ostnameipfsuniversalpathcontentlistentry_test.go | 5 ----- workers/accountsetting_test.go | 2 -- workers/ai_test.go | 1 - workers/domain_test.go | 4 ---- workers/script_test.go | 5 +---- workers/scriptcontent_test.go | 3 +-- workers/scriptdeployment_test.go | 2 -- workers/scriptschedule_test.go | 2 -- workers/scriptsetting_test.go | 2 -- workers/scripttail_test.go | 3 --- workers/scriptversion_test.go | 4 +--- workers/subdomain_test.go | 2 -- workers_for_platforms/dispatchnamespace_test.go | 4 ---- .../dispatchnamespacescript_test.go | 4 +--- .../dispatchnamespacescriptbinding_test.go | 1 - .../dispatchnamespacescriptcontent_test.go | 3 +-- .../dispatchnamespacescriptsecret_test.go | 2 -- .../dispatchnamespacescriptsetting_test.go | 3 +-- .../dispatchnamespacescripttag_test.go | 3 --- zero_trust/accessapplication_test.go | 12 ++++++------ zero_trust/accessapplicationca_test.go | 8 ++++---- zero_trust/accessapplicationpolicy_test.go | 10 +++++----- zero_trust/accessapplicationuserpolicycheck_test.go | 2 +- zero_trust/accessbookmark_test.go | 5 ----- zero_trust/accesscertificate_test.go | 10 +++++----- zero_trust/accesscertificatesetting_test.go | 4 ++-- zero_trust/accesscustompage_test.go | 5 ----- zero_trust/accessgroup_test.go | 10 +++++----- zero_trust/accesskey_test.go | 3 --- zero_trust/accesslogaccessrequest_test.go | 1 - zero_trust/accessservicetoken_test.go | 10 ++++------ zero_trust/accesstag_test.go | 5 ----- zero_trust/accessuser_test.go | 1 - zero_trust/accessuseractivesession_test.go | 2 -- zero_trust/accessuserfailedlogin_test.go | 1 - zero_trust/accessuserlastseenidentity_test.go | 1 - zero_trust/connectivitysetting_test.go | 2 -- zero_trust/device_test.go | 2 -- zero_trust/devicedextest_test.go | 5 ----- zero_trust/devicenetwork_test.go | 5 ----- zero_trust/deviceoverridecode_test.go | 1 - zero_trust/devicepolicy_test.go | 8 +++----- zero_trust/devicepolicydefaultpolicy_test.go | 1 - zero_trust/devicepolicyexclude_test.go | 3 --- zero_trust/devicepolicyfallbackdomain_test.go | 3 --- zero_trust/devicepolicyinclude_test.go | 3 --- zero_trust/deviceposture_test.go | 5 ----- zero_trust/devicepostureintegration_test.go | 5 ----- zero_trust/devicerevoke_test.go | 1 - zero_trust/devicesetting_test.go | 2 -- zero_trust/deviceunrevoke_test.go | 1 - zero_trust/dexcolo_test.go | 1 - zero_trust/dexfleetstatus_test.go | 2 -- zero_trust/dexfleetstatusdevice_test.go | 2 +- zero_trust/dexhttptest_test.go | 1 - zero_trust/dexhttptestpercentile_test.go | 1 - zero_trust/dextest_test.go | 1 - zero_trust/dextestuniquedevice_test.go | 1 - zero_trust/dextraceroutetest_test.go | 3 --- .../dextraceroutetestresultnetworkpath_test.go | 1 - zero_trust/dlpdataset_test.go | 5 ----- zero_trust/dlpdatasetupload_test.go | 3 +-- zero_trust/dlppattern_test.go | 1 - zero_trust/dlppayloadlog_test.go | 2 -- zero_trust/dlpprofile_test.go | 2 -- zero_trust/dlpprofilecustom_test.go | 4 ---- zero_trust/dlpprofilepredefined_test.go | 2 -- zero_trust/gateway_test.go | 2 -- zero_trust/gatewayapptype_test.go | 1 - zero_trust/gatewayauditsshsetting_test.go | 2 -- zero_trust/gatewaycategory_test.go | 1 - zero_trust/gatewayconfiguration_test.go | 3 --- zero_trust/gatewaylist_test.go | 6 ------ zero_trust/gatewaylistitem_test.go | 1 - zero_trust/gatewaylocation_test.go | 5 ----- zero_trust/gatewaylogging_test.go | 2 -- zero_trust/gatewayproxyendpoint_test.go | 5 ----- zero_trust/gatewayrule_test.go | 5 ----- zero_trust/identityprovider_test.go | 10 +++++----- zero_trust/networkroute_test.go | 4 ---- zero_trust/networkrouteip_test.go | 1 - zero_trust/networkroutenetwork_test.go | 3 --- zero_trust/networkvirtualnetwork_test.go | 4 ---- zero_trust/organization_test.go | 8 ++++---- zero_trust/riskscoring_test.go | 2 -- zero_trust/riskscoringbehaviour_test.go | 2 -- zero_trust/riskscoringsummary_test.go | 1 - zero_trust/seat_test.go | 2 +- zero_trust/tunnel_test.go | 5 ----- zero_trust/tunnelconfiguration_test.go | 2 -- zero_trust/tunnelconnection_test.go | 2 -- zero_trust/tunnelconnector_test.go | 1 - zero_trust/tunnelmanagement_test.go | 1 - zero_trust/tunneltoken_test.go | 1 - zones/activationcheck_test.go | 1 - zones/customnameserver_test.go | 2 -- zones/dnssetting_test.go | 2 -- zones/hold_test.go | 3 --- zones/settingadvancedddos_test.go | 1 - zones/settingalwaysonline_test.go | 2 -- zones/settingalwaysusehttps_test.go | 2 -- zones/settingautomatichttpsrewrite_test.go | 2 -- zones/settingautomaticplatformoptimization_test.go | 2 -- zones/settingbrotli_test.go | 2 -- zones/settingbrowsercachettl_test.go | 2 -- zones/settingbrowsercheck_test.go | 2 -- zones/settingcachelevel_test.go | 2 -- zones/settingchallengettl_test.go | 2 -- zones/settingcipher_test.go | 2 -- zones/settingdevelopmentmode_test.go | 2 -- zones/settingearlyhint_test.go | 2 -- zones/settingemailobfuscation_test.go | 2 -- zones/settingfontsetting_test.go | 2 -- zones/settingh2prioritization_test.go | 2 -- zones/settinghotlinkprotection_test.go | 2 -- zones/settinghttp2_test.go | 2 -- zones/settinghttp3_test.go | 2 -- zones/settingimageresizing_test.go | 2 -- zones/settingipgeolocation_test.go | 2 -- zones/settingipv6_test.go | 2 -- zones/settingminify_test.go | 2 -- zones/settingmintlsversion_test.go | 2 -- zones/settingmirage_test.go | 2 -- zones/settingmobileredirect_test.go | 2 -- zones/settingnel_test.go | 2 -- zones/settingopportunisticencryption_test.go | 2 -- zones/settingopportunisticonion_test.go | 2 -- zones/settingorangetoorange_test.go | 2 -- zones/settingoriginerrorpagepassthru_test.go | 2 -- zones/settingoriginmaxhttpversion_test.go | 2 -- zones/settingpolish_test.go | 2 -- zones/settingprefetchpreload_test.go | 2 -- zones/settingproxyreadtimeout_test.go | 2 -- zones/settingpseudoipv4_test.go | 2 -- zones/settingresponsebuffering_test.go | 2 -- zones/settingrocketloader_test.go | 2 -- zones/settingsecurityheader_test.go | 2 -- zones/settingsecuritylevel_test.go | 2 -- zones/settingserversideexclude_test.go | 2 -- zones/settingsortquerystringforcache_test.go | 2 -- zones/settingssl_test.go | 2 -- zones/settingsslrecommender_test.go | 2 -- zones/settingtls13_test.go | 2 -- zones/settingtlsclientauth_test.go | 2 -- zones/settingtrueclientipheader_test.go | 2 -- zones/settingwaf_test.go | 2 -- zones/settingwebp_test.go | 2 -- zones/settingwebsocket_test.go | 2 -- zones/settingzerortt_test.go | 2 -- zones/subscription_test.go | 3 --- zones/zone_test.go | 4 ---- 466 files changed, 130 insertions(+), 1261 deletions(-) diff --git a/accounts/account_test.go b/accounts/account_test.go index 498f9e3410..dd676ac759 100644 --- a/accounts/account_test.go +++ b/accounts/account_test.go @@ -15,7 +15,6 @@ import ( ) func TestAccountUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -49,7 +48,6 @@ func TestAccountUpdateWithOptionalParams(t *testing.T) { } func TestAccountListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -78,7 +76,6 @@ func TestAccountListWithOptionalParams(t *testing.T) { } func TestAccountGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/accounts/member_test.go b/accounts/member_test.go index 19fae4994a..04f69a2567 100644 --- a/accounts/member_test.go +++ b/accounts/member_test.go @@ -16,7 +16,6 @@ import ( ) func TestMemberNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,7 @@ func TestMemberNewWithOptionalParams(t *testing.T) { } func TestMemberUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -84,7 +83,6 @@ func TestMemberUpdate(t *testing.T) { } func TestMemberListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -115,7 +113,6 @@ func TestMemberListWithOptionalParams(t *testing.T) { } func TestMemberDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -145,7 +142,6 @@ func TestMemberDelete(t *testing.T) { } func TestMemberGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/accounts/role_test.go b/accounts/role_test.go index ddce75d5fc..0856e76066 100644 --- a/accounts/role_test.go +++ b/accounts/role_test.go @@ -15,7 +15,6 @@ import ( ) func TestRoleList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -41,7 +40,6 @@ func TestRoleList(t *testing.T) { } func TestRoleGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/acm/totaltls_test.go b/acm/totaltls_test.go index cd4e02e4d1..87496fef01 100644 --- a/acm/totaltls_test.go +++ b/acm/totaltls_test.go @@ -15,7 +15,6 @@ import ( ) func TestTotalTLSNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -43,7 +42,6 @@ func TestTotalTLSNewWithOptionalParams(t *testing.T) { } func TestTotalTLSGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/addressing/addressmap_test.go b/addressing/addressmap_test.go index dce9f55ef0..5687a20130 100644 --- a/addressing/addressmap_test.go +++ b/addressing/addressmap_test.go @@ -15,7 +15,6 @@ import ( ) func TestAddressMapNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -43,7 +42,6 @@ func TestAddressMapNewWithOptionalParams(t *testing.T) { } func TestAddressMapList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -69,7 +67,6 @@ func TestAddressMapList(t *testing.T) { } func TestAddressMapDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -99,7 +96,6 @@ func TestAddressMapDelete(t *testing.T) { } func TestAddressMapEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -132,7 +128,6 @@ func TestAddressMapEditWithOptionalParams(t *testing.T) { } func TestAddressMapGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/addressing/addressmapaccount_test.go b/addressing/addressmapaccount_test.go index b13dad1f48..34d004a551 100644 --- a/addressing/addressmapaccount_test.go +++ b/addressing/addressmapaccount_test.go @@ -15,7 +15,6 @@ import ( ) func TestAddressMapAccountUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -46,7 +45,6 @@ func TestAddressMapAccountUpdate(t *testing.T) { } func TestAddressMapAccountDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/addressing/addressmapip_test.go b/addressing/addressmapip_test.go index 8b83306c14..d40fd7754a 100644 --- a/addressing/addressmapip_test.go +++ b/addressing/addressmapip_test.go @@ -15,7 +15,6 @@ import ( ) func TestAddressMapIPUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -47,7 +46,6 @@ func TestAddressMapIPUpdate(t *testing.T) { } func TestAddressMapIPDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/addressing/addressmapzone_test.go b/addressing/addressmapzone_test.go index b01d8162be..61f98daf39 100644 --- a/addressing/addressmapzone_test.go +++ b/addressing/addressmapzone_test.go @@ -15,7 +15,6 @@ import ( ) func TestAddressMapZoneUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -47,7 +46,6 @@ func TestAddressMapZoneUpdate(t *testing.T) { } func TestAddressMapZoneDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/addressing/loadocument_test.go b/addressing/loadocument_test.go index efe065c41f..b3f6647cb6 100644 --- a/addressing/loadocument_test.go +++ b/addressing/loadocument_test.go @@ -15,7 +15,7 @@ import ( ) func TestLOADocumentNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/addressing/loadocumentdownload_test.go b/addressing/loadocumentdownload_test.go index 478f5fa5b2..3f20aacbdb 100644 --- a/addressing/loadocumentdownload_test.go +++ b/addressing/loadocumentdownload_test.go @@ -15,7 +15,6 @@ import ( ) func TestLOADocumentDownloadGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/addressing/prefix_test.go b/addressing/prefix_test.go index bf7ee843c8..d0d41b621b 100644 --- a/addressing/prefix_test.go +++ b/addressing/prefix_test.go @@ -15,7 +15,6 @@ import ( ) func TestPrefixNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -44,7 +43,6 @@ func TestPrefixNew(t *testing.T) { } func TestPrefixList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -70,7 +68,6 @@ func TestPrefixList(t *testing.T) { } func TestPrefixDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -100,7 +97,6 @@ func TestPrefixDelete(t *testing.T) { } func TestPrefixEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -131,7 +127,6 @@ func TestPrefixEdit(t *testing.T) { } func TestPrefixGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/addressing/prefixbgpbinding_test.go b/addressing/prefixbgpbinding_test.go index fad3e9995e..eedb9e668b 100644 --- a/addressing/prefixbgpbinding_test.go +++ b/addressing/prefixbgpbinding_test.go @@ -15,7 +15,6 @@ import ( ) func TestPrefixBGPBindingNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -47,7 +46,6 @@ func TestPrefixBGPBindingNewWithOptionalParams(t *testing.T) { } func TestPrefixBGPBindingList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -77,7 +75,6 @@ func TestPrefixBGPBindingList(t *testing.T) { } func TestPrefixBGPBindingDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -108,7 +105,6 @@ func TestPrefixBGPBindingDelete(t *testing.T) { } func TestPrefixBGPBindingGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/addressing/prefixbgpprefix_test.go b/addressing/prefixbgpprefix_test.go index 7ff5396093..239aa14423 100644 --- a/addressing/prefixbgpprefix_test.go +++ b/addressing/prefixbgpprefix_test.go @@ -15,7 +15,6 @@ import ( ) func TestPrefixBGPPrefixList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,6 @@ func TestPrefixBGPPrefixList(t *testing.T) { } func TestPrefixBGPPrefixEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -79,7 +77,6 @@ func TestPrefixBGPPrefixEditWithOptionalParams(t *testing.T) { } func TestPrefixBGPPrefixGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/addressing/prefixbgpstatus_test.go b/addressing/prefixbgpstatus_test.go index cf9b5f4fc9..9071cb5db5 100644 --- a/addressing/prefixbgpstatus_test.go +++ b/addressing/prefixbgpstatus_test.go @@ -15,7 +15,6 @@ import ( ) func TestPrefixBGPStatusEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -46,7 +45,6 @@ func TestPrefixBGPStatusEdit(t *testing.T) { } func TestPrefixBGPStatusGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/addressing/prefixdelegation_test.go b/addressing/prefixdelegation_test.go index c5a207a9e1..eb543832a6 100644 --- a/addressing/prefixdelegation_test.go +++ b/addressing/prefixdelegation_test.go @@ -15,7 +15,6 @@ import ( ) func TestPrefixDelegationNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -47,7 +46,6 @@ func TestPrefixDelegationNew(t *testing.T) { } func TestPrefixDelegationList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -77,7 +75,6 @@ func TestPrefixDelegationList(t *testing.T) { } func TestPrefixDelegationDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/addressing/service_test.go b/addressing/service_test.go index bc4ff9ba62..d4ed51063b 100644 --- a/addressing/service_test.go +++ b/addressing/service_test.go @@ -15,7 +15,6 @@ import ( ) func TestServiceList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/alerting/availablealert_test.go b/alerting/availablealert_test.go index 236231c207..6805acf5c6 100644 --- a/alerting/availablealert_test.go +++ b/alerting/availablealert_test.go @@ -15,7 +15,6 @@ import ( ) func TestAvailableAlertList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/alerting/destinationeligible_test.go b/alerting/destinationeligible_test.go index b17253b686..7d9afb6902 100644 --- a/alerting/destinationeligible_test.go +++ b/alerting/destinationeligible_test.go @@ -15,7 +15,6 @@ import ( ) func TestDestinationEligibleGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/alerting/destinationpagerduty_test.go b/alerting/destinationpagerduty_test.go index a11b279f02..63f12175b2 100644 --- a/alerting/destinationpagerduty_test.go +++ b/alerting/destinationpagerduty_test.go @@ -15,7 +15,6 @@ import ( ) func TestDestinationPagerdutyNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -41,7 +40,6 @@ func TestDestinationPagerdutyNew(t *testing.T) { } func TestDestinationPagerdutyDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -67,7 +65,6 @@ func TestDestinationPagerdutyDelete(t *testing.T) { } func TestDestinationPagerdutyGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -93,7 +90,6 @@ func TestDestinationPagerdutyGet(t *testing.T) { } func TestDestinationPagerdutyLink(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/alerting/destinationwebhook_test.go b/alerting/destinationwebhook_test.go index e4cad3a971..df44b9de16 100644 --- a/alerting/destinationwebhook_test.go +++ b/alerting/destinationwebhook_test.go @@ -15,7 +15,6 @@ import ( ) func TestDestinationWebhookNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -44,7 +43,6 @@ func TestDestinationWebhookNewWithOptionalParams(t *testing.T) { } func TestDestinationWebhookUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -77,7 +75,6 @@ func TestDestinationWebhookUpdateWithOptionalParams(t *testing.T) { } func TestDestinationWebhookList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -103,7 +100,6 @@ func TestDestinationWebhookList(t *testing.T) { } func TestDestinationWebhookDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -133,7 +129,6 @@ func TestDestinationWebhookDelete(t *testing.T) { } func TestDestinationWebhookGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/alerting/history_test.go b/alerting/history_test.go index e1b46503f9..5a24b9606d 100644 --- a/alerting/history_test.go +++ b/alerting/history_test.go @@ -16,7 +16,6 @@ import ( ) func TestHistoryListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/alerting/policy_test.go b/alerting/policy_test.go index bcc2df68c4..bde33e8de5 100644 --- a/alerting/policy_test.go +++ b/alerting/policy_test.go @@ -16,7 +16,6 @@ import ( ) func TestPolicyNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -99,7 +98,6 @@ func TestPolicyNewWithOptionalParams(t *testing.T) { } func TestPolicyUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -186,7 +184,6 @@ func TestPolicyUpdateWithOptionalParams(t *testing.T) { } func TestPolicyList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -212,7 +209,6 @@ func TestPolicyList(t *testing.T) { } func TestPolicyDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -242,7 +238,6 @@ func TestPolicyDelete(t *testing.T) { } func TestPolicyGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/argo/smartrouting_test.go b/argo/smartrouting_test.go index 128ab4279c..437e11c164 100644 --- a/argo/smartrouting_test.go +++ b/argo/smartrouting_test.go @@ -15,7 +15,6 @@ import ( ) func TestSmartRoutingEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSmartRoutingEdit(t *testing.T) { } func TestSmartRoutingGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/argo/tieredcaching_test.go b/argo/tieredcaching_test.go index 1912a7806d..a016e4d3ce 100644 --- a/argo/tieredcaching_test.go +++ b/argo/tieredcaching_test.go @@ -15,7 +15,6 @@ import ( ) func TestTieredCachingEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestTieredCachingEdit(t *testing.T) { } func TestTieredCachingGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/audit_logs/auditlog_test.go b/audit_logs/auditlog_test.go index ee7487991f..37216ea8dd 100644 --- a/audit_logs/auditlog_test.go +++ b/audit_logs/auditlog_test.go @@ -16,7 +16,6 @@ import ( ) func TestAuditLogListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/billing/profile_test.go b/billing/profile_test.go index d938c8f315..50709fd1ba 100644 --- a/billing/profile_test.go +++ b/billing/profile_test.go @@ -14,7 +14,6 @@ import ( ) func TestProfileGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/bot_management/botmanagement_test.go b/bot_management/botmanagement_test.go index c8b5b09395..b840013dd4 100644 --- a/bot_management/botmanagement_test.go +++ b/bot_management/botmanagement_test.go @@ -15,7 +15,6 @@ import ( ) func TestBotManagementUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,6 @@ func TestBotManagementUpdateWithOptionalParams(t *testing.T) { } func TestBotManagementGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/brand_protection/brandprotection_test.go b/brand_protection/brandprotection_test.go index 757be0c561..422d0e4631 100644 --- a/brand_protection/brandprotection_test.go +++ b/brand_protection/brandprotection_test.go @@ -15,7 +15,6 @@ import ( ) func TestBrandProtectionSubmitWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestBrandProtectionSubmitWithOptionalParams(t *testing.T) { } func TestBrandProtectionURLInfoWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/cache/cache_test.go b/cache/cache_test.go index d452bb279f..2de0944910 100644 --- a/cache/cache_test.go +++ b/cache/cache_test.go @@ -15,7 +15,6 @@ import ( ) func TestCachePurgeWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/cache/cachereserve_test.go b/cache/cachereserve_test.go index af51eb1a1a..5ba08282af 100644 --- a/cache/cachereserve_test.go +++ b/cache/cachereserve_test.go @@ -15,7 +15,6 @@ import ( ) func TestCacheReserveClear(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestCacheReserveClear(t *testing.T) { } func TestCacheReserveEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -69,7 +67,6 @@ func TestCacheReserveEdit(t *testing.T) { } func TestCacheReserveGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -95,7 +92,6 @@ func TestCacheReserveGet(t *testing.T) { } func TestCacheReserveStatus(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/cache/regionaltieredcache_test.go b/cache/regionaltieredcache_test.go index e8973cca30..103ff446cb 100644 --- a/cache/regionaltieredcache_test.go +++ b/cache/regionaltieredcache_test.go @@ -15,7 +15,6 @@ import ( ) func TestRegionalTieredCacheEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestRegionalTieredCacheEdit(t *testing.T) { } func TestRegionalTieredCacheGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/cache/smarttieredcache_test.go b/cache/smarttieredcache_test.go index cc24d46ab8..dbd0fee666 100644 --- a/cache/smarttieredcache_test.go +++ b/cache/smarttieredcache_test.go @@ -15,7 +15,6 @@ import ( ) func TestSmartTieredCacheDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -41,7 +40,6 @@ func TestSmartTieredCacheDelete(t *testing.T) { } func TestSmartTieredCacheEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -68,7 +66,6 @@ func TestSmartTieredCacheEdit(t *testing.T) { } func TestSmartTieredCacheGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/cache/variant_test.go b/cache/variant_test.go index 7907f28292..fa83402e99 100644 --- a/cache/variant_test.go +++ b/cache/variant_test.go @@ -15,7 +15,6 @@ import ( ) func TestVariantDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -41,7 +40,6 @@ func TestVariantDelete(t *testing.T) { } func TestVariantEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -80,7 +78,6 @@ func TestVariantEditWithOptionalParams(t *testing.T) { } func TestVariantGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/calls/call_test.go b/calls/call_test.go index 34930f089b..c2b5a8e9e5 100644 --- a/calls/call_test.go +++ b/calls/call_test.go @@ -15,7 +15,6 @@ import ( ) func TestCallNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestCallNewWithOptionalParams(t *testing.T) { } func TestCallUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -73,7 +71,6 @@ func TestCallUpdateWithOptionalParams(t *testing.T) { } func TestCallList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -99,7 +96,6 @@ func TestCallList(t *testing.T) { } func TestCallDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -129,7 +125,6 @@ func TestCallDelete(t *testing.T) { } func TestCallGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/certificate_authorities/hostnameassociation_test.go b/certificate_authorities/hostnameassociation_test.go index fb40cc9e55..073bf735d2 100644 --- a/certificate_authorities/hostnameassociation_test.go +++ b/certificate_authorities/hostnameassociation_test.go @@ -15,7 +15,6 @@ import ( ) func TestHostnameAssociationUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,6 @@ func TestHostnameAssociationUpdateWithOptionalParams(t *testing.T) { } func TestHostnameAssociationGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/challenges/widget_test.go b/challenges/widget_test.go index 489014e776..d9756330dd 100644 --- a/challenges/widget_test.go +++ b/challenges/widget_test.go @@ -15,7 +15,6 @@ import ( ) func TestWidgetNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -52,7 +51,6 @@ func TestWidgetNewWithOptionalParams(t *testing.T) { } func TestWidgetUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -88,7 +86,6 @@ func TestWidgetUpdateWithOptionalParams(t *testing.T) { } func TestWidgetListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -118,7 +115,6 @@ func TestWidgetListWithOptionalParams(t *testing.T) { } func TestWidgetDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -148,7 +144,6 @@ func TestWidgetDelete(t *testing.T) { } func TestWidgetGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -178,7 +173,6 @@ func TestWidgetGet(t *testing.T) { } func TestWidgetRotateSecretWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/client_certificates/clientcertificate_test.go b/client_certificates/clientcertificate_test.go index 47d6119b60..81fc7287f6 100644 --- a/client_certificates/clientcertificate_test.go +++ b/client_certificates/clientcertificate_test.go @@ -15,7 +15,6 @@ import ( ) func TestClientCertificateNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -43,7 +42,6 @@ func TestClientCertificateNew(t *testing.T) { } func TestClientCertificateListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -74,7 +72,6 @@ func TestClientCertificateListWithOptionalParams(t *testing.T) { } func TestClientCertificateDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -104,7 +101,6 @@ func TestClientCertificateDelete(t *testing.T) { } func TestClientCertificateEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -134,7 +130,6 @@ func TestClientCertificateEdit(t *testing.T) { } func TestClientCertificateGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/cloudforce_one/request_test.go b/cloudforce_one/request_test.go index 356bca2ef5..a1204865a6 100644 --- a/cloudforce_one/request_test.go +++ b/cloudforce_one/request_test.go @@ -16,7 +16,6 @@ import ( ) func TestRequestNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -50,7 +49,6 @@ func TestRequestNewWithOptionalParams(t *testing.T) { } func TestRequestUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -85,7 +83,6 @@ func TestRequestUpdateWithOptionalParams(t *testing.T) { } func TestRequestListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -124,7 +121,6 @@ func TestRequestListWithOptionalParams(t *testing.T) { } func TestRequestDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -152,7 +148,6 @@ func TestRequestDelete(t *testing.T) { } func TestRequestConstants(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -176,7 +171,6 @@ func TestRequestConstants(t *testing.T) { } func TestRequestGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -204,7 +198,6 @@ func TestRequestGet(t *testing.T) { } func TestRequestQuota(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -228,7 +221,6 @@ func TestRequestQuota(t *testing.T) { } func TestRequestTypes(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/cloudforce_one/requestmessage_test.go b/cloudforce_one/requestmessage_test.go index 1204633b33..4cf854f8dc 100644 --- a/cloudforce_one/requestmessage_test.go +++ b/cloudforce_one/requestmessage_test.go @@ -16,7 +16,6 @@ import ( ) func TestRequestMessageNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -47,7 +46,6 @@ func TestRequestMessageNewWithOptionalParams(t *testing.T) { } func TestRequestMessageUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -83,7 +81,6 @@ func TestRequestMessageUpdateWithOptionalParams(t *testing.T) { } func TestRequestMessageDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -112,7 +109,6 @@ func TestRequestMessageDelete(t *testing.T) { } func TestRequestMessageGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/cloudforce_one/requestpriority_test.go b/cloudforce_one/requestpriority_test.go index 4888c2d1de..7e8cbe9551 100644 --- a/cloudforce_one/requestpriority_test.go +++ b/cloudforce_one/requestpriority_test.go @@ -15,7 +15,6 @@ import ( ) func TestRequestPriorityNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -50,7 +49,6 @@ func TestRequestPriorityNew(t *testing.T) { } func TestRequestPriorityUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -86,7 +84,6 @@ func TestRequestPriorityUpdate(t *testing.T) { } func TestRequestPriorityDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -114,7 +111,6 @@ func TestRequestPriorityDelete(t *testing.T) { } func TestRequestPriorityGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -142,7 +138,6 @@ func TestRequestPriorityGet(t *testing.T) { } func TestRequestPriorityQuota(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/custom_certificates/customcertificate_test.go b/custom_certificates/customcertificate_test.go index fea3655c53..f0ee1cfcb3 100644 --- a/custom_certificates/customcertificate_test.go +++ b/custom_certificates/customcertificate_test.go @@ -16,7 +16,6 @@ import ( ) func TestCustomCertificateNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -50,7 +49,6 @@ func TestCustomCertificateNewWithOptionalParams(t *testing.T) { } func TestCustomCertificateListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -80,7 +78,6 @@ func TestCustomCertificateListWithOptionalParams(t *testing.T) { } func TestCustomCertificateDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -110,7 +107,6 @@ func TestCustomCertificateDelete(t *testing.T) { } func TestCustomCertificateEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -147,7 +143,6 @@ func TestCustomCertificateEditWithOptionalParams(t *testing.T) { } func TestCustomCertificateGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/custom_certificates/prioritize_test.go b/custom_certificates/prioritize_test.go index c953a49eb8..1064f392ac 100644 --- a/custom_certificates/prioritize_test.go +++ b/custom_certificates/prioritize_test.go @@ -15,7 +15,6 @@ import ( ) func TestPrioritizeUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/custom_hostnames/customhostname_test.go b/custom_hostnames/customhostname_test.go index 097099275f..b6c63c7e1f 100644 --- a/custom_hostnames/customhostname_test.go +++ b/custom_hostnames/customhostname_test.go @@ -15,7 +15,6 @@ import ( ) func TestCustomHostnameNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -61,7 +60,6 @@ func TestCustomHostnameNewWithOptionalParams(t *testing.T) { } func TestCustomHostnameListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -94,7 +92,6 @@ func TestCustomHostnameListWithOptionalParams(t *testing.T) { } func TestCustomHostnameDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -124,7 +121,6 @@ func TestCustomHostnameDelete(t *testing.T) { } func TestCustomHostnameEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -175,7 +171,6 @@ func TestCustomHostnameEditWithOptionalParams(t *testing.T) { } func TestCustomHostnameGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/custom_hostnames/fallbackorigin_test.go b/custom_hostnames/fallbackorigin_test.go index 1e2de9182a..03320338c8 100644 --- a/custom_hostnames/fallbackorigin_test.go +++ b/custom_hostnames/fallbackorigin_test.go @@ -15,7 +15,6 @@ import ( ) func TestFallbackOriginUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestFallbackOriginUpdate(t *testing.T) { } func TestFallbackOriginDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -68,7 +66,6 @@ func TestFallbackOriginDelete(t *testing.T) { } func TestFallbackOriginGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/custom_nameservers/customnameserver_test.go b/custom_nameservers/customnameserver_test.go index cb1ddc92d3..4acb2631cd 100644 --- a/custom_nameservers/customnameserver_test.go +++ b/custom_nameservers/customnameserver_test.go @@ -15,7 +15,6 @@ import ( ) func TestCustomNameserverNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -43,7 +42,6 @@ func TestCustomNameserverNewWithOptionalParams(t *testing.T) { } func TestCustomNameserverDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -73,7 +71,6 @@ func TestCustomNameserverDelete(t *testing.T) { } func TestCustomNameserverAvailabilty(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -99,7 +96,6 @@ func TestCustomNameserverAvailabilty(t *testing.T) { } func TestCustomNameserverGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -125,7 +121,6 @@ func TestCustomNameserverGet(t *testing.T) { } func TestCustomNameserverVerify(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/d1/database_test.go b/d1/database_test.go index a130eef651..b9fa9320cf 100644 --- a/d1/database_test.go +++ b/d1/database_test.go @@ -15,7 +15,6 @@ import ( ) func TestDatabaseNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestDatabaseNew(t *testing.T) { } func TestDatabaseListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -71,7 +69,6 @@ func TestDatabaseListWithOptionalParams(t *testing.T) { } func TestDatabaseDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -99,7 +96,6 @@ func TestDatabaseDelete(t *testing.T) { } func TestDatabaseGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -127,7 +123,6 @@ func TestDatabaseGet(t *testing.T) { } func TestDatabaseQueryWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/dcv_delegation/uuid_test.go b/dcv_delegation/uuid_test.go index 39b99f5b56..d5ba65f3ee 100644 --- a/dcv_delegation/uuid_test.go +++ b/dcv_delegation/uuid_test.go @@ -15,7 +15,6 @@ import ( ) func TestUUIDGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/diagnostics/traceroute_test.go b/diagnostics/traceroute_test.go index e7dd38398f..d09d777390 100644 --- a/diagnostics/traceroute_test.go +++ b/diagnostics/traceroute_test.go @@ -15,7 +15,6 @@ import ( ) func TestTracerouteNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/dns/analyticsreport_test.go b/dns/analyticsreport_test.go index 16993e5c05..17f32a2d39 100644 --- a/dns/analyticsreport_test.go +++ b/dns/analyticsreport_test.go @@ -16,7 +16,6 @@ import ( ) func TestAnalyticsReportGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/dns/analyticsreportbytime_test.go b/dns/analyticsreportbytime_test.go index 21ea18b2a6..5894bf3dfa 100644 --- a/dns/analyticsreportbytime_test.go +++ b/dns/analyticsreportbytime_test.go @@ -16,7 +16,6 @@ import ( ) func TestAnalyticsReportBytimeGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/dns/firewall_test.go b/dns/firewall_test.go index 397d65f656..abcd75a78a 100644 --- a/dns/firewall_test.go +++ b/dns/firewall_test.go @@ -16,7 +16,6 @@ import ( ) func TestFirewallNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -55,7 +54,6 @@ func TestFirewallNewWithOptionalParams(t *testing.T) { } func TestFirewallListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -83,7 +81,6 @@ func TestFirewallListWithOptionalParams(t *testing.T) { } func TestFirewallDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -113,7 +110,6 @@ func TestFirewallDelete(t *testing.T) { } func TestFirewallEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -159,7 +155,6 @@ func TestFirewallEditWithOptionalParams(t *testing.T) { } func TestFirewallGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/dns/firewallanalyticsreport_test.go b/dns/firewallanalyticsreport_test.go index 3ba63eacc6..73b49c91c2 100644 --- a/dns/firewallanalyticsreport_test.go +++ b/dns/firewallanalyticsreport_test.go @@ -16,7 +16,6 @@ import ( ) func TestFirewallAnalyticsReportGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/dns/firewallanalyticsreportbytime_test.go b/dns/firewallanalyticsreportbytime_test.go index 66f749cac8..9b0cc654e3 100644 --- a/dns/firewallanalyticsreportbytime_test.go +++ b/dns/firewallanalyticsreportbytime_test.go @@ -16,7 +16,6 @@ import ( ) func TestFirewallAnalyticsReportBytimeGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/dns/record_test.go b/dns/record_test.go index 1c3af875ed..693fdea848 100644 --- a/dns/record_test.go +++ b/dns/record_test.go @@ -16,7 +16,7 @@ import ( ) func TestRecordNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -51,7 +51,7 @@ func TestRecordNewWithOptionalParams(t *testing.T) { } func TestRecordUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -90,7 +90,6 @@ func TestRecordUpdateWithOptionalParams(t *testing.T) { } func TestRecordListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -143,7 +142,6 @@ func TestRecordListWithOptionalParams(t *testing.T) { } func TestRecordDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -173,7 +171,7 @@ func TestRecordDelete(t *testing.T) { } func TestRecordEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -212,7 +210,6 @@ func TestRecordEditWithOptionalParams(t *testing.T) { } func TestRecordExport(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -238,7 +235,6 @@ func TestRecordExport(t *testing.T) { } func TestRecordGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -268,7 +264,7 @@ func TestRecordGet(t *testing.T) { } func TestRecordImportWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -296,7 +292,6 @@ func TestRecordImportWithOptionalParams(t *testing.T) { } func TestRecordScan(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/dnssec/dnssec_test.go b/dnssec/dnssec_test.go index e8f58a54b6..66ece72110 100644 --- a/dnssec/dnssec_test.go +++ b/dnssec/dnssec_test.go @@ -15,7 +15,6 @@ import ( ) func TestDNSSECDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -41,7 +40,6 @@ func TestDNSSECDelete(t *testing.T) { } func TestDNSSECEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -70,7 +68,6 @@ func TestDNSSECEditWithOptionalParams(t *testing.T) { } func TestDNSSECGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/durable_objects/namespace_test.go b/durable_objects/namespace_test.go index 5703c74b69..f2726ce1c3 100644 --- a/durable_objects/namespace_test.go +++ b/durable_objects/namespace_test.go @@ -15,7 +15,6 @@ import ( ) func TestNamespaceList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/durable_objects/namespaceobject_test.go b/durable_objects/namespaceobject_test.go index 23f3deef1e..aba9d77d80 100644 --- a/durable_objects/namespaceobject_test.go +++ b/durable_objects/namespaceobject_test.go @@ -15,7 +15,6 @@ import ( ) func TestNamespaceObjectListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/email_routing/address_test.go b/email_routing/address_test.go index 5b1ddf6f23..9ce0600551 100644 --- a/email_routing/address_test.go +++ b/email_routing/address_test.go @@ -15,7 +15,6 @@ import ( ) func TestAddressNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,6 @@ func TestAddressNew(t *testing.T) { } func TestAddressListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -78,7 +76,6 @@ func TestAddressListWithOptionalParams(t *testing.T) { } func TestAddressDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -106,7 +103,6 @@ func TestAddressDelete(t *testing.T) { } func TestAddressGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/email_routing/dns_test.go b/email_routing/dns_test.go index 50e7fa5772..8a629dc5a3 100644 --- a/email_routing/dns_test.go +++ b/email_routing/dns_test.go @@ -14,7 +14,6 @@ import ( ) func TestDNSGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/email_routing/emailrouting_test.go b/email_routing/emailrouting_test.go index 6bcafdd26b..0e45ffcc96 100644 --- a/email_routing/emailrouting_test.go +++ b/email_routing/emailrouting_test.go @@ -15,7 +15,6 @@ import ( ) func TestEmailRoutingDisable(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,6 @@ func TestEmailRoutingDisable(t *testing.T) { } func TestEmailRoutingEnable(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -75,7 +73,6 @@ func TestEmailRoutingEnable(t *testing.T) { } func TestEmailRoutingGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/email_routing/rule_test.go b/email_routing/rule_test.go index ec41c0dbb9..6e1965bd89 100644 --- a/email_routing/rule_test.go +++ b/email_routing/rule_test.go @@ -15,7 +15,6 @@ import ( ) func TestRuleNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -70,7 +69,6 @@ func TestRuleNewWithOptionalParams(t *testing.T) { } func TestRuleUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -126,7 +124,6 @@ func TestRuleUpdateWithOptionalParams(t *testing.T) { } func TestRuleListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -158,7 +155,6 @@ func TestRuleListWithOptionalParams(t *testing.T) { } func TestRuleDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -186,7 +182,6 @@ func TestRuleDelete(t *testing.T) { } func TestRuleGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/email_routing/rulecatchall_test.go b/email_routing/rulecatchall_test.go index fc47c1c620..22b490f9a5 100644 --- a/email_routing/rulecatchall_test.go +++ b/email_routing/rulecatchall_test.go @@ -15,7 +15,6 @@ import ( ) func TestRuleCatchAllUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -63,7 +62,6 @@ func TestRuleCatchAllUpdateWithOptionalParams(t *testing.T) { } func TestRuleCatchAllGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/event_notifications/r2configuration_test.go b/event_notifications/r2configuration_test.go index b8893110b4..0bd0542286 100644 --- a/event_notifications/r2configuration_test.go +++ b/event_notifications/r2configuration_test.go @@ -15,7 +15,6 @@ import ( ) func TestR2ConfigurationGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/event_notifications/r2configurationqueue_test.go b/event_notifications/r2configurationqueue_test.go index 5186b21985..8994ac66cd 100644 --- a/event_notifications/r2configurationqueue_test.go +++ b/event_notifications/r2configurationqueue_test.go @@ -15,7 +15,6 @@ import ( ) func TestR2ConfigurationQueueUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -59,7 +58,6 @@ func TestR2ConfigurationQueueUpdateWithOptionalParams(t *testing.T) { } func TestR2ConfigurationQueueDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/filters/filter_test.go b/filters/filter_test.go index 79741554d1..fedc66efbe 100644 --- a/filters/filter_test.go +++ b/filters/filter_test.go @@ -15,7 +15,7 @@ import ( ) func TestFilterNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +45,7 @@ func TestFilterNew(t *testing.T) { } func TestFilterUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -76,7 +76,6 @@ func TestFilterUpdate(t *testing.T) { } func TestFilterListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -112,7 +111,6 @@ func TestFilterListWithOptionalParams(t *testing.T) { } func TestFilterDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -140,7 +138,6 @@ func TestFilterDelete(t *testing.T) { } func TestFilterGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/firewall/accessrule_test.go b/firewall/accessrule_test.go index 8f63a4197c..c467f75d54 100644 --- a/firewall/accessrule_test.go +++ b/firewall/accessrule_test.go @@ -15,7 +15,7 @@ import ( ) func TestAccessRuleNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -48,7 +48,7 @@ func TestAccessRuleNewWithOptionalParams(t *testing.T) { } func TestAccessRuleListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -92,7 +92,7 @@ func TestAccessRuleListWithOptionalParams(t *testing.T) { } func TestAccessRuleDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -123,7 +123,7 @@ func TestAccessRuleDeleteWithOptionalParams(t *testing.T) { } func TestAccessRuleEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -160,7 +160,7 @@ func TestAccessRuleEditWithOptionalParams(t *testing.T) { } func TestAccessRuleGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/firewall/lockdown_test.go b/firewall/lockdown_test.go index 33675ea8be..1bca94b455 100644 --- a/firewall/lockdown_test.go +++ b/firewall/lockdown_test.go @@ -16,7 +16,7 @@ import ( ) func TestLockdownNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -46,7 +46,7 @@ func TestLockdownNew(t *testing.T) { } func TestLockdownUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -77,7 +77,6 @@ func TestLockdownUpdate(t *testing.T) { } func TestLockdownListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -117,7 +116,6 @@ func TestLockdownListWithOptionalParams(t *testing.T) { } func TestLockdownDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -145,7 +143,6 @@ func TestLockdownDelete(t *testing.T) { } func TestLockdownGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/firewall/rule_test.go b/firewall/rule_test.go index eaeb22e40d..5061d3d1df 100644 --- a/firewall/rule_test.go +++ b/firewall/rule_test.go @@ -15,7 +15,7 @@ import ( ) func TestRuleNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +45,7 @@ func TestRuleNew(t *testing.T) { } func TestRuleUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -76,7 +76,6 @@ func TestRuleUpdate(t *testing.T) { } func TestRuleListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -111,7 +110,6 @@ func TestRuleListWithOptionalParams(t *testing.T) { } func TestRuleDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -139,7 +137,7 @@ func TestRuleDelete(t *testing.T) { } func TestRuleEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -170,7 +168,6 @@ func TestRuleEdit(t *testing.T) { } func TestRuleGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/firewall/uarule_test.go b/firewall/uarule_test.go index ccbd1a2bbc..b5b536148a 100644 --- a/firewall/uarule_test.go +++ b/firewall/uarule_test.go @@ -15,7 +15,7 @@ import ( ) func TestUARuleNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +45,7 @@ func TestUARuleNew(t *testing.T) { } func TestUARuleUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -76,7 +76,6 @@ func TestUARuleUpdate(t *testing.T) { } func TestUARuleListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -110,7 +109,6 @@ func TestUARuleListWithOptionalParams(t *testing.T) { } func TestUARuleDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -138,7 +136,6 @@ func TestUARuleDelete(t *testing.T) { } func TestUARuleGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/firewall/wafoverride_test.go b/firewall/wafoverride_test.go index 0fdcf292af..46a08427d7 100644 --- a/firewall/wafoverride_test.go +++ b/firewall/wafoverride_test.go @@ -15,7 +15,7 @@ import ( ) func TestWAFOverrideNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +45,7 @@ func TestWAFOverrideNew(t *testing.T) { } func TestWAFOverrideUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -76,7 +76,6 @@ func TestWAFOverrideUpdate(t *testing.T) { } func TestWAFOverrideListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -107,7 +106,6 @@ func TestWAFOverrideListWithOptionalParams(t *testing.T) { } func TestWAFOverrideDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -135,7 +133,6 @@ func TestWAFOverrideDelete(t *testing.T) { } func TestWAFOverrideGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/firewall/wafpackage_test.go b/firewall/wafpackage_test.go index 6abf2e73bf..3b8cf81fc5 100644 --- a/firewall/wafpackage_test.go +++ b/firewall/wafpackage_test.go @@ -15,7 +15,7 @@ import ( ) func TestWAFPackageListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -50,7 +50,6 @@ func TestWAFPackageListWithOptionalParams(t *testing.T) { } func TestWAFPackageGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/firewall/wafpackagegroup_test.go b/firewall/wafpackagegroup_test.go index 61a96ef341..86eb054d64 100644 --- a/firewall/wafpackagegroup_test.go +++ b/firewall/wafpackagegroup_test.go @@ -15,7 +15,6 @@ import ( ) func TestWAFPackageGroupListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -53,7 +52,6 @@ func TestWAFPackageGroupListWithOptionalParams(t *testing.T) { } func TestWAFPackageGroupEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -85,7 +83,6 @@ func TestWAFPackageGroupEditWithOptionalParams(t *testing.T) { } func TestWAFPackageGroupGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/firewall/wafpackagerule_test.go b/firewall/wafpackagerule_test.go index 1cdf79b696..19412d32d2 100644 --- a/firewall/wafpackagerule_test.go +++ b/firewall/wafpackagerule_test.go @@ -15,7 +15,6 @@ import ( ) func TestWAFPackageRuleListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -54,7 +53,6 @@ func TestWAFPackageRuleListWithOptionalParams(t *testing.T) { } func TestWAFPackageRuleEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -86,7 +84,6 @@ func TestWAFPackageRuleEditWithOptionalParams(t *testing.T) { } func TestWAFPackageRuleGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/healthchecks/healthcheck_test.go b/healthchecks/healthcheck_test.go index 60f1f5c65e..66be1e0123 100644 --- a/healthchecks/healthcheck_test.go +++ b/healthchecks/healthcheck_test.go @@ -15,7 +15,6 @@ import ( ) func TestHealthcheckNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -75,7 +74,6 @@ func TestHealthcheckNewWithOptionalParams(t *testing.T) { } func TestHealthcheckUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -139,7 +137,6 @@ func TestHealthcheckUpdateWithOptionalParams(t *testing.T) { } func TestHealthcheckListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -167,7 +164,6 @@ func TestHealthcheckListWithOptionalParams(t *testing.T) { } func TestHealthcheckDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -197,7 +193,6 @@ func TestHealthcheckDelete(t *testing.T) { } func TestHealthcheckEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -261,7 +256,6 @@ func TestHealthcheckEditWithOptionalParams(t *testing.T) { } func TestHealthcheckGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/healthchecks/preview_test.go b/healthchecks/preview_test.go index c02dfc44f3..68795d6234 100644 --- a/healthchecks/preview_test.go +++ b/healthchecks/preview_test.go @@ -15,7 +15,6 @@ import ( ) func TestPreviewNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -75,7 +74,6 @@ func TestPreviewNewWithOptionalParams(t *testing.T) { } func TestPreviewDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -105,7 +103,6 @@ func TestPreviewDelete(t *testing.T) { } func TestPreviewGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/hostnames/settingtls_test.go b/hostnames/settingtls_test.go index dfb2056f91..85f977be59 100644 --- a/hostnames/settingtls_test.go +++ b/hostnames/settingtls_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingTLSUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -47,7 +46,6 @@ func TestSettingTLSUpdate(t *testing.T) { } func TestSettingTLSDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -78,7 +76,6 @@ func TestSettingTLSDelete(t *testing.T) { } func TestSettingTLSGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/hyperdrive/config_test.go b/hyperdrive/config_test.go index 7e6b945ded..5258d61dbd 100644 --- a/hyperdrive/config_test.go +++ b/hyperdrive/config_test.go @@ -15,7 +15,7 @@ import ( ) func TestConfigNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -56,7 +56,7 @@ func TestConfigNewWithOptionalParams(t *testing.T) { } func TestConfigUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -101,7 +101,6 @@ func TestConfigUpdateWithOptionalParams(t *testing.T) { } func TestConfigList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -127,7 +126,6 @@ func TestConfigList(t *testing.T) { } func TestConfigDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -157,7 +155,7 @@ func TestConfigDelete(t *testing.T) { } func TestConfigEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -202,7 +200,6 @@ func TestConfigEditWithOptionalParams(t *testing.T) { } func TestConfigGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/images/v1_test.go b/images/v1_test.go index 45033c2d44..d6b577b188 100644 --- a/images/v1_test.go +++ b/images/v1_test.go @@ -15,7 +15,7 @@ import ( ) func TestV1NewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +45,6 @@ func TestV1NewWithOptionalParams(t *testing.T) { } func TestV1ListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -73,7 +72,6 @@ func TestV1ListWithOptionalParams(t *testing.T) { } func TestV1Delete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -103,7 +101,6 @@ func TestV1Delete(t *testing.T) { } func TestV1EditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -135,7 +132,6 @@ func TestV1EditWithOptionalParams(t *testing.T) { } func TestV1Get(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/images/v1blob_test.go b/images/v1blob_test.go index 2526efe018..5670f99fda 100644 --- a/images/v1blob_test.go +++ b/images/v1blob_test.go @@ -17,7 +17,6 @@ import ( ) func TestV1BlobGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(200) w.Write([]byte("abc")) diff --git a/images/v1key_test.go b/images/v1key_test.go index 670ae3783c..2364962a5b 100644 --- a/images/v1key_test.go +++ b/images/v1key_test.go @@ -15,7 +15,6 @@ import ( ) func TestV1KeyUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,6 @@ func TestV1KeyUpdate(t *testing.T) { } func TestV1KeyList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -71,7 +69,6 @@ func TestV1KeyList(t *testing.T) { } func TestV1KeyDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/images/v1stat_test.go b/images/v1stat_test.go index 0e7079513f..8add044cd6 100644 --- a/images/v1stat_test.go +++ b/images/v1stat_test.go @@ -15,7 +15,6 @@ import ( ) func TestV1StatGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/images/v1variant_test.go b/images/v1variant_test.go index f020cc2d65..613c3e394c 100644 --- a/images/v1variant_test.go +++ b/images/v1variant_test.go @@ -15,7 +15,6 @@ import ( ) func TestV1VariantNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -49,7 +48,6 @@ func TestV1VariantNewWithOptionalParams(t *testing.T) { } func TestV1VariantList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -75,7 +73,6 @@ func TestV1VariantList(t *testing.T) { } func TestV1VariantDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -105,7 +102,6 @@ func TestV1VariantDelete(t *testing.T) { } func TestV1VariantEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -142,7 +138,6 @@ func TestV1VariantEditWithOptionalParams(t *testing.T) { } func TestV1VariantGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/images/v2_test.go b/images/v2_test.go index 3c0155f5df..9640ba0282 100644 --- a/images/v2_test.go +++ b/images/v2_test.go @@ -15,7 +15,6 @@ import ( ) func TestV2ListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/images/v2directupload_test.go b/images/v2directupload_test.go index 70bcaee349..95e3e8344b 100644 --- a/images/v2directupload_test.go +++ b/images/v2directupload_test.go @@ -16,7 +16,7 @@ import ( ) func TestV2DirectUploadNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/intel/asn_test.go b/intel/asn_test.go index 5e348aebd9..37efdae2f4 100644 --- a/intel/asn_test.go +++ b/intel/asn_test.go @@ -15,7 +15,6 @@ import ( ) func TestASNGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/intel/asnsubnet_test.go b/intel/asnsubnet_test.go index bc3a7fcdac..92692f2050 100644 --- a/intel/asnsubnet_test.go +++ b/intel/asnsubnet_test.go @@ -15,7 +15,6 @@ import ( ) func TestASNSubnetGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/intel/attacksurfacereportissue_test.go b/intel/attacksurfacereportissue_test.go index 0384573822..d130c6c15b 100644 --- a/intel/attacksurfacereportissue_test.go +++ b/intel/attacksurfacereportissue_test.go @@ -15,7 +15,6 @@ import ( ) func TestAttackSurfaceReportIssueListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -54,7 +53,6 @@ func TestAttackSurfaceReportIssueListWithOptionalParams(t *testing.T) { } func TestAttackSurfaceReportIssueClassWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -91,7 +89,6 @@ func TestAttackSurfaceReportIssueClassWithOptionalParams(t *testing.T) { } func TestAttackSurfaceReportIssueDismissWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -122,7 +119,6 @@ func TestAttackSurfaceReportIssueDismissWithOptionalParams(t *testing.T) { } func TestAttackSurfaceReportIssueSeverityWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -159,7 +155,6 @@ func TestAttackSurfaceReportIssueSeverityWithOptionalParams(t *testing.T) { } func TestAttackSurfaceReportIssueTypeWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/intel/attacksurfacereportissuetype_test.go b/intel/attacksurfacereportissuetype_test.go index c10067441a..86cc9f95ca 100644 --- a/intel/attacksurfacereportissuetype_test.go +++ b/intel/attacksurfacereportissuetype_test.go @@ -15,7 +15,6 @@ import ( ) func TestAttackSurfaceReportIssueTypeGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/intel/dns_test.go b/intel/dns_test.go index fb1700345f..a1e5b3aab4 100644 --- a/intel/dns_test.go +++ b/intel/dns_test.go @@ -16,7 +16,6 @@ import ( ) func TestDNSListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/intel/domain_test.go b/intel/domain_test.go index fc74babe65..35377c4df8 100644 --- a/intel/domain_test.go +++ b/intel/domain_test.go @@ -15,7 +15,6 @@ import ( ) func TestDomainGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/intel/domainbulk_test.go b/intel/domainbulk_test.go index e42b9bb208..c1f8d21d27 100644 --- a/intel/domainbulk_test.go +++ b/intel/domainbulk_test.go @@ -15,7 +15,6 @@ import ( ) func TestDomainBulkGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/intel/domainhistory_test.go b/intel/domainhistory_test.go index 8de27a2770..65f8186094 100644 --- a/intel/domainhistory_test.go +++ b/intel/domainhistory_test.go @@ -15,7 +15,6 @@ import ( ) func TestDomainHistoryGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/intel/indicatorfeed_test.go b/intel/indicatorfeed_test.go index 60ea6840b5..78e4e79f04 100644 --- a/intel/indicatorfeed_test.go +++ b/intel/indicatorfeed_test.go @@ -15,7 +15,6 @@ import ( ) func TestIndicatorFeedNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -43,7 +42,7 @@ func TestIndicatorFeedNewWithOptionalParams(t *testing.T) { } func TestIndicatorFeedUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -74,7 +73,6 @@ func TestIndicatorFeedUpdateWithOptionalParams(t *testing.T) { } func TestIndicatorFeedList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -100,7 +98,6 @@ func TestIndicatorFeedList(t *testing.T) { } func TestIndicatorFeedData(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -130,7 +127,6 @@ func TestIndicatorFeedData(t *testing.T) { } func TestIndicatorFeedGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/intel/indicatorfeedpermission_test.go b/intel/indicatorfeedpermission_test.go index d03140692a..5467a49a02 100644 --- a/intel/indicatorfeedpermission_test.go +++ b/intel/indicatorfeedpermission_test.go @@ -15,7 +15,6 @@ import ( ) func TestIndicatorFeedPermissionNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -43,7 +42,6 @@ func TestIndicatorFeedPermissionNewWithOptionalParams(t *testing.T) { } func TestIndicatorFeedPermissionList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -69,7 +67,6 @@ func TestIndicatorFeedPermissionList(t *testing.T) { } func TestIndicatorFeedPermissionDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/intel/ip_test.go b/intel/ip_test.go index efa167b8f6..20387116c3 100644 --- a/intel/ip_test.go +++ b/intel/ip_test.go @@ -15,7 +15,6 @@ import ( ) func TestIPGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/intel/iplist_test.go b/intel/iplist_test.go index cb817df57f..6885ac2cf1 100644 --- a/intel/iplist_test.go +++ b/intel/iplist_test.go @@ -15,7 +15,6 @@ import ( ) func TestIPListGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/intel/miscategorization_test.go b/intel/miscategorization_test.go index 11936e603a..a4f0d3a774 100644 --- a/intel/miscategorization_test.go +++ b/intel/miscategorization_test.go @@ -15,7 +15,6 @@ import ( ) func TestMiscategorizationNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/intel/sinkhole_test.go b/intel/sinkhole_test.go index a3f131f860..450d992ac5 100644 --- a/intel/sinkhole_test.go +++ b/intel/sinkhole_test.go @@ -15,7 +15,6 @@ import ( ) func TestSinkholeList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/intel/whois_test.go b/intel/whois_test.go index 688920c8be..85465963b5 100644 --- a/intel/whois_test.go +++ b/intel/whois_test.go @@ -15,7 +15,6 @@ import ( ) func TestWhoisGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/ips/ip_test.go b/ips/ip_test.go index cf31c45a8b..17dc298460 100644 --- a/ips/ip_test.go +++ b/ips/ip_test.go @@ -15,7 +15,6 @@ import ( ) func TestIPListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/keyless_certificates/keylesscertificate_test.go b/keyless_certificates/keylesscertificate_test.go index b34e62956f..ff07ef48fd 100644 --- a/keyless_certificates/keylesscertificate_test.go +++ b/keyless_certificates/keylesscertificate_test.go @@ -16,7 +16,6 @@ import ( ) func TestKeylessCertificateNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -51,7 +50,6 @@ func TestKeylessCertificateNewWithOptionalParams(t *testing.T) { } func TestKeylessCertificateList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -77,7 +75,6 @@ func TestKeylessCertificateList(t *testing.T) { } func TestKeylessCertificateDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -107,7 +104,6 @@ func TestKeylessCertificateDelete(t *testing.T) { } func TestKeylessCertificateEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -145,7 +141,6 @@ func TestKeylessCertificateEditWithOptionalParams(t *testing.T) { } func TestKeylessCertificateGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/kv/namespace_test.go b/kv/namespace_test.go index 635b9e316c..b8736d3995 100644 --- a/kv/namespace_test.go +++ b/kv/namespace_test.go @@ -15,7 +15,6 @@ import ( ) func TestNamespaceNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestNamespaceNew(t *testing.T) { } func TestNamespaceUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -73,7 +71,6 @@ func TestNamespaceUpdate(t *testing.T) { } func TestNamespaceListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -103,7 +100,6 @@ func TestNamespaceListWithOptionalParams(t *testing.T) { } func TestNamespaceDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/kv/namespacebulk_test.go b/kv/namespacebulk_test.go index 85bb4994cd..2e2d42d949 100644 --- a/kv/namespacebulk_test.go +++ b/kv/namespacebulk_test.go @@ -15,7 +15,6 @@ import ( ) func TestNamespaceBulkUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -73,7 +72,6 @@ func TestNamespaceBulkUpdate(t *testing.T) { } func TestNamespaceBulkDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/kv/namespacekey_test.go b/kv/namespacekey_test.go index af5a908073..1062c71967 100644 --- a/kv/namespacekey_test.go +++ b/kv/namespacekey_test.go @@ -15,7 +15,6 @@ import ( ) func TestNamespaceKeyListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/kv/namespacemetadata_test.go b/kv/namespacemetadata_test.go index f629189be6..b06656431d 100644 --- a/kv/namespacemetadata_test.go +++ b/kv/namespacemetadata_test.go @@ -15,7 +15,6 @@ import ( ) func TestNamespaceMetadataGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/kv/namespacevalue_test.go b/kv/namespacevalue_test.go index 6cc0ab6697..5b0b13ea6e 100644 --- a/kv/namespacevalue_test.go +++ b/kv/namespacevalue_test.go @@ -15,7 +15,7 @@ import ( ) func TestNamespaceValueUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -48,7 +48,6 @@ func TestNamespaceValueUpdate(t *testing.T) { } func TestNamespaceValueDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -79,7 +78,6 @@ func TestNamespaceValueDelete(t *testing.T) { } func TestNamespaceValueGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/load_balancers/loadbalancer_test.go b/load_balancers/loadbalancer_test.go index 9142624af4..425a1e731e 100644 --- a/load_balancers/loadbalancer_test.go +++ b/load_balancers/loadbalancer_test.go @@ -15,7 +15,6 @@ import ( ) func TestLoadBalancerNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -323,7 +322,6 @@ func TestLoadBalancerNewWithOptionalParams(t *testing.T) { } func TestLoadBalancerUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -636,7 +634,6 @@ func TestLoadBalancerUpdateWithOptionalParams(t *testing.T) { } func TestLoadBalancerList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -662,7 +659,6 @@ func TestLoadBalancerList(t *testing.T) { } func TestLoadBalancerDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -692,7 +688,6 @@ func TestLoadBalancerDelete(t *testing.T) { } func TestLoadBalancerEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -1005,7 +1000,6 @@ func TestLoadBalancerEditWithOptionalParams(t *testing.T) { } func TestLoadBalancerGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/load_balancers/monitor_test.go b/load_balancers/monitor_test.go index 10fc985fc5..3c4c59a229 100644 --- a/load_balancers/monitor_test.go +++ b/load_balancers/monitor_test.go @@ -15,7 +15,6 @@ import ( ) func TestMonitorNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -64,7 +63,6 @@ func TestMonitorNewWithOptionalParams(t *testing.T) { } func TestMonitorUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -117,7 +115,6 @@ func TestMonitorUpdateWithOptionalParams(t *testing.T) { } func TestMonitorList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -143,7 +140,6 @@ func TestMonitorList(t *testing.T) { } func TestMonitorDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -173,7 +169,6 @@ func TestMonitorDelete(t *testing.T) { } func TestMonitorEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -226,7 +221,6 @@ func TestMonitorEditWithOptionalParams(t *testing.T) { } func TestMonitorGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/load_balancers/monitorpreview_test.go b/load_balancers/monitorpreview_test.go index 3f9fb4d500..aca2d025f0 100644 --- a/load_balancers/monitorpreview_test.go +++ b/load_balancers/monitorpreview_test.go @@ -15,7 +15,6 @@ import ( ) func TestMonitorPreviewNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/load_balancers/monitorreference_test.go b/load_balancers/monitorreference_test.go index 0edf026f95..507c3ffde5 100644 --- a/load_balancers/monitorreference_test.go +++ b/load_balancers/monitorreference_test.go @@ -15,7 +15,6 @@ import ( ) func TestMonitorReferenceGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/load_balancers/pool_test.go b/load_balancers/pool_test.go index 946e0246d5..d51201af29 100644 --- a/load_balancers/pool_test.go +++ b/load_balancers/pool_test.go @@ -15,7 +15,6 @@ import ( ) func TestPoolNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -96,7 +95,6 @@ func TestPoolNewWithOptionalParams(t *testing.T) { } func TestPoolUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -182,7 +180,6 @@ func TestPoolUpdateWithOptionalParams(t *testing.T) { } func TestPoolListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -209,7 +206,6 @@ func TestPoolListWithOptionalParams(t *testing.T) { } func TestPoolDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -239,7 +235,6 @@ func TestPoolDelete(t *testing.T) { } func TestPoolEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -325,7 +320,6 @@ func TestPoolEditWithOptionalParams(t *testing.T) { } func TestPoolGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/load_balancers/poolhealth_test.go b/load_balancers/poolhealth_test.go index 3bbc54b2b0..f982613ecb 100644 --- a/load_balancers/poolhealth_test.go +++ b/load_balancers/poolhealth_test.go @@ -15,7 +15,6 @@ import ( ) func TestPoolHealthNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -68,7 +67,6 @@ func TestPoolHealthNewWithOptionalParams(t *testing.T) { } func TestPoolHealthGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/load_balancers/poolreference_test.go b/load_balancers/poolreference_test.go index a610ff9174..8020f111d7 100644 --- a/load_balancers/poolreference_test.go +++ b/load_balancers/poolreference_test.go @@ -15,7 +15,6 @@ import ( ) func TestPoolReferenceGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/load_balancers/preview_test.go b/load_balancers/preview_test.go index 073d3fa640..89b98b8721 100644 --- a/load_balancers/preview_test.go +++ b/load_balancers/preview_test.go @@ -15,7 +15,6 @@ import ( ) func TestPreviewGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/load_balancers/region_test.go b/load_balancers/region_test.go index 335b0bb9f0..5807a5e923 100644 --- a/load_balancers/region_test.go +++ b/load_balancers/region_test.go @@ -15,7 +15,6 @@ import ( ) func TestRegionListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -44,7 +43,6 @@ func TestRegionListWithOptionalParams(t *testing.T) { } func TestRegionGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/load_balancers/search_test.go b/load_balancers/search_test.go index b0c1eaa325..eeb0ecf22f 100644 --- a/load_balancers/search_test.go +++ b/load_balancers/search_test.go @@ -15,7 +15,7 @@ import ( ) func TestSearchGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/logpush/datasetfield_test.go b/logpush/datasetfield_test.go index c161ff6f8b..8f89b12e03 100644 --- a/logpush/datasetfield_test.go +++ b/logpush/datasetfield_test.go @@ -15,7 +15,7 @@ import ( ) func TestDatasetFieldGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/logpush/datasetjob_test.go b/logpush/datasetjob_test.go index f2016d43a1..be4e14eb32 100644 --- a/logpush/datasetjob_test.go +++ b/logpush/datasetjob_test.go @@ -15,7 +15,7 @@ import ( ) func TestDatasetJobGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/logpush/edge_test.go b/logpush/edge_test.go index 679fa60a4f..8d72978318 100644 --- a/logpush/edge_test.go +++ b/logpush/edge_test.go @@ -15,7 +15,6 @@ import ( ) func TestEdgeNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -44,7 +43,6 @@ func TestEdgeNewWithOptionalParams(t *testing.T) { } func TestEdgeGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/logpush/job_test.go b/logpush/job_test.go index 0e4ae154ef..54256ac0a5 100644 --- a/logpush/job_test.go +++ b/logpush/job_test.go @@ -15,7 +15,7 @@ import ( ) func TestJobNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -63,7 +63,7 @@ func TestJobNewWithOptionalParams(t *testing.T) { } func TestJobUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -113,7 +113,7 @@ func TestJobUpdateWithOptionalParams(t *testing.T) { } func TestJobListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -140,7 +140,7 @@ func TestJobListWithOptionalParams(t *testing.T) { } func TestJobDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -171,7 +171,7 @@ func TestJobDeleteWithOptionalParams(t *testing.T) { } func TestJobGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/logpush/ownership_test.go b/logpush/ownership_test.go index a6aec09c0e..b637eb4920 100644 --- a/logpush/ownership_test.go +++ b/logpush/ownership_test.go @@ -15,7 +15,7 @@ import ( ) func TestOwnershipNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -43,7 +43,7 @@ func TestOwnershipNewWithOptionalParams(t *testing.T) { } func TestOwnershipValidateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/logpush/validate_test.go b/logpush/validate_test.go index 3c60fe8ec1..951a077c2a 100644 --- a/logpush/validate_test.go +++ b/logpush/validate_test.go @@ -15,7 +15,7 @@ import ( ) func TestValidateDestinationWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -43,7 +43,7 @@ func TestValidateDestinationWithOptionalParams(t *testing.T) { } func TestValidateOriginWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/logs/controlcmbconfig_test.go b/logs/controlcmbconfig_test.go index 54d324e229..2033472c6c 100644 --- a/logs/controlcmbconfig_test.go +++ b/logs/controlcmbconfig_test.go @@ -15,7 +15,6 @@ import ( ) func TestControlCmbConfigNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -44,7 +43,6 @@ func TestControlCmbConfigNewWithOptionalParams(t *testing.T) { } func TestControlCmbConfigDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -70,7 +68,6 @@ func TestControlCmbConfigDelete(t *testing.T) { } func TestControlCmbConfigGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/logs/controlretentionflag_test.go b/logs/controlretentionflag_test.go index ff637d7121..dccea36fa4 100644 --- a/logs/controlretentionflag_test.go +++ b/logs/controlretentionflag_test.go @@ -15,7 +15,6 @@ import ( ) func TestControlRetentionFlagNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,6 @@ func TestControlRetentionFlagNew(t *testing.T) { } func TestControlRetentionFlagGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/logs/rayid_test.go b/logs/rayid_test.go index 15fb0010fc..de2e088e38 100644 --- a/logs/rayid_test.go +++ b/logs/rayid_test.go @@ -15,7 +15,6 @@ import ( ) func TestRayIDGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/logs/received_test.go b/logs/received_test.go index 247857a308..d9cd4592c1 100644 --- a/logs/received_test.go +++ b/logs/received_test.go @@ -16,7 +16,6 @@ import ( ) func TestReceivedGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/logs/receivedfield_test.go b/logs/receivedfield_test.go index 84aabd88a9..bf5fe40d2e 100644 --- a/logs/receivedfield_test.go +++ b/logs/receivedfield_test.go @@ -14,7 +14,6 @@ import ( ) func TestReceivedFieldGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/magic_network_monitoring/config_test.go b/magic_network_monitoring/config_test.go index 43e250192e..aed6bbc154 100644 --- a/magic_network_monitoring/config_test.go +++ b/magic_network_monitoring/config_test.go @@ -15,7 +15,6 @@ import ( ) func TestConfigNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestConfigNew(t *testing.T) { } func TestConfigUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -69,7 +67,6 @@ func TestConfigUpdate(t *testing.T) { } func TestConfigDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -95,7 +92,6 @@ func TestConfigDelete(t *testing.T) { } func TestConfigEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -122,7 +118,6 @@ func TestConfigEdit(t *testing.T) { } func TestConfigGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/magic_network_monitoring/configfull_test.go b/magic_network_monitoring/configfull_test.go index f0b2596349..3fbcb1e2fc 100644 --- a/magic_network_monitoring/configfull_test.go +++ b/magic_network_monitoring/configfull_test.go @@ -15,7 +15,6 @@ import ( ) func TestConfigFullGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/magic_network_monitoring/rule_test.go b/magic_network_monitoring/rule_test.go index 3d302fa13f..87299520f4 100644 --- a/magic_network_monitoring/rule_test.go +++ b/magic_network_monitoring/rule_test.go @@ -15,7 +15,6 @@ import ( ) func TestRuleNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestRuleNew(t *testing.T) { } func TestRuleUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -69,7 +67,6 @@ func TestRuleUpdate(t *testing.T) { } func TestRuleList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -95,7 +92,6 @@ func TestRuleList(t *testing.T) { } func TestRuleDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -125,7 +121,6 @@ func TestRuleDelete(t *testing.T) { } func TestRuleEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -156,7 +151,6 @@ func TestRuleEdit(t *testing.T) { } func TestRuleGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/magic_network_monitoring/ruleadvertisement_test.go b/magic_network_monitoring/ruleadvertisement_test.go index dfe6f09bd8..bffae3c1fa 100644 --- a/magic_network_monitoring/ruleadvertisement_test.go +++ b/magic_network_monitoring/ruleadvertisement_test.go @@ -15,7 +15,6 @@ import ( ) func TestRuleAdvertisementEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/magic_transit/cfinterconnect_test.go b/magic_transit/cfinterconnect_test.go index 49df094f77..3379bd0da1 100644 --- a/magic_transit/cfinterconnect_test.go +++ b/magic_transit/cfinterconnect_test.go @@ -15,7 +15,6 @@ import ( ) func TestCfInterconnectUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -57,7 +56,6 @@ func TestCfInterconnectUpdateWithOptionalParams(t *testing.T) { } func TestCfInterconnectList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -83,7 +81,6 @@ func TestCfInterconnectList(t *testing.T) { } func TestCfInterconnectGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/magic_transit/gretunnel_test.go b/magic_transit/gretunnel_test.go index 4c1fc00b4f..a2f40553ce 100644 --- a/magic_transit/gretunnel_test.go +++ b/magic_transit/gretunnel_test.go @@ -15,7 +15,7 @@ import ( ) func TestGRETunnelNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +42,6 @@ func TestGRETunnelNew(t *testing.T) { } func TestGRETunnelUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -86,7 +85,6 @@ func TestGRETunnelUpdateWithOptionalParams(t *testing.T) { } func TestGRETunnelList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -112,7 +110,6 @@ func TestGRETunnelList(t *testing.T) { } func TestGRETunnelDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -142,7 +139,6 @@ func TestGRETunnelDelete(t *testing.T) { } func TestGRETunnelGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/magic_transit/ipsectunnel_test.go b/magic_transit/ipsectunnel_test.go index db0d620d47..b46d9c3955 100644 --- a/magic_transit/ipsectunnel_test.go +++ b/magic_transit/ipsectunnel_test.go @@ -15,7 +15,6 @@ import ( ) func TestIPSECTunnelNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -55,7 +54,6 @@ func TestIPSECTunnelNewWithOptionalParams(t *testing.T) { } func TestIPSECTunnelUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -99,7 +97,6 @@ func TestIPSECTunnelUpdateWithOptionalParams(t *testing.T) { } func TestIPSECTunnelList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -125,7 +122,6 @@ func TestIPSECTunnelList(t *testing.T) { } func TestIPSECTunnelDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -155,7 +151,6 @@ func TestIPSECTunnelDelete(t *testing.T) { } func TestIPSECTunnelGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -185,7 +180,6 @@ func TestIPSECTunnelGet(t *testing.T) { } func TestIPSECTunnelPSKGenerate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/magic_transit/route_test.go b/magic_transit/route_test.go index f7d3643936..201807721a 100644 --- a/magic_transit/route_test.go +++ b/magic_transit/route_test.go @@ -15,7 +15,7 @@ import ( ) func TestRouteNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +42,6 @@ func TestRouteNew(t *testing.T) { } func TestRouteUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -81,7 +80,6 @@ func TestRouteUpdateWithOptionalParams(t *testing.T) { } func TestRouteList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -107,7 +105,6 @@ func TestRouteList(t *testing.T) { } func TestRouteDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -137,7 +134,6 @@ func TestRouteDelete(t *testing.T) { } func TestRouteEmpty(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -163,7 +159,6 @@ func TestRouteEmpty(t *testing.T) { } func TestRouteGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/magic_transit/site_test.go b/magic_transit/site_test.go index a0be47ba06..3afe3718ac 100644 --- a/magic_transit/site_test.go +++ b/magic_transit/site_test.go @@ -15,7 +15,6 @@ import ( ) func TestSiteNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -50,7 +49,6 @@ func TestSiteNewWithOptionalParams(t *testing.T) { } func TestSiteUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -88,7 +86,6 @@ func TestSiteUpdateWithOptionalParams(t *testing.T) { } func TestSiteListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -115,7 +112,6 @@ func TestSiteListWithOptionalParams(t *testing.T) { } func TestSiteDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -145,7 +141,6 @@ func TestSiteDelete(t *testing.T) { } func TestSiteGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/magic_transit/siteacl_test.go b/magic_transit/siteacl_test.go index cb46352647..841afa7b36 100644 --- a/magic_transit/siteacl_test.go +++ b/magic_transit/siteacl_test.go @@ -16,7 +16,6 @@ import ( ) func TestSiteACLNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -62,7 +61,6 @@ func TestSiteACLNewWithOptionalParams(t *testing.T) { } func TestSiteACLUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -109,7 +107,6 @@ func TestSiteACLUpdateWithOptionalParams(t *testing.T) { } func TestSiteACLList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -139,7 +136,6 @@ func TestSiteACLList(t *testing.T) { } func TestSiteACLDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -170,7 +166,6 @@ func TestSiteACLDelete(t *testing.T) { } func TestSiteACLGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/magic_transit/sitelan_test.go b/magic_transit/sitelan_test.go index 6b7a1b2033..b38c72341b 100644 --- a/magic_transit/sitelan_test.go +++ b/magic_transit/sitelan_test.go @@ -15,7 +15,6 @@ import ( ) func TestSiteLANNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -88,7 +87,6 @@ func TestSiteLANNewWithOptionalParams(t *testing.T) { } func TestSiteLANUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -161,7 +159,6 @@ func TestSiteLANUpdateWithOptionalParams(t *testing.T) { } func TestSiteLANList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -191,7 +188,6 @@ func TestSiteLANList(t *testing.T) { } func TestSiteLANDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -222,7 +218,6 @@ func TestSiteLANDelete(t *testing.T) { } func TestSiteLANGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/magic_transit/sitewan_test.go b/magic_transit/sitewan_test.go index 3942bdc7dd..1befe50744 100644 --- a/magic_transit/sitewan_test.go +++ b/magic_transit/sitewan_test.go @@ -15,7 +15,6 @@ import ( ) func TestSiteWANNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -54,7 +53,6 @@ func TestSiteWANNewWithOptionalParams(t *testing.T) { } func TestSiteWANUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -94,7 +92,6 @@ func TestSiteWANUpdateWithOptionalParams(t *testing.T) { } func TestSiteWANList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -124,7 +121,6 @@ func TestSiteWANList(t *testing.T) { } func TestSiteWANDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -155,7 +151,6 @@ func TestSiteWANDelete(t *testing.T) { } func TestSiteWANGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/managed_headers/managedheader_test.go b/managed_headers/managedheader_test.go index e0c671db03..733083926e 100644 --- a/managed_headers/managedheader_test.go +++ b/managed_headers/managedheader_test.go @@ -15,7 +15,6 @@ import ( ) func TestManagedHeaderList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -41,7 +40,6 @@ func TestManagedHeaderList(t *testing.T) { } func TestManagedHeaderEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/memberships/membership_test.go b/memberships/membership_test.go index 0181c24d7f..5332b4e9b3 100644 --- a/memberships/membership_test.go +++ b/memberships/membership_test.go @@ -15,7 +15,6 @@ import ( ) func TestMembershipUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,6 @@ func TestMembershipUpdate(t *testing.T) { } func TestMembershipListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -79,7 +77,6 @@ func TestMembershipListWithOptionalParams(t *testing.T) { } func TestMembershipDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -103,7 +100,6 @@ func TestMembershipDelete(t *testing.T) { } func TestMembershipGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/mtls_certificates/association_test.go b/mtls_certificates/association_test.go index ef82e6bf76..f1a3219260 100644 --- a/mtls_certificates/association_test.go +++ b/mtls_certificates/association_test.go @@ -15,7 +15,6 @@ import ( ) func TestAssociationGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/mtls_certificates/mtlscertificate_test.go b/mtls_certificates/mtlscertificate_test.go index 7646b992b4..954b082a54 100644 --- a/mtls_certificates/mtlscertificate_test.go +++ b/mtls_certificates/mtlscertificate_test.go @@ -15,7 +15,6 @@ import ( ) func TestMTLSCertificateNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,6 @@ func TestMTLSCertificateNewWithOptionalParams(t *testing.T) { } func TestMTLSCertificateList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -71,7 +69,6 @@ func TestMTLSCertificateList(t *testing.T) { } func TestMTLSCertificateDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -101,7 +98,6 @@ func TestMTLSCertificateDelete(t *testing.T) { } func TestMTLSCertificateGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/origin_ca_certificates/origincacertificate_test.go b/origin_ca_certificates/origincacertificate_test.go index ba20e6d961..106ff41613 100644 --- a/origin_ca_certificates/origincacertificate_test.go +++ b/origin_ca_certificates/origincacertificate_test.go @@ -15,7 +15,6 @@ import ( ) func TestOriginCACertificateNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -44,7 +43,6 @@ func TestOriginCACertificateNewWithOptionalParams(t *testing.T) { } func TestOriginCACertificateListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -70,7 +68,6 @@ func TestOriginCACertificateListWithOptionalParams(t *testing.T) { } func TestOriginCACertificateDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -94,7 +91,6 @@ func TestOriginCACertificateDelete(t *testing.T) { } func TestOriginCACertificateGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/origin_post_quantum_encryption/originpostquantumencryption_test.go b/origin_post_quantum_encryption/originpostquantumencryption_test.go index 382c39f750..535150fea8 100644 --- a/origin_post_quantum_encryption/originpostquantumencryption_test.go +++ b/origin_post_quantum_encryption/originpostquantumencryption_test.go @@ -15,7 +15,7 @@ import ( ) func TestOriginPostQuantumEncryptionUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +42,7 @@ func TestOriginPostQuantumEncryptionUpdate(t *testing.T) { } func TestOriginPostQuantumEncryptionGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/origin_tls_client_auth/hostname_test.go b/origin_tls_client_auth/hostname_test.go index 4836ae647d..a6f8292492 100644 --- a/origin_tls_client_auth/hostname_test.go +++ b/origin_tls_client_auth/hostname_test.go @@ -15,7 +15,6 @@ import ( ) func TestHostnameUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -54,7 +53,6 @@ func TestHostnameUpdate(t *testing.T) { } func TestHostnameGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/origin_tls_client_auth/hostnamecertificate_test.go b/origin_tls_client_auth/hostnamecertificate_test.go index 6af3d9f65f..591373513c 100644 --- a/origin_tls_client_auth/hostnamecertificate_test.go +++ b/origin_tls_client_auth/hostnamecertificate_test.go @@ -15,7 +15,6 @@ import ( ) func TestHostnameCertificateNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -43,7 +42,6 @@ func TestHostnameCertificateNew(t *testing.T) { } func TestHostnameCertificateList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -69,7 +67,6 @@ func TestHostnameCertificateList(t *testing.T) { } func TestHostnameCertificateDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -99,7 +96,6 @@ func TestHostnameCertificateDelete(t *testing.T) { } func TestHostnameCertificateGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/origin_tls_client_auth/origintlsclientauth_test.go b/origin_tls_client_auth/origintlsclientauth_test.go index 2f058c9f0f..335c32b1d5 100644 --- a/origin_tls_client_auth/origintlsclientauth_test.go +++ b/origin_tls_client_auth/origintlsclientauth_test.go @@ -15,7 +15,6 @@ import ( ) func TestOriginTLSClientAuthNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -43,7 +42,6 @@ func TestOriginTLSClientAuthNew(t *testing.T) { } func TestOriginTLSClientAuthList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -69,7 +67,6 @@ func TestOriginTLSClientAuthList(t *testing.T) { } func TestOriginTLSClientAuthDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -99,7 +96,6 @@ func TestOriginTLSClientAuthDelete(t *testing.T) { } func TestOriginTLSClientAuthGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/origin_tls_client_auth/setting_test.go b/origin_tls_client_auth/setting_test.go index e5a70e3a48..7d70daae3c 100644 --- a/origin_tls_client_auth/setting_test.go +++ b/origin_tls_client_auth/setting_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingUpdate(t *testing.T) { } func TestSettingGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/page_shield/connection_test.go b/page_shield/connection_test.go index 288a28035c..ef394be0df 100644 --- a/page_shield/connection_test.go +++ b/page_shield/connection_test.go @@ -15,7 +15,6 @@ import ( ) func TestConnectionListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -53,7 +52,6 @@ func TestConnectionListWithOptionalParams(t *testing.T) { } func TestConnectionGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/page_shield/pageshield_test.go b/page_shield/pageshield_test.go index 968d323a4e..bca1f914bd 100644 --- a/page_shield/pageshield_test.go +++ b/page_shield/pageshield_test.go @@ -15,7 +15,6 @@ import ( ) func TestPageShieldUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -44,7 +43,6 @@ func TestPageShieldUpdateWithOptionalParams(t *testing.T) { } func TestPageShieldGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/page_shield/policy_test.go b/page_shield/policy_test.go index 0183e95356..9b078e19f4 100644 --- a/page_shield/policy_test.go +++ b/page_shield/policy_test.go @@ -15,7 +15,6 @@ import ( ) func TestPolicyNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -46,7 +45,6 @@ func TestPolicyNewWithOptionalParams(t *testing.T) { } func TestPolicyUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -81,7 +79,6 @@ func TestPolicyUpdateWithOptionalParams(t *testing.T) { } func TestPolicyList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -107,7 +104,6 @@ func TestPolicyList(t *testing.T) { } func TestPolicyDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -137,7 +133,6 @@ func TestPolicyDelete(t *testing.T) { } func TestPolicyGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/page_shield/script_test.go b/page_shield/script_test.go index 794b5c473c..17b619227f 100644 --- a/page_shield/script_test.go +++ b/page_shield/script_test.go @@ -15,7 +15,6 @@ import ( ) func TestScriptListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -54,7 +53,6 @@ func TestScriptListWithOptionalParams(t *testing.T) { } func TestScriptGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/pagerules/pagerule_test.go b/pagerules/pagerule_test.go index d14bbdf58f..e845030563 100644 --- a/pagerules/pagerule_test.go +++ b/pagerules/pagerule_test.go @@ -15,7 +15,6 @@ import ( ) func TestPageruleNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -69,7 +68,6 @@ func TestPageruleNewWithOptionalParams(t *testing.T) { } func TestPageruleUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -127,7 +125,6 @@ func TestPageruleUpdateWithOptionalParams(t *testing.T) { } func TestPageruleListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -157,7 +154,6 @@ func TestPageruleListWithOptionalParams(t *testing.T) { } func TestPageruleDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -187,7 +183,6 @@ func TestPageruleDelete(t *testing.T) { } func TestPageruleEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -245,7 +240,6 @@ func TestPageruleEditWithOptionalParams(t *testing.T) { } func TestPageruleGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/pagerules/setting_test.go b/pagerules/setting_test.go index 8d66dfd03d..0910e68a79 100644 --- a/pagerules/setting_test.go +++ b/pagerules/setting_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/pages/project_test.go b/pages/project_test.go index 5d11449b58..c48fe64589 100644 --- a/pages/project_test.go +++ b/pages/project_test.go @@ -15,7 +15,6 @@ import ( ) func TestProjectNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -203,7 +202,6 @@ func TestProjectNewWithOptionalParams(t *testing.T) { } func TestProjectList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -229,7 +227,6 @@ func TestProjectList(t *testing.T) { } func TestProjectDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -259,7 +256,6 @@ func TestProjectDelete(t *testing.T) { } func TestProjectEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -309,7 +305,6 @@ func TestProjectEdit(t *testing.T) { } func TestProjectGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -339,7 +334,6 @@ func TestProjectGet(t *testing.T) { } func TestProjectPurgeBuildCache(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/pages/projectdeployment_test.go b/pages/projectdeployment_test.go index 7481b12c29..4471944897 100644 --- a/pages/projectdeployment_test.go +++ b/pages/projectdeployment_test.go @@ -15,7 +15,7 @@ import ( ) func TestProjectDeploymentNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -46,7 +46,6 @@ func TestProjectDeploymentNewWithOptionalParams(t *testing.T) { } func TestProjectDeploymentListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -77,7 +76,6 @@ func TestProjectDeploymentListWithOptionalParams(t *testing.T) { } func TestProjectDeploymentDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -108,7 +106,6 @@ func TestProjectDeploymentDelete(t *testing.T) { } func TestProjectDeploymentGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -139,7 +136,6 @@ func TestProjectDeploymentGet(t *testing.T) { } func TestProjectDeploymentRetry(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -171,7 +167,6 @@ func TestProjectDeploymentRetry(t *testing.T) { } func TestProjectDeploymentRollback(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/pages/projectdeploymenthistorylog_test.go b/pages/projectdeploymenthistorylog_test.go index 14e6c374f6..16ea453d67 100644 --- a/pages/projectdeploymenthistorylog_test.go +++ b/pages/projectdeploymenthistorylog_test.go @@ -15,7 +15,6 @@ import ( ) func TestProjectDeploymentHistoryLogGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/pages/projectdomain_test.go b/pages/projectdomain_test.go index 8f543d7230..c2414669e8 100644 --- a/pages/projectdomain_test.go +++ b/pages/projectdomain_test.go @@ -15,7 +15,6 @@ import ( ) func TestProjectDomainNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -48,7 +47,6 @@ func TestProjectDomainNew(t *testing.T) { } func TestProjectDomainList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -78,7 +76,6 @@ func TestProjectDomainList(t *testing.T) { } func TestProjectDomainDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -109,7 +106,6 @@ func TestProjectDomainDelete(t *testing.T) { } func TestProjectDomainEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -141,7 +137,6 @@ func TestProjectDomainEdit(t *testing.T) { } func TestProjectDomainGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/pcaps/download_test.go b/pcaps/download_test.go index b8b39208bc..deffd349a3 100644 --- a/pcaps/download_test.go +++ b/pcaps/download_test.go @@ -17,7 +17,6 @@ import ( ) func TestDownloadGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(200) w.Write([]byte("abc")) diff --git a/pcaps/ownership_test.go b/pcaps/ownership_test.go index 2724e3c429..80ed081c41 100644 --- a/pcaps/ownership_test.go +++ b/pcaps/ownership_test.go @@ -15,7 +15,6 @@ import ( ) func TestOwnershipNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestOwnershipNew(t *testing.T) { } func TestOwnershipDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -72,7 +70,6 @@ func TestOwnershipDelete(t *testing.T) { } func TestOwnershipGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -98,7 +95,6 @@ func TestOwnershipGet(t *testing.T) { } func TestOwnershipValidate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/pcaps/pcap_test.go b/pcaps/pcap_test.go index d67b4f2e14..3541fdc1a2 100644 --- a/pcaps/pcap_test.go +++ b/pcaps/pcap_test.go @@ -15,7 +15,6 @@ import ( ) func TestPCAPNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -54,7 +53,6 @@ func TestPCAPNewWithOptionalParams(t *testing.T) { } func TestPCAPList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -80,7 +78,6 @@ func TestPCAPList(t *testing.T) { } func TestPCAPGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/plans/plan_test.go b/plans/plan_test.go index 122d9cac3c..7f9158a410 100644 --- a/plans/plan_test.go +++ b/plans/plan_test.go @@ -14,7 +14,6 @@ import ( ) func TestPlanList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -38,7 +37,6 @@ func TestPlanList(t *testing.T) { } func TestPlanGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/queues/consumer_test.go b/queues/consumer_test.go index 82e01dc451..5824140f0c 100644 --- a/queues/consumer_test.go +++ b/queues/consumer_test.go @@ -15,7 +15,6 @@ import ( ) func TestConsumerNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -56,7 +55,6 @@ func TestConsumerNew(t *testing.T) { } func TestConsumerUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -95,7 +93,6 @@ func TestConsumerUpdate(t *testing.T) { } func TestConsumerDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -126,7 +123,6 @@ func TestConsumerDelete(t *testing.T) { } func TestConsumerGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/queues/message_test.go b/queues/message_test.go index 6836144d12..e17d831229 100644 --- a/queues/message_test.go +++ b/queues/message_test.go @@ -15,7 +15,6 @@ import ( ) func TestMessageAckWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -62,7 +61,6 @@ func TestMessageAckWithOptionalParams(t *testing.T) { } func TestMessagePullWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/queues/queue_test.go b/queues/queue_test.go index f8c3f0a63a..befa980cc1 100644 --- a/queues/queue_test.go +++ b/queues/queue_test.go @@ -15,7 +15,6 @@ import ( ) func TestQueueNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -44,7 +43,6 @@ func TestQueueNew(t *testing.T) { } func TestQueueUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -77,7 +75,6 @@ func TestQueueUpdate(t *testing.T) { } func TestQueueList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -103,7 +100,6 @@ func TestQueueList(t *testing.T) { } func TestQueueDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -133,7 +129,6 @@ func TestQueueDelete(t *testing.T) { } func TestQueueGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/r2/bucket_test.go b/r2/bucket_test.go index 624e783ccd..6109ef77c3 100644 --- a/r2/bucket_test.go +++ b/r2/bucket_test.go @@ -15,7 +15,6 @@ import ( ) func TestBucketNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -43,7 +42,6 @@ func TestBucketNewWithOptionalParams(t *testing.T) { } func TestBucketListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -75,7 +73,6 @@ func TestBucketListWithOptionalParams(t *testing.T) { } func TestBucketDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -105,7 +102,6 @@ func TestBucketDelete(t *testing.T) { } func TestBucketGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/r2/sippy_test.go b/r2/sippy_test.go index b6b699e22e..ab8653a471 100644 --- a/r2/sippy_test.go +++ b/r2/sippy_test.go @@ -15,7 +15,6 @@ import ( ) func TestSippyUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -59,7 +58,6 @@ func TestSippyUpdateWithOptionalParams(t *testing.T) { } func TestSippyDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -89,7 +87,6 @@ func TestSippyDelete(t *testing.T) { } func TestSippyGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/annotationoutage_test.go b/radar/annotationoutage_test.go index c173e6527a..a533dbd954 100644 --- a/radar/annotationoutage_test.go +++ b/radar/annotationoutage_test.go @@ -16,7 +16,6 @@ import ( ) func TestAnnotationOutageGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -49,7 +48,6 @@ func TestAnnotationOutageGetWithOptionalParams(t *testing.T) { } func TestAnnotationOutageLocationsWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/as112_test.go b/radar/as112_test.go index 43db28bb62..4fa0a53d71 100644 --- a/radar/as112_test.go +++ b/radar/as112_test.go @@ -16,7 +16,6 @@ import ( ) func TestAS112TimeseriesWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/as112summary_test.go b/radar/as112summary_test.go index 768baf515e..5f6c47b79a 100644 --- a/radar/as112summary_test.go +++ b/radar/as112summary_test.go @@ -16,7 +16,6 @@ import ( ) func TestAS112SummaryDNSSECWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -49,7 +48,6 @@ func TestAS112SummaryDNSSECWithOptionalParams(t *testing.T) { } func TestAS112SummaryEdnsWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -82,7 +80,6 @@ func TestAS112SummaryEdnsWithOptionalParams(t *testing.T) { } func TestAS112SummaryIPVersionWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -115,7 +112,6 @@ func TestAS112SummaryIPVersionWithOptionalParams(t *testing.T) { } func TestAS112SummaryProtocolWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -148,7 +144,6 @@ func TestAS112SummaryProtocolWithOptionalParams(t *testing.T) { } func TestAS112SummaryQueryTypeWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -181,7 +176,6 @@ func TestAS112SummaryQueryTypeWithOptionalParams(t *testing.T) { } func TestAS112SummaryResponseCodesWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/as112timeseriesgroup_test.go b/radar/as112timeseriesgroup_test.go index 020483321a..54e4e94cb1 100644 --- a/radar/as112timeseriesgroup_test.go +++ b/radar/as112timeseriesgroup_test.go @@ -16,7 +16,6 @@ import ( ) func TestAS112TimeseriesGroupDNSSECWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -50,7 +49,6 @@ func TestAS112TimeseriesGroupDNSSECWithOptionalParams(t *testing.T) { } func TestAS112TimeseriesGroupEdnsWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -84,7 +82,6 @@ func TestAS112TimeseriesGroupEdnsWithOptionalParams(t *testing.T) { } func TestAS112TimeseriesGroupIPVersionWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -118,7 +115,6 @@ func TestAS112TimeseriesGroupIPVersionWithOptionalParams(t *testing.T) { } func TestAS112TimeseriesGroupProtocolWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -152,7 +148,6 @@ func TestAS112TimeseriesGroupProtocolWithOptionalParams(t *testing.T) { } func TestAS112TimeseriesGroupQueryTypeWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -186,7 +181,6 @@ func TestAS112TimeseriesGroupQueryTypeWithOptionalParams(t *testing.T) { } func TestAS112TimeseriesGroupResponseCodesWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/as112top_test.go b/radar/as112top_test.go index e54bcdb3d5..0d66fbce00 100644 --- a/radar/as112top_test.go +++ b/radar/as112top_test.go @@ -16,7 +16,6 @@ import ( ) func TestAS112TopDNSSECWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -54,7 +53,6 @@ func TestAS112TopDNSSECWithOptionalParams(t *testing.T) { } func TestAS112TopEdnsWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -92,7 +90,6 @@ func TestAS112TopEdnsWithOptionalParams(t *testing.T) { } func TestAS112TopIPVersionWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -130,7 +127,6 @@ func TestAS112TopIPVersionWithOptionalParams(t *testing.T) { } func TestAS112TopLocationsWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/attacklayer3_test.go b/radar/attacklayer3_test.go index 448a71e9a5..230309eee2 100644 --- a/radar/attacklayer3_test.go +++ b/radar/attacklayer3_test.go @@ -16,7 +16,6 @@ import ( ) func TestAttackLayer3TimeseriesWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/attacklayer3summary_test.go b/radar/attacklayer3summary_test.go index 409533aa76..c847ce6e46 100644 --- a/radar/attacklayer3summary_test.go +++ b/radar/attacklayer3summary_test.go @@ -16,7 +16,6 @@ import ( ) func TestAttackLayer3SummaryBitrateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -51,7 +50,6 @@ func TestAttackLayer3SummaryBitrateWithOptionalParams(t *testing.T) { } func TestAttackLayer3SummaryDurationWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -86,7 +84,6 @@ func TestAttackLayer3SummaryDurationWithOptionalParams(t *testing.T) { } func TestAttackLayer3SummaryGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -119,7 +116,6 @@ func TestAttackLayer3SummaryGetWithOptionalParams(t *testing.T) { } func TestAttackLayer3SummaryIPVersionWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -153,7 +149,6 @@ func TestAttackLayer3SummaryIPVersionWithOptionalParams(t *testing.T) { } func TestAttackLayer3SummaryProtocolWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -187,7 +182,6 @@ func TestAttackLayer3SummaryProtocolWithOptionalParams(t *testing.T) { } func TestAttackLayer3SummaryVectorWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/attacklayer3timeseriesgroup_test.go b/radar/attacklayer3timeseriesgroup_test.go index 12865a68a3..ced4274e50 100644 --- a/radar/attacklayer3timeseriesgroup_test.go +++ b/radar/attacklayer3timeseriesgroup_test.go @@ -16,7 +16,6 @@ import ( ) func TestAttackLayer3TimeseriesGroupBitrateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -53,7 +52,6 @@ func TestAttackLayer3TimeseriesGroupBitrateWithOptionalParams(t *testing.T) { } func TestAttackLayer3TimeseriesGroupDurationWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -90,7 +88,6 @@ func TestAttackLayer3TimeseriesGroupDurationWithOptionalParams(t *testing.T) { } func TestAttackLayer3TimeseriesGroupGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -124,7 +121,6 @@ func TestAttackLayer3TimeseriesGroupGetWithOptionalParams(t *testing.T) { } func TestAttackLayer3TimeseriesGroupIndustryWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -161,7 +157,6 @@ func TestAttackLayer3TimeseriesGroupIndustryWithOptionalParams(t *testing.T) { } func TestAttackLayer3TimeseriesGroupIPVersionWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -197,7 +192,6 @@ func TestAttackLayer3TimeseriesGroupIPVersionWithOptionalParams(t *testing.T) { } func TestAttackLayer3TimeseriesGroupProtocolWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -233,7 +227,6 @@ func TestAttackLayer3TimeseriesGroupProtocolWithOptionalParams(t *testing.T) { } func TestAttackLayer3TimeseriesGroupVectorWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -271,7 +264,6 @@ func TestAttackLayer3TimeseriesGroupVectorWithOptionalParams(t *testing.T) { } func TestAttackLayer3TimeseriesGroupVerticalWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/attacklayer3top_test.go b/radar/attacklayer3top_test.go index c27f5a0365..23a2a8e4ce 100644 --- a/radar/attacklayer3top_test.go +++ b/radar/attacklayer3top_test.go @@ -16,7 +16,6 @@ import ( ) func TestAttackLayer3TopAttacksWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -53,7 +52,6 @@ func TestAttackLayer3TopAttacksWithOptionalParams(t *testing.T) { } func TestAttackLayer3TopIndustryWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -88,7 +86,6 @@ func TestAttackLayer3TopIndustryWithOptionalParams(t *testing.T) { } func TestAttackLayer3TopVerticalWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/attacklayer3toplocation_test.go b/radar/attacklayer3toplocation_test.go index 3d13f00b26..d33d9abded 100644 --- a/radar/attacklayer3toplocation_test.go +++ b/radar/attacklayer3toplocation_test.go @@ -16,7 +16,6 @@ import ( ) func TestAttackLayer3TopLocationOriginWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -51,7 +50,6 @@ func TestAttackLayer3TopLocationOriginWithOptionalParams(t *testing.T) { } func TestAttackLayer3TopLocationTargetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/attacklayer7_test.go b/radar/attacklayer7_test.go index e9185184a6..546c13423c 100644 --- a/radar/attacklayer7_test.go +++ b/radar/attacklayer7_test.go @@ -16,7 +16,6 @@ import ( ) func TestAttackLayer7TimeseriesWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/attacklayer7summary_test.go b/radar/attacklayer7summary_test.go index 4d52fad6d8..609911d170 100644 --- a/radar/attacklayer7summary_test.go +++ b/radar/attacklayer7summary_test.go @@ -16,7 +16,6 @@ import ( ) func TestAttackLayer7SummaryGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -49,7 +48,6 @@ func TestAttackLayer7SummaryGetWithOptionalParams(t *testing.T) { } func TestAttackLayer7SummaryHTTPMethodWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -85,7 +83,6 @@ func TestAttackLayer7SummaryHTTPMethodWithOptionalParams(t *testing.T) { } func TestAttackLayer7SummaryHTTPVersionWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -121,7 +118,6 @@ func TestAttackLayer7SummaryHTTPVersionWithOptionalParams(t *testing.T) { } func TestAttackLayer7SummaryIPVersionWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -157,7 +153,6 @@ func TestAttackLayer7SummaryIPVersionWithOptionalParams(t *testing.T) { } func TestAttackLayer7SummaryManagedRulesWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -194,7 +189,6 @@ func TestAttackLayer7SummaryManagedRulesWithOptionalParams(t *testing.T) { } func TestAttackLayer7SummaryMitigationProductWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/attacklayer7timeseriesgroup_test.go b/radar/attacklayer7timeseriesgroup_test.go index 688542200d..fc4edfbf42 100644 --- a/radar/attacklayer7timeseriesgroup_test.go +++ b/radar/attacklayer7timeseriesgroup_test.go @@ -16,7 +16,6 @@ import ( ) func TestAttackLayer7TimeseriesGroupGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -50,7 +49,6 @@ func TestAttackLayer7TimeseriesGroupGetWithOptionalParams(t *testing.T) { } func TestAttackLayer7TimeseriesGroupHTTPMethodWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -88,7 +86,6 @@ func TestAttackLayer7TimeseriesGroupHTTPMethodWithOptionalParams(t *testing.T) { } func TestAttackLayer7TimeseriesGroupHTTPVersionWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -126,7 +123,6 @@ func TestAttackLayer7TimeseriesGroupHTTPVersionWithOptionalParams(t *testing.T) } func TestAttackLayer7TimeseriesGroupIndustryWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -166,7 +162,6 @@ func TestAttackLayer7TimeseriesGroupIndustryWithOptionalParams(t *testing.T) { } func TestAttackLayer7TimeseriesGroupIPVersionWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -204,7 +199,6 @@ func TestAttackLayer7TimeseriesGroupIPVersionWithOptionalParams(t *testing.T) { } func TestAttackLayer7TimeseriesGroupManagedRulesWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -243,7 +237,6 @@ func TestAttackLayer7TimeseriesGroupManagedRulesWithOptionalParams(t *testing.T) } func TestAttackLayer7TimeseriesGroupMitigationProductWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -281,7 +274,6 @@ func TestAttackLayer7TimeseriesGroupMitigationProductWithOptionalParams(t *testi } func TestAttackLayer7TimeseriesGroupVerticalWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/attacklayer7top_test.go b/radar/attacklayer7top_test.go index 628cc58bc4..e7e4d38f7c 100644 --- a/radar/attacklayer7top_test.go +++ b/radar/attacklayer7top_test.go @@ -16,7 +16,6 @@ import ( ) func TestAttackLayer7TopAttacksWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -53,7 +52,6 @@ func TestAttackLayer7TopAttacksWithOptionalParams(t *testing.T) { } func TestAttackLayer7TopIndustryWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -87,7 +85,6 @@ func TestAttackLayer7TopIndustryWithOptionalParams(t *testing.T) { } func TestAttackLayer7TopVerticalWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/attacklayer7topase_test.go b/radar/attacklayer7topase_test.go index e70550c2d5..399b257044 100644 --- a/radar/attacklayer7topase_test.go +++ b/radar/attacklayer7topase_test.go @@ -16,7 +16,6 @@ import ( ) func TestAttackLayer7TopAseOriginWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/attacklayer7toplocation_test.go b/radar/attacklayer7toplocation_test.go index 3eab517f3a..78a9556c3b 100644 --- a/radar/attacklayer7toplocation_test.go +++ b/radar/attacklayer7toplocation_test.go @@ -16,7 +16,6 @@ import ( ) func TestAttackLayer7TopLocationOriginWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -49,7 +48,6 @@ func TestAttackLayer7TopLocationOriginWithOptionalParams(t *testing.T) { } func TestAttackLayer7TopLocationTargetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/bgp_test.go b/radar/bgp_test.go index 697640b698..f16397aa99 100644 --- a/radar/bgp_test.go +++ b/radar/bgp_test.go @@ -16,7 +16,6 @@ import ( ) func TestBGPTimeseriesWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/bgphijackevent_test.go b/radar/bgphijackevent_test.go index ad36d1ce82..61551b2128 100644 --- a/radar/bgphijackevent_test.go +++ b/radar/bgphijackevent_test.go @@ -16,7 +16,6 @@ import ( ) func TestBGPHijackEventListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/bgpleakevent_test.go b/radar/bgpleakevent_test.go index 7c44f8c02c..b9f66befcf 100644 --- a/radar/bgpleakevent_test.go +++ b/radar/bgpleakevent_test.go @@ -16,7 +16,6 @@ import ( ) func TestBGPLeakEventListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/bgproute_test.go b/radar/bgproute_test.go index ea6e529d24..ecc17a1863 100644 --- a/radar/bgproute_test.go +++ b/radar/bgproute_test.go @@ -16,7 +16,6 @@ import ( ) func TestBGPRouteMoasWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,6 @@ func TestBGPRouteMoasWithOptionalParams(t *testing.T) { } func TestBGPRoutePfx2asWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -75,7 +73,6 @@ func TestBGPRoutePfx2asWithOptionalParams(t *testing.T) { } func TestBGPRouteStatsWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -103,7 +100,6 @@ func TestBGPRouteStatsWithOptionalParams(t *testing.T) { } func TestBGPRouteTimeseriesWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/bgptop_test.go b/radar/bgptop_test.go index 0c8569d86c..cd787055c8 100644 --- a/radar/bgptop_test.go +++ b/radar/bgptop_test.go @@ -16,7 +16,6 @@ import ( ) func TestBGPTopPrefixesWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/bgptopase_test.go b/radar/bgptopase_test.go index f810340c0d..1bcb8166a0 100644 --- a/radar/bgptopase_test.go +++ b/radar/bgptopase_test.go @@ -16,7 +16,6 @@ import ( ) func TestBGPTopAseGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -50,7 +49,6 @@ func TestBGPTopAseGetWithOptionalParams(t *testing.T) { } func TestBGPTopAsePrefixesWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/connectiontampering_test.go b/radar/connectiontampering_test.go index c600683cb7..911f2ae18d 100644 --- a/radar/connectiontampering_test.go +++ b/radar/connectiontampering_test.go @@ -16,7 +16,6 @@ import ( ) func TestConnectionTamperingSummaryWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -49,7 +48,6 @@ func TestConnectionTamperingSummaryWithOptionalParams(t *testing.T) { } func TestConnectionTamperingTimeseriesGroupsWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/dataset_test.go b/radar/dataset_test.go index 4d5c837597..06d80cb332 100644 --- a/radar/dataset_test.go +++ b/radar/dataset_test.go @@ -15,7 +15,6 @@ import ( ) func TestDatasetListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -44,7 +43,6 @@ func TestDatasetListWithOptionalParams(t *testing.T) { } func TestDatasetDownloadWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -71,7 +69,6 @@ func TestDatasetDownloadWithOptionalParams(t *testing.T) { } func TestDatasetGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/dnstop_test.go b/radar/dnstop_test.go index c1a9be9988..2653b06810 100644 --- a/radar/dnstop_test.go +++ b/radar/dnstop_test.go @@ -16,7 +16,6 @@ import ( ) func TestDNSTopAsesWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -51,7 +50,6 @@ func TestDNSTopAsesWithOptionalParams(t *testing.T) { } func TestDNSTopLocationsWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/emailroutingsummary_test.go b/radar/emailroutingsummary_test.go index 55c8448445..bd89f46be8 100644 --- a/radar/emailroutingsummary_test.go +++ b/radar/emailroutingsummary_test.go @@ -16,7 +16,6 @@ import ( ) func TestEmailRoutingSummaryARCWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -51,7 +50,6 @@ func TestEmailRoutingSummaryARCWithOptionalParams(t *testing.T) { } func TestEmailRoutingSummaryDKIMWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -86,7 +84,6 @@ func TestEmailRoutingSummaryDKIMWithOptionalParams(t *testing.T) { } func TestEmailRoutingSummaryDMARCWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -121,7 +118,6 @@ func TestEmailRoutingSummaryDMARCWithOptionalParams(t *testing.T) { } func TestEmailRoutingSummaryEncryptedWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -156,7 +152,6 @@ func TestEmailRoutingSummaryEncryptedWithOptionalParams(t *testing.T) { } func TestEmailRoutingSummaryIPVersionWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -191,7 +186,6 @@ func TestEmailRoutingSummaryIPVersionWithOptionalParams(t *testing.T) { } func TestEmailRoutingSummarySPFWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/emailroutingtimeseriesgroup_test.go b/radar/emailroutingtimeseriesgroup_test.go index 029e959e83..a9e7cd6a95 100644 --- a/radar/emailroutingtimeseriesgroup_test.go +++ b/radar/emailroutingtimeseriesgroup_test.go @@ -16,7 +16,6 @@ import ( ) func TestEmailRoutingTimeseriesGroupARCWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -52,7 +51,6 @@ func TestEmailRoutingTimeseriesGroupARCWithOptionalParams(t *testing.T) { } func TestEmailRoutingTimeseriesGroupDKIMWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -88,7 +86,6 @@ func TestEmailRoutingTimeseriesGroupDKIMWithOptionalParams(t *testing.T) { } func TestEmailRoutingTimeseriesGroupDMARCWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -124,7 +121,6 @@ func TestEmailRoutingTimeseriesGroupDMARCWithOptionalParams(t *testing.T) { } func TestEmailRoutingTimeseriesGroupEncryptedWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -160,7 +156,6 @@ func TestEmailRoutingTimeseriesGroupEncryptedWithOptionalParams(t *testing.T) { } func TestEmailRoutingTimeseriesGroupIPVersionWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -196,7 +191,6 @@ func TestEmailRoutingTimeseriesGroupIPVersionWithOptionalParams(t *testing.T) { } func TestEmailRoutingTimeseriesGroupSPFWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/emailsecuritysummary_test.go b/radar/emailsecuritysummary_test.go index e0c51af3e6..3737b331fe 100644 --- a/radar/emailsecuritysummary_test.go +++ b/radar/emailsecuritysummary_test.go @@ -16,7 +16,6 @@ import ( ) func TestEmailSecuritySummaryARCWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -50,7 +49,6 @@ func TestEmailSecuritySummaryARCWithOptionalParams(t *testing.T) { } func TestEmailSecuritySummaryDKIMWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -84,7 +82,6 @@ func TestEmailSecuritySummaryDKIMWithOptionalParams(t *testing.T) { } func TestEmailSecuritySummaryDMARCWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -118,7 +115,6 @@ func TestEmailSecuritySummaryDMARCWithOptionalParams(t *testing.T) { } func TestEmailSecuritySummaryMaliciousWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -153,7 +149,6 @@ func TestEmailSecuritySummaryMaliciousWithOptionalParams(t *testing.T) { } func TestEmailSecuritySummarySpamWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -188,7 +183,6 @@ func TestEmailSecuritySummarySpamWithOptionalParams(t *testing.T) { } func TestEmailSecuritySummarySPFWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -222,7 +216,6 @@ func TestEmailSecuritySummarySPFWithOptionalParams(t *testing.T) { } func TestEmailSecuritySummarySpoofWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -257,7 +250,6 @@ func TestEmailSecuritySummarySpoofWithOptionalParams(t *testing.T) { } func TestEmailSecuritySummaryThreatCategoryWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -292,7 +284,6 @@ func TestEmailSecuritySummaryThreatCategoryWithOptionalParams(t *testing.T) { } func TestEmailSecuritySummaryTLSVersionWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/emailsecuritytimeseriesgroup_test.go b/radar/emailsecuritytimeseriesgroup_test.go index d480fd9987..c93fe209ee 100644 --- a/radar/emailsecuritytimeseriesgroup_test.go +++ b/radar/emailsecuritytimeseriesgroup_test.go @@ -16,7 +16,6 @@ import ( ) func TestEmailSecurityTimeseriesGroupARCWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -51,7 +50,6 @@ func TestEmailSecurityTimeseriesGroupARCWithOptionalParams(t *testing.T) { } func TestEmailSecurityTimeseriesGroupDKIMWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -86,7 +84,6 @@ func TestEmailSecurityTimeseriesGroupDKIMWithOptionalParams(t *testing.T) { } func TestEmailSecurityTimeseriesGroupDMARCWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -121,7 +118,6 @@ func TestEmailSecurityTimeseriesGroupDMARCWithOptionalParams(t *testing.T) { } func TestEmailSecurityTimeseriesGroupMaliciousWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -157,7 +153,6 @@ func TestEmailSecurityTimeseriesGroupMaliciousWithOptionalParams(t *testing.T) { } func TestEmailSecurityTimeseriesGroupSpamWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -193,7 +188,6 @@ func TestEmailSecurityTimeseriesGroupSpamWithOptionalParams(t *testing.T) { } func TestEmailSecurityTimeseriesGroupSPFWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -228,7 +222,6 @@ func TestEmailSecurityTimeseriesGroupSPFWithOptionalParams(t *testing.T) { } func TestEmailSecurityTimeseriesGroupSpoofWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -264,7 +257,6 @@ func TestEmailSecurityTimeseriesGroupSpoofWithOptionalParams(t *testing.T) { } func TestEmailSecurityTimeseriesGroupThreatCategoryWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -300,7 +292,6 @@ func TestEmailSecurityTimeseriesGroupThreatCategoryWithOptionalParams(t *testing } func TestEmailSecurityTimeseriesGroupTLSVersionWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/emailsecuritytoptld_test.go b/radar/emailsecuritytoptld_test.go index 6460369f71..d6198370e0 100644 --- a/radar/emailsecuritytoptld_test.go +++ b/radar/emailsecuritytoptld_test.go @@ -16,7 +16,6 @@ import ( ) func TestEmailSecurityTopTldGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/emailsecuritytoptldmalicious_test.go b/radar/emailsecuritytoptldmalicious_test.go index 3c65f75d1d..f16eca0c2a 100644 --- a/radar/emailsecuritytoptldmalicious_test.go +++ b/radar/emailsecuritytoptldmalicious_test.go @@ -16,7 +16,6 @@ import ( ) func TestEmailSecurityTopTldMaliciousGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/emailsecuritytoptldspam_test.go b/radar/emailsecuritytoptldspam_test.go index 410fcee85b..115307839a 100644 --- a/radar/emailsecuritytoptldspam_test.go +++ b/radar/emailsecuritytoptldspam_test.go @@ -16,7 +16,6 @@ import ( ) func TestEmailSecurityTopTldSpamGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/emailsecuritytoptldspoof_test.go b/radar/emailsecuritytoptldspoof_test.go index 6f42b6b9bd..f0325a2465 100644 --- a/radar/emailsecuritytoptldspoof_test.go +++ b/radar/emailsecuritytoptldspoof_test.go @@ -16,7 +16,6 @@ import ( ) func TestEmailSecurityTopTldSpoofGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/entity_test.go b/radar/entity_test.go index 44a99cf761..6913fbbb04 100644 --- a/radar/entity_test.go +++ b/radar/entity_test.go @@ -15,7 +15,6 @@ import ( ) func TestEntityGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/entityasn_test.go b/radar/entityasn_test.go index 8c76e55fed..40dce71396 100644 --- a/radar/entityasn_test.go +++ b/radar/entityasn_test.go @@ -15,7 +15,6 @@ import ( ) func TestEntityASNListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -46,7 +45,6 @@ func TestEntityASNListWithOptionalParams(t *testing.T) { } func TestEntityASNGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -76,7 +74,6 @@ func TestEntityASNGetWithOptionalParams(t *testing.T) { } func TestEntityASNIPWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -103,7 +100,6 @@ func TestEntityASNIPWithOptionalParams(t *testing.T) { } func TestEntityASNRelWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/entitylocation_test.go b/radar/entitylocation_test.go index 0c8b423f9c..eba2b9fd5c 100644 --- a/radar/entitylocation_test.go +++ b/radar/entitylocation_test.go @@ -15,7 +15,6 @@ import ( ) func TestEntityLocationListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -44,7 +43,6 @@ func TestEntityLocationListWithOptionalParams(t *testing.T) { } func TestEntityLocationGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/httpase_test.go b/radar/httpase_test.go index 111cb9ea07..212e8c0da1 100644 --- a/radar/httpase_test.go +++ b/radar/httpase_test.go @@ -16,7 +16,6 @@ import ( ) func TestHTTPAseGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/httpasebotclass_test.go b/radar/httpasebotclass_test.go index 85bbd64c8b..62b49d18b2 100644 --- a/radar/httpasebotclass_test.go +++ b/radar/httpasebotclass_test.go @@ -16,7 +16,6 @@ import ( ) func TestHTTPAseBotClassGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/httpasedevicetype_test.go b/radar/httpasedevicetype_test.go index eb53f13da7..63dda3d970 100644 --- a/radar/httpasedevicetype_test.go +++ b/radar/httpasedevicetype_test.go @@ -16,7 +16,6 @@ import ( ) func TestHTTPAseDeviceTypeGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/httpasehttpmethod_test.go b/radar/httpasehttpmethod_test.go index db5329cd65..8ae152bd2b 100644 --- a/radar/httpasehttpmethod_test.go +++ b/radar/httpasehttpmethod_test.go @@ -16,7 +16,6 @@ import ( ) func TestHTTPAseHTTPMethodGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/httpasehttpprotocol_test.go b/radar/httpasehttpprotocol_test.go index 6bd5d992c5..8e6b627def 100644 --- a/radar/httpasehttpprotocol_test.go +++ b/radar/httpasehttpprotocol_test.go @@ -16,7 +16,6 @@ import ( ) func TestHTTPAseHTTPProtocolGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/httpaseipversion_test.go b/radar/httpaseipversion_test.go index 271260c919..692d027695 100644 --- a/radar/httpaseipversion_test.go +++ b/radar/httpaseipversion_test.go @@ -16,7 +16,6 @@ import ( ) func TestHTTPAseIPVersionGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/httpaseos_test.go b/radar/httpaseos_test.go index e560fa37bf..4f8614b909 100644 --- a/radar/httpaseos_test.go +++ b/radar/httpaseos_test.go @@ -16,7 +16,6 @@ import ( ) func TestHTTPAseOSGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/httpasetlsversion_test.go b/radar/httpasetlsversion_test.go index 1386874dd5..372d6b02ec 100644 --- a/radar/httpasetlsversion_test.go +++ b/radar/httpasetlsversion_test.go @@ -16,7 +16,6 @@ import ( ) func TestHTTPAseTLSVersionGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/httplocation_test.go b/radar/httplocation_test.go index 8741eccd85..6590712003 100644 --- a/radar/httplocation_test.go +++ b/radar/httplocation_test.go @@ -16,7 +16,6 @@ import ( ) func TestHTTPLocationGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/httplocationbotclass_test.go b/radar/httplocationbotclass_test.go index a2c97477ea..5c5c1c058d 100644 --- a/radar/httplocationbotclass_test.go +++ b/radar/httplocationbotclass_test.go @@ -16,7 +16,6 @@ import ( ) func TestHTTPLocationBotClassGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/httplocationdevicetype_test.go b/radar/httplocationdevicetype_test.go index 995c9eba4b..1824cf65fd 100644 --- a/radar/httplocationdevicetype_test.go +++ b/radar/httplocationdevicetype_test.go @@ -16,7 +16,6 @@ import ( ) func TestHTTPLocationDeviceTypeGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/httplocationhttpmethod_test.go b/radar/httplocationhttpmethod_test.go index d285cbd49c..4ecff553ed 100644 --- a/radar/httplocationhttpmethod_test.go +++ b/radar/httplocationhttpmethod_test.go @@ -16,7 +16,6 @@ import ( ) func TestHTTPLocationHTTPMethodGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/httplocationhttpprotocol_test.go b/radar/httplocationhttpprotocol_test.go index cbbbc683ce..b8a210df83 100644 --- a/radar/httplocationhttpprotocol_test.go +++ b/radar/httplocationhttpprotocol_test.go @@ -16,7 +16,6 @@ import ( ) func TestHTTPLocationHTTPProtocolGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/httplocationipversion_test.go b/radar/httplocationipversion_test.go index 580d5b65bc..ba3048348a 100644 --- a/radar/httplocationipversion_test.go +++ b/radar/httplocationipversion_test.go @@ -16,7 +16,6 @@ import ( ) func TestHTTPLocationIPVersionGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/httplocationos_test.go b/radar/httplocationos_test.go index 090abe760f..a335f2504f 100644 --- a/radar/httplocationos_test.go +++ b/radar/httplocationos_test.go @@ -16,7 +16,6 @@ import ( ) func TestHTTPLocationOSGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/httplocationtlsversion_test.go b/radar/httplocationtlsversion_test.go index 5e2cc04a63..46e9d5595d 100644 --- a/radar/httplocationtlsversion_test.go +++ b/radar/httplocationtlsversion_test.go @@ -16,7 +16,6 @@ import ( ) func TestHTTPLocationTLSVersionGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/httpsummary_test.go b/radar/httpsummary_test.go index f22e1178fd..3faad2768d 100644 --- a/radar/httpsummary_test.go +++ b/radar/httpsummary_test.go @@ -16,7 +16,6 @@ import ( ) func TestHTTPSummaryBotClassWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -55,7 +54,6 @@ func TestHTTPSummaryBotClassWithOptionalParams(t *testing.T) { } func TestHTTPSummaryDeviceTypeWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -94,7 +92,6 @@ func TestHTTPSummaryDeviceTypeWithOptionalParams(t *testing.T) { } func TestHTTPSummaryHTTPProtocolWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -133,7 +130,6 @@ func TestHTTPSummaryHTTPProtocolWithOptionalParams(t *testing.T) { } func TestHTTPSummaryHTTPVersionWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -172,7 +168,6 @@ func TestHTTPSummaryHTTPVersionWithOptionalParams(t *testing.T) { } func TestHTTPSummaryIPVersionWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -211,7 +206,6 @@ func TestHTTPSummaryIPVersionWithOptionalParams(t *testing.T) { } func TestHTTPSummaryOSWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -250,7 +244,6 @@ func TestHTTPSummaryOSWithOptionalParams(t *testing.T) { } func TestHTTPSummaryTLSVersionWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/httptimeseriesgroup_test.go b/radar/httptimeseriesgroup_test.go index f2e9dcbb90..f7fd68ef1b 100644 --- a/radar/httptimeseriesgroup_test.go +++ b/radar/httptimeseriesgroup_test.go @@ -16,7 +16,6 @@ import ( ) func TestHTTPTimeseriesGroupBotClassWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -56,7 +55,6 @@ func TestHTTPTimeseriesGroupBotClassWithOptionalParams(t *testing.T) { } func TestHTTPTimeseriesGroupBrowserWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -98,7 +96,6 @@ func TestHTTPTimeseriesGroupBrowserWithOptionalParams(t *testing.T) { } func TestHTTPTimeseriesGroupBrowserFamilyWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -139,7 +136,6 @@ func TestHTTPTimeseriesGroupBrowserFamilyWithOptionalParams(t *testing.T) { } func TestHTTPTimeseriesGroupDeviceTypeWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -179,7 +175,6 @@ func TestHTTPTimeseriesGroupDeviceTypeWithOptionalParams(t *testing.T) { } func TestHTTPTimeseriesGroupHTTPProtocolWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -219,7 +214,6 @@ func TestHTTPTimeseriesGroupHTTPProtocolWithOptionalParams(t *testing.T) { } func TestHTTPTimeseriesGroupHTTPVersionWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -259,7 +253,6 @@ func TestHTTPTimeseriesGroupHTTPVersionWithOptionalParams(t *testing.T) { } func TestHTTPTimeseriesGroupIPVersionWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -299,7 +292,6 @@ func TestHTTPTimeseriesGroupIPVersionWithOptionalParams(t *testing.T) { } func TestHTTPTimeseriesGroupOSWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -339,7 +331,6 @@ func TestHTTPTimeseriesGroupOSWithOptionalParams(t *testing.T) { } func TestHTTPTimeseriesGroupTLSVersionWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/httptop_test.go b/radar/httptop_test.go index 083ad63986..a34eddfb21 100644 --- a/radar/httptop_test.go +++ b/radar/httptop_test.go @@ -16,7 +16,6 @@ import ( ) func TestHTTPTopBrowserFamiliesWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -57,7 +56,6 @@ func TestHTTPTopBrowserFamiliesWithOptionalParams(t *testing.T) { } func TestHTTPTopBrowsersWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/netflow_test.go b/radar/netflow_test.go index 0a7dc12d7c..aa0d2896e3 100644 --- a/radar/netflow_test.go +++ b/radar/netflow_test.go @@ -16,7 +16,6 @@ import ( ) func TestNetflowTimeseriesWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/netflowtop_test.go b/radar/netflowtop_test.go index 14d65c915c..d64037cfb5 100644 --- a/radar/netflowtop_test.go +++ b/radar/netflowtop_test.go @@ -16,7 +16,6 @@ import ( ) func TestNetflowTopAsesWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -50,7 +49,6 @@ func TestNetflowTopAsesWithOptionalParams(t *testing.T) { } func TestNetflowTopLocationsWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/qualityiqi_test.go b/radar/qualityiqi_test.go index e290873c35..2eff53238f 100644 --- a/radar/qualityiqi_test.go +++ b/radar/qualityiqi_test.go @@ -16,7 +16,6 @@ import ( ) func TestQualityIQISummaryWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -50,7 +49,6 @@ func TestQualityIQISummaryWithOptionalParams(t *testing.T) { } func TestQualityIQITimeseriesGroupsWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/qualityspeed_test.go b/radar/qualityspeed_test.go index efd12d5b35..277ec65f99 100644 --- a/radar/qualityspeed_test.go +++ b/radar/qualityspeed_test.go @@ -16,7 +16,6 @@ import ( ) func TestQualitySpeedHistogramWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -49,7 +48,6 @@ func TestQualitySpeedHistogramWithOptionalParams(t *testing.T) { } func TestQualitySpeedSummaryWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/qualityspeedtop_test.go b/radar/qualityspeedtop_test.go index bc9c2df2aa..4649c1d6e0 100644 --- a/radar/qualityspeedtop_test.go +++ b/radar/qualityspeedtop_test.go @@ -16,7 +16,6 @@ import ( ) func TestQualitySpeedTopAsesWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -50,7 +49,6 @@ func TestQualitySpeedTopAsesWithOptionalParams(t *testing.T) { } func TestQualitySpeedTopLocationsWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/ranking_test.go b/radar/ranking_test.go index 59310bcbc2..16b1a0eafc 100644 --- a/radar/ranking_test.go +++ b/radar/ranking_test.go @@ -16,7 +16,6 @@ import ( ) func TestRankingTimeseriesGroupsWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -50,7 +49,6 @@ func TestRankingTimeseriesGroupsWithOptionalParams(t *testing.T) { } func TestRankingTopWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/rankingdomain_test.go b/radar/rankingdomain_test.go index 9b9c614428..3127a1daa4 100644 --- a/radar/rankingdomain_test.go +++ b/radar/rankingdomain_test.go @@ -15,7 +15,6 @@ import ( ) func TestRankingDomainGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/search_test.go b/radar/search_test.go index e6207ebc61..0e558c9d8b 100644 --- a/radar/search_test.go +++ b/radar/search_test.go @@ -15,7 +15,6 @@ import ( ) func TestSearchGlobalWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/trafficanomaly_test.go b/radar/trafficanomaly_test.go index ed7eb4547c..7232d856d9 100644 --- a/radar/trafficanomaly_test.go +++ b/radar/trafficanomaly_test.go @@ -16,7 +16,6 @@ import ( ) func TestTrafficAnomalyGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/trafficanomalylocation_test.go b/radar/trafficanomalylocation_test.go index a9da4e69f1..22996497a2 100644 --- a/radar/trafficanomalylocation_test.go +++ b/radar/trafficanomalylocation_test.go @@ -16,7 +16,6 @@ import ( ) func TestTrafficAnomalyLocationGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/radar/verifiedbottop_test.go b/radar/verifiedbottop_test.go index 6b488e10e8..500107d64a 100644 --- a/radar/verifiedbottop_test.go +++ b/radar/verifiedbottop_test.go @@ -16,7 +16,6 @@ import ( ) func TestVerifiedBotTopBotsWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -50,7 +49,6 @@ func TestVerifiedBotTopBotsWithOptionalParams(t *testing.T) { } func TestVerifiedBotTopCategoriesWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/rate_limits/ratelimit_test.go b/rate_limits/ratelimit_test.go index bf8bb692a0..735c0f3988 100644 --- a/rate_limits/ratelimit_test.go +++ b/rate_limits/ratelimit_test.go @@ -15,7 +15,7 @@ import ( ) func TestRateLimitNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +45,6 @@ func TestRateLimitNew(t *testing.T) { } func TestRateLimitListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -76,7 +75,6 @@ func TestRateLimitListWithOptionalParams(t *testing.T) { } func TestRateLimitDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -104,7 +102,7 @@ func TestRateLimitDelete(t *testing.T) { } func TestRateLimitEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -135,7 +133,6 @@ func TestRateLimitEdit(t *testing.T) { } func TestRateLimitGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/rate_plans/rateplan_test.go b/rate_plans/rateplan_test.go index fb0e730d46..4dc67ab96b 100644 --- a/rate_plans/rateplan_test.go +++ b/rate_plans/rateplan_test.go @@ -14,7 +14,6 @@ import ( ) func TestRatePlanGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/registrar/domain_test.go b/registrar/domain_test.go index b1576ded04..538249c672 100644 --- a/registrar/domain_test.go +++ b/registrar/domain_test.go @@ -15,7 +15,6 @@ import ( ) func TestDomainUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -48,7 +47,6 @@ func TestDomainUpdateWithOptionalParams(t *testing.T) { } func TestDomainList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -74,7 +72,6 @@ func TestDomainList(t *testing.T) { } func TestDomainGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/request_tracers/trace_test.go b/request_tracers/trace_test.go index 26fccf3181..d982759fb6 100644 --- a/request_tracers/trace_test.go +++ b/request_tracers/trace_test.go @@ -15,7 +15,6 @@ import ( ) func TestTraceNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/rules/list_test.go b/rules/list_test.go index 746f9149ea..99838f9ccb 100644 --- a/rules/list_test.go +++ b/rules/list_test.go @@ -15,7 +15,7 @@ import ( ) func TestListNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -44,7 +44,7 @@ func TestListNewWithOptionalParams(t *testing.T) { } func TestListUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -75,7 +75,6 @@ func TestListUpdateWithOptionalParams(t *testing.T) { } func TestListList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -101,7 +100,6 @@ func TestListList(t *testing.T) { } func TestListDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -131,7 +129,7 @@ func TestListDelete(t *testing.T) { } func TestListGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/rules/listbulkoperation_test.go b/rules/listbulkoperation_test.go index 2eb7c8be3c..1fce56f617 100644 --- a/rules/listbulkoperation_test.go +++ b/rules/listbulkoperation_test.go @@ -14,7 +14,6 @@ import ( ) func TestListBulkOperationGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/rules/listitem_test.go b/rules/listitem_test.go index 09100e76c3..b2989c2fbe 100644 --- a/rules/listitem_test.go +++ b/rules/listitem_test.go @@ -15,7 +15,6 @@ import ( ) func TestListItemNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -94,7 +93,6 @@ func TestListItemNew(t *testing.T) { } func TestListItemUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -173,7 +171,6 @@ func TestListItemUpdate(t *testing.T) { } func TestListItemListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -206,7 +203,6 @@ func TestListItemListWithOptionalParams(t *testing.T) { } func TestListItemDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -236,7 +232,6 @@ func TestListItemDelete(t *testing.T) { } func TestListItemGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/rulesets/phase_test.go b/rulesets/phase_test.go index 8a722986c5..ff5ebbabce 100644 --- a/rulesets/phase_test.go +++ b/rulesets/phase_test.go @@ -15,7 +15,7 @@ import ( ) func TestPhaseUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -102,7 +102,7 @@ func TestPhaseUpdateWithOptionalParams(t *testing.T) { } func TestPhaseGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/rulesets/phaseversion_test.go b/rulesets/phaseversion_test.go index 256ef12bfd..34f90a3b31 100644 --- a/rulesets/phaseversion_test.go +++ b/rulesets/phaseversion_test.go @@ -15,7 +15,7 @@ import ( ) func TestPhaseVersionListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -46,7 +46,7 @@ func TestPhaseVersionListWithOptionalParams(t *testing.T) { } func TestPhaseVersionGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/rulesets/rule_test.go b/rulesets/rule_test.go index d50048511c..e652dedbbf 100644 --- a/rulesets/rule_test.go +++ b/rulesets/rule_test.go @@ -15,7 +15,7 @@ import ( ) func TestRuleNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -49,7 +49,7 @@ func TestRuleNewWithOptionalParams(t *testing.T) { } func TestRuleDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -81,7 +81,7 @@ func TestRuleDeleteWithOptionalParams(t *testing.T) { } func TestRuleEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/rulesets/ruleset_test.go b/rulesets/ruleset_test.go index 56bc36baf4..a58635743f 100644 --- a/rulesets/ruleset_test.go +++ b/rulesets/ruleset_test.go @@ -15,7 +15,7 @@ import ( ) func TestRulesetNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -98,7 +98,7 @@ func TestRulesetNewWithOptionalParams(t *testing.T) { } func TestRulesetUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -185,7 +185,7 @@ func TestRulesetUpdateWithOptionalParams(t *testing.T) { } func TestRulesetListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -212,7 +212,7 @@ func TestRulesetListWithOptionalParams(t *testing.T) { } func TestRulesetDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -243,7 +243,7 @@ func TestRulesetDeleteWithOptionalParams(t *testing.T) { } func TestRulesetGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/rulesets/version_test.go b/rulesets/version_test.go index d810491389..1530094666 100644 --- a/rulesets/version_test.go +++ b/rulesets/version_test.go @@ -15,7 +15,7 @@ import ( ) func TestVersionListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -46,7 +46,7 @@ func TestVersionListWithOptionalParams(t *testing.T) { } func TestVersionDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -78,7 +78,7 @@ func TestVersionDeleteWithOptionalParams(t *testing.T) { } func TestVersionGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/rulesets/versionbytag_test.go b/rulesets/versionbytag_test.go index 6b3ef6aa72..29a8a6ee7b 100644 --- a/rulesets/versionbytag_test.go +++ b/rulesets/versionbytag_test.go @@ -15,7 +15,6 @@ import ( ) func TestVersionByTagGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/rum/rule_test.go b/rum/rule_test.go index 7c0d7e2745..eefb48565f 100644 --- a/rum/rule_test.go +++ b/rum/rule_test.go @@ -15,7 +15,6 @@ import ( ) func TestRuleNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -49,7 +48,6 @@ func TestRuleNewWithOptionalParams(t *testing.T) { } func TestRuleUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -84,7 +82,6 @@ func TestRuleUpdateWithOptionalParams(t *testing.T) { } func TestRuleList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -114,7 +111,6 @@ func TestRuleList(t *testing.T) { } func TestRuleDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/rum/siteinfo_test.go b/rum/siteinfo_test.go index 08f01cc11b..fe85401bff 100644 --- a/rum/siteinfo_test.go +++ b/rum/siteinfo_test.go @@ -15,7 +15,6 @@ import ( ) func TestSiteInfoNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -44,7 +43,6 @@ func TestSiteInfoNewWithOptionalParams(t *testing.T) { } func TestSiteInfoUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -77,7 +75,6 @@ func TestSiteInfoUpdateWithOptionalParams(t *testing.T) { } func TestSiteInfoListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -106,7 +103,6 @@ func TestSiteInfoListWithOptionalParams(t *testing.T) { } func TestSiteInfoDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -136,7 +132,6 @@ func TestSiteInfoDelete(t *testing.T) { } func TestSiteInfoGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/secondary_dns/acl_test.go b/secondary_dns/acl_test.go index 226e9054d7..3edf85b2d9 100644 --- a/secondary_dns/acl_test.go +++ b/secondary_dns/acl_test.go @@ -15,7 +15,7 @@ import ( ) func TestACLNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +42,6 @@ func TestACLNew(t *testing.T) { } func TestACLUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -76,7 +75,6 @@ func TestACLUpdate(t *testing.T) { } func TestACLList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -102,7 +100,6 @@ func TestACLList(t *testing.T) { } func TestACLDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -132,7 +129,6 @@ func TestACLDelete(t *testing.T) { } func TestACLGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/secondary_dns/forceaxfr_test.go b/secondary_dns/forceaxfr_test.go index ca75a7e43b..1321d44aeb 100644 --- a/secondary_dns/forceaxfr_test.go +++ b/secondary_dns/forceaxfr_test.go @@ -15,7 +15,6 @@ import ( ) func TestForceAXFRNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/secondary_dns/incoming_test.go b/secondary_dns/incoming_test.go index 589d132d81..4facdc1be5 100644 --- a/secondary_dns/incoming_test.go +++ b/secondary_dns/incoming_test.go @@ -15,7 +15,6 @@ import ( ) func TestIncomingNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -44,7 +43,6 @@ func TestIncomingNew(t *testing.T) { } func TestIncomingUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -73,7 +71,6 @@ func TestIncomingUpdate(t *testing.T) { } func TestIncomingDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -99,7 +96,6 @@ func TestIncomingDelete(t *testing.T) { } func TestIncomingGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/secondary_dns/outgoing_test.go b/secondary_dns/outgoing_test.go index 2d3f6116b9..3636a010b7 100644 --- a/secondary_dns/outgoing_test.go +++ b/secondary_dns/outgoing_test.go @@ -15,7 +15,6 @@ import ( ) func TestOutgoingNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -43,7 +42,6 @@ func TestOutgoingNew(t *testing.T) { } func TestOutgoingUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -71,7 +69,6 @@ func TestOutgoingUpdate(t *testing.T) { } func TestOutgoingDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -97,7 +94,6 @@ func TestOutgoingDelete(t *testing.T) { } func TestOutgoingDisable(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -124,7 +120,6 @@ func TestOutgoingDisable(t *testing.T) { } func TestOutgoingEnable(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -151,7 +146,6 @@ func TestOutgoingEnable(t *testing.T) { } func TestOutgoingForceNotify(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -178,7 +172,6 @@ func TestOutgoingForceNotify(t *testing.T) { } func TestOutgoingGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/secondary_dns/outgoingstatus_test.go b/secondary_dns/outgoingstatus_test.go index 006c0576ee..88359633d7 100644 --- a/secondary_dns/outgoingstatus_test.go +++ b/secondary_dns/outgoingstatus_test.go @@ -15,7 +15,6 @@ import ( ) func TestOutgoingStatusGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/secondary_dns/peer_test.go b/secondary_dns/peer_test.go index c16d3599ed..727d394817 100644 --- a/secondary_dns/peer_test.go +++ b/secondary_dns/peer_test.go @@ -15,7 +15,7 @@ import ( ) func TestPeerNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +42,6 @@ func TestPeerNew(t *testing.T) { } func TestPeerUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -79,7 +78,6 @@ func TestPeerUpdateWithOptionalParams(t *testing.T) { } func TestPeerList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -105,7 +103,6 @@ func TestPeerList(t *testing.T) { } func TestPeerDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -135,7 +132,6 @@ func TestPeerDelete(t *testing.T) { } func TestPeerGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/secondary_dns/tsig_test.go b/secondary_dns/tsig_test.go index 02a8e9174e..1dffc94744 100644 --- a/secondary_dns/tsig_test.go +++ b/secondary_dns/tsig_test.go @@ -15,7 +15,6 @@ import ( ) func TestTSIGNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -46,7 +45,6 @@ func TestTSIGNew(t *testing.T) { } func TestTSIGUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -81,7 +79,6 @@ func TestTSIGUpdate(t *testing.T) { } func TestTSIGList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -107,7 +104,6 @@ func TestTSIGList(t *testing.T) { } func TestTSIGDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -137,7 +133,6 @@ func TestTSIGDelete(t *testing.T) { } func TestTSIGGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/spectrum/analyticsaggregatecurrent_test.go b/spectrum/analyticsaggregatecurrent_test.go index 4fa0010f45..eee8693ddc 100644 --- a/spectrum/analyticsaggregatecurrent_test.go +++ b/spectrum/analyticsaggregatecurrent_test.go @@ -15,7 +15,6 @@ import ( ) func TestAnalyticsAggregateCurrentGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/spectrum/analyticseventbytime_test.go b/spectrum/analyticseventbytime_test.go index e6071b1d04..554424a723 100644 --- a/spectrum/analyticseventbytime_test.go +++ b/spectrum/analyticseventbytime_test.go @@ -16,7 +16,6 @@ import ( ) func TestAnalyticsEventBytimeGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/spectrum/analyticseventsummary_test.go b/spectrum/analyticseventsummary_test.go index 9cdd3838c8..4fe9a0a956 100644 --- a/spectrum/analyticseventsummary_test.go +++ b/spectrum/analyticseventsummary_test.go @@ -16,7 +16,6 @@ import ( ) func TestAnalyticsEventSummaryGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/spectrum/app_test.go b/spectrum/app_test.go index 0dd7c95733..a242a8d094 100644 --- a/spectrum/app_test.go +++ b/spectrum/app_test.go @@ -16,7 +16,6 @@ import ( ) func TestAppNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -65,7 +64,6 @@ func TestAppNewWithOptionalParams(t *testing.T) { } func TestAppUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -115,7 +113,6 @@ func TestAppUpdateWithOptionalParams(t *testing.T) { } func TestAppListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -148,7 +145,6 @@ func TestAppListWithOptionalParams(t *testing.T) { } func TestAppDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -176,7 +172,6 @@ func TestAppDelete(t *testing.T) { } func TestAppGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/speed/availability_test.go b/speed/availability_test.go index c64095714e..bf55df7507 100644 --- a/speed/availability_test.go +++ b/speed/availability_test.go @@ -15,7 +15,6 @@ import ( ) func TestAvailabilityList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/speed/page_test.go b/speed/page_test.go index a3fe62157b..9a91a8ff91 100644 --- a/speed/page_test.go +++ b/speed/page_test.go @@ -15,7 +15,6 @@ import ( ) func TestPageList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/speed/schedule_test.go b/speed/schedule_test.go index 2168491102..63ad41de94 100644 --- a/speed/schedule_test.go +++ b/speed/schedule_test.go @@ -15,7 +15,6 @@ import ( ) func TestScheduleNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/speed/speed_test.go b/speed/speed_test.go index 4aed55eef8..27c06ace97 100644 --- a/speed/speed_test.go +++ b/speed/speed_test.go @@ -16,7 +16,6 @@ import ( ) func TestSpeedDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -47,7 +46,6 @@ func TestSpeedDeleteWithOptionalParams(t *testing.T) { } func TestSpeedScheduleGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -78,7 +76,7 @@ func TestSpeedScheduleGetWithOptionalParams(t *testing.T) { } func TestSpeedTrendsListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/speed/test_test.go b/speed/test_test.go index 417968e3fa..0518443bbd 100644 --- a/speed/test_test.go +++ b/speed/test_test.go @@ -15,7 +15,6 @@ import ( ) func TestTestNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -46,7 +45,6 @@ func TestTestNewWithOptionalParams(t *testing.T) { } func TestTestListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -79,7 +77,6 @@ func TestTestListWithOptionalParams(t *testing.T) { } func TestTestDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -110,7 +107,6 @@ func TestTestDeleteWithOptionalParams(t *testing.T) { } func TestTestGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/ssl/analyze_test.go b/ssl/analyze_test.go index 85029b4549..a2a9cc5f4d 100644 --- a/ssl/analyze_test.go +++ b/ssl/analyze_test.go @@ -16,7 +16,6 @@ import ( ) func TestAnalyzeNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/ssl/certificatepack_test.go b/ssl/certificatepack_test.go index f3141fe265..94f437efe4 100644 --- a/ssl/certificatepack_test.go +++ b/ssl/certificatepack_test.go @@ -15,7 +15,6 @@ import ( ) func TestCertificatePackListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestCertificatePackListWithOptionalParams(t *testing.T) { } func TestCertificatePackDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -72,7 +70,6 @@ func TestCertificatePackDelete(t *testing.T) { } func TestCertificatePackEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -103,7 +100,6 @@ func TestCertificatePackEdit(t *testing.T) { } func TestCertificatePackGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/ssl/certificatepackorder_test.go b/ssl/certificatepackorder_test.go index 65ac40c08d..99721abd8c 100644 --- a/ssl/certificatepackorder_test.go +++ b/ssl/certificatepackorder_test.go @@ -15,7 +15,6 @@ import ( ) func TestCertificatePackOrderNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/ssl/certificatepackquota_test.go b/ssl/certificatepackquota_test.go index 194fe681b4..85b513c562 100644 --- a/ssl/certificatepackquota_test.go +++ b/ssl/certificatepackquota_test.go @@ -15,7 +15,6 @@ import ( ) func TestCertificatePackQuotaGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/ssl/recommendation_test.go b/ssl/recommendation_test.go index 24872615c9..9b15183cae 100644 --- a/ssl/recommendation_test.go +++ b/ssl/recommendation_test.go @@ -14,7 +14,6 @@ import ( ) func TestRecommendationGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/ssl/universalsetting_test.go b/ssl/universalsetting_test.go index 75145922e9..16fd5ba245 100644 --- a/ssl/universalsetting_test.go +++ b/ssl/universalsetting_test.go @@ -15,7 +15,6 @@ import ( ) func TestUniversalSettingEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -44,7 +43,6 @@ func TestUniversalSettingEditWithOptionalParams(t *testing.T) { } func TestUniversalSettingGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/ssl/verification_test.go b/ssl/verification_test.go index 584a415c91..a53c9a7a6b 100644 --- a/ssl/verification_test.go +++ b/ssl/verification_test.go @@ -15,7 +15,6 @@ import ( ) func TestVerificationEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -46,7 +45,6 @@ func TestVerificationEdit(t *testing.T) { } func TestVerificationGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/storage/analytics_test.go b/storage/analytics_test.go index f08803a1be..1d8b1bf1a2 100644 --- a/storage/analytics_test.go +++ b/storage/analytics_test.go @@ -16,7 +16,6 @@ import ( ) func TestAnalyticsListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -51,7 +50,6 @@ func TestAnalyticsListWithOptionalParams(t *testing.T) { } func TestAnalyticsStoredWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/stream/audiotrack_test.go b/stream/audiotrack_test.go index 36eaad6f23..a1d9d1aee2 100644 --- a/stream/audiotrack_test.go +++ b/stream/audiotrack_test.go @@ -15,7 +15,6 @@ import ( ) func TestAudioTrackDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -46,7 +45,6 @@ func TestAudioTrackDelete(t *testing.T) { } func TestAudioTrackCopyWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -78,7 +76,6 @@ func TestAudioTrackCopyWithOptionalParams(t *testing.T) { } func TestAudioTrackEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -111,7 +108,6 @@ func TestAudioTrackEditWithOptionalParams(t *testing.T) { } func TestAudioTrackGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/stream/caption_test.go b/stream/caption_test.go index e5d3018932..be4c348c9e 100644 --- a/stream/caption_test.go +++ b/stream/caption_test.go @@ -15,7 +15,6 @@ import ( ) func TestCaptionGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/stream/captionlanguage_test.go b/stream/captionlanguage_test.go index fcea8218c5..36fe79c283 100644 --- a/stream/captionlanguage_test.go +++ b/stream/captionlanguage_test.go @@ -15,7 +15,7 @@ import ( ) func TestCaptionLanguageUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -47,7 +47,6 @@ func TestCaptionLanguageUpdate(t *testing.T) { } func TestCaptionLanguageDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -78,7 +77,6 @@ func TestCaptionLanguageDelete(t *testing.T) { } func TestCaptionLanguageGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/stream/captionlanguagevtt_test.go b/stream/captionlanguagevtt_test.go index 1430896fad..1533378e6c 100644 --- a/stream/captionlanguagevtt_test.go +++ b/stream/captionlanguagevtt_test.go @@ -15,7 +15,6 @@ import ( ) func TestCaptionLanguageVttGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/stream/clip_test.go b/stream/clip_test.go index 496ca22b27..7ef21ccba4 100644 --- a/stream/clip_test.go +++ b/stream/clip_test.go @@ -15,7 +15,6 @@ import ( ) func TestClipNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/stream/copy_test.go b/stream/copy_test.go index f2a3a2718c..309b3e909e 100644 --- a/stream/copy_test.go +++ b/stream/copy_test.go @@ -16,7 +16,6 @@ import ( ) func TestCopyNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/stream/directupload_test.go b/stream/directupload_test.go index 3fc1770ce7..4082e2d74f 100644 --- a/stream/directupload_test.go +++ b/stream/directupload_test.go @@ -16,7 +16,6 @@ import ( ) func TestDirectUploadNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/stream/download_test.go b/stream/download_test.go index 692636defb..fa2660ef41 100644 --- a/stream/download_test.go +++ b/stream/download_test.go @@ -15,7 +15,6 @@ import ( ) func TestDownloadNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -46,7 +45,6 @@ func TestDownloadNew(t *testing.T) { } func TestDownloadDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -76,7 +74,6 @@ func TestDownloadDelete(t *testing.T) { } func TestDownloadGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/stream/embed_test.go b/stream/embed_test.go index f27f672c2f..2fc8ef79f8 100644 --- a/stream/embed_test.go +++ b/stream/embed_test.go @@ -15,7 +15,6 @@ import ( ) func TestEmbedGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/stream/key_test.go b/stream/key_test.go index ea0359c7aa..03784c79cc 100644 --- a/stream/key_test.go +++ b/stream/key_test.go @@ -15,7 +15,6 @@ import ( ) func TestKeyNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestKeyNew(t *testing.T) { } func TestKeyDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -72,7 +70,6 @@ func TestKeyDelete(t *testing.T) { } func TestKeyGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/stream/liveinput_test.go b/stream/liveinput_test.go index e34ae98265..dfe3cf90a5 100644 --- a/stream/liveinput_test.go +++ b/stream/liveinput_test.go @@ -15,7 +15,6 @@ import ( ) func TestLiveInputNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -52,7 +51,6 @@ func TestLiveInputNewWithOptionalParams(t *testing.T) { } func TestLiveInputUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -93,7 +91,6 @@ func TestLiveInputUpdateWithOptionalParams(t *testing.T) { } func TestLiveInputListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -120,7 +117,6 @@ func TestLiveInputListWithOptionalParams(t *testing.T) { } func TestLiveInputDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -150,7 +146,6 @@ func TestLiveInputDelete(t *testing.T) { } func TestLiveInputGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/stream/liveinputoutput_test.go b/stream/liveinputoutput_test.go index 9aa171cb88..7070f22914 100644 --- a/stream/liveinputoutput_test.go +++ b/stream/liveinputoutput_test.go @@ -15,7 +15,6 @@ import ( ) func TestLiveInputOutputNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -48,7 +47,6 @@ func TestLiveInputOutputNewWithOptionalParams(t *testing.T) { } func TestLiveInputOutputUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -80,7 +78,6 @@ func TestLiveInputOutputUpdate(t *testing.T) { } func TestLiveInputOutputList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -110,7 +107,6 @@ func TestLiveInputOutputList(t *testing.T) { } func TestLiveInputOutputDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/stream/stream_test.go b/stream/stream_test.go index 221367bea0..f100772559 100644 --- a/stream/stream_test.go +++ b/stream/stream_test.go @@ -16,7 +16,7 @@ import ( ) func TestStreamNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -47,7 +47,6 @@ func TestStreamNewWithOptionalParams(t *testing.T) { } func TestStreamListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -81,7 +80,6 @@ func TestStreamListWithOptionalParams(t *testing.T) { } func TestStreamDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -111,7 +109,6 @@ func TestStreamDelete(t *testing.T) { } func TestStreamGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/stream/token_test.go b/stream/token_test.go index cf721675f5..a892007898 100644 --- a/stream/token_test.go +++ b/stream/token_test.go @@ -15,7 +15,6 @@ import ( ) func TestTokenNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/stream/video_test.go b/stream/video_test.go index f96088bb0d..a2826e95af 100644 --- a/stream/video_test.go +++ b/stream/video_test.go @@ -15,7 +15,6 @@ import ( ) func TestVideoStorageUsageWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/stream/watermark_test.go b/stream/watermark_test.go index b09a8b5283..73dd888e3d 100644 --- a/stream/watermark_test.go +++ b/stream/watermark_test.go @@ -15,7 +15,7 @@ import ( ) func TestWatermarkNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -47,7 +47,6 @@ func TestWatermarkNewWithOptionalParams(t *testing.T) { } func TestWatermarkList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -73,7 +72,6 @@ func TestWatermarkList(t *testing.T) { } func TestWatermarkDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -103,7 +101,6 @@ func TestWatermarkDelete(t *testing.T) { } func TestWatermarkGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/stream/webhook_test.go b/stream/webhook_test.go index c5af189540..5bc6daa465 100644 --- a/stream/webhook_test.go +++ b/stream/webhook_test.go @@ -15,7 +15,6 @@ import ( ) func TestWebhookUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestWebhookUpdate(t *testing.T) { } func TestWebhookDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -68,7 +66,6 @@ func TestWebhookDelete(t *testing.T) { } func TestWebhookGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/subscriptions/subscription_test.go b/subscriptions/subscription_test.go index 036b589bdb..0eaa436574 100644 --- a/subscriptions/subscription_test.go +++ b/subscriptions/subscription_test.go @@ -16,7 +16,6 @@ import ( ) func TestSubscriptionNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -77,7 +76,6 @@ func TestSubscriptionNewWithOptionalParams(t *testing.T) { } func TestSubscriptionUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -139,7 +137,6 @@ func TestSubscriptionUpdateWithOptionalParams(t *testing.T) { } func TestSubscriptionList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -163,7 +160,6 @@ func TestSubscriptionList(t *testing.T) { } func TestSubscriptionDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -191,7 +187,6 @@ func TestSubscriptionDelete(t *testing.T) { } func TestSubscriptionGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/url_normalization/urlnormalization_test.go b/url_normalization/urlnormalization_test.go index d5d4671fd7..33841b09b2 100644 --- a/url_normalization/urlnormalization_test.go +++ b/url_normalization/urlnormalization_test.go @@ -15,7 +15,6 @@ import ( ) func TestURLNormalizationUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -43,7 +42,6 @@ func TestURLNormalizationUpdateWithOptionalParams(t *testing.T) { } func TestURLNormalizationGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/url_scanner/scan_test.go b/url_scanner/scan_test.go index ae41968833..13e9f07c90 100644 --- a/url_scanner/scan_test.go +++ b/url_scanner/scan_test.go @@ -19,7 +19,6 @@ import ( ) func TestScanNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -54,7 +53,6 @@ func TestScanNewWithOptionalParams(t *testing.T) { } func TestScanGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -82,7 +80,6 @@ func TestScanGet(t *testing.T) { } func TestScanHar(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -110,7 +107,6 @@ func TestScanHar(t *testing.T) { } func TestScanScreenshotWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(200) w.Write([]byte("abc")) diff --git a/url_scanner/urlscanner_test.go b/url_scanner/urlscanner_test.go index 189738e72d..70a7668182 100644 --- a/url_scanner/urlscanner_test.go +++ b/url_scanner/urlscanner_test.go @@ -16,7 +16,6 @@ import ( ) func TestURLScannerScanWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/user/auditlog_test.go b/user/auditlog_test.go index a5029711dc..ac03c10154 100644 --- a/user/auditlog_test.go +++ b/user/auditlog_test.go @@ -16,7 +16,6 @@ import ( ) func TestAuditLogListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/user/billinghistory_test.go b/user/billinghistory_test.go index bdd4b1dd3f..94fd9df009 100644 --- a/user/billinghistory_test.go +++ b/user/billinghistory_test.go @@ -16,7 +16,6 @@ import ( ) func TestBillingHistoryListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/user/billingprofile_test.go b/user/billingprofile_test.go index a7d857c0a4..dc35b2248f 100644 --- a/user/billingprofile_test.go +++ b/user/billingprofile_test.go @@ -14,7 +14,6 @@ import ( ) func TestBillingProfileGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/user/invite_test.go b/user/invite_test.go index 82feca650a..608d63d04d 100644 --- a/user/invite_test.go +++ b/user/invite_test.go @@ -15,7 +15,6 @@ import ( ) func TestInviteList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -39,7 +38,6 @@ func TestInviteList(t *testing.T) { } func TestInviteEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -69,7 +67,6 @@ func TestInviteEdit(t *testing.T) { } func TestInviteGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/user/organization_test.go b/user/organization_test.go index a4792578a7..478d351e3c 100644 --- a/user/organization_test.go +++ b/user/organization_test.go @@ -15,7 +15,6 @@ import ( ) func TestOrganizationListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -47,7 +46,6 @@ func TestOrganizationListWithOptionalParams(t *testing.T) { } func TestOrganizationDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -71,7 +69,6 @@ func TestOrganizationDelete(t *testing.T) { } func TestOrganizationGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/user/subscription_test.go b/user/subscription_test.go index ad4fe2835b..5b8e0201e5 100644 --- a/user/subscription_test.go +++ b/user/subscription_test.go @@ -15,7 +15,6 @@ import ( ) func TestSubscriptionUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -76,7 +75,6 @@ func TestSubscriptionUpdateWithOptionalParams(t *testing.T) { } func TestSubscriptionDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -100,7 +98,6 @@ func TestSubscriptionDelete(t *testing.T) { } func TestSubscriptionEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -161,7 +158,6 @@ func TestSubscriptionEditWithOptionalParams(t *testing.T) { } func TestSubscriptionGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/user/token_test.go b/user/token_test.go index 471d5ade56..451c88e6e9 100644 --- a/user/token_test.go +++ b/user/token_test.go @@ -16,7 +16,7 @@ import ( ) func TestTokenNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -72,7 +72,7 @@ func TestTokenNewWithOptionalParams(t *testing.T) { } func TestTokenUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -135,7 +135,6 @@ func TestTokenUpdateWithOptionalParams(t *testing.T) { } func TestTokenListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -163,7 +162,6 @@ func TestTokenListWithOptionalParams(t *testing.T) { } func TestTokenDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -187,7 +185,6 @@ func TestTokenDelete(t *testing.T) { } func TestTokenGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -211,7 +208,6 @@ func TestTokenGet(t *testing.T) { } func TestTokenVerify(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/user/tokenpermissiongroup_test.go b/user/tokenpermissiongroup_test.go index 60b89fe21e..324dde10df 100644 --- a/user/tokenpermissiongroup_test.go +++ b/user/tokenpermissiongroup_test.go @@ -14,7 +14,6 @@ import ( ) func TestTokenPermissionGroupList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/user/tokenvalue_test.go b/user/tokenvalue_test.go index 1aa17c69a0..cd3e11b6d9 100644 --- a/user/tokenvalue_test.go +++ b/user/tokenvalue_test.go @@ -15,7 +15,6 @@ import ( ) func TestTokenValueUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/user/user_test.go b/user/user_test.go index 007212bcd6..17646f777e 100644 --- a/user/user_test.go +++ b/user/user_test.go @@ -15,7 +15,6 @@ import ( ) func TestUserEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,6 @@ func TestUserEditWithOptionalParams(t *testing.T) { } func TestUserGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/vectorize/index_test.go b/vectorize/index_test.go index 8b2b7e37c9..412b2a81fc 100644 --- a/vectorize/index_test.go +++ b/vectorize/index_test.go @@ -15,7 +15,6 @@ import ( ) func TestIndexNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -47,7 +46,6 @@ func TestIndexNewWithOptionalParams(t *testing.T) { } func TestIndexUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -78,7 +76,6 @@ func TestIndexUpdate(t *testing.T) { } func TestIndexList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -104,7 +101,6 @@ func TestIndexList(t *testing.T) { } func TestIndexDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -134,7 +130,6 @@ func TestIndexDelete(t *testing.T) { } func TestIndexDeleteByIDsWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -165,7 +160,6 @@ func TestIndexDeleteByIDsWithOptionalParams(t *testing.T) { } func TestIndexGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -195,7 +189,6 @@ func TestIndexGet(t *testing.T) { } func TestIndexGetByIDsWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -226,7 +219,7 @@ func TestIndexGetByIDsWithOptionalParams(t *testing.T) { } func TestIndexInsert(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -257,7 +250,6 @@ func TestIndexInsert(t *testing.T) { } func TestIndexQueryWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -297,7 +289,7 @@ func TestIndexQueryWithOptionalParams(t *testing.T) { } func TestIndexUpsert(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/waiting_rooms/event_test.go b/waiting_rooms/event_test.go index 92fa209797..750ed2fca6 100644 --- a/waiting_rooms/event_test.go +++ b/waiting_rooms/event_test.go @@ -15,7 +15,6 @@ import ( ) func TestEventNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -60,7 +59,6 @@ func TestEventNewWithOptionalParams(t *testing.T) { } func TestEventUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -106,7 +104,6 @@ func TestEventUpdateWithOptionalParams(t *testing.T) { } func TestEventListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -138,7 +135,6 @@ func TestEventListWithOptionalParams(t *testing.T) { } func TestEventDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -169,7 +165,6 @@ func TestEventDelete(t *testing.T) { } func TestEventEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -215,7 +210,6 @@ func TestEventEditWithOptionalParams(t *testing.T) { } func TestEventGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/waiting_rooms/eventdetail_test.go b/waiting_rooms/eventdetail_test.go index 47c7788fa2..80d97938e9 100644 --- a/waiting_rooms/eventdetail_test.go +++ b/waiting_rooms/eventdetail_test.go @@ -15,7 +15,6 @@ import ( ) func TestEventDetailGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/waiting_rooms/page_test.go b/waiting_rooms/page_test.go index abb0703abb..7fd6c9964f 100644 --- a/waiting_rooms/page_test.go +++ b/waiting_rooms/page_test.go @@ -15,7 +15,6 @@ import ( ) func TestPagePreview(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/waiting_rooms/rule_test.go b/waiting_rooms/rule_test.go index aeadc331f1..10a41ce7ea 100644 --- a/waiting_rooms/rule_test.go +++ b/waiting_rooms/rule_test.go @@ -15,7 +15,6 @@ import ( ) func TestRuleNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -49,7 +48,6 @@ func TestRuleNewWithOptionalParams(t *testing.T) { } func TestRuleUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -95,7 +93,6 @@ func TestRuleUpdate(t *testing.T) { } func TestRuleList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -125,7 +122,6 @@ func TestRuleList(t *testing.T) { } func TestRuleDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -156,7 +152,6 @@ func TestRuleDelete(t *testing.T) { } func TestRuleEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/waiting_rooms/setting_test.go b/waiting_rooms/setting_test.go index 08788935bd..a22ea93556 100644 --- a/waiting_rooms/setting_test.go +++ b/waiting_rooms/setting_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingUpdateWithOptionalParams(t *testing.T) { } func TestSettingEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -69,7 +67,6 @@ func TestSettingEditWithOptionalParams(t *testing.T) { } func TestSettingGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/waiting_rooms/status_test.go b/waiting_rooms/status_test.go index 5bb98a8318..5afd0499c0 100644 --- a/waiting_rooms/status_test.go +++ b/waiting_rooms/status_test.go @@ -15,7 +15,6 @@ import ( ) func TestStatusGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/waiting_rooms/waitingroom_test.go b/waiting_rooms/waitingroom_test.go index ee16c604c3..2ba34ea68b 100644 --- a/waiting_rooms/waitingroom_test.go +++ b/waiting_rooms/waitingroom_test.go @@ -15,7 +15,6 @@ import ( ) func TestWaitingRoomNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -73,7 +72,6 @@ func TestWaitingRoomNewWithOptionalParams(t *testing.T) { } func TestWaitingRoomUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -135,7 +133,6 @@ func TestWaitingRoomUpdateWithOptionalParams(t *testing.T) { } func TestWaitingRoomListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -163,7 +160,6 @@ func TestWaitingRoomListWithOptionalParams(t *testing.T) { } func TestWaitingRoomDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -193,7 +189,6 @@ func TestWaitingRoomDelete(t *testing.T) { } func TestWaitingRoomEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -255,7 +250,6 @@ func TestWaitingRoomEditWithOptionalParams(t *testing.T) { } func TestWaitingRoomGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/warp_connector/warpconnector_test.go b/warp_connector/warpconnector_test.go index f50b0d0659..68953cd88b 100644 --- a/warp_connector/warpconnector_test.go +++ b/warp_connector/warpconnector_test.go @@ -16,7 +16,6 @@ import ( ) func TestWARPConnectorNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -43,7 +42,6 @@ func TestWARPConnectorNew(t *testing.T) { } func TestWARPConnectorListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -79,7 +77,6 @@ func TestWARPConnectorListWithOptionalParams(t *testing.T) { } func TestWARPConnectorDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -109,7 +106,6 @@ func TestWARPConnectorDelete(t *testing.T) { } func TestWARPConnectorEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -141,7 +137,6 @@ func TestWARPConnectorEditWithOptionalParams(t *testing.T) { } func TestWARPConnectorGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -171,7 +166,6 @@ func TestWARPConnectorGet(t *testing.T) { } func TestWARPConnectorToken(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/web3/hostname_test.go b/web3/hostname_test.go index e91b06efcf..b86b193678 100644 --- a/web3/hostname_test.go +++ b/web3/hostname_test.go @@ -15,7 +15,6 @@ import ( ) func TestHostnameNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -47,7 +46,6 @@ func TestHostnameNewWithOptionalParams(t *testing.T) { } func TestHostnameList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -71,7 +69,6 @@ func TestHostnameList(t *testing.T) { } func TestHostnameDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -99,7 +96,6 @@ func TestHostnameDelete(t *testing.T) { } func TestHostnameEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -131,7 +127,6 @@ func TestHostnameEditWithOptionalParams(t *testing.T) { } func TestHostnameGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/web3/hostnameipfsuniversalpathcontentlist_test.go b/web3/hostnameipfsuniversalpathcontentlist_test.go index f04882f17d..662ce5b425 100644 --- a/web3/hostnameipfsuniversalpathcontentlist_test.go +++ b/web3/hostnameipfsuniversalpathcontentlist_test.go @@ -15,7 +15,6 @@ import ( ) func TestHostnameIPFSUniversalPathContentListUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -59,7 +58,6 @@ func TestHostnameIPFSUniversalPathContentListUpdate(t *testing.T) { } func TestHostnameIPFSUniversalPathContentListGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/web3/hostnameipfsuniversalpathcontentlistentry_test.go b/web3/hostnameipfsuniversalpathcontentlistentry_test.go index 486cd5d768..6ff3222124 100644 --- a/web3/hostnameipfsuniversalpathcontentlistentry_test.go +++ b/web3/hostnameipfsuniversalpathcontentlistentry_test.go @@ -15,7 +15,6 @@ import ( ) func TestHostnameIPFSUniversalPathContentListEntryNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -48,7 +47,6 @@ func TestHostnameIPFSUniversalPathContentListEntryNewWithOptionalParams(t *testi } func TestHostnameIPFSUniversalPathContentListEntryUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -82,7 +80,6 @@ func TestHostnameIPFSUniversalPathContentListEntryUpdateWithOptionalParams(t *te } func TestHostnameIPFSUniversalPathContentListEntryList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -110,7 +107,6 @@ func TestHostnameIPFSUniversalPathContentListEntryList(t *testing.T) { } func TestHostnameIPFSUniversalPathContentListEntryDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -139,7 +135,6 @@ func TestHostnameIPFSUniversalPathContentListEntryDelete(t *testing.T) { } func TestHostnameIPFSUniversalPathContentListEntryGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/workers/accountsetting_test.go b/workers/accountsetting_test.go index 08d436c142..edb57590c7 100644 --- a/workers/accountsetting_test.go +++ b/workers/accountsetting_test.go @@ -15,7 +15,6 @@ import ( ) func TestAccountSettingUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestAccountSettingUpdate(t *testing.T) { } func TestAccountSettingGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/workers/ai_test.go b/workers/ai_test.go index ece4133840..cac661162d 100644 --- a/workers/ai_test.go +++ b/workers/ai_test.go @@ -15,7 +15,6 @@ import ( ) func TestAIRunWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/workers/domain_test.go b/workers/domain_test.go index 6f04843c1f..9347785f4c 100644 --- a/workers/domain_test.go +++ b/workers/domain_test.go @@ -15,7 +15,6 @@ import ( ) func TestDomainUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,6 @@ func TestDomainUpdate(t *testing.T) { } func TestDomainListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -76,7 +74,6 @@ func TestDomainListWithOptionalParams(t *testing.T) { } func TestDomainDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -106,7 +103,6 @@ func TestDomainDelete(t *testing.T) { } func TestDomainGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/workers/script_test.go b/workers/script_test.go index 252df12eab..b4dcab98e2 100644 --- a/workers/script_test.go +++ b/workers/script_test.go @@ -19,7 +19,7 @@ import ( ) func TestScriptUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -114,7 +114,6 @@ func TestScriptUpdateWithOptionalParams(t *testing.T) { } func TestScriptList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -140,7 +139,6 @@ func TestScriptList(t *testing.T) { } func TestScriptDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -171,7 +169,6 @@ func TestScriptDeleteWithOptionalParams(t *testing.T) { } func TestScriptGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(200) w.Write([]byte("abc")) diff --git a/workers/scriptcontent_test.go b/workers/scriptcontent_test.go index ec7fd6f680..6d9aba7713 100644 --- a/workers/scriptcontent_test.go +++ b/workers/scriptcontent_test.go @@ -19,7 +19,7 @@ import ( ) func TestScriptContentUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -56,7 +56,6 @@ func TestScriptContentUpdateWithOptionalParams(t *testing.T) { } func TestScriptContentGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(200) w.Write([]byte("abc")) diff --git a/workers/scriptdeployment_test.go b/workers/scriptdeployment_test.go index bd146259bb..79e670d8a3 100644 --- a/workers/scriptdeployment_test.go +++ b/workers/scriptdeployment_test.go @@ -15,7 +15,6 @@ import ( ) func TestScriptDeploymentNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -49,7 +48,6 @@ func TestScriptDeploymentNewWithOptionalParams(t *testing.T) { } func TestScriptDeploymentGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/workers/scriptschedule_test.go b/workers/scriptschedule_test.go index a14d50ae95..4e30f52b16 100644 --- a/workers/scriptschedule_test.go +++ b/workers/scriptschedule_test.go @@ -15,7 +15,6 @@ import ( ) func TestScriptScheduleUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -46,7 +45,6 @@ func TestScriptScheduleUpdate(t *testing.T) { } func TestScriptScheduleGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/workers/scriptsetting_test.go b/workers/scriptsetting_test.go index 939837760f..2e5e93dc96 100644 --- a/workers/scriptsetting_test.go +++ b/workers/scriptsetting_test.go @@ -15,7 +15,6 @@ import ( ) func TestScriptSettingEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -61,7 +60,6 @@ func TestScriptSettingEditWithOptionalParams(t *testing.T) { } func TestScriptSettingGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/workers/scripttail_test.go b/workers/scripttail_test.go index 4bdff3a9c3..7402bd3f01 100644 --- a/workers/scripttail_test.go +++ b/workers/scripttail_test.go @@ -15,7 +15,6 @@ import ( ) func TestScriptTailNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -46,7 +45,6 @@ func TestScriptTailNew(t *testing.T) { } func TestScriptTailDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -77,7 +75,6 @@ func TestScriptTailDelete(t *testing.T) { } func TestScriptTailGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/workers/scriptversion_test.go b/workers/scriptversion_test.go index 1e3f64d3e0..ea1bbd7d49 100644 --- a/workers/scriptversion_test.go +++ b/workers/scriptversion_test.go @@ -17,7 +17,7 @@ import ( ) func TestScriptVersionNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -64,7 +64,6 @@ func TestScriptVersionNewWithOptionalParams(t *testing.T) { } func TestScriptVersionList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -94,7 +93,6 @@ func TestScriptVersionList(t *testing.T) { } func TestScriptVersionGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/workers/subdomain_test.go b/workers/subdomain_test.go index f659c744ed..6c37c39c51 100644 --- a/workers/subdomain_test.go +++ b/workers/subdomain_test.go @@ -15,7 +15,6 @@ import ( ) func TestSubdomainUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSubdomainUpdate(t *testing.T) { } func TestSubdomainGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/workers_for_platforms/dispatchnamespace_test.go b/workers_for_platforms/dispatchnamespace_test.go index 4e9df31db9..d84e2f962c 100644 --- a/workers_for_platforms/dispatchnamespace_test.go +++ b/workers_for_platforms/dispatchnamespace_test.go @@ -15,7 +15,6 @@ import ( ) func TestDispatchNamespaceNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestDispatchNamespaceNewWithOptionalParams(t *testing.T) { } func TestDispatchNamespaceList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -68,7 +66,6 @@ func TestDispatchNamespaceList(t *testing.T) { } func TestDispatchNamespaceDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -98,7 +95,6 @@ func TestDispatchNamespaceDelete(t *testing.T) { } func TestDispatchNamespaceGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/workers_for_platforms/dispatchnamespacescript_test.go b/workers_for_platforms/dispatchnamespacescript_test.go index 9b0683a414..52576375d7 100644 --- a/workers_for_platforms/dispatchnamespacescript_test.go +++ b/workers_for_platforms/dispatchnamespacescript_test.go @@ -18,7 +18,7 @@ import ( ) func TestDispatchNamespaceScriptUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -113,7 +113,6 @@ func TestDispatchNamespaceScriptUpdateWithOptionalParams(t *testing.T) { } func TestDispatchNamespaceScriptDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -145,7 +144,6 @@ func TestDispatchNamespaceScriptDeleteWithOptionalParams(t *testing.T) { } func TestDispatchNamespaceScriptGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/workers_for_platforms/dispatchnamespacescriptbinding_test.go b/workers_for_platforms/dispatchnamespacescriptbinding_test.go index c521d44974..54d0a749bc 100644 --- a/workers_for_platforms/dispatchnamespacescriptbinding_test.go +++ b/workers_for_platforms/dispatchnamespacescriptbinding_test.go @@ -15,7 +15,6 @@ import ( ) func TestDispatchNamespaceScriptBindingGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/workers_for_platforms/dispatchnamespacescriptcontent_test.go b/workers_for_platforms/dispatchnamespacescriptcontent_test.go index 3393d0a1e6..bb13ef5600 100644 --- a/workers_for_platforms/dispatchnamespacescriptcontent_test.go +++ b/workers_for_platforms/dispatchnamespacescriptcontent_test.go @@ -20,7 +20,7 @@ import ( ) func TestDispatchNamespaceScriptContentUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -58,7 +58,6 @@ func TestDispatchNamespaceScriptContentUpdateWithOptionalParams(t *testing.T) { } func TestDispatchNamespaceScriptContentGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(200) w.Write([]byte("abc")) diff --git a/workers_for_platforms/dispatchnamespacescriptsecret_test.go b/workers_for_platforms/dispatchnamespacescriptsecret_test.go index 2ee9139e1c..9cd822e8a5 100644 --- a/workers_for_platforms/dispatchnamespacescriptsecret_test.go +++ b/workers_for_platforms/dispatchnamespacescriptsecret_test.go @@ -15,7 +15,6 @@ import ( ) func TestDispatchNamespaceScriptSecretUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -49,7 +48,6 @@ func TestDispatchNamespaceScriptSecretUpdateWithOptionalParams(t *testing.T) { } func TestDispatchNamespaceScriptSecretList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/workers_for_platforms/dispatchnamespacescriptsetting_test.go b/workers_for_platforms/dispatchnamespacescriptsetting_test.go index d77c9b9088..46b4f012ec 100644 --- a/workers_for_platforms/dispatchnamespacescriptsetting_test.go +++ b/workers_for_platforms/dispatchnamespacescriptsetting_test.go @@ -16,7 +16,7 @@ import ( ) func TestDispatchNamespaceScriptSettingEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -109,7 +109,6 @@ func TestDispatchNamespaceScriptSettingEditWithOptionalParams(t *testing.T) { } func TestDispatchNamespaceScriptSettingGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/workers_for_platforms/dispatchnamespacescripttag_test.go b/workers_for_platforms/dispatchnamespacescripttag_test.go index 8e60812960..98a6a08a9f 100644 --- a/workers_for_platforms/dispatchnamespacescripttag_test.go +++ b/workers_for_platforms/dispatchnamespacescripttag_test.go @@ -15,7 +15,6 @@ import ( ) func TestDispatchNamespaceScriptTagUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -47,7 +46,6 @@ func TestDispatchNamespaceScriptTagUpdate(t *testing.T) { } func TestDispatchNamespaceScriptTagList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -78,7 +76,6 @@ func TestDispatchNamespaceScriptTagList(t *testing.T) { } func TestDispatchNamespaceScriptTagDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/accessapplication_test.go b/zero_trust/accessapplication_test.go index 3db409ac56..beb5e3c74c 100644 --- a/zero_trust/accessapplication_test.go +++ b/zero_trust/accessapplication_test.go @@ -16,7 +16,7 @@ import ( ) func TestAccessApplicationNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -77,7 +77,7 @@ func TestAccessApplicationNewWithOptionalParams(t *testing.T) { } func TestAccessApplicationUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -142,7 +142,7 @@ func TestAccessApplicationUpdateWithOptionalParams(t *testing.T) { } func TestAccessApplicationListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -169,7 +169,7 @@ func TestAccessApplicationListWithOptionalParams(t *testing.T) { } func TestAccessApplicationDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -200,7 +200,7 @@ func TestAccessApplicationDeleteWithOptionalParams(t *testing.T) { } func TestAccessApplicationGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -231,7 +231,7 @@ func TestAccessApplicationGetWithOptionalParams(t *testing.T) { } func TestAccessApplicationRevokeTokensWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/accessapplicationca_test.go b/zero_trust/accessapplicationca_test.go index bdb5c36fd7..73ba84f77b 100644 --- a/zero_trust/accessapplicationca_test.go +++ b/zero_trust/accessapplicationca_test.go @@ -15,7 +15,7 @@ import ( ) func TestAccessApplicationCANewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -46,7 +46,7 @@ func TestAccessApplicationCANewWithOptionalParams(t *testing.T) { } func TestAccessApplicationCAListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -73,7 +73,7 @@ func TestAccessApplicationCAListWithOptionalParams(t *testing.T) { } func TestAccessApplicationCADeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -104,7 +104,7 @@ func TestAccessApplicationCADeleteWithOptionalParams(t *testing.T) { } func TestAccessApplicationCAGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/accessapplicationpolicy_test.go b/zero_trust/accessapplicationpolicy_test.go index cae43abecc..e25693bf6c 100644 --- a/zero_trust/accessapplicationpolicy_test.go +++ b/zero_trust/accessapplicationpolicy_test.go @@ -15,7 +15,7 @@ import ( ) func TestAccessApplicationPolicyNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -102,7 +102,7 @@ func TestAccessApplicationPolicyNewWithOptionalParams(t *testing.T) { } func TestAccessApplicationPolicyUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -190,7 +190,7 @@ func TestAccessApplicationPolicyUpdateWithOptionalParams(t *testing.T) { } func TestAccessApplicationPolicyListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -221,7 +221,7 @@ func TestAccessApplicationPolicyListWithOptionalParams(t *testing.T) { } func TestAccessApplicationPolicyDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -253,7 +253,7 @@ func TestAccessApplicationPolicyDeleteWithOptionalParams(t *testing.T) { } func TestAccessApplicationPolicyGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/accessapplicationuserpolicycheck_test.go b/zero_trust/accessapplicationuserpolicycheck_test.go index 9c107f7ddb..891db9ad1b 100644 --- a/zero_trust/accessapplicationuserpolicycheck_test.go +++ b/zero_trust/accessapplicationuserpolicycheck_test.go @@ -16,7 +16,7 @@ import ( ) func TestAccessApplicationUserPolicyCheckListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/accessbookmark_test.go b/zero_trust/accessbookmark_test.go index 88e4a7d598..09d559af86 100644 --- a/zero_trust/accessbookmark_test.go +++ b/zero_trust/accessbookmark_test.go @@ -15,7 +15,6 @@ import ( ) func TestAccessBookmarkNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -46,7 +45,6 @@ func TestAccessBookmarkNew(t *testing.T) { } func TestAccessBookmarkUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -77,7 +75,6 @@ func TestAccessBookmarkUpdate(t *testing.T) { } func TestAccessBookmarkList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -101,7 +98,6 @@ func TestAccessBookmarkList(t *testing.T) { } func TestAccessBookmarkDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -129,7 +125,6 @@ func TestAccessBookmarkDelete(t *testing.T) { } func TestAccessBookmarkGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/accesscertificate_test.go b/zero_trust/accesscertificate_test.go index fcdca9c765..a2e35e8e1c 100644 --- a/zero_trust/accesscertificate_test.go +++ b/zero_trust/accesscertificate_test.go @@ -15,7 +15,7 @@ import ( ) func TestAccessCertificateNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +45,7 @@ func TestAccessCertificateNewWithOptionalParams(t *testing.T) { } func TestAccessCertificateUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -78,7 +78,7 @@ func TestAccessCertificateUpdateWithOptionalParams(t *testing.T) { } func TestAccessCertificateListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -105,7 +105,7 @@ func TestAccessCertificateListWithOptionalParams(t *testing.T) { } func TestAccessCertificateDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -136,7 +136,7 @@ func TestAccessCertificateDeleteWithOptionalParams(t *testing.T) { } func TestAccessCertificateGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/accesscertificatesetting_test.go b/zero_trust/accesscertificatesetting_test.go index 3d5510ccf2..265d336605 100644 --- a/zero_trust/accesscertificatesetting_test.go +++ b/zero_trust/accesscertificatesetting_test.go @@ -15,7 +15,7 @@ import ( ) func TestAccessCertificateSettingUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -55,7 +55,7 @@ func TestAccessCertificateSettingUpdateWithOptionalParams(t *testing.T) { } func TestAccessCertificateSettingGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/accesscustompage_test.go b/zero_trust/accesscustompage_test.go index 59147eca3f..235c2c8426 100644 --- a/zero_trust/accesscustompage_test.go +++ b/zero_trust/accesscustompage_test.go @@ -15,7 +15,6 @@ import ( ) func TestAccessCustomPageNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -50,7 +49,6 @@ func TestAccessCustomPageNewWithOptionalParams(t *testing.T) { } func TestAccessCustomPageUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -86,7 +84,6 @@ func TestAccessCustomPageUpdateWithOptionalParams(t *testing.T) { } func TestAccessCustomPageList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -110,7 +107,6 @@ func TestAccessCustomPageList(t *testing.T) { } func TestAccessCustomPageDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -138,7 +134,6 @@ func TestAccessCustomPageDelete(t *testing.T) { } func TestAccessCustomPageGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/accessgroup_test.go b/zero_trust/accessgroup_test.go index 82ae5698f6..cf1eb6d917 100644 --- a/zero_trust/accessgroup_test.go +++ b/zero_trust/accessgroup_test.go @@ -15,7 +15,7 @@ import ( ) func TestAccessGroupNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -83,7 +83,7 @@ func TestAccessGroupNewWithOptionalParams(t *testing.T) { } func TestAccessGroupUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -155,7 +155,7 @@ func TestAccessGroupUpdateWithOptionalParams(t *testing.T) { } func TestAccessGroupListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -182,7 +182,7 @@ func TestAccessGroupListWithOptionalParams(t *testing.T) { } func TestAccessGroupDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -213,7 +213,7 @@ func TestAccessGroupDeleteWithOptionalParams(t *testing.T) { } func TestAccessGroupGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/accesskey_test.go b/zero_trust/accesskey_test.go index ab5adb3018..6447d78309 100644 --- a/zero_trust/accesskey_test.go +++ b/zero_trust/accesskey_test.go @@ -15,7 +15,6 @@ import ( ) func TestAccessKeyUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,6 @@ func TestAccessKeyUpdate(t *testing.T) { } func TestAccessKeyGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -69,7 +67,6 @@ func TestAccessKeyGet(t *testing.T) { } func TestAccessKeyRotate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/accesslogaccessrequest_test.go b/zero_trust/accesslogaccessrequest_test.go index 4f4c600d60..2483dbf0ce 100644 --- a/zero_trust/accesslogaccessrequest_test.go +++ b/zero_trust/accesslogaccessrequest_test.go @@ -14,7 +14,6 @@ import ( ) func TestAccessLogAccessRequestList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/accessservicetoken_test.go b/zero_trust/accessservicetoken_test.go index 897fbe1458..ea757dd851 100644 --- a/zero_trust/accessservicetoken_test.go +++ b/zero_trust/accessservicetoken_test.go @@ -15,7 +15,7 @@ import ( ) func TestAccessServiceTokenNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -44,7 +44,7 @@ func TestAccessServiceTokenNewWithOptionalParams(t *testing.T) { } func TestAccessServiceTokenUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -77,7 +77,7 @@ func TestAccessServiceTokenUpdateWithOptionalParams(t *testing.T) { } func TestAccessServiceTokenListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -104,7 +104,7 @@ func TestAccessServiceTokenListWithOptionalParams(t *testing.T) { } func TestAccessServiceTokenDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -135,7 +135,6 @@ func TestAccessServiceTokenDeleteWithOptionalParams(t *testing.T) { } func TestAccessServiceTokenRefresh(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -163,7 +162,6 @@ func TestAccessServiceTokenRefresh(t *testing.T) { } func TestAccessServiceTokenRotate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/accesstag_test.go b/zero_trust/accesstag_test.go index 71a178be65..272c6d5710 100644 --- a/zero_trust/accesstag_test.go +++ b/zero_trust/accesstag_test.go @@ -15,7 +15,6 @@ import ( ) func TestAccessTagNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,6 @@ func TestAccessTagNew(t *testing.T) { } func TestAccessTagUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -76,7 +74,6 @@ func TestAccessTagUpdate(t *testing.T) { } func TestAccessTagList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -100,7 +97,6 @@ func TestAccessTagList(t *testing.T) { } func TestAccessTagDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -128,7 +124,6 @@ func TestAccessTagDelete(t *testing.T) { } func TestAccessTagGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/accessuser_test.go b/zero_trust/accessuser_test.go index 7bb2850f1b..e008030ac7 100644 --- a/zero_trust/accessuser_test.go +++ b/zero_trust/accessuser_test.go @@ -14,7 +14,6 @@ import ( ) func TestAccessUserList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/accessuseractivesession_test.go b/zero_trust/accessuseractivesession_test.go index b3f5a777fc..a401c896fa 100644 --- a/zero_trust/accessuseractivesession_test.go +++ b/zero_trust/accessuseractivesession_test.go @@ -14,7 +14,6 @@ import ( ) func TestAccessUserActiveSessionList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestAccessUserActiveSessionList(t *testing.T) { } func TestAccessUserActiveSessionGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/accessuserfailedlogin_test.go b/zero_trust/accessuserfailedlogin_test.go index a179bd4644..7f59fb2a1f 100644 --- a/zero_trust/accessuserfailedlogin_test.go +++ b/zero_trust/accessuserfailedlogin_test.go @@ -14,7 +14,6 @@ import ( ) func TestAccessUserFailedLoginList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/accessuserlastseenidentity_test.go b/zero_trust/accessuserlastseenidentity_test.go index b241a3fdb8..a8c9b8a072 100644 --- a/zero_trust/accessuserlastseenidentity_test.go +++ b/zero_trust/accessuserlastseenidentity_test.go @@ -14,7 +14,6 @@ import ( ) func TestAccessUserLastSeenIdentityGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/connectivitysetting_test.go b/zero_trust/connectivitysetting_test.go index 382a70e685..2ff1d38c4c 100644 --- a/zero_trust/connectivitysetting_test.go +++ b/zero_trust/connectivitysetting_test.go @@ -15,7 +15,6 @@ import ( ) func TestConnectivitySettingEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -43,7 +42,6 @@ func TestConnectivitySettingEditWithOptionalParams(t *testing.T) { } func TestConnectivitySettingGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/device_test.go b/zero_trust/device_test.go index 88dac0a377..876e02d59a 100644 --- a/zero_trust/device_test.go +++ b/zero_trust/device_test.go @@ -15,7 +15,6 @@ import ( ) func TestDeviceList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -41,7 +40,6 @@ func TestDeviceList(t *testing.T) { } func TestDeviceGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/devicedextest_test.go b/zero_trust/devicedextest_test.go index dac8acee17..1b69157252 100644 --- a/zero_trust/devicedextest_test.go +++ b/zero_trust/devicedextest_test.go @@ -15,7 +15,6 @@ import ( ) func TestDeviceDEXTestNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -66,7 +65,6 @@ func TestDeviceDEXTestNewWithOptionalParams(t *testing.T) { } func TestDeviceDEXTestUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -121,7 +119,6 @@ func TestDeviceDEXTestUpdateWithOptionalParams(t *testing.T) { } func TestDeviceDEXTestList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -147,7 +144,6 @@ func TestDeviceDEXTestList(t *testing.T) { } func TestDeviceDEXTestDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -177,7 +173,6 @@ func TestDeviceDEXTestDelete(t *testing.T) { } func TestDeviceDEXTestGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/devicenetwork_test.go b/zero_trust/devicenetwork_test.go index ef5b7f7e10..689054aff9 100644 --- a/zero_trust/devicenetwork_test.go +++ b/zero_trust/devicenetwork_test.go @@ -15,7 +15,6 @@ import ( ) func TestDeviceNetworkNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -47,7 +46,6 @@ func TestDeviceNetworkNewWithOptionalParams(t *testing.T) { } func TestDeviceNetworkUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -83,7 +81,6 @@ func TestDeviceNetworkUpdateWithOptionalParams(t *testing.T) { } func TestDeviceNetworkList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -109,7 +106,6 @@ func TestDeviceNetworkList(t *testing.T) { } func TestDeviceNetworkDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -139,7 +135,6 @@ func TestDeviceNetworkDelete(t *testing.T) { } func TestDeviceNetworkGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/deviceoverridecode_test.go b/zero_trust/deviceoverridecode_test.go index 0c18875002..6e8651ad97 100644 --- a/zero_trust/deviceoverridecode_test.go +++ b/zero_trust/deviceoverridecode_test.go @@ -15,7 +15,6 @@ import ( ) func TestDeviceOverrideCodeList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/devicepolicy_test.go b/zero_trust/devicepolicy_test.go index b3e6a6b85f..4ca78b8522 100644 --- a/zero_trust/devicepolicy_test.go +++ b/zero_trust/devicepolicy_test.go @@ -15,7 +15,7 @@ import ( ) func TestDevicePolicyNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -61,7 +61,6 @@ func TestDevicePolicyNewWithOptionalParams(t *testing.T) { } func TestDevicePolicyList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -87,7 +86,6 @@ func TestDevicePolicyList(t *testing.T) { } func TestDevicePolicyDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -117,7 +115,7 @@ func TestDevicePolicyDelete(t *testing.T) { } func TestDevicePolicyEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -165,7 +163,7 @@ func TestDevicePolicyEditWithOptionalParams(t *testing.T) { } func TestDevicePolicyGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/devicepolicydefaultpolicy_test.go b/zero_trust/devicepolicydefaultpolicy_test.go index e2164d411a..f126c61f7c 100644 --- a/zero_trust/devicepolicydefaultpolicy_test.go +++ b/zero_trust/devicepolicydefaultpolicy_test.go @@ -15,7 +15,6 @@ import ( ) func TestDevicePolicyDefaultPolicyGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/devicepolicyexclude_test.go b/zero_trust/devicepolicyexclude_test.go index 3c60baff49..e12eaa07fd 100644 --- a/zero_trust/devicepolicyexclude_test.go +++ b/zero_trust/devicepolicyexclude_test.go @@ -15,7 +15,6 @@ import ( ) func TestDevicePolicyExcludeUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -54,7 +53,6 @@ func TestDevicePolicyExcludeUpdate(t *testing.T) { } func TestDevicePolicyExcludeList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -80,7 +78,6 @@ func TestDevicePolicyExcludeList(t *testing.T) { } func TestDevicePolicyExcludeGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/devicepolicyfallbackdomain_test.go b/zero_trust/devicepolicyfallbackdomain_test.go index caf5294f08..9ce3e568d1 100644 --- a/zero_trust/devicepolicyfallbackdomain_test.go +++ b/zero_trust/devicepolicyfallbackdomain_test.go @@ -15,7 +15,6 @@ import ( ) func TestDevicePolicyFallbackDomainUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -58,7 +57,6 @@ func TestDevicePolicyFallbackDomainUpdate(t *testing.T) { } func TestDevicePolicyFallbackDomainList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -84,7 +82,6 @@ func TestDevicePolicyFallbackDomainList(t *testing.T) { } func TestDevicePolicyFallbackDomainGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/devicepolicyinclude_test.go b/zero_trust/devicepolicyinclude_test.go index 73855c6854..8df8f8fb08 100644 --- a/zero_trust/devicepolicyinclude_test.go +++ b/zero_trust/devicepolicyinclude_test.go @@ -15,7 +15,6 @@ import ( ) func TestDevicePolicyIncludeUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -54,7 +53,6 @@ func TestDevicePolicyIncludeUpdate(t *testing.T) { } func TestDevicePolicyIncludeList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -80,7 +78,6 @@ func TestDevicePolicyIncludeList(t *testing.T) { } func TestDevicePolicyIncludeGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/deviceposture_test.go b/zero_trust/deviceposture_test.go index 15128ba1d7..b9d476e451 100644 --- a/zero_trust/deviceposture_test.go +++ b/zero_trust/deviceposture_test.go @@ -15,7 +15,6 @@ import ( ) func TestDevicePostureNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -60,7 +59,6 @@ func TestDevicePostureNewWithOptionalParams(t *testing.T) { } func TestDevicePostureUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -109,7 +107,6 @@ func TestDevicePostureUpdateWithOptionalParams(t *testing.T) { } func TestDevicePostureList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -135,7 +132,6 @@ func TestDevicePostureList(t *testing.T) { } func TestDevicePostureDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -165,7 +161,6 @@ func TestDevicePostureDelete(t *testing.T) { } func TestDevicePostureGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/devicepostureintegration_test.go b/zero_trust/devicepostureintegration_test.go index 03a998fb1e..35d7e9d2c7 100644 --- a/zero_trust/devicepostureintegration_test.go +++ b/zero_trust/devicepostureintegration_test.go @@ -15,7 +15,6 @@ import ( ) func TestDevicePostureIntegrationNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -50,7 +49,6 @@ func TestDevicePostureIntegrationNewWithOptionalParams(t *testing.T) { } func TestDevicePostureIntegrationList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -76,7 +74,6 @@ func TestDevicePostureIntegrationList(t *testing.T) { } func TestDevicePostureIntegrationDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -106,7 +103,6 @@ func TestDevicePostureIntegrationDelete(t *testing.T) { } func TestDevicePostureIntegrationEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -145,7 +141,6 @@ func TestDevicePostureIntegrationEditWithOptionalParams(t *testing.T) { } func TestDevicePostureIntegrationGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/devicerevoke_test.go b/zero_trust/devicerevoke_test.go index 91b21b1a4c..3b169ae63a 100644 --- a/zero_trust/devicerevoke_test.go +++ b/zero_trust/devicerevoke_test.go @@ -15,7 +15,6 @@ import ( ) func TestDeviceRevokeNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/devicesetting_test.go b/zero_trust/devicesetting_test.go index 3ccd554d41..a9dd4830b7 100644 --- a/zero_trust/devicesetting_test.go +++ b/zero_trust/devicesetting_test.go @@ -15,7 +15,6 @@ import ( ) func TestDeviceSettingUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -47,7 +46,6 @@ func TestDeviceSettingUpdateWithOptionalParams(t *testing.T) { } func TestDeviceSettingList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/deviceunrevoke_test.go b/zero_trust/deviceunrevoke_test.go index 5c0c8cf482..15ec120344 100644 --- a/zero_trust/deviceunrevoke_test.go +++ b/zero_trust/deviceunrevoke_test.go @@ -15,7 +15,6 @@ import ( ) func TestDeviceUnrevokeNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/dexcolo_test.go b/zero_trust/dexcolo_test.go index 7bb8e90a24..8a756b64f8 100644 --- a/zero_trust/dexcolo_test.go +++ b/zero_trust/dexcolo_test.go @@ -15,7 +15,6 @@ import ( ) func TestDEXColoListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/dexfleetstatus_test.go b/zero_trust/dexfleetstatus_test.go index 971d4893db..f3d811b340 100644 --- a/zero_trust/dexfleetstatus_test.go +++ b/zero_trust/dexfleetstatus_test.go @@ -15,7 +15,6 @@ import ( ) func TestDEXFleetStatusLive(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestDEXFleetStatusLive(t *testing.T) { } func TestDEXFleetStatusOverTimeWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/dexfleetstatusdevice_test.go b/zero_trust/dexfleetstatusdevice_test.go index 44af9640b1..2c4193aa68 100644 --- a/zero_trust/dexfleetstatusdevice_test.go +++ b/zero_trust/dexfleetstatusdevice_test.go @@ -15,7 +15,7 @@ import ( ) func TestDEXFleetStatusDeviceListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/dexhttptest_test.go b/zero_trust/dexhttptest_test.go index 228bcf32ad..32aafde50d 100644 --- a/zero_trust/dexhttptest_test.go +++ b/zero_trust/dexhttptest_test.go @@ -15,7 +15,6 @@ import ( ) func TestDEXHTTPTestGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/dexhttptestpercentile_test.go b/zero_trust/dexhttptestpercentile_test.go index 63846d98f2..9232aa8561 100644 --- a/zero_trust/dexhttptestpercentile_test.go +++ b/zero_trust/dexhttptestpercentile_test.go @@ -15,7 +15,6 @@ import ( ) func TestDEXHTTPTestPercentileGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/dextest_test.go b/zero_trust/dextest_test.go index 1267b48f9a..3f7f8f4ca0 100644 --- a/zero_trust/dextest_test.go +++ b/zero_trust/dextest_test.go @@ -15,7 +15,6 @@ import ( ) func TestDEXTestListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/dextestuniquedevice_test.go b/zero_trust/dextestuniquedevice_test.go index 41aab67834..06169b3eb5 100644 --- a/zero_trust/dextestuniquedevice_test.go +++ b/zero_trust/dextestuniquedevice_test.go @@ -15,7 +15,6 @@ import ( ) func TestDEXTestUniqueDeviceListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/dextraceroutetest_test.go b/zero_trust/dextraceroutetest_test.go index f676550663..082e40c680 100644 --- a/zero_trust/dextraceroutetest_test.go +++ b/zero_trust/dextraceroutetest_test.go @@ -15,7 +15,6 @@ import ( ) func TestDEXTracerouteTestGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -50,7 +49,6 @@ func TestDEXTracerouteTestGetWithOptionalParams(t *testing.T) { } func TestDEXTracerouteTestNetworkPath(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -84,7 +82,6 @@ func TestDEXTracerouteTestNetworkPath(t *testing.T) { } func TestDEXTracerouteTestPercentilesWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/dextraceroutetestresultnetworkpath_test.go b/zero_trust/dextraceroutetestresultnetworkpath_test.go index 3f3fe83f7c..99e60ab2b6 100644 --- a/zero_trust/dextraceroutetestresultnetworkpath_test.go +++ b/zero_trust/dextraceroutetestresultnetworkpath_test.go @@ -15,7 +15,6 @@ import ( ) func TestDEXTracerouteTestResultNetworkPathGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/dlpdataset_test.go b/zero_trust/dlpdataset_test.go index 3c11b89e5d..df9fdde498 100644 --- a/zero_trust/dlpdataset_test.go +++ b/zero_trust/dlpdataset_test.go @@ -15,7 +15,6 @@ import ( ) func TestDLPDatasetNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -44,7 +43,6 @@ func TestDLPDatasetNewWithOptionalParams(t *testing.T) { } func TestDLPDatasetUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -76,7 +74,6 @@ func TestDLPDatasetUpdateWithOptionalParams(t *testing.T) { } func TestDLPDatasetList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -102,7 +99,6 @@ func TestDLPDatasetList(t *testing.T) { } func TestDLPDatasetDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -132,7 +128,6 @@ func TestDLPDatasetDelete(t *testing.T) { } func TestDLPDatasetGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/dlpdatasetupload_test.go b/zero_trust/dlpdatasetupload_test.go index 194c263251..d7524d7e6b 100644 --- a/zero_trust/dlpdatasetupload_test.go +++ b/zero_trust/dlpdatasetupload_test.go @@ -15,7 +15,6 @@ import ( ) func TestDLPDatasetUploadNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,7 @@ func TestDLPDatasetUploadNew(t *testing.T) { } func TestDLPDatasetUploadEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/dlppattern_test.go b/zero_trust/dlppattern_test.go index 7ee523029b..8ff48a94fd 100644 --- a/zero_trust/dlppattern_test.go +++ b/zero_trust/dlppattern_test.go @@ -15,7 +15,6 @@ import ( ) func TestDLPPatternValidate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/dlppayloadlog_test.go b/zero_trust/dlppayloadlog_test.go index ba059c4d12..3b978a40aa 100644 --- a/zero_trust/dlppayloadlog_test.go +++ b/zero_trust/dlppayloadlog_test.go @@ -15,7 +15,6 @@ import ( ) func TestDLPPayloadLogUpdate(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestDLPPayloadLogUpdate(t *testing.T) { } func TestDLPPayloadLogGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/dlpprofile_test.go b/zero_trust/dlpprofile_test.go index d19eea0a3e..ab6d605bde 100644 --- a/zero_trust/dlpprofile_test.go +++ b/zero_trust/dlpprofile_test.go @@ -15,7 +15,6 @@ import ( ) func TestDLPProfileList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -41,7 +40,6 @@ func TestDLPProfileList(t *testing.T) { } func TestDLPProfileGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/dlpprofilecustom_test.go b/zero_trust/dlpprofilecustom_test.go index 22ea6b4022..55f0e4ecfd 100644 --- a/zero_trust/dlpprofilecustom_test.go +++ b/zero_trust/dlpprofilecustom_test.go @@ -15,7 +15,6 @@ import ( ) func TestDLPProfileCustomNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -141,7 +140,6 @@ func TestDLPProfileCustomNew(t *testing.T) { } func TestDLPProfileCustomUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -213,7 +211,6 @@ func TestDLPProfileCustomUpdateWithOptionalParams(t *testing.T) { } func TestDLPProfileCustomDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -243,7 +240,6 @@ func TestDLPProfileCustomDelete(t *testing.T) { } func TestDLPProfileCustomGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/dlpprofilepredefined_test.go b/zero_trust/dlpprofilepredefined_test.go index e2c30a930b..0078dc43d8 100644 --- a/zero_trust/dlpprofilepredefined_test.go +++ b/zero_trust/dlpprofilepredefined_test.go @@ -15,7 +15,6 @@ import ( ) func TestDLPProfilePredefinedUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -60,7 +59,6 @@ func TestDLPProfilePredefinedUpdateWithOptionalParams(t *testing.T) { } func TestDLPProfilePredefinedGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/gateway_test.go b/zero_trust/gateway_test.go index ca2f547924..0df5a93c43 100644 --- a/zero_trust/gateway_test.go +++ b/zero_trust/gateway_test.go @@ -15,7 +15,6 @@ import ( ) func TestGatewayNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -41,7 +40,6 @@ func TestGatewayNew(t *testing.T) { } func TestGatewayList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/gatewayapptype_test.go b/zero_trust/gatewayapptype_test.go index 739427698e..7d400cc4ba 100644 --- a/zero_trust/gatewayapptype_test.go +++ b/zero_trust/gatewayapptype_test.go @@ -15,7 +15,6 @@ import ( ) func TestGatewayAppTypeList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/gatewayauditsshsetting_test.go b/zero_trust/gatewayauditsshsetting_test.go index ba7fc64520..61dfcc3b88 100644 --- a/zero_trust/gatewayauditsshsetting_test.go +++ b/zero_trust/gatewayauditsshsetting_test.go @@ -15,7 +15,6 @@ import ( ) func TestGatewayAuditSSHSettingUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -43,7 +42,6 @@ func TestGatewayAuditSSHSettingUpdateWithOptionalParams(t *testing.T) { } func TestGatewayAuditSSHSettingGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/gatewaycategory_test.go b/zero_trust/gatewaycategory_test.go index dffbc158d8..f8e7706d8a 100644 --- a/zero_trust/gatewaycategory_test.go +++ b/zero_trust/gatewaycategory_test.go @@ -15,7 +15,6 @@ import ( ) func TestGatewayCategoryList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/gatewayconfiguration_test.go b/zero_trust/gatewayconfiguration_test.go index 0d4e17341f..619467c27d 100644 --- a/zero_trust/gatewayconfiguration_test.go +++ b/zero_trust/gatewayconfiguration_test.go @@ -15,7 +15,6 @@ import ( ) func TestGatewayConfigurationUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -90,7 +89,6 @@ func TestGatewayConfigurationUpdateWithOptionalParams(t *testing.T) { } func TestGatewayConfigurationEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -165,7 +163,6 @@ func TestGatewayConfigurationEditWithOptionalParams(t *testing.T) { } func TestGatewayConfigurationGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/gatewaylist_test.go b/zero_trust/gatewaylist_test.go index f6c6d94647..def73f4ccf 100644 --- a/zero_trust/gatewaylist_test.go +++ b/zero_trust/gatewaylist_test.go @@ -15,7 +15,6 @@ import ( ) func TestGatewayListNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -51,7 +50,6 @@ func TestGatewayListNewWithOptionalParams(t *testing.T) { } func TestGatewayListUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -83,7 +81,6 @@ func TestGatewayListUpdateWithOptionalParams(t *testing.T) { } func TestGatewayListList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -109,7 +106,6 @@ func TestGatewayListList(t *testing.T) { } func TestGatewayListDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -139,7 +135,6 @@ func TestGatewayListDelete(t *testing.T) { } func TestGatewayListEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -177,7 +172,6 @@ func TestGatewayListEditWithOptionalParams(t *testing.T) { } func TestGatewayListGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/gatewaylistitem_test.go b/zero_trust/gatewaylistitem_test.go index 603526ab09..d3f3f3084d 100644 --- a/zero_trust/gatewaylistitem_test.go +++ b/zero_trust/gatewaylistitem_test.go @@ -15,7 +15,6 @@ import ( ) func TestGatewayListItemList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/gatewaylocation_test.go b/zero_trust/gatewaylocation_test.go index 87f8bc3542..fd05051fa0 100644 --- a/zero_trust/gatewaylocation_test.go +++ b/zero_trust/gatewaylocation_test.go @@ -15,7 +15,6 @@ import ( ) func TestGatewayLocationNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -51,7 +50,6 @@ func TestGatewayLocationNewWithOptionalParams(t *testing.T) { } func TestGatewayLocationUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -91,7 +89,6 @@ func TestGatewayLocationUpdateWithOptionalParams(t *testing.T) { } func TestGatewayLocationList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -117,7 +114,6 @@ func TestGatewayLocationList(t *testing.T) { } func TestGatewayLocationDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -147,7 +143,6 @@ func TestGatewayLocationDelete(t *testing.T) { } func TestGatewayLocationGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/gatewaylogging_test.go b/zero_trust/gatewaylogging_test.go index f22907d333..8684a34ad3 100644 --- a/zero_trust/gatewaylogging_test.go +++ b/zero_trust/gatewaylogging_test.go @@ -15,7 +15,6 @@ import ( ) func TestGatewayLoggingUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -49,7 +48,6 @@ func TestGatewayLoggingUpdateWithOptionalParams(t *testing.T) { } func TestGatewayLoggingGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/gatewayproxyendpoint_test.go b/zero_trust/gatewayproxyendpoint_test.go index 194ca3e6f1..715b7e3612 100644 --- a/zero_trust/gatewayproxyendpoint_test.go +++ b/zero_trust/gatewayproxyendpoint_test.go @@ -15,7 +15,6 @@ import ( ) func TestGatewayProxyEndpointNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -43,7 +42,6 @@ func TestGatewayProxyEndpointNew(t *testing.T) { } func TestGatewayProxyEndpointList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -69,7 +67,6 @@ func TestGatewayProxyEndpointList(t *testing.T) { } func TestGatewayProxyEndpointDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -99,7 +96,6 @@ func TestGatewayProxyEndpointDelete(t *testing.T) { } func TestGatewayProxyEndpointEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -131,7 +127,6 @@ func TestGatewayProxyEndpointEditWithOptionalParams(t *testing.T) { } func TestGatewayProxyEndpointGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/gatewayrule_test.go b/zero_trust/gatewayrule_test.go index 2a12870620..e6eee75485 100644 --- a/zero_trust/gatewayrule_test.go +++ b/zero_trust/gatewayrule_test.go @@ -15,7 +15,6 @@ import ( ) func TestGatewayRuleNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -149,7 +148,6 @@ func TestGatewayRuleNewWithOptionalParams(t *testing.T) { } func TestGatewayRuleUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -287,7 +285,6 @@ func TestGatewayRuleUpdateWithOptionalParams(t *testing.T) { } func TestGatewayRuleList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -313,7 +310,6 @@ func TestGatewayRuleList(t *testing.T) { } func TestGatewayRuleDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -343,7 +339,6 @@ func TestGatewayRuleDelete(t *testing.T) { } func TestGatewayRuleGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/identityprovider_test.go b/zero_trust/identityprovider_test.go index 9cc3f88cbc..d2ac722814 100644 --- a/zero_trust/identityprovider_test.go +++ b/zero_trust/identityprovider_test.go @@ -15,7 +15,7 @@ import ( ) func TestIdentityProviderNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -63,7 +63,7 @@ func TestIdentityProviderNewWithOptionalParams(t *testing.T) { } func TestIdentityProviderUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -115,7 +115,7 @@ func TestIdentityProviderUpdateWithOptionalParams(t *testing.T) { } func TestIdentityProviderListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -142,7 +142,7 @@ func TestIdentityProviderListWithOptionalParams(t *testing.T) { } func TestIdentityProviderDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -173,7 +173,7 @@ func TestIdentityProviderDeleteWithOptionalParams(t *testing.T) { } func TestIdentityProviderGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/networkroute_test.go b/zero_trust/networkroute_test.go index 9758c82acc..a9315527d9 100644 --- a/zero_trust/networkroute_test.go +++ b/zero_trust/networkroute_test.go @@ -16,7 +16,6 @@ import ( ) func TestNetworkRouteNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,6 @@ func TestNetworkRouteNewWithOptionalParams(t *testing.T) { } func TestNetworkRouteListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -82,7 +80,6 @@ func TestNetworkRouteListWithOptionalParams(t *testing.T) { } func TestNetworkRouteDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -112,7 +109,6 @@ func TestNetworkRouteDelete(t *testing.T) { } func TestNetworkRouteEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/networkrouteip_test.go b/zero_trust/networkrouteip_test.go index 82d48c3e99..ee48e0d6de 100644 --- a/zero_trust/networkrouteip_test.go +++ b/zero_trust/networkrouteip_test.go @@ -15,7 +15,6 @@ import ( ) func TestNetworkRouteIPGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/networkroutenetwork_test.go b/zero_trust/networkroutenetwork_test.go index 1d42308708..a5f664346a 100644 --- a/zero_trust/networkroutenetwork_test.go +++ b/zero_trust/networkroutenetwork_test.go @@ -15,7 +15,6 @@ import ( ) func TestNetworkRouteNetworkNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -47,7 +46,6 @@ func TestNetworkRouteNetworkNewWithOptionalParams(t *testing.T) { } func TestNetworkRouteNetworkDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -80,7 +78,6 @@ func TestNetworkRouteNetworkDeleteWithOptionalParams(t *testing.T) { } func TestNetworkRouteNetworkEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/networkvirtualnetwork_test.go b/zero_trust/networkvirtualnetwork_test.go index 6e58a63a84..03608bfa83 100644 --- a/zero_trust/networkvirtualnetwork_test.go +++ b/zero_trust/networkvirtualnetwork_test.go @@ -15,7 +15,6 @@ import ( ) func TestNetworkVirtualNetworkNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -44,7 +43,6 @@ func TestNetworkVirtualNetworkNewWithOptionalParams(t *testing.T) { } func TestNetworkVirtualNetworkListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -74,7 +72,6 @@ func TestNetworkVirtualNetworkListWithOptionalParams(t *testing.T) { } func TestNetworkVirtualNetworkDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -104,7 +101,6 @@ func TestNetworkVirtualNetworkDelete(t *testing.T) { } func TestNetworkVirtualNetworkEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/organization_test.go b/zero_trust/organization_test.go index e2a0644096..dec682946c 100644 --- a/zero_trust/organization_test.go +++ b/zero_trust/organization_test.go @@ -15,7 +15,7 @@ import ( ) func TestOrganizationNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -58,7 +58,7 @@ func TestOrganizationNewWithOptionalParams(t *testing.T) { } func TestOrganizationUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -105,7 +105,7 @@ func TestOrganizationUpdateWithOptionalParams(t *testing.T) { } func TestOrganizationListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -132,7 +132,7 @@ func TestOrganizationListWithOptionalParams(t *testing.T) { } func TestOrganizationRevokeUsersWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/riskscoring_test.go b/zero_trust/riskscoring_test.go index 75642159c9..6cfd078b71 100644 --- a/zero_trust/riskscoring_test.go +++ b/zero_trust/riskscoring_test.go @@ -15,7 +15,6 @@ import ( ) func TestRiskScoringGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -49,7 +48,6 @@ func TestRiskScoringGetWithOptionalParams(t *testing.T) { } func TestRiskScoringReset(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/riskscoringbehaviour_test.go b/zero_trust/riskscoringbehaviour_test.go index cc3b5e4305..3e6c2e0c74 100644 --- a/zero_trust/riskscoringbehaviour_test.go +++ b/zero_trust/riskscoringbehaviour_test.go @@ -15,7 +15,6 @@ import ( ) func TestRiskScoringBehaviourUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -50,7 +49,6 @@ func TestRiskScoringBehaviourUpdateWithOptionalParams(t *testing.T) { } func TestRiskScoringBehaviourGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/riskscoringsummary_test.go b/zero_trust/riskscoringsummary_test.go index 45e9f61c12..7e11ba16c6 100644 --- a/zero_trust/riskscoringsummary_test.go +++ b/zero_trust/riskscoringsummary_test.go @@ -15,7 +15,6 @@ import ( ) func TestRiskScoringSummaryGetWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/seat_test.go b/zero_trust/seat_test.go index b5ff38ff74..64eae5cb4a 100644 --- a/zero_trust/seat_test.go +++ b/zero_trust/seat_test.go @@ -15,7 +15,7 @@ import ( ) func TestSeatEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") + t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/tunnel_test.go b/zero_trust/tunnel_test.go index 155ee91419..9d0a963db8 100644 --- a/zero_trust/tunnel_test.go +++ b/zero_trust/tunnel_test.go @@ -16,7 +16,6 @@ import ( ) func TestTunnelNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -44,7 +43,6 @@ func TestTunnelNew(t *testing.T) { } func TestTunnelListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -81,7 +79,6 @@ func TestTunnelListWithOptionalParams(t *testing.T) { } func TestTunnelDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -111,7 +108,6 @@ func TestTunnelDelete(t *testing.T) { } func TestTunnelEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -143,7 +139,6 @@ func TestTunnelEditWithOptionalParams(t *testing.T) { } func TestTunnelGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/tunnelconfiguration_test.go b/zero_trust/tunnelconfiguration_test.go index ffa83258f9..0ce7bf08a0 100644 --- a/zero_trust/tunnelconfiguration_test.go +++ b/zero_trust/tunnelconfiguration_test.go @@ -15,7 +15,6 @@ import ( ) func TestTunnelConfigurationUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -143,7 +142,6 @@ func TestTunnelConfigurationUpdateWithOptionalParams(t *testing.T) { } func TestTunnelConfigurationGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/tunnelconnection_test.go b/zero_trust/tunnelconnection_test.go index abb16e4e20..7cab50e2c7 100644 --- a/zero_trust/tunnelconnection_test.go +++ b/zero_trust/tunnelconnection_test.go @@ -15,7 +15,6 @@ import ( ) func TestTunnelConnectionDelete(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,6 @@ func TestTunnelConnectionDelete(t *testing.T) { } func TestTunnelConnectionGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/tunnelconnector_test.go b/zero_trust/tunnelconnector_test.go index bd83783d55..2f0043daf2 100644 --- a/zero_trust/tunnelconnector_test.go +++ b/zero_trust/tunnelconnector_test.go @@ -15,7 +15,6 @@ import ( ) func TestTunnelConnectorGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/tunnelmanagement_test.go b/zero_trust/tunnelmanagement_test.go index 02d7d3e819..50e7fee993 100644 --- a/zero_trust/tunnelmanagement_test.go +++ b/zero_trust/tunnelmanagement_test.go @@ -15,7 +15,6 @@ import ( ) func TestTunnelManagementNew(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/tunneltoken_test.go b/zero_trust/tunneltoken_test.go index a9d51f44a6..b59b8f924c 100644 --- a/zero_trust/tunneltoken_test.go +++ b/zero_trust/tunneltoken_test.go @@ -15,7 +15,6 @@ import ( ) func TestTunnelTokenGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/activationcheck_test.go b/zones/activationcheck_test.go index 36eca7b1ec..a5f3a38061 100644 --- a/zones/activationcheck_test.go +++ b/zones/activationcheck_test.go @@ -15,7 +15,6 @@ import ( ) func TestActivationCheckTrigger(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/customnameserver_test.go b/zones/customnameserver_test.go index 92b61ad5a9..8b91f2a113 100644 --- a/zones/customnameserver_test.go +++ b/zones/customnameserver_test.go @@ -15,7 +15,6 @@ import ( ) func TestCustomNameserverUpdateWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -43,7 +42,6 @@ func TestCustomNameserverUpdateWithOptionalParams(t *testing.T) { } func TestCustomNameserverGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/dnssetting_test.go b/zones/dnssetting_test.go index a74202a89c..6a46603a93 100644 --- a/zones/dnssetting_test.go +++ b/zones/dnssetting_test.go @@ -15,7 +15,6 @@ import ( ) func TestDNSSettingEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -49,7 +48,6 @@ func TestDNSSettingEditWithOptionalParams(t *testing.T) { } func TestDNSSettingGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/hold_test.go b/zones/hold_test.go index bebfc69128..12ed5c1378 100644 --- a/zones/hold_test.go +++ b/zones/hold_test.go @@ -15,7 +15,6 @@ import ( ) func TestHoldNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestHoldNewWithOptionalParams(t *testing.T) { } func TestHoldDeleteWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -69,7 +67,6 @@ func TestHoldDeleteWithOptionalParams(t *testing.T) { } func TestHoldGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingadvancedddos_test.go b/zones/settingadvancedddos_test.go index 7c7345d695..98bdc6ec03 100644 --- a/zones/settingadvancedddos_test.go +++ b/zones/settingadvancedddos_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingAdvancedDDoSGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingalwaysonline_test.go b/zones/settingalwaysonline_test.go index 8f96509684..329a3c8b5b 100644 --- a/zones/settingalwaysonline_test.go +++ b/zones/settingalwaysonline_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingAlwaysOnlineEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingAlwaysOnlineEdit(t *testing.T) { } func TestSettingAlwaysOnlineGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingalwaysusehttps_test.go b/zones/settingalwaysusehttps_test.go index 5988bcf386..59a4e649d8 100644 --- a/zones/settingalwaysusehttps_test.go +++ b/zones/settingalwaysusehttps_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingAlwaysUseHTTPSEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingAlwaysUseHTTPSEdit(t *testing.T) { } func TestSettingAlwaysUseHTTPSGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingautomatichttpsrewrite_test.go b/zones/settingautomatichttpsrewrite_test.go index 7f0cf0b430..3ba2c533c7 100644 --- a/zones/settingautomatichttpsrewrite_test.go +++ b/zones/settingautomatichttpsrewrite_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingAutomaticHTTPSRewriteEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingAutomaticHTTPSRewriteEdit(t *testing.T) { } func TestSettingAutomaticHTTPSRewriteGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingautomaticplatformoptimization_test.go b/zones/settingautomaticplatformoptimization_test.go index 5613e83646..d8b78efedf 100644 --- a/zones/settingautomaticplatformoptimization_test.go +++ b/zones/settingautomaticplatformoptimization_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingAutomaticPlatformOptimizationEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -49,7 +48,6 @@ func TestSettingAutomaticPlatformOptimizationEdit(t *testing.T) { } func TestSettingAutomaticPlatformOptimizationGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingbrotli_test.go b/zones/settingbrotli_test.go index 82758f31dd..fa5a403697 100644 --- a/zones/settingbrotli_test.go +++ b/zones/settingbrotli_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingBrotliEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingBrotliEdit(t *testing.T) { } func TestSettingBrotliGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingbrowsercachettl_test.go b/zones/settingbrowsercachettl_test.go index c55138b3b8..aaf48e569c 100644 --- a/zones/settingbrowsercachettl_test.go +++ b/zones/settingbrowsercachettl_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingBrowserCacheTTLEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingBrowserCacheTTLEdit(t *testing.T) { } func TestSettingBrowserCacheTTLGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingbrowsercheck_test.go b/zones/settingbrowsercheck_test.go index 4c1dfaec1b..ccfdd0d848 100644 --- a/zones/settingbrowsercheck_test.go +++ b/zones/settingbrowsercheck_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingBrowserCheckEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingBrowserCheckEdit(t *testing.T) { } func TestSettingBrowserCheckGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingcachelevel_test.go b/zones/settingcachelevel_test.go index d68ac54047..97c7271fb3 100644 --- a/zones/settingcachelevel_test.go +++ b/zones/settingcachelevel_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingCacheLevelEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingCacheLevelEdit(t *testing.T) { } func TestSettingCacheLevelGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingchallengettl_test.go b/zones/settingchallengettl_test.go index 6cac4f215e..d73491fd6d 100644 --- a/zones/settingchallengettl_test.go +++ b/zones/settingchallengettl_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingChallengeTTLEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingChallengeTTLEdit(t *testing.T) { } func TestSettingChallengeTTLGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingcipher_test.go b/zones/settingcipher_test.go index 13610188c1..c04cd5bdab 100644 --- a/zones/settingcipher_test.go +++ b/zones/settingcipher_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingCipherEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingCipherEdit(t *testing.T) { } func TestSettingCipherGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingdevelopmentmode_test.go b/zones/settingdevelopmentmode_test.go index 181bb06481..c20f24f386 100644 --- a/zones/settingdevelopmentmode_test.go +++ b/zones/settingdevelopmentmode_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingDevelopmentModeEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingDevelopmentModeEdit(t *testing.T) { } func TestSettingDevelopmentModeGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingearlyhint_test.go b/zones/settingearlyhint_test.go index 7c55704819..fe9f33b15c 100644 --- a/zones/settingearlyhint_test.go +++ b/zones/settingearlyhint_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingEarlyHintEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingEarlyHintEdit(t *testing.T) { } func TestSettingEarlyHintGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingemailobfuscation_test.go b/zones/settingemailobfuscation_test.go index df2b4fd679..9d322301c8 100644 --- a/zones/settingemailobfuscation_test.go +++ b/zones/settingemailobfuscation_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingEmailObfuscationEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingEmailObfuscationEdit(t *testing.T) { } func TestSettingEmailObfuscationGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingfontsetting_test.go b/zones/settingfontsetting_test.go index 9d2b7d986e..50415fcc9e 100644 --- a/zones/settingfontsetting_test.go +++ b/zones/settingfontsetting_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingFontSettingEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingFontSettingEdit(t *testing.T) { } func TestSettingFontSettingGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingh2prioritization_test.go b/zones/settingh2prioritization_test.go index 4f31fcf190..78f58ed01a 100644 --- a/zones/settingh2prioritization_test.go +++ b/zones/settingh2prioritization_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingH2PrioritizationEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,6 @@ func TestSettingH2PrioritizationEditWithOptionalParams(t *testing.T) { } func TestSettingH2PrioritizationGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settinghotlinkprotection_test.go b/zones/settinghotlinkprotection_test.go index 3462d4a661..6c0b23e1ac 100644 --- a/zones/settinghotlinkprotection_test.go +++ b/zones/settinghotlinkprotection_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingHotlinkProtectionEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingHotlinkProtectionEdit(t *testing.T) { } func TestSettingHotlinkProtectionGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settinghttp2_test.go b/zones/settinghttp2_test.go index 175b717cd5..c2a7b28660 100644 --- a/zones/settinghttp2_test.go +++ b/zones/settinghttp2_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingHTTP2Edit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingHTTP2Edit(t *testing.T) { } func TestSettingHTTP2Get(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settinghttp3_test.go b/zones/settinghttp3_test.go index baa4ce3bcd..c22904b30e 100644 --- a/zones/settinghttp3_test.go +++ b/zones/settinghttp3_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingHTTP3Edit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingHTTP3Edit(t *testing.T) { } func TestSettingHTTP3Get(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingimageresizing_test.go b/zones/settingimageresizing_test.go index d3a8470bb9..26b8f11ad7 100644 --- a/zones/settingimageresizing_test.go +++ b/zones/settingimageresizing_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingImageResizingEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,6 @@ func TestSettingImageResizingEditWithOptionalParams(t *testing.T) { } func TestSettingImageResizingGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingipgeolocation_test.go b/zones/settingipgeolocation_test.go index 9590c95c79..de34426c82 100644 --- a/zones/settingipgeolocation_test.go +++ b/zones/settingipgeolocation_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingIPGeolocationEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingIPGeolocationEdit(t *testing.T) { } func TestSettingIPGeolocationGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingipv6_test.go b/zones/settingipv6_test.go index a415a57355..0c4676f47d 100644 --- a/zones/settingipv6_test.go +++ b/zones/settingipv6_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingIPV6Edit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingIPV6Edit(t *testing.T) { } func TestSettingIPV6Get(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingminify_test.go b/zones/settingminify_test.go index 5443ea161d..31d38a35d6 100644 --- a/zones/settingminify_test.go +++ b/zones/settingminify_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingMinifyEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -46,7 +45,6 @@ func TestSettingMinifyEditWithOptionalParams(t *testing.T) { } func TestSettingMinifyGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingmintlsversion_test.go b/zones/settingmintlsversion_test.go index a54dbfadb9..49628aea26 100644 --- a/zones/settingmintlsversion_test.go +++ b/zones/settingmintlsversion_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingMinTLSVersionEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingMinTLSVersionEdit(t *testing.T) { } func TestSettingMinTLSVersionGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingmirage_test.go b/zones/settingmirage_test.go index 472a748bc1..52b29b901e 100644 --- a/zones/settingmirage_test.go +++ b/zones/settingmirage_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingMirageEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingMirageEdit(t *testing.T) { } func TestSettingMirageGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingmobileredirect_test.go b/zones/settingmobileredirect_test.go index 74473fc064..5b76c1be3e 100644 --- a/zones/settingmobileredirect_test.go +++ b/zones/settingmobileredirect_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingMobileRedirectEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -46,7 +45,6 @@ func TestSettingMobileRedirectEditWithOptionalParams(t *testing.T) { } func TestSettingMobileRedirectGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingnel_test.go b/zones/settingnel_test.go index e3187fd522..9608e401d6 100644 --- a/zones/settingnel_test.go +++ b/zones/settingnel_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingNELEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -47,7 +46,6 @@ func TestSettingNELEditWithOptionalParams(t *testing.T) { } func TestSettingNELGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingopportunisticencryption_test.go b/zones/settingopportunisticencryption_test.go index ed76578f73..9b07abd94e 100644 --- a/zones/settingopportunisticencryption_test.go +++ b/zones/settingopportunisticencryption_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingOpportunisticEncryptionEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingOpportunisticEncryptionEdit(t *testing.T) { } func TestSettingOpportunisticEncryptionGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingopportunisticonion_test.go b/zones/settingopportunisticonion_test.go index 7cedd455c2..1227c220b1 100644 --- a/zones/settingopportunisticonion_test.go +++ b/zones/settingopportunisticonion_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingOpportunisticOnionEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingOpportunisticOnionEdit(t *testing.T) { } func TestSettingOpportunisticOnionGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingorangetoorange_test.go b/zones/settingorangetoorange_test.go index dfed5834f1..9f9685aacc 100644 --- a/zones/settingorangetoorange_test.go +++ b/zones/settingorangetoorange_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingOrangeToOrangeEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,6 @@ func TestSettingOrangeToOrangeEditWithOptionalParams(t *testing.T) { } func TestSettingOrangeToOrangeGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingoriginerrorpagepassthru_test.go b/zones/settingoriginerrorpagepassthru_test.go index e99a2fa494..e3291bbbf1 100644 --- a/zones/settingoriginerrorpagepassthru_test.go +++ b/zones/settingoriginerrorpagepassthru_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingOriginErrorPagePassThruEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingOriginErrorPagePassThruEdit(t *testing.T) { } func TestSettingOriginErrorPagePassThruGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingoriginmaxhttpversion_test.go b/zones/settingoriginmaxhttpversion_test.go index 97775b7e58..13e585135f 100644 --- a/zones/settingoriginmaxhttpversion_test.go +++ b/zones/settingoriginmaxhttpversion_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingOriginMaxHTTPVersionEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingOriginMaxHTTPVersionEdit(t *testing.T) { } func TestSettingOriginMaxHTTPVersionGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingpolish_test.go b/zones/settingpolish_test.go index a43ad23924..f63ac3ac70 100644 --- a/zones/settingpolish_test.go +++ b/zones/settingpolish_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingPolishEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,6 @@ func TestSettingPolishEditWithOptionalParams(t *testing.T) { } func TestSettingPolishGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingprefetchpreload_test.go b/zones/settingprefetchpreload_test.go index 2b4c1ed412..2cbb4555c0 100644 --- a/zones/settingprefetchpreload_test.go +++ b/zones/settingprefetchpreload_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingPrefetchPreloadEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingPrefetchPreloadEdit(t *testing.T) { } func TestSettingPrefetchPreloadGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingproxyreadtimeout_test.go b/zones/settingproxyreadtimeout_test.go index aaf8688af7..f6d8c3cdd9 100644 --- a/zones/settingproxyreadtimeout_test.go +++ b/zones/settingproxyreadtimeout_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingProxyReadTimeoutEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,6 @@ func TestSettingProxyReadTimeoutEditWithOptionalParams(t *testing.T) { } func TestSettingProxyReadTimeoutGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingpseudoipv4_test.go b/zones/settingpseudoipv4_test.go index abff46bbbd..a7364e5993 100644 --- a/zones/settingpseudoipv4_test.go +++ b/zones/settingpseudoipv4_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingPseudoIPV4Edit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingPseudoIPV4Edit(t *testing.T) { } func TestSettingPseudoIPV4Get(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingresponsebuffering_test.go b/zones/settingresponsebuffering_test.go index c655f89535..0c86fd3733 100644 --- a/zones/settingresponsebuffering_test.go +++ b/zones/settingresponsebuffering_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingResponseBufferingEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingResponseBufferingEdit(t *testing.T) { } func TestSettingResponseBufferingGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingrocketloader_test.go b/zones/settingrocketloader_test.go index 80aa014fa0..9d98f0033c 100644 --- a/zones/settingrocketloader_test.go +++ b/zones/settingrocketloader_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingRocketLoaderEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,6 @@ func TestSettingRocketLoaderEditWithOptionalParams(t *testing.T) { } func TestSettingRocketLoaderGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingsecurityheader_test.go b/zones/settingsecurityheader_test.go index 2d5ff83cdc..ffb43b33e0 100644 --- a/zones/settingsecurityheader_test.go +++ b/zones/settingsecurityheader_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingSecurityHeaderEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -49,7 +48,6 @@ func TestSettingSecurityHeaderEditWithOptionalParams(t *testing.T) { } func TestSettingSecurityHeaderGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingsecuritylevel_test.go b/zones/settingsecuritylevel_test.go index a1d85924e5..f23fd5fb35 100644 --- a/zones/settingsecuritylevel_test.go +++ b/zones/settingsecuritylevel_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingSecurityLevelEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingSecurityLevelEdit(t *testing.T) { } func TestSettingSecurityLevelGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingserversideexclude_test.go b/zones/settingserversideexclude_test.go index 44ff638ded..fee585a6e7 100644 --- a/zones/settingserversideexclude_test.go +++ b/zones/settingserversideexclude_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingServerSideExcludeEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingServerSideExcludeEdit(t *testing.T) { } func TestSettingServerSideExcludeGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingsortquerystringforcache_test.go b/zones/settingsortquerystringforcache_test.go index f2d31f7ac8..b3dd9d8a95 100644 --- a/zones/settingsortquerystringforcache_test.go +++ b/zones/settingsortquerystringforcache_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingSortQueryStringForCacheEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingSortQueryStringForCacheEdit(t *testing.T) { } func TestSettingSortQueryStringForCacheGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingssl_test.go b/zones/settingssl_test.go index 69309ab14d..ba1f25ff77 100644 --- a/zones/settingssl_test.go +++ b/zones/settingssl_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingSSLEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingSSLEdit(t *testing.T) { } func TestSettingSSLGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingsslrecommender_test.go b/zones/settingsslrecommender_test.go index e4ecc3a40a..888e7f831d 100644 --- a/zones/settingsslrecommender_test.go +++ b/zones/settingsslrecommender_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingSSLRecommenderEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,6 @@ func TestSettingSSLRecommenderEditWithOptionalParams(t *testing.T) { } func TestSettingSSLRecommenderGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingtls13_test.go b/zones/settingtls13_test.go index 1ccad879a2..f523aadafe 100644 --- a/zones/settingtls13_test.go +++ b/zones/settingtls13_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingTLS1_3Edit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingTLS1_3Edit(t *testing.T) { } func TestSettingTLS1_3Get(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingtlsclientauth_test.go b/zones/settingtlsclientauth_test.go index 0aa368b613..fa6580e10d 100644 --- a/zones/settingtlsclientauth_test.go +++ b/zones/settingtlsclientauth_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingTLSClientAuthEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingTLSClientAuthEdit(t *testing.T) { } func TestSettingTLSClientAuthGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingtrueclientipheader_test.go b/zones/settingtrueclientipheader_test.go index 02135c9ca8..6a41c3d631 100644 --- a/zones/settingtrueclientipheader_test.go +++ b/zones/settingtrueclientipheader_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingTrueClientIPHeaderEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingTrueClientIPHeaderEdit(t *testing.T) { } func TestSettingTrueClientIPHeaderGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingwaf_test.go b/zones/settingwaf_test.go index a0d703798f..22bbdaf70c 100644 --- a/zones/settingwaf_test.go +++ b/zones/settingwaf_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingWAFEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingWAFEdit(t *testing.T) { } func TestSettingWAFGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingwebp_test.go b/zones/settingwebp_test.go index e7991c284b..76f6773bb9 100644 --- a/zones/settingwebp_test.go +++ b/zones/settingwebp_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingWebPEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingWebPEdit(t *testing.T) { } func TestSettingWebPGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingwebsocket_test.go b/zones/settingwebsocket_test.go index b7366f67e3..fc1810779c 100644 --- a/zones/settingwebsocket_test.go +++ b/zones/settingwebsocket_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingWebsocketEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingWebsocketEdit(t *testing.T) { } func TestSettingWebsocketGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/settingzerortt_test.go b/zones/settingzerortt_test.go index 16cd8ce94c..1355544f33 100644 --- a/zones/settingzerortt_test.go +++ b/zones/settingzerortt_test.go @@ -15,7 +15,6 @@ import ( ) func TestSettingZeroRTTEdit(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -42,7 +41,6 @@ func TestSettingZeroRTTEdit(t *testing.T) { } func TestSettingZeroRTTGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/subscription_test.go b/zones/subscription_test.go index 36e8c6cc36..95fb8e0528 100644 --- a/zones/subscription_test.go +++ b/zones/subscription_test.go @@ -16,7 +16,6 @@ import ( ) func TestSubscriptionNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -77,7 +76,6 @@ func TestSubscriptionNewWithOptionalParams(t *testing.T) { } func TestSubscriptionList(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -101,7 +99,6 @@ func TestSubscriptionList(t *testing.T) { } func TestSubscriptionGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zones/zone_test.go b/zones/zone_test.go index b88e6d1177..ce74a70244 100644 --- a/zones/zone_test.go +++ b/zones/zone_test.go @@ -15,7 +15,6 @@ import ( ) func TestZoneNewWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -45,7 +44,6 @@ func TestZoneNewWithOptionalParams(t *testing.T) { } func TestZoneListWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -107,7 +105,6 @@ func TestZoneDelete(t *testing.T) { } func TestZoneEditWithOptionalParams(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -138,7 +135,6 @@ func TestZoneEditWithOptionalParams(t *testing.T) { } func TestZoneGet(t *testing.T) { - t.Skip("skipped: tests are disabled for the time being") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL From 692ea51f083239638d0e645dcdaa68cd635fd2ab Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 02:52:44 +0000 Subject: [PATCH 024/127] feat(api): OpenAPI spec update via Stainless API (#1866) --- .stats.yml | 2 +- brand_protection/brandprotection.go | 8 ++++---- intel/asn.go | 4 ++-- intel/dns.go | 4 ++-- intel/domain.go | 4 ++-- intel/miscategorization.go | 8 ++++---- intel/whois.go | 4 ++-- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.stats.yml b/.stats.yml index db4425733d..b793266d07 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1259 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1f0167c5fee5c0cadf72c222f47f8fc3ba43905607b21f6a88853c061117b77b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-543a9898a4efc4501e7101d78908dcfaa303efd8f2abb7164299dd85be87749d.yml diff --git a/brand_protection/brandprotection.go b/brand_protection/brandprotection.go index 5826d60f9f..3feb9a8925 100644 --- a/brand_protection/brandprotection.go +++ b/brand_protection/brandprotection.go @@ -325,9 +325,9 @@ func (r BrandProtectionSubmitParams) MarshalJSON() (data []byte, err error) { type BrandProtectionSubmitResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Submit `json:"result,required"` // Whether the API call was successful Success BrandProtectionSubmitResponseEnvelopeSuccess `json:"success,required"` + Result Submit `json:"result"` JSON brandProtectionSubmitResponseEnvelopeJSON `json:"-"` } @@ -336,8 +336,8 @@ type BrandProtectionSubmitResponseEnvelope struct { type brandProtectionSubmitResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -398,9 +398,9 @@ func (r BrandProtectionURLInfoParamsURLIDParam) URLQuery() (v url.Values) { type BrandProtectionURLInfoResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Info `json:"result,required"` // Whether the API call was successful Success BrandProtectionURLInfoResponseEnvelopeSuccess `json:"success,required"` + Result Info `json:"result"` JSON brandProtectionURLInfoResponseEnvelopeJSON `json:"-"` } @@ -409,8 +409,8 @@ type BrandProtectionURLInfoResponseEnvelope struct { type brandProtectionURLInfoResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/intel/asn.go b/intel/asn.go index 95f2469909..c546ec4f60 100644 --- a/intel/asn.go +++ b/intel/asn.go @@ -54,9 +54,9 @@ type ASNGetParams struct { type ASNGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result shared.ASN `json:"result,required"` // Whether the API call was successful Success ASNGetResponseEnvelopeSuccess `json:"success,required"` + Result shared.ASN `json:"result"` JSON asnGetResponseEnvelopeJSON `json:"-"` } @@ -65,8 +65,8 @@ type ASNGetResponseEnvelope struct { type asnGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/intel/dns.go b/intel/dns.go index d155942803..4ff47b12e5 100644 --- a/intel/dns.go +++ b/intel/dns.go @@ -119,9 +119,9 @@ func (r dnsReverseRecordJSON) RawJSON() string { type DNSListResponse struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result DNS `json:"result,required"` // Whether the API call was successful Success DNSListResponseSuccess `json:"success,required"` + Result DNS `json:"result"` JSON dnsListResponseJSON `json:"-"` } @@ -129,8 +129,8 @@ type DNSListResponse struct { type dnsListResponseJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/intel/domain.go b/intel/domain.go index 5824bca805..01dc8dd1e0 100644 --- a/intel/domain.go +++ b/intel/domain.go @@ -239,9 +239,9 @@ func (r DomainGetParams) URLQuery() (v url.Values) { type DomainGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Domain `json:"result,required"` // Whether the API call was successful Success DomainGetResponseEnvelopeSuccess `json:"success,required"` + Result Domain `json:"result"` JSON domainGetResponseEnvelopeJSON `json:"-"` } @@ -250,8 +250,8 @@ type DomainGetResponseEnvelope struct { type domainGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/intel/miscategorization.go b/intel/miscategorization.go index ec1f16730c..19881b374f 100644 --- a/intel/miscategorization.go +++ b/intel/miscategorization.go @@ -106,11 +106,11 @@ func (r MiscategorizationNewParamsIndicatorType) IsKnown() bool { } type MiscategorizationNewResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result MiscategorizationNewResponseUnion `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success MiscategorizationNewResponseEnvelopeSuccess `json:"success,required"` + Result MiscategorizationNewResponseUnion `json:"result"` JSON miscategorizationNewResponseEnvelopeJSON `json:"-"` } @@ -119,8 +119,8 @@ type MiscategorizationNewResponseEnvelope struct { type miscategorizationNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/intel/whois.go b/intel/whois.go index d4b016424d..31886fbaeb 100644 --- a/intel/whois.go +++ b/intel/whois.go @@ -100,9 +100,9 @@ func (r WhoisGetParams) URLQuery() (v url.Values) { type WhoisGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Whois `json:"result,required"` // Whether the API call was successful Success WhoisGetResponseEnvelopeSuccess `json:"success,required"` + Result Whois `json:"result"` JSON whoisGetResponseEnvelopeJSON `json:"-"` } @@ -111,8 +111,8 @@ type WhoisGetResponseEnvelope struct { type whoisGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } From a31112e4396b99a92e784aafb21bc83ccba2179f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 11:25:26 +0000 Subject: [PATCH 025/127] feat(api): OpenAPI spec update via Stainless API (#1867) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index b793266d07..f1cbed725a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1259 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-543a9898a4efc4501e7101d78908dcfaa303efd8f2abb7164299dd85be87749d.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7433fd05a47a02d77a547f97f793bf1f42598d8dd425b5874995e373dad22678.yml From f41dd89520d881dedc1872a6d5ae84fdd3b79711 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 12:20:16 +0000 Subject: [PATCH 026/127] feat(api): OpenAPI spec update via Stainless API (#1868) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index f1cbed725a..b793266d07 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1259 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7433fd05a47a02d77a547f97f793bf1f42598d8dd425b5874995e373dad22678.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-543a9898a4efc4501e7101d78908dcfaa303efd8f2abb7164299dd85be87749d.yml From c89613a0d3186e992a57cde82a53b3e7027a8ba1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 12:22:09 +0000 Subject: [PATCH 027/127] feat(api): OpenAPI spec update via Stainless API (#1869) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index b793266d07..f1cbed725a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1259 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-543a9898a4efc4501e7101d78908dcfaa303efd8f2abb7164299dd85be87749d.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7433fd05a47a02d77a547f97f793bf1f42598d8dd425b5874995e373dad22678.yml From 2d5e060d799b77969f6890fd2324f7db9e3ce0bd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 13:54:55 +0000 Subject: [PATCH 028/127] feat(api): OpenAPI spec update via Stainless API (#1870) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index f1cbed725a..b793266d07 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1259 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7433fd05a47a02d77a547f97f793bf1f42598d8dd425b5874995e373dad22678.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-543a9898a4efc4501e7101d78908dcfaa303efd8f2abb7164299dd85be87749d.yml From fd8fd26282357d55f7a067b29a8e0123ed5df900 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 14:08:38 +0000 Subject: [PATCH 029/127] feat(api): OpenAPI spec update via Stainless API (#1871) --- .stats.yml | 2 +- email_routing/address.go | 12 ++++++------ email_routing/dns.go | 4 ++-- email_routing/emailrouting.go | 12 ++++++------ email_routing/rule.go | 16 ++++++++-------- email_routing/rulecatchall.go | 16 ++++++++-------- 6 files changed, 31 insertions(+), 31 deletions(-) diff --git a/.stats.yml b/.stats.yml index b793266d07..c44a93364c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1259 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-543a9898a4efc4501e7101d78908dcfaa303efd8f2abb7164299dd85be87749d.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db82dd88520065dc6282d55691c415867cb115705691731e45ed70570bf0b2c4.yml diff --git a/email_routing/address.go b/email_routing/address.go index 6fad22ad3a..9475ed9b22 100644 --- a/email_routing/address.go +++ b/email_routing/address.go @@ -148,9 +148,9 @@ func (r AddressNewParams) MarshalJSON() (data []byte, err error) { type AddressNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Address `json:"result,required"` // Whether the API call was successful Success AddressNewResponseEnvelopeSuccess `json:"success,required"` + Result Address `json:"result"` JSON addressNewResponseEnvelopeJSON `json:"-"` } @@ -159,8 +159,8 @@ type AddressNewResponseEnvelope struct { type addressNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -242,9 +242,9 @@ func (r AddressListParamsVerified) IsKnown() bool { type AddressDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Address `json:"result,required"` // Whether the API call was successful Success AddressDeleteResponseEnvelopeSuccess `json:"success,required"` + Result Address `json:"result"` JSON addressDeleteResponseEnvelopeJSON `json:"-"` } @@ -253,8 +253,8 @@ type AddressDeleteResponseEnvelope struct { type addressDeleteResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -285,9 +285,9 @@ func (r AddressDeleteResponseEnvelopeSuccess) IsKnown() bool { type AddressGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Address `json:"result,required"` // Whether the API call was successful Success AddressGetResponseEnvelopeSuccess `json:"success,required"` + Result Address `json:"result"` JSON addressGetResponseEnvelopeJSON `json:"-"` } @@ -296,8 +296,8 @@ type AddressGetResponseEnvelope struct { type addressGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/email_routing/dns.go b/email_routing/dns.go index 2f8f54538d..feb561decd 100644 --- a/email_routing/dns.go +++ b/email_routing/dns.go @@ -153,9 +153,9 @@ func (r DNSRecordType) IsKnown() bool { type DNSGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result []DNSRecord `json:"result,required,nullable"` // Whether the API call was successful Success DNSGetResponseEnvelopeSuccess `json:"success,required"` + Result []DNSRecord `json:"result,nullable"` ResultInfo DNSGetResponseEnvelopeResultInfo `json:"result_info"` JSON dnsGetResponseEnvelopeJSON `json:"-"` } @@ -165,8 +165,8 @@ type DNSGetResponseEnvelope struct { type dnsGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field ResultInfo apijson.Field raw string ExtraFields map[string]apijson.Field diff --git a/email_routing/emailrouting.go b/email_routing/emailrouting.go index fbc67c2e27..1268041038 100644 --- a/email_routing/emailrouting.go +++ b/email_routing/emailrouting.go @@ -183,9 +183,9 @@ func (r EmailRoutingDisableParams) MarshalJSON() (data []byte, err error) { type EmailRoutingDisableResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Settings `json:"result,required"` // Whether the API call was successful Success EmailRoutingDisableResponseEnvelopeSuccess `json:"success,required"` + Result Settings `json:"result"` JSON emailRoutingDisableResponseEnvelopeJSON `json:"-"` } @@ -194,8 +194,8 @@ type EmailRoutingDisableResponseEnvelope struct { type emailRoutingDisableResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -234,9 +234,9 @@ func (r EmailRoutingEnableParams) MarshalJSON() (data []byte, err error) { type EmailRoutingEnableResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Settings `json:"result,required"` // Whether the API call was successful Success EmailRoutingEnableResponseEnvelopeSuccess `json:"success,required"` + Result Settings `json:"result"` JSON emailRoutingEnableResponseEnvelopeJSON `json:"-"` } @@ -245,8 +245,8 @@ type EmailRoutingEnableResponseEnvelope struct { type emailRoutingEnableResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -277,9 +277,9 @@ func (r EmailRoutingEnableResponseEnvelopeSuccess) IsKnown() bool { type EmailRoutingGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Settings `json:"result,required"` // Whether the API call was successful Success EmailRoutingGetResponseEnvelopeSuccess `json:"success,required"` + Result Settings `json:"result"` JSON emailRoutingGetResponseEnvelopeJSON `json:"-"` } @@ -288,8 +288,8 @@ type EmailRoutingGetResponseEnvelope struct { type emailRoutingGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/email_routing/rule.go b/email_routing/rule.go index 0616dc5c57..7d1852ebb8 100644 --- a/email_routing/rule.go +++ b/email_routing/rule.go @@ -329,9 +329,9 @@ func (r RuleNewParamsEnabled) IsKnown() bool { type RuleNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result EmailRoutingRule `json:"result,required"` // Whether the API call was successful Success RuleNewResponseEnvelopeSuccess `json:"success,required"` + Result EmailRoutingRule `json:"result"` JSON ruleNewResponseEnvelopeJSON `json:"-"` } @@ -340,8 +340,8 @@ type RuleNewResponseEnvelope struct { type ruleNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -405,9 +405,9 @@ func (r RuleUpdateParamsEnabled) IsKnown() bool { type RuleUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result EmailRoutingRule `json:"result,required"` // Whether the API call was successful Success RuleUpdateResponseEnvelopeSuccess `json:"success,required"` + Result EmailRoutingRule `json:"result"` JSON ruleUpdateResponseEnvelopeJSON `json:"-"` } @@ -416,8 +416,8 @@ type RuleUpdateResponseEnvelope struct { type ruleUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -481,9 +481,9 @@ func (r RuleListParamsEnabled) IsKnown() bool { type RuleDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result EmailRoutingRule `json:"result,required"` // Whether the API call was successful Success RuleDeleteResponseEnvelopeSuccess `json:"success,required"` + Result EmailRoutingRule `json:"result"` JSON ruleDeleteResponseEnvelopeJSON `json:"-"` } @@ -492,8 +492,8 @@ type RuleDeleteResponseEnvelope struct { type ruleDeleteResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -524,9 +524,9 @@ func (r RuleDeleteResponseEnvelopeSuccess) IsKnown() bool { type RuleGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result EmailRoutingRule `json:"result,required"` // Whether the API call was successful Success RuleGetResponseEnvelopeSuccess `json:"success,required"` + Result EmailRoutingRule `json:"result"` JSON ruleGetResponseEnvelopeJSON `json:"-"` } @@ -535,8 +535,8 @@ type RuleGetResponseEnvelope struct { type ruleGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/email_routing/rulecatchall.go b/email_routing/rulecatchall.go index 583748feb0..7bae3fb22e 100644 --- a/email_routing/rulecatchall.go +++ b/email_routing/rulecatchall.go @@ -296,11 +296,11 @@ func (r RuleCatchAllUpdateParamsEnabled) IsKnown() bool { } type RuleCatchAllUpdateResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RuleCatchAllUpdateResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success RuleCatchAllUpdateResponseEnvelopeSuccess `json:"success,required"` + Result RuleCatchAllUpdateResponse `json:"result"` JSON ruleCatchAllUpdateResponseEnvelopeJSON `json:"-"` } @@ -309,8 +309,8 @@ type RuleCatchAllUpdateResponseEnvelope struct { type ruleCatchAllUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -339,11 +339,11 @@ func (r RuleCatchAllUpdateResponseEnvelopeSuccess) IsKnown() bool { } type RuleCatchAllGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RuleCatchAllGetResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success RuleCatchAllGetResponseEnvelopeSuccess `json:"success,required"` + Result RuleCatchAllGetResponse `json:"result"` JSON ruleCatchAllGetResponseEnvelopeJSON `json:"-"` } @@ -352,8 +352,8 @@ type RuleCatchAllGetResponseEnvelope struct { type ruleCatchAllGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } From 3fb734cd0c92a815795e38a6a5144a737e8726a9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 15:37:56 +0000 Subject: [PATCH 030/127] feat(api): OpenAPI spec update via Stainless API (#1872) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c44a93364c..bd813bc1fa 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1259 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-db82dd88520065dc6282d55691c415867cb115705691731e45ed70570bf0b2c4.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-91fa0a3e121d10cf3cb049619ba9e0cf6116612ec2ef75672fcef911ad371eaf.yml From daca4b817d88059421ac8ed8319e541a57380eac Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 18:06:23 +0000 Subject: [PATCH 031/127] feat(api): OpenAPI spec update via Stainless API (#1873) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index bd813bc1fa..310e06abf2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1259 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-91fa0a3e121d10cf3cb049619ba9e0cf6116612ec2ef75672fcef911ad371eaf.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9e7278b59ca6d3312a49ec919b139cdc626476b556f93923d70aeaf39c5c7bcf.yml From fcf413bb5fb8470299bae8c4a69a7ec8dca95d17 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 18:08:09 +0000 Subject: [PATCH 032/127] feat(api): OpenAPI spec update via Stainless API (#1874) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 310e06abf2..bd813bc1fa 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1259 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9e7278b59ca6d3312a49ec919b139cdc626476b556f93923d70aeaf39c5c7bcf.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-91fa0a3e121d10cf3cb049619ba9e0cf6116612ec2ef75672fcef911ad371eaf.yml From 6e45fb6e93d5766e5781863b675e3a4974601695 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 18:18:11 +0000 Subject: [PATCH 033/127] feat(api): OpenAPI spec update via Stainless API (#1875) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index bd813bc1fa..310e06abf2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1259 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-91fa0a3e121d10cf3cb049619ba9e0cf6116612ec2ef75672fcef911ad371eaf.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9e7278b59ca6d3312a49ec919b139cdc626476b556f93923d70aeaf39c5c7bcf.yml From b66804f8ee31f6987dfe46a4825ce8fcc85bd9e2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 18:19:55 +0000 Subject: [PATCH 034/127] feat(api): OpenAPI spec update via Stainless API (#1876) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 310e06abf2..bd813bc1fa 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1259 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9e7278b59ca6d3312a49ec919b139cdc626476b556f93923d70aeaf39c5c7bcf.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-91fa0a3e121d10cf3cb049619ba9e0cf6116612ec2ef75672fcef911ad371eaf.yml From e1bbcc922af4acde86f3b56b6c4a2bca9bfe2b7f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 18:24:50 +0000 Subject: [PATCH 035/127] feat(api): OpenAPI spec update via Stainless API (#1877) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index bd813bc1fa..310e06abf2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1259 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-91fa0a3e121d10cf3cb049619ba9e0cf6116612ec2ef75672fcef911ad371eaf.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9e7278b59ca6d3312a49ec919b139cdc626476b556f93923d70aeaf39c5c7bcf.yml From a6cc625a042488117455561ae3fc6f2a1a62cdaf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 18:29:41 +0000 Subject: [PATCH 036/127] feat(api): OpenAPI spec update via Stainless API (#1878) --- .stats.yml | 2 +- logpush/job.go | 192 ++++++++++++++++++++++++++++++++++++-------- logpush/job_test.go | 36 +++++---- 3 files changed, 182 insertions(+), 48 deletions(-) diff --git a/.stats.yml b/.stats.yml index 310e06abf2..1765a1fb19 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1259 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9e7278b59ca6d3312a49ec919b139cdc626476b556f93923d70aeaf39c5c7bcf.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-66dffe82f1ae82ccb13bf0b382257be6906f416a22d1ca4ea74464cfff324775.yml diff --git a/logpush/job.go b/logpush/job.go index 795655c835..b8e273a540 100644 --- a/logpush/job.go +++ b/logpush/job.go @@ -156,7 +156,8 @@ func (r *JobService) Get(ctx context.Context, jobID int64, query JobGetParams, o type LogpushJob struct { // Unique id of the job. ID int64 `json:"id"` - // Name of the dataset. + // Name of the dataset. A list of supported datasets can be found on the + // [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/). Dataset string `json:"dataset,nullable"` // Uniquely identifies a resource (such as an s3 bucket) where data will be pushed. // Additional configuration parameters supported by the destination may be @@ -169,10 +170,15 @@ type LogpushJob struct { // is recorded. On successful execution of a job the error_message and last_error // are set to null. ErrorMessage time.Time `json:"error_message,nullable" format:"date-time"` - // The frequency at which Cloudflare sends batches of logs to your destination. - // Setting frequency to high sends your logs in larger quantities of smaller files. - // Setting frequency to low sends logs in smaller quantities of larger files. + // This field is deprecated. Please use `max_upload_*` parameters instead. The + // frequency at which Cloudflare sends batches of logs to your destination. Setting + // frequency to high sends your logs in larger quantities of smaller files. Setting + // frequency to low sends logs in smaller quantities of larger files. Frequency LogpushJobFrequency `json:"frequency,nullable"` + // The kind parameter (optional) is used to differentiate between Logpush and Edge + // Log Delivery jobs. Currently, Edge Log Delivery is only supported for the + // `http_requests` dataset. + Kind LogpushJobKind `json:"kind,nullable"` // Records the last time for which logs have been successfully pushed. If the last // successful push was for logs range 2018-07-23T10:00:00Z to 2018-07-23T10:01:00Z // then the value of this field will be 2018-07-23T10:01:00Z. If the job has never @@ -188,6 +194,23 @@ type LogpushJob struct { // here, and logpush will keep on making this call for you, setting start and end // times appropriately. LogpullOptions string `json:"logpull_options,nullable" format:"uri-reference"` + // The maximum uncompressed file size of a batch of logs. This setting value must + // be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a + // minimum file size; this means that log files may be much smaller than this batch + // size. This parameter is not available for jobs with `edge` as its kind. + MaxUploadBytes int64 `json:"max_upload_bytes,nullable"` + // The maximum interval in seconds for log batches. This setting must be between 30 + // and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify + // a minimum interval for log batches; this means that log files may be sent in + // shorter intervals than this. This parameter is only used for jobs with `edge` as + // its kind. + MaxUploadIntervalSeconds int64 `json:"max_upload_interval_seconds,nullable"` + // The maximum number of log lines per batch. This setting must be between 1000 and + // 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum + // number of log lines per batch; this means that log files may contain many fewer + // lines than this. This parameter is not available for jobs with `edge` as its + // kind. + MaxUploadRecords int64 `json:"max_upload_records,nullable"` // Optional human readable job name. Not unique. Cloudflare suggests that you set // this to a meaningful string, like the domain name, to make it easier to identify // your job. @@ -200,19 +223,23 @@ type LogpushJob struct { // logpushJobJSON contains the JSON metadata for the struct [LogpushJob] type logpushJobJSON struct { - ID apijson.Field - Dataset apijson.Field - DestinationConf apijson.Field - Enabled apijson.Field - ErrorMessage apijson.Field - Frequency apijson.Field - LastComplete apijson.Field - LastError apijson.Field - LogpullOptions apijson.Field - Name apijson.Field - OutputOptions apijson.Field - raw string - ExtraFields map[string]apijson.Field + ID apijson.Field + Dataset apijson.Field + DestinationConf apijson.Field + Enabled apijson.Field + ErrorMessage apijson.Field + Frequency apijson.Field + Kind apijson.Field + LastComplete apijson.Field + LastError apijson.Field + LogpullOptions apijson.Field + MaxUploadBytes apijson.Field + MaxUploadIntervalSeconds apijson.Field + MaxUploadRecords apijson.Field + Name apijson.Field + OutputOptions apijson.Field + raw string + ExtraFields map[string]apijson.Field } func (r *LogpushJob) UnmarshalJSON(data []byte) (err error) { @@ -223,9 +250,10 @@ func (r logpushJobJSON) RawJSON() string { return r.raw } -// The frequency at which Cloudflare sends batches of logs to your destination. -// Setting frequency to high sends your logs in larger quantities of smaller files. -// Setting frequency to low sends logs in smaller quantities of larger files. +// This field is deprecated. Please use `max_upload_*` parameters instead. The +// frequency at which Cloudflare sends batches of logs to your destination. Setting +// frequency to high sends your logs in larger quantities of smaller files. Setting +// frequency to low sends logs in smaller quantities of larger files. type LogpushJobFrequency string const ( @@ -241,6 +269,23 @@ func (r LogpushJobFrequency) IsKnown() bool { return false } +// The kind parameter (optional) is used to differentiate between Logpush and Edge +// Log Delivery jobs. Currently, Edge Log Delivery is only supported for the +// `http_requests` dataset. +type LogpushJobKind string + +const ( + LogpushJobKindEdge LogpushJobKind = "edge" +) + +func (r LogpushJobKind) IsKnown() bool { + switch r { + case LogpushJobKindEdge: + return true + } + return false +} + // The structured replacement for `logpull_options`. When including this field, the // `logpull_option` field will be ignored. type OutputOptions struct { @@ -397,20 +442,43 @@ type JobNewParams struct { AccountID param.Field[string] `path:"account_id"` // The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. ZoneID param.Field[string] `path:"zone_id"` - // Name of the dataset. + // Name of the dataset. A list of supported datasets can be found on the + // [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/). Dataset param.Field[string] `json:"dataset"` // Flag that indicates if the job is enabled. Enabled param.Field[bool] `json:"enabled"` - // The frequency at which Cloudflare sends batches of logs to your destination. - // Setting frequency to high sends your logs in larger quantities of smaller files. - // Setting frequency to low sends logs in smaller quantities of larger files. + // This field is deprecated. Please use `max_upload_*` parameters instead. The + // frequency at which Cloudflare sends batches of logs to your destination. Setting + // frequency to high sends your logs in larger quantities of smaller files. Setting + // frequency to low sends logs in smaller quantities of larger files. Frequency param.Field[JobNewParamsFrequency] `json:"frequency"` + // The kind parameter (optional) is used to differentiate between Logpush and Edge + // Log Delivery jobs. Currently, Edge Log Delivery is only supported for the + // `http_requests` dataset. + Kind param.Field[JobNewParamsKind] `json:"kind"` // This field is deprecated. Use `output_options` instead. Configuration string. It // specifies things like requested fields and timestamp formats. If migrating from // the logpull api, copy the url (full url or just the query string) of your call // here, and logpush will keep on making this call for you, setting start and end // times appropriately. LogpullOptions param.Field[string] `json:"logpull_options" format:"uri-reference"` + // The maximum uncompressed file size of a batch of logs. This setting value must + // be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a + // minimum file size; this means that log files may be much smaller than this batch + // size. This parameter is not available for jobs with `edge` as its kind. + MaxUploadBytes param.Field[int64] `json:"max_upload_bytes"` + // The maximum interval in seconds for log batches. This setting must be between 30 + // and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify + // a minimum interval for log batches; this means that log files may be sent in + // shorter intervals than this. This parameter is only used for jobs with `edge` as + // its kind. + MaxUploadIntervalSeconds param.Field[int64] `json:"max_upload_interval_seconds"` + // The maximum number of log lines per batch. This setting must be between 1000 and + // 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum + // number of log lines per batch; this means that log files may contain many fewer + // lines than this. This parameter is not available for jobs with `edge` as its + // kind. + MaxUploadRecords param.Field[int64] `json:"max_upload_records"` // Optional human readable job name. Not unique. Cloudflare suggests that you set // this to a meaningful string, like the domain name, to make it easier to identify // your job. @@ -426,9 +494,10 @@ func (r JobNewParams) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -// The frequency at which Cloudflare sends batches of logs to your destination. -// Setting frequency to high sends your logs in larger quantities of smaller files. -// Setting frequency to low sends logs in smaller quantities of larger files. +// This field is deprecated. Please use `max_upload_*` parameters instead. The +// frequency at which Cloudflare sends batches of logs to your destination. Setting +// frequency to high sends your logs in larger quantities of smaller files. Setting +// frequency to low sends logs in smaller quantities of larger files. type JobNewParamsFrequency string const ( @@ -444,6 +513,23 @@ func (r JobNewParamsFrequency) IsKnown() bool { return false } +// The kind parameter (optional) is used to differentiate between Logpush and Edge +// Log Delivery jobs. Currently, Edge Log Delivery is only supported for the +// `http_requests` dataset. +type JobNewParamsKind string + +const ( + JobNewParamsKindEdge JobNewParamsKind = "edge" +) + +func (r JobNewParamsKind) IsKnown() bool { + switch r { + case JobNewParamsKindEdge: + return true + } + return false +} + type JobNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` @@ -498,16 +584,38 @@ type JobUpdateParams struct { DestinationConf param.Field[string] `json:"destination_conf" format:"uri"` // Flag that indicates if the job is enabled. Enabled param.Field[bool] `json:"enabled"` - // The frequency at which Cloudflare sends batches of logs to your destination. - // Setting frequency to high sends your logs in larger quantities of smaller files. - // Setting frequency to low sends logs in smaller quantities of larger files. + // This field is deprecated. Please use `max_upload_*` parameters instead. The + // frequency at which Cloudflare sends batches of logs to your destination. Setting + // frequency to high sends your logs in larger quantities of smaller files. Setting + // frequency to low sends logs in smaller quantities of larger files. Frequency param.Field[JobUpdateParamsFrequency] `json:"frequency"` + // The kind parameter (optional) is used to differentiate between Logpush and Edge + // Log Delivery jobs. Currently, Edge Log Delivery is only supported for the + // `http_requests` dataset. + Kind param.Field[JobUpdateParamsKind] `json:"kind"` // This field is deprecated. Use `output_options` instead. Configuration string. It // specifies things like requested fields and timestamp formats. If migrating from // the logpull api, copy the url (full url or just the query string) of your call // here, and logpush will keep on making this call for you, setting start and end // times appropriately. LogpullOptions param.Field[string] `json:"logpull_options" format:"uri-reference"` + // The maximum uncompressed file size of a batch of logs. This setting value must + // be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a + // minimum file size; this means that log files may be much smaller than this batch + // size. This parameter is not available for jobs with `edge` as its kind. + MaxUploadBytes param.Field[int64] `json:"max_upload_bytes"` + // The maximum interval in seconds for log batches. This setting must be between 30 + // and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify + // a minimum interval for log batches; this means that log files may be sent in + // shorter intervals than this. This parameter is only used for jobs with `edge` as + // its kind. + MaxUploadIntervalSeconds param.Field[int64] `json:"max_upload_interval_seconds"` + // The maximum number of log lines per batch. This setting must be between 1000 and + // 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum + // number of log lines per batch; this means that log files may contain many fewer + // lines than this. This parameter is not available for jobs with `edge` as its + // kind. + MaxUploadRecords param.Field[int64] `json:"max_upload_records"` // The structured replacement for `logpull_options`. When including this field, the // `logpull_option` field will be ignored. OutputOptions param.Field[OutputOptionsParam] `json:"output_options"` @@ -519,9 +627,10 @@ func (r JobUpdateParams) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -// The frequency at which Cloudflare sends batches of logs to your destination. -// Setting frequency to high sends your logs in larger quantities of smaller files. -// Setting frequency to low sends logs in smaller quantities of larger files. +// This field is deprecated. Please use `max_upload_*` parameters instead. The +// frequency at which Cloudflare sends batches of logs to your destination. Setting +// frequency to high sends your logs in larger quantities of smaller files. Setting +// frequency to low sends logs in smaller quantities of larger files. type JobUpdateParamsFrequency string const ( @@ -537,6 +646,23 @@ func (r JobUpdateParamsFrequency) IsKnown() bool { return false } +// The kind parameter (optional) is used to differentiate between Logpush and Edge +// Log Delivery jobs. Currently, Edge Log Delivery is only supported for the +// `http_requests` dataset. +type JobUpdateParamsKind string + +const ( + JobUpdateParamsKindEdge JobUpdateParamsKind = "edge" +) + +func (r JobUpdateParamsKind) IsKnown() bool { + switch r { + case JobUpdateParamsKindEdge: + return true + } + return false +} + type JobUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` diff --git a/logpush/job_test.go b/logpush/job_test.go index 54256ac0a5..96a98e4d40 100644 --- a/logpush/job_test.go +++ b/logpush/job_test.go @@ -29,14 +29,18 @@ func TestJobNewWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.Logpush.Jobs.New(context.TODO(), logpush.JobNewParams{ - DestinationConf: cloudflare.F("s3://mybucket/logs?region=us-west-2"), - AccountID: cloudflare.F("string"), - ZoneID: cloudflare.F("string"), - Dataset: cloudflare.F("http_requests"), - Enabled: cloudflare.F(false), - Frequency: cloudflare.F(logpush.JobNewParamsFrequencyHigh), - LogpullOptions: cloudflare.F("fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339"), - Name: cloudflare.F("example.com"), + DestinationConf: cloudflare.F("s3://mybucket/logs?region=us-west-2"), + AccountID: cloudflare.F("string"), + ZoneID: cloudflare.F("string"), + Dataset: cloudflare.F("http_requests"), + Enabled: cloudflare.F(false), + Frequency: cloudflare.F(logpush.JobNewParamsFrequencyHigh), + Kind: cloudflare.F(logpush.JobNewParamsKindEdge), + LogpullOptions: cloudflare.F("fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339"), + MaxUploadBytes: cloudflare.F(int64(5000000)), + MaxUploadIntervalSeconds: cloudflare.F(int64(30)), + MaxUploadRecords: cloudflare.F(int64(1000)), + Name: cloudflare.F("example.com"), OutputOptions: cloudflare.F(logpush.OutputOptionsParam{ Cve2021_4428: cloudflare.F(true), BatchPrefix: cloudflare.F("string"), @@ -80,12 +84,16 @@ func TestJobUpdateWithOptionalParams(t *testing.T) { context.TODO(), int64(1), logpush.JobUpdateParams{ - AccountID: cloudflare.F("string"), - ZoneID: cloudflare.F("string"), - DestinationConf: cloudflare.F("s3://mybucket/logs?region=us-west-2"), - Enabled: cloudflare.F(false), - Frequency: cloudflare.F(logpush.JobUpdateParamsFrequencyHigh), - LogpullOptions: cloudflare.F("fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339"), + AccountID: cloudflare.F("string"), + ZoneID: cloudflare.F("string"), + DestinationConf: cloudflare.F("s3://mybucket/logs?region=us-west-2"), + Enabled: cloudflare.F(false), + Frequency: cloudflare.F(logpush.JobUpdateParamsFrequencyHigh), + Kind: cloudflare.F(logpush.JobUpdateParamsKindEdge), + LogpullOptions: cloudflare.F("fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339"), + MaxUploadBytes: cloudflare.F(int64(5000000)), + MaxUploadIntervalSeconds: cloudflare.F(int64(30)), + MaxUploadRecords: cloudflare.F(int64(1000)), OutputOptions: cloudflare.F(logpush.OutputOptionsParam{ Cve2021_4428: cloudflare.F(true), BatchPrefix: cloudflare.F("string"), From 0d8323b76a282143ff2a2f7d968e0c6e21934450 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 18:49:29 +0000 Subject: [PATCH 037/127] feat(api): OpenAPI spec update via Stainless API (#1879) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 1765a1fb19..ba161dce48 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1259 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-66dffe82f1ae82ccb13bf0b382257be6906f416a22d1ca4ea74464cfff324775.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-179d354a5efb9510d58296bed40aabb52d7bd8fda7eda55dc991a97ea8a448ae.yml From 826316c99ed6b55fbd48028f8847d736a7e3c67e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 18:56:57 +0000 Subject: [PATCH 038/127] feat(api): OpenAPI spec update via Stainless API (#1880) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index ba161dce48..1765a1fb19 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1259 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-179d354a5efb9510d58296bed40aabb52d7bd8fda7eda55dc991a97ea8a448ae.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-66dffe82f1ae82ccb13bf0b382257be6906f416a22d1ca4ea74464cfff324775.yml From 26a4ef142906925bda190ca656470899d1a2dbbb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 19:21:59 +0000 Subject: [PATCH 039/127] feat(api): OpenAPI spec update via Stainless API (#1881) --- .stats.yml | 4 +- api.md | 8 --- intel/whois.go | 117 -------------------------------------------- intel/whois_test.go | 41 ---------------- 4 files changed, 2 insertions(+), 168 deletions(-) delete mode 100644 intel/whois_test.go diff --git a/.stats.yml b/.stats.yml index 1765a1fb19..b38eee9f7b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1259 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-66dffe82f1ae82ccb13bf0b382257be6906f416a22d1ca4ea74464cfff324775.yml +configured_endpoints: 1258 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-eb69a13d7b51cee2ffd5e3a4a70f4312e20c9830d80be2ecbc7006c8a524d912.yml diff --git a/api.md b/api.md index 142d07d832..acf14e982e 100644 --- a/api.md +++ b/api.md @@ -3341,14 +3341,6 @@ Methods: ## Whois -Response Types: - -- intel.Whois - -Methods: - -- client.Intel.Whois.Get(ctx context.Context, params intel.WhoisGetParams) (intel.Whois, error) - ## IndicatorFeeds Response Types: diff --git a/intel/whois.go b/intel/whois.go index 31886fbaeb..48fe59ae7d 100644 --- a/intel/whois.go +++ b/intel/whois.go @@ -3,18 +3,7 @@ package intel import ( - "context" - "fmt" - "net/http" - "net/url" - "time" - - "github.com/cloudflare/cloudflare-go/v2/internal/apijson" - "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" - "github.com/cloudflare/cloudflare-go/v2/internal/param" - "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" - "github.com/cloudflare/cloudflare-go/v2/shared" ) // WhoisService contains methods and other services that help with interacting with @@ -33,109 +22,3 @@ func NewWhoisService(opts ...option.RequestOption) (r *WhoisService) { r.Options = opts return } - -// Get WHOIS Record -func (r *WhoisService) Get(ctx context.Context, params WhoisGetParams, opts ...option.RequestOption) (res *Whois, err error) { - opts = append(r.Options[:], opts...) - var env WhoisGetResponseEnvelope - path := fmt.Sprintf("accounts/%s/intel/whois", params.AccountID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, params, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -type Whois struct { - CreatedDate time.Time `json:"created_date" format:"date"` - Domain string `json:"domain"` - Nameservers []string `json:"nameservers"` - Registrant string `json:"registrant"` - RegistrantCountry string `json:"registrant_country"` - RegistrantEmail string `json:"registrant_email"` - RegistrantOrg string `json:"registrant_org"` - Registrar string `json:"registrar"` - UpdatedDate time.Time `json:"updated_date" format:"date"` - JSON whoisJSON `json:"-"` -} - -// whoisJSON contains the JSON metadata for the struct [Whois] -type whoisJSON struct { - CreatedDate apijson.Field - Domain apijson.Field - Nameservers apijson.Field - Registrant apijson.Field - RegistrantCountry apijson.Field - RegistrantEmail apijson.Field - RegistrantOrg apijson.Field - Registrar apijson.Field - UpdatedDate apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *Whois) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r whoisJSON) RawJSON() string { - return r.raw -} - -type WhoisGetParams struct { - // Identifier - AccountID param.Field[string] `path:"account_id,required"` - Domain param.Field[string] `query:"domain"` -} - -// URLQuery serializes [WhoisGetParams]'s query parameters as `url.Values`. -func (r WhoisGetParams) URLQuery() (v url.Values) { - return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ - ArrayFormat: apiquery.ArrayQueryFormatRepeat, - NestedFormat: apiquery.NestedQueryFormatBrackets, - }) -} - -type WhoisGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success WhoisGetResponseEnvelopeSuccess `json:"success,required"` - Result Whois `json:"result"` - JSON whoisGetResponseEnvelopeJSON `json:"-"` -} - -// whoisGetResponseEnvelopeJSON contains the JSON metadata for the struct -// [WhoisGetResponseEnvelope] -type whoisGetResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - Result apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *WhoisGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r whoisGetResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type WhoisGetResponseEnvelopeSuccess bool - -const ( - WhoisGetResponseEnvelopeSuccessTrue WhoisGetResponseEnvelopeSuccess = true -) - -func (r WhoisGetResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case WhoisGetResponseEnvelopeSuccessTrue: - return true - } - return false -} diff --git a/intel/whois_test.go b/intel/whois_test.go deleted file mode 100644 index 85465963b5..0000000000 --- a/intel/whois_test.go +++ /dev/null @@ -1,41 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -package intel_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-go/v2" - "github.com/cloudflare/cloudflare-go/v2/intel" - "github.com/cloudflare/cloudflare-go/v2/internal/testutil" - "github.com/cloudflare/cloudflare-go/v2/option" -) - -func TestWhoisGetWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.Intel.Whois.Get(context.TODO(), intel.WhoisGetParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Domain: cloudflare.F("string"), - }) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} From 213386acb8dfaadb310e8046083ef147495de1be Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 19:53:08 +0000 Subject: [PATCH 040/127] feat(api): OpenAPI spec update via Stainless API (#1882) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index b38eee9f7b..332a3d83d5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1258 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-eb69a13d7b51cee2ffd5e3a4a70f4312e20c9830d80be2ecbc7006c8a524d912.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ffa94a3c4ebc67f6f570cdeae586e9f48e4050fffc7eac67e283a78ff2c71c24.yml From af2c259b1dfa2ef4387ba787721c440abf722e36 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 21:27:55 +0000 Subject: [PATCH 041/127] feat(api): OpenAPI spec update via Stainless API (#1883) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 332a3d83d5..b38eee9f7b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1258 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ffa94a3c4ebc67f6f570cdeae586e9f48e4050fffc7eac67e283a78ff2c71c24.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-eb69a13d7b51cee2ffd5e3a4a70f4312e20c9830d80be2ecbc7006c8a524d912.yml From 59cd9f9bf4a2cd6f5a7b747c1b098839f41d84cc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 21:29:38 +0000 Subject: [PATCH 042/127] chore: rebuild project due to oas spec rename (#1884) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index b38eee9f7b..df6ffb0697 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1258 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-eb69a13d7b51cee2ffd5e3a4a70f4312e20c9830d80be2ecbc7006c8a524d912.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b3772775d2fb2b6a241272ee7e25947401f425c5f89ba33c11dabd434a060aa7.yml From a436f5e745750644dbbd03b53ac491607fce25eb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 22:34:07 +0000 Subject: [PATCH 043/127] feat(api): OpenAPI spec update via Stainless API (#1885) --- .github/workflows/ci.yml | 13 +- .gitignore | 1 + .stats.yml | 2 +- api.md | 20 +- scripts/bootstrap | 16 ++ scripts/format | 8 + scripts/mock | 41 +++ scripts/test | 57 ++++ web3/hostname.go | 287 +++++++++++++++++-- web3/hostnameipfsuniversalpathcontentlist.go | 76 +++-- 10 files changed, 462 insertions(+), 59 deletions(-) create mode 100755 scripts/bootstrap create mode 100755 scripts/format create mode 100755 scripts/mock create mode 100755 scripts/test diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 00569c3040..7c1b374f18 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,5 +21,16 @@ jobs: - run: | go build ./... + test: + name: test + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Bootstrap + run: ./scripts/bootstrap + + - name: Run tests + run: ./scripts/test - diff --git a/.gitignore b/.gitignore index 57e05f9966..104dbfdc82 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ codegen.log +Brewfile.lock.json .idea/ diff --git a/.stats.yml b/.stats.yml index df6ffb0697..f189017b76 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1258 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b3772775d2fb2b6a241272ee7e25947401f425c5f89ba33c11dabd434a060aa7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5f1479806ff9a382d425b33f45765681c248cf0895cd4fb79eec5b51a55ea23a.yml diff --git a/api.md b/api.md index acf14e982e..0ac2e07697 100644 --- a/api.md +++ b/api.md @@ -2354,16 +2354,19 @@ Methods: Response Types: -- web3.Hostname +- web3.HostnameNewResponse +- web3.HostnameListResponse - web3.HostnameDeleteResponse +- web3.HostnameEditResponse +- web3.HostnameGetResponse Methods: -- client.Web3.Hostnames.New(ctx context.Context, zoneIdentifier string, body web3.HostnameNewParams) (web3.Hostname, error) -- client.Web3.Hostnames.List(ctx context.Context, zoneIdentifier string) (pagination.SinglePage[web3.Hostname], error) +- client.Web3.Hostnames.New(ctx context.Context, zoneIdentifier string, body web3.HostnameNewParams) (web3.HostnameNewResponse, error) +- client.Web3.Hostnames.List(ctx context.Context, zoneIdentifier string) (pagination.SinglePage[web3.HostnameListResponse], error) - client.Web3.Hostnames.Delete(ctx context.Context, zoneIdentifier string, identifier string) (web3.HostnameDeleteResponse, error) -- client.Web3.Hostnames.Edit(ctx context.Context, zoneIdentifier string, identifier string, body web3.HostnameEditParams) (web3.Hostname, error) -- client.Web3.Hostnames.Get(ctx context.Context, zoneIdentifier string, identifier string) (web3.Hostname, error) +- client.Web3.Hostnames.Edit(ctx context.Context, zoneIdentifier string, identifier string, body web3.HostnameEditParams) (web3.HostnameEditResponse, error) +- client.Web3.Hostnames.Get(ctx context.Context, zoneIdentifier string, identifier string) (web3.HostnameGetResponse, error) ### IPFSUniversalPaths @@ -2371,12 +2374,13 @@ Methods: Response Types: -- web3.ContentList +- web3.HostnameIPFSUniversalPathContentListUpdateResponse +- web3.HostnameIPFSUniversalPathContentListGetResponse Methods: -- client.Web3.Hostnames.IPFSUniversalPaths.ContentLists.Update(ctx context.Context, zoneIdentifier string, identifier string, body web3.HostnameIPFSUniversalPathContentListUpdateParams) (web3.ContentList, error) -- client.Web3.Hostnames.IPFSUniversalPaths.ContentLists.Get(ctx context.Context, zoneIdentifier string, identifier string) (web3.ContentList, error) +- client.Web3.Hostnames.IPFSUniversalPaths.ContentLists.Update(ctx context.Context, zoneIdentifier string, identifier string, body web3.HostnameIPFSUniversalPathContentListUpdateParams) (web3.HostnameIPFSUniversalPathContentListUpdateResponse, error) +- client.Web3.Hostnames.IPFSUniversalPaths.ContentLists.Get(ctx context.Context, zoneIdentifier string, identifier string) (web3.HostnameIPFSUniversalPathContentListGetResponse, error) ##### Entries diff --git a/scripts/bootstrap b/scripts/bootstrap new file mode 100755 index 0000000000..6a819d278e --- /dev/null +++ b/scripts/bootstrap @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -e + +cd "$(dirname "$0")/.." + +if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then + brew bundle check >/dev/null 2>&1 || { + echo "==> Installing Homebrew dependencies…" + brew bundle + } +fi + +echo "==> Installing Go dependencies…" + +go mod install diff --git a/scripts/format b/scripts/format new file mode 100755 index 0000000000..96a586faa2 --- /dev/null +++ b/scripts/format @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +set -e + +cd "$(dirname "$0")/.." + +gofmt ./... + diff --git a/scripts/mock b/scripts/mock new file mode 100755 index 0000000000..5a8c35b725 --- /dev/null +++ b/scripts/mock @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +set -e + +cd "$(dirname "$0")/.." + +if [[ -n "$1" && "$1" != '--'* ]]; then + URL="$1" + shift +else + URL="$(grep 'openapi_spec_url' .stats.yml | cut -d' ' -f2)" +fi + +# Check if the URL is empty +if [ -z "$URL" ]; then + echo "Error: No OpenAPI spec path/url provided or found in .stats.yml" + exit 1 +fi + +echo "==> Starting mock server with URL ${URL}" + +# Run prism mock on the given spec +if [ "$1" == "--daemon" ]; then + npm exec --package=@stoplight/prism-cli@~5.3.2 -- prism mock "$URL" &> .prism.log & + + # Wait for server to come online + echo -n "Waiting for server" + while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do + echo -n "." + sleep 0.1 + done + + if grep -q "✖ fatal" ".prism.log"; then + cat .prism.log + exit 1 + fi + + echo +else + npm exec --package=@stoplight/prism-cli@~5.3.2 -- prism mock "$URL" +fi diff --git a/scripts/test b/scripts/test new file mode 100755 index 0000000000..b762a63707 --- /dev/null +++ b/scripts/test @@ -0,0 +1,57 @@ +#!/usr/bin/env bash + +set -e + +cd "$(dirname "$0")/.." + +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[0;33m' +NC='\033[0m' # No Color + +function prism_is_running() { + curl --silent "http://localhost:4010" >/dev/null 2>&1 +} + +kill_server_on_port() { + pids=$(lsof -t -i tcp:"$1" || echo "") + if [ "$pids" != "" ]; then + kill "$pids" + echo "Stopped $pids." + fi +} + +function is_overriding_api_base_url() { + [ -n "$TEST_API_BASE_URL" ] +} + +if ! is_overriding_api_base_url && ! prism_is_running ; then + # When we exit this script, make sure to kill the background mock server process + trap 'kill_server_on_port 4010' EXIT + + # Start the dev server + ./scripts/mock --daemon +fi + +if is_overriding_api_base_url ; then + echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}" + echo +elif ! prism_is_running ; then + echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server" + echo -e "running against your OpenAPI spec." + echo + echo -e "To run the server, pass in the path or url of your OpenAPI" + echo -e "spec to the prism command:" + echo + echo -e " \$ ${YELLOW}npm exec --package=@stoplight/prism-cli@~5.3.2 -- prism mock path/to/your.openapi.yml${NC}" + echo + + exit 1 +else + echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}" + echo +fi + +# Run tests +echo "==> Running tests" +go test ./... "$@" diff --git a/web3/hostname.go b/web3/hostname.go index 1580dbdba3..981241cc4a 100644 --- a/web3/hostname.go +++ b/web3/hostname.go @@ -36,7 +36,7 @@ func NewHostnameService(opts ...option.RequestOption) (r *HostnameService) { } // Create Web3 Hostname -func (r *HostnameService) New(ctx context.Context, zoneIdentifier string, body HostnameNewParams, opts ...option.RequestOption) (res *Hostname, err error) { +func (r *HostnameService) New(ctx context.Context, zoneIdentifier string, body HostnameNewParams, opts ...option.RequestOption) (res *HostnameNewResponse, err error) { opts = append(r.Options[:], opts...) var env HostnameNewResponseEnvelope path := fmt.Sprintf("zones/%s/web3/hostnames", zoneIdentifier) @@ -49,7 +49,7 @@ func (r *HostnameService) New(ctx context.Context, zoneIdentifier string, body H } // List Web3 Hostnames -func (r *HostnameService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *pagination.SinglePage[Hostname], err error) { +func (r *HostnameService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *pagination.SinglePage[HostnameListResponse], 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 *HostnameService) List(ctx context.Context, zoneIdentifier string, opts } // List Web3 Hostnames -func (r *HostnameService) ListAutoPaging(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Hostname] { +func (r *HostnameService) ListAutoPaging(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) *pagination.SinglePageAutoPager[HostnameListResponse] { return pagination.NewSinglePageAutoPager(r.List(ctx, zoneIdentifier, opts...)) } @@ -85,7 +85,7 @@ func (r *HostnameService) Delete(ctx context.Context, zoneIdentifier string, ide } // Edit Web3 Hostname -func (r *HostnameService) Edit(ctx context.Context, zoneIdentifier string, identifier string, body HostnameEditParams, opts ...option.RequestOption) (res *Hostname, err error) { +func (r *HostnameService) Edit(ctx context.Context, zoneIdentifier string, identifier string, body HostnameEditParams, opts ...option.RequestOption) (res *HostnameEditResponse, err error) { opts = append(r.Options[:], opts...) var env HostnameEditResponseEnvelope path := fmt.Sprintf("zones/%s/web3/hostnames/%s", zoneIdentifier, identifier) @@ -98,7 +98,7 @@ func (r *HostnameService) Edit(ctx context.Context, zoneIdentifier string, ident } // Web3 Hostname Details -func (r *HostnameService) Get(ctx context.Context, zoneIdentifier string, identifier string, opts ...option.RequestOption) (res *Hostname, err error) { +func (r *HostnameService) Get(ctx context.Context, zoneIdentifier string, identifier string, opts ...option.RequestOption) (res *HostnameGetResponse, err error) { opts = append(r.Options[:], opts...) var env HostnameGetResponseEnvelope path := fmt.Sprintf("zones/%s/web3/hostnames/%s", zoneIdentifier, identifier) @@ -110,7 +110,7 @@ func (r *HostnameService) Get(ctx context.Context, zoneIdentifier string, identi return } -type Hostname struct { +type HostnameNewResponse struct { // Identifier ID string `json:"id"` CreatedOn time.Time `json:"created_on" format:"date-time"` @@ -122,14 +122,15 @@ type Hostname struct { // The hostname that will point to the target gateway via CNAME. Name string `json:"name"` // Status of the hostname's activation. - Status HostnameStatus `json:"status"` + Status HostnameNewResponseStatus `json:"status"` // Target gateway of the hostname. - Target HostnameTarget `json:"target"` - JSON hostnameJSON `json:"-"` + Target HostnameNewResponseTarget `json:"target"` + JSON hostnameNewResponseJSON `json:"-"` } -// hostnameJSON contains the JSON metadata for the struct [Hostname] -type hostnameJSON struct { +// hostnameNewResponseJSON contains the JSON metadata for the struct +// [HostnameNewResponse] +type hostnameNewResponseJSON struct { ID apijson.Field CreatedOn apijson.Field Description apijson.Field @@ -142,46 +143,120 @@ type hostnameJSON struct { ExtraFields map[string]apijson.Field } -func (r *Hostname) UnmarshalJSON(data []byte) (err error) { +func (r *HostnameNewResponse) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r hostnameJSON) RawJSON() string { +func (r hostnameNewResponseJSON) RawJSON() string { return r.raw } -func (r Hostname) ImplementsRulesListItemGetResponseUnion() {} +// Status of the hostname's activation. +type HostnameNewResponseStatus string + +const ( + HostnameNewResponseStatusActive HostnameNewResponseStatus = "active" + HostnameNewResponseStatusPending HostnameNewResponseStatus = "pending" + HostnameNewResponseStatusDeleting HostnameNewResponseStatus = "deleting" + HostnameNewResponseStatusError HostnameNewResponseStatus = "error" +) + +func (r HostnameNewResponseStatus) IsKnown() bool { + switch r { + case HostnameNewResponseStatusActive, HostnameNewResponseStatusPending, HostnameNewResponseStatusDeleting, HostnameNewResponseStatusError: + return true + } + return false +} + +// Target gateway of the hostname. +type HostnameNewResponseTarget string + +const ( + HostnameNewResponseTargetEthereum HostnameNewResponseTarget = "ethereum" + HostnameNewResponseTargetIPFS HostnameNewResponseTarget = "ipfs" + HostnameNewResponseTargetIPFSUniversalPath HostnameNewResponseTarget = "ipfs_universal_path" +) + +func (r HostnameNewResponseTarget) IsKnown() bool { + switch r { + case HostnameNewResponseTargetEthereum, HostnameNewResponseTargetIPFS, HostnameNewResponseTargetIPFSUniversalPath: + return true + } + return false +} + +type HostnameListResponse struct { + // Identifier + ID string `json:"id"` + CreatedOn time.Time `json:"created_on" format:"date-time"` + // An optional description of the hostname. + Description string `json:"description"` + // DNSLink value used if the target is ipfs. + Dnslink string `json:"dnslink"` + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // The hostname that will point to the target gateway via CNAME. + Name string `json:"name"` + // Status of the hostname's activation. + Status HostnameListResponseStatus `json:"status"` + // Target gateway of the hostname. + Target HostnameListResponseTarget `json:"target"` + JSON hostnameListResponseJSON `json:"-"` +} + +// hostnameListResponseJSON contains the JSON metadata for the struct +// [HostnameListResponse] +type hostnameListResponseJSON struct { + ID apijson.Field + CreatedOn apijson.Field + Description apijson.Field + Dnslink apijson.Field + ModifiedOn apijson.Field + Name apijson.Field + Status apijson.Field + Target apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *HostnameListResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r hostnameListResponseJSON) RawJSON() string { + return r.raw +} // Status of the hostname's activation. -type HostnameStatus string +type HostnameListResponseStatus string const ( - HostnameStatusActive HostnameStatus = "active" - HostnameStatusPending HostnameStatus = "pending" - HostnameStatusDeleting HostnameStatus = "deleting" - HostnameStatusError HostnameStatus = "error" + HostnameListResponseStatusActive HostnameListResponseStatus = "active" + HostnameListResponseStatusPending HostnameListResponseStatus = "pending" + HostnameListResponseStatusDeleting HostnameListResponseStatus = "deleting" + HostnameListResponseStatusError HostnameListResponseStatus = "error" ) -func (r HostnameStatus) IsKnown() bool { +func (r HostnameListResponseStatus) IsKnown() bool { switch r { - case HostnameStatusActive, HostnameStatusPending, HostnameStatusDeleting, HostnameStatusError: + case HostnameListResponseStatusActive, HostnameListResponseStatusPending, HostnameListResponseStatusDeleting, HostnameListResponseStatusError: return true } return false } // Target gateway of the hostname. -type HostnameTarget string +type HostnameListResponseTarget string const ( - HostnameTargetEthereum HostnameTarget = "ethereum" - HostnameTargetIPFS HostnameTarget = "ipfs" - HostnameTargetIPFSUniversalPath HostnameTarget = "ipfs_universal_path" + HostnameListResponseTargetEthereum HostnameListResponseTarget = "ethereum" + HostnameListResponseTargetIPFS HostnameListResponseTarget = "ipfs" + HostnameListResponseTargetIPFSUniversalPath HostnameListResponseTarget = "ipfs_universal_path" ) -func (r HostnameTarget) IsKnown() bool { +func (r HostnameListResponseTarget) IsKnown() bool { switch r { - case HostnameTargetEthereum, HostnameTargetIPFS, HostnameTargetIPFSUniversalPath: + case HostnameListResponseTargetEthereum, HostnameListResponseTargetIPFS, HostnameListResponseTargetIPFSUniversalPath: return true } return false @@ -209,6 +284,158 @@ func (r hostnameDeleteResponseJSON) RawJSON() string { return r.raw } +type HostnameEditResponse struct { + // Identifier + ID string `json:"id"` + CreatedOn time.Time `json:"created_on" format:"date-time"` + // An optional description of the hostname. + Description string `json:"description"` + // DNSLink value used if the target is ipfs. + Dnslink string `json:"dnslink"` + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // The hostname that will point to the target gateway via CNAME. + Name string `json:"name"` + // Status of the hostname's activation. + Status HostnameEditResponseStatus `json:"status"` + // Target gateway of the hostname. + Target HostnameEditResponseTarget `json:"target"` + JSON hostnameEditResponseJSON `json:"-"` +} + +// hostnameEditResponseJSON contains the JSON metadata for the struct +// [HostnameEditResponse] +type hostnameEditResponseJSON struct { + ID apijson.Field + CreatedOn apijson.Field + Description apijson.Field + Dnslink apijson.Field + ModifiedOn apijson.Field + Name apijson.Field + Status apijson.Field + Target apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *HostnameEditResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r hostnameEditResponseJSON) RawJSON() string { + return r.raw +} + +// Status of the hostname's activation. +type HostnameEditResponseStatus string + +const ( + HostnameEditResponseStatusActive HostnameEditResponseStatus = "active" + HostnameEditResponseStatusPending HostnameEditResponseStatus = "pending" + HostnameEditResponseStatusDeleting HostnameEditResponseStatus = "deleting" + HostnameEditResponseStatusError HostnameEditResponseStatus = "error" +) + +func (r HostnameEditResponseStatus) IsKnown() bool { + switch r { + case HostnameEditResponseStatusActive, HostnameEditResponseStatusPending, HostnameEditResponseStatusDeleting, HostnameEditResponseStatusError: + return true + } + return false +} + +// Target gateway of the hostname. +type HostnameEditResponseTarget string + +const ( + HostnameEditResponseTargetEthereum HostnameEditResponseTarget = "ethereum" + HostnameEditResponseTargetIPFS HostnameEditResponseTarget = "ipfs" + HostnameEditResponseTargetIPFSUniversalPath HostnameEditResponseTarget = "ipfs_universal_path" +) + +func (r HostnameEditResponseTarget) IsKnown() bool { + switch r { + case HostnameEditResponseTargetEthereum, HostnameEditResponseTargetIPFS, HostnameEditResponseTargetIPFSUniversalPath: + return true + } + return false +} + +type HostnameGetResponse struct { + // Identifier + ID string `json:"id"` + CreatedOn time.Time `json:"created_on" format:"date-time"` + // An optional description of the hostname. + Description string `json:"description"` + // DNSLink value used if the target is ipfs. + Dnslink string `json:"dnslink"` + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // The hostname that will point to the target gateway via CNAME. + Name string `json:"name"` + // Status of the hostname's activation. + Status HostnameGetResponseStatus `json:"status"` + // Target gateway of the hostname. + Target HostnameGetResponseTarget `json:"target"` + JSON hostnameGetResponseJSON `json:"-"` +} + +// hostnameGetResponseJSON contains the JSON metadata for the struct +// [HostnameGetResponse] +type hostnameGetResponseJSON struct { + ID apijson.Field + CreatedOn apijson.Field + Description apijson.Field + Dnslink apijson.Field + ModifiedOn apijson.Field + Name apijson.Field + Status apijson.Field + Target apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *HostnameGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r hostnameGetResponseJSON) RawJSON() string { + return r.raw +} + +// Status of the hostname's activation. +type HostnameGetResponseStatus string + +const ( + HostnameGetResponseStatusActive HostnameGetResponseStatus = "active" + HostnameGetResponseStatusPending HostnameGetResponseStatus = "pending" + HostnameGetResponseStatusDeleting HostnameGetResponseStatus = "deleting" + HostnameGetResponseStatusError HostnameGetResponseStatus = "error" +) + +func (r HostnameGetResponseStatus) IsKnown() bool { + switch r { + case HostnameGetResponseStatusActive, HostnameGetResponseStatusPending, HostnameGetResponseStatusDeleting, HostnameGetResponseStatusError: + return true + } + return false +} + +// Target gateway of the hostname. +type HostnameGetResponseTarget string + +const ( + HostnameGetResponseTargetEthereum HostnameGetResponseTarget = "ethereum" + HostnameGetResponseTargetIPFS HostnameGetResponseTarget = "ipfs" + HostnameGetResponseTargetIPFSUniversalPath HostnameGetResponseTarget = "ipfs_universal_path" +) + +func (r HostnameGetResponseTarget) IsKnown() bool { + switch r { + case HostnameGetResponseTargetEthereum, HostnameGetResponseTargetIPFS, HostnameGetResponseTargetIPFSUniversalPath: + return true + } + return false +} + type HostnameNewParams struct { // Target gateway of the hostname. Target param.Field[HostnameNewParamsTarget] `json:"target,required"` @@ -242,7 +469,7 @@ func (r HostnameNewParamsTarget) IsKnown() bool { type HostnameNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Hostname `json:"result,required"` + Result HostnameNewResponse `json:"result,required"` // Whether the API call was successful Success HostnameNewResponseEnvelopeSuccess `json:"success,required"` JSON hostnameNewResponseEnvelopeJSON `json:"-"` @@ -339,7 +566,7 @@ func (r HostnameEditParams) MarshalJSON() (data []byte, err error) { type HostnameEditResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Hostname `json:"result,required"` + Result HostnameEditResponse `json:"result,required"` // Whether the API call was successful Success HostnameEditResponseEnvelopeSuccess `json:"success,required"` JSON hostnameEditResponseEnvelopeJSON `json:"-"` @@ -382,7 +609,7 @@ func (r HostnameEditResponseEnvelopeSuccess) IsKnown() bool { type HostnameGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Hostname `json:"result,required"` + Result HostnameGetResponse `json:"result,required"` // Whether the API call was successful Success HostnameGetResponseEnvelopeSuccess `json:"success,required"` JSON hostnameGetResponseEnvelopeJSON `json:"-"` diff --git a/web3/hostnameipfsuniversalpathcontentlist.go b/web3/hostnameipfsuniversalpathcontentlist.go index 9ea2cdec0e..ee783cc05e 100644 --- a/web3/hostnameipfsuniversalpathcontentlist.go +++ b/web3/hostnameipfsuniversalpathcontentlist.go @@ -36,7 +36,7 @@ func NewHostnameIPFSUniversalPathContentListService(opts ...option.RequestOption } // Update IPFS Universal Path Gateway Content List -func (r *HostnameIPFSUniversalPathContentListService) Update(ctx context.Context, zoneIdentifier string, identifier string, body HostnameIPFSUniversalPathContentListUpdateParams, opts ...option.RequestOption) (res *ContentList, err error) { +func (r *HostnameIPFSUniversalPathContentListService) Update(ctx context.Context, zoneIdentifier string, identifier string, body HostnameIPFSUniversalPathContentListUpdateParams, opts ...option.RequestOption) (res *HostnameIPFSUniversalPathContentListUpdateResponse, err error) { opts = append(r.Options[:], opts...) var env HostnameIPFSUniversalPathContentListUpdateResponseEnvelope path := fmt.Sprintf("zones/%s/web3/hostnames/%s/ipfs_universal_path/content_list", zoneIdentifier, identifier) @@ -49,7 +49,7 @@ func (r *HostnameIPFSUniversalPathContentListService) Update(ctx context.Context } // IPFS Universal Path Gateway Content List Details -func (r *HostnameIPFSUniversalPathContentListService) Get(ctx context.Context, zoneIdentifier string, identifier string, opts ...option.RequestOption) (res *ContentList, err error) { +func (r *HostnameIPFSUniversalPathContentListService) Get(ctx context.Context, zoneIdentifier string, identifier string, opts ...option.RequestOption) (res *HostnameIPFSUniversalPathContentListGetResponse, err error) { opts = append(r.Options[:], opts...) var env HostnameIPFSUniversalPathContentListGetResponseEnvelope path := fmt.Sprintf("zones/%s/web3/hostnames/%s/ipfs_universal_path/content_list", zoneIdentifier, identifier) @@ -61,37 +61,75 @@ func (r *HostnameIPFSUniversalPathContentListService) Get(ctx context.Context, z return } -type ContentList struct { +type HostnameIPFSUniversalPathContentListUpdateResponse struct { // Behavior of the content list. - Action ContentListAction `json:"action"` - JSON contentListJSON `json:"-"` + Action HostnameIPFSUniversalPathContentListUpdateResponseAction `json:"action"` + JSON hostnameIPFSUniversalPathContentListUpdateResponseJSON `json:"-"` } -// contentListJSON contains the JSON metadata for the struct [ContentList] -type contentListJSON struct { +// hostnameIPFSUniversalPathContentListUpdateResponseJSON contains the JSON +// metadata for the struct [HostnameIPFSUniversalPathContentListUpdateResponse] +type hostnameIPFSUniversalPathContentListUpdateResponseJSON struct { Action apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ContentList) UnmarshalJSON(data []byte) (err error) { +func (r *HostnameIPFSUniversalPathContentListUpdateResponse) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r contentListJSON) RawJSON() string { +func (r hostnameIPFSUniversalPathContentListUpdateResponseJSON) RawJSON() string { return r.raw } // Behavior of the content list. -type ContentListAction string +type HostnameIPFSUniversalPathContentListUpdateResponseAction string const ( - ContentListActionBlock ContentListAction = "block" + HostnameIPFSUniversalPathContentListUpdateResponseActionBlock HostnameIPFSUniversalPathContentListUpdateResponseAction = "block" ) -func (r ContentListAction) IsKnown() bool { +func (r HostnameIPFSUniversalPathContentListUpdateResponseAction) IsKnown() bool { switch r { - case ContentListActionBlock: + case HostnameIPFSUniversalPathContentListUpdateResponseActionBlock: + return true + } + return false +} + +type HostnameIPFSUniversalPathContentListGetResponse struct { + // Behavior of the content list. + Action HostnameIPFSUniversalPathContentListGetResponseAction `json:"action"` + JSON hostnameIPFSUniversalPathContentListGetResponseJSON `json:"-"` +} + +// hostnameIPFSUniversalPathContentListGetResponseJSON contains the JSON metadata +// for the struct [HostnameIPFSUniversalPathContentListGetResponse] +type hostnameIPFSUniversalPathContentListGetResponseJSON struct { + Action apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *HostnameIPFSUniversalPathContentListGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r hostnameIPFSUniversalPathContentListGetResponseJSON) RawJSON() string { + return r.raw +} + +// Behavior of the content list. +type HostnameIPFSUniversalPathContentListGetResponseAction string + +const ( + HostnameIPFSUniversalPathContentListGetResponseActionBlock HostnameIPFSUniversalPathContentListGetResponseAction = "block" +) + +func (r HostnameIPFSUniversalPathContentListGetResponseAction) IsKnown() bool { + switch r { + case HostnameIPFSUniversalPathContentListGetResponseActionBlock: return true } return false @@ -154,9 +192,9 @@ func (r HostnameIPFSUniversalPathContentListUpdateParamsEntriesType) IsKnown() b } type HostnameIPFSUniversalPathContentListUpdateResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result ContentList `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result HostnameIPFSUniversalPathContentListUpdateResponse `json:"result,required"` // Whether the API call was successful Success HostnameIPFSUniversalPathContentListUpdateResponseEnvelopeSuccess `json:"success,required"` JSON hostnameIPFSUniversalPathContentListUpdateResponseEnvelopeJSON `json:"-"` @@ -198,9 +236,9 @@ func (r HostnameIPFSUniversalPathContentListUpdateResponseEnvelopeSuccess) IsKno } type HostnameIPFSUniversalPathContentListGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result ContentList `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result HostnameIPFSUniversalPathContentListGetResponse `json:"result,required"` // Whether the API call was successful Success HostnameIPFSUniversalPathContentListGetResponseEnvelopeSuccess `json:"success,required"` JSON hostnameIPFSUniversalPathContentListGetResponseEnvelopeJSON `json:"-"` From b04a64c0984553582ce096496bb160edd4b25b57 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 03:35:54 +0000 Subject: [PATCH 044/127] feat(api): update via SDK Studio (#1886) --- .stats.yml | 2 +- api.md | 50 ++- radar/httpsummary.go | 402 +++++++++++++++++++ radar/httpsummary_test.go | 39 ++ radar/httptimeseriesgroup.go | 319 +++++++++++++++ radar/httptimeseriesgroup_test.go | 40 ++ snippets/content.go | 20 + snippets/content_test.go | 58 +++ snippets/rule.go | 173 ++++++++ snippets/rule_test.go | 81 ++++ snippets/snippet.go | 259 ++++++++++++ snippets/snippet_test.go | 131 ++++++ web3/hostname.go | 287 ++----------- web3/hostnameipfsuniversalpathcontentlist.go | 76 +--- 14 files changed, 1610 insertions(+), 327 deletions(-) create mode 100644 snippets/content_test.go create mode 100644 snippets/rule_test.go create mode 100644 snippets/snippet_test.go diff --git a/.stats.yml b/.stats.yml index f189017b76..81d08c8bc1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1258 +configured_endpoints: 1267 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5f1479806ff9a382d425b33f45765681c248cf0895cd4fb79eec5b51a55ea23a.yml diff --git a/api.md b/api.md index 0ac2e07697..dccb5a7feb 100644 --- a/api.md +++ b/api.md @@ -2354,19 +2354,16 @@ Methods: Response Types: -- web3.HostnameNewResponse -- web3.HostnameListResponse +- web3.Hostname - web3.HostnameDeleteResponse -- web3.HostnameEditResponse -- web3.HostnameGetResponse Methods: -- client.Web3.Hostnames.New(ctx context.Context, zoneIdentifier string, body web3.HostnameNewParams) (web3.HostnameNewResponse, error) -- client.Web3.Hostnames.List(ctx context.Context, zoneIdentifier string) (pagination.SinglePage[web3.HostnameListResponse], error) +- client.Web3.Hostnames.New(ctx context.Context, zoneIdentifier string, body web3.HostnameNewParams) (web3.Hostname, error) +- client.Web3.Hostnames.List(ctx context.Context, zoneIdentifier string) (pagination.SinglePage[web3.Hostname], error) - client.Web3.Hostnames.Delete(ctx context.Context, zoneIdentifier string, identifier string) (web3.HostnameDeleteResponse, error) -- client.Web3.Hostnames.Edit(ctx context.Context, zoneIdentifier string, identifier string, body web3.HostnameEditParams) (web3.HostnameEditResponse, error) -- client.Web3.Hostnames.Get(ctx context.Context, zoneIdentifier string, identifier string) (web3.HostnameGetResponse, error) +- client.Web3.Hostnames.Edit(ctx context.Context, zoneIdentifier string, identifier string, body web3.HostnameEditParams) (web3.Hostname, error) +- client.Web3.Hostnames.Get(ctx context.Context, zoneIdentifier string, identifier string) (web3.Hostname, error) ### IPFSUniversalPaths @@ -2374,13 +2371,12 @@ Methods: Response Types: -- web3.HostnameIPFSUniversalPathContentListUpdateResponse -- web3.HostnameIPFSUniversalPathContentListGetResponse +- web3.ContentList Methods: -- client.Web3.Hostnames.IPFSUniversalPaths.ContentLists.Update(ctx context.Context, zoneIdentifier string, identifier string, body web3.HostnameIPFSUniversalPathContentListUpdateParams) (web3.HostnameIPFSUniversalPathContentListUpdateResponse, error) -- client.Web3.Hostnames.IPFSUniversalPaths.ContentLists.Get(ctx context.Context, zoneIdentifier string, identifier string) (web3.HostnameIPFSUniversalPathContentListGetResponse, error) +- client.Web3.Hostnames.IPFSUniversalPaths.ContentLists.Update(ctx context.Context, zoneIdentifier string, identifier string, body web3.HostnameIPFSUniversalPathContentListUpdateParams) (web3.ContentList, error) +- client.Web3.Hostnames.IPFSUniversalPaths.ContentLists.Get(ctx context.Context, zoneIdentifier string, identifier string) (web3.ContentList, error) ##### Entries @@ -6418,6 +6414,7 @@ Response Types: - radar.HTTPSummaryHTTPVersionResponse - radar.HTTPSummaryIPVersionResponse - radar.HTTPSummaryOSResponse +- radar.HTTPSummaryPostQuantumResponse - radar.HTTPSummaryTLSVersionResponse Methods: @@ -6428,6 +6425,7 @@ Methods: - client.Radar.HTTP.Summary.HTTPVersion(ctx context.Context, query radar.HTTPSummaryHTTPVersionParams) (radar.HTTPSummaryHTTPVersionResponse, error) - client.Radar.HTTP.Summary.IPVersion(ctx context.Context, query radar.HTTPSummaryIPVersionParams) (radar.HTTPSummaryIPVersionResponse, error) - client.Radar.HTTP.Summary.OS(ctx context.Context, query radar.HTTPSummaryOSParams) (radar.HTTPSummaryOSResponse, error) +- client.Radar.HTTP.Summary.PostQuantum(ctx context.Context, query radar.HTTPSummaryPostQuantumParams) (radar.HTTPSummaryPostQuantumResponse, error) - client.Radar.HTTP.Summary.TLSVersion(ctx context.Context, query radar.HTTPSummaryTLSVersionParams) (radar.HTTPSummaryTLSVersionResponse, error) ### TimeseriesGroups @@ -6442,6 +6440,7 @@ Response Types: - radar.HTTPTimeseriesGroupHTTPVersionResponse - radar.HTTPTimeseriesGroupIPVersionResponse - radar.HTTPTimeseriesGroupOSResponse +- radar.HTTPTimeseriesGroupPostQuantumResponse - radar.HTTPTimeseriesGroupTLSVersionResponse Methods: @@ -6454,6 +6453,7 @@ Methods: - client.Radar.HTTP.TimeseriesGroups.HTTPVersion(ctx context.Context, query radar.HTTPTimeseriesGroupHTTPVersionParams) (radar.HTTPTimeseriesGroupHTTPVersionResponse, error) - client.Radar.HTTP.TimeseriesGroups.IPVersion(ctx context.Context, query radar.HTTPTimeseriesGroupIPVersionParams) (radar.HTTPTimeseriesGroupIPVersionResponse, error) - client.Radar.HTTP.TimeseriesGroups.OS(ctx context.Context, query radar.HTTPTimeseriesGroupOSParams) (radar.HTTPTimeseriesGroupOSResponse, error) +- client.Radar.HTTP.TimeseriesGroups.PostQuantum(ctx context.Context, query radar.HTTPTimeseriesGroupPostQuantumParams) (radar.HTTPTimeseriesGroupPostQuantumResponse, error) - client.Radar.HTTP.TimeseriesGroups.TLSVersion(ctx context.Context, query radar.HTTPTimeseriesGroupTLSVersionParams) (radar.HTTPTimeseriesGroupTLSVersionResponse, error) ## Quality @@ -6669,10 +6669,36 @@ Methods: # Snippets +Response Types: + +- snippets.Snippet +- snippets.SnippetDeleteResponse + +Methods: + +- client.Snippets.Update(ctx context.Context, snippetName string, params snippets.SnippetUpdateParams) (snippets.Snippet, error) +- client.Snippets.List(ctx context.Context, query snippets.SnippetListParams) (pagination.SinglePage[snippets.Snippet], error) +- client.Snippets.Delete(ctx context.Context, snippetName string, body snippets.SnippetDeleteParams) (snippets.SnippetDeleteResponse, error) +- client.Snippets.Get(ctx context.Context, snippetName string, query snippets.SnippetGetParams) (snippets.Snippet, error) + ## Content +Methods: + +- client.Snippets.Content.Get(ctx context.Context, snippetName string, query snippets.ContentGetParams) (http.Response, error) + ## Rules +Response Types: + +- snippets.RuleUpdateResponse +- snippets.RuleListResponse + +Methods: + +- client.Snippets.Rules.Update(ctx context.Context, params snippets.RuleUpdateParams) ([]snippets.RuleUpdateResponse, error) +- client.Snippets.Rules.List(ctx context.Context, query snippets.RuleListParams) (pagination.SinglePage[snippets.RuleListResponse], error) + # Calls Response Types: diff --git a/radar/httpsummary.go b/radar/httpsummary.go index 58606b0364..684c1f2a71 100644 --- a/radar/httpsummary.go +++ b/radar/httpsummary.go @@ -118,6 +118,20 @@ func (r *HTTPSummaryService) OS(ctx context.Context, query HTTPSummaryOSParams, return } +// Percentage distribution of traffic per Post Quantum support over a given time +// period. +func (r *HTTPSummaryService) PostQuantum(ctx context.Context, query HTTPSummaryPostQuantumParams, opts ...option.RequestOption) (res *HTTPSummaryPostQuantumResponse, err error) { + opts = append(r.Options[:], opts...) + var env HTTPSummaryPostQuantumResponseEnvelope + path := "radar/http/summary/post_quantum" + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + // Percentage distribution of traffic per TLS protocol version, over a given time // period. func (r *HTTPSummaryService) TLSVersion(ctx context.Context, query HTTPSummaryTLSVersionParams, opts ...option.RequestOption) (res *HTTPSummaryTLSVersionResponse, err error) { @@ -1065,6 +1079,161 @@ func (r httpSummaryOSResponseSummary0JSON) RawJSON() string { return r.raw } +type HTTPSummaryPostQuantumResponse struct { + Meta HTTPSummaryPostQuantumResponseMeta `json:"meta,required"` + Summary0 HTTPSummaryPostQuantumResponseSummary0 `json:"summary_0,required"` + JSON httpSummaryPostQuantumResponseJSON `json:"-"` +} + +// httpSummaryPostQuantumResponseJSON contains the JSON metadata for the struct +// [HTTPSummaryPostQuantumResponse] +type httpSummaryPostQuantumResponseJSON struct { + Meta apijson.Field + Summary0 apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *HTTPSummaryPostQuantumResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r httpSummaryPostQuantumResponseJSON) RawJSON() string { + return r.raw +} + +type HTTPSummaryPostQuantumResponseMeta struct { + DateRange []HTTPSummaryPostQuantumResponseMetaDateRange `json:"dateRange,required"` + LastUpdated string `json:"lastUpdated,required"` + Normalization string `json:"normalization,required"` + ConfidenceInfo HTTPSummaryPostQuantumResponseMetaConfidenceInfo `json:"confidenceInfo"` + JSON httpSummaryPostQuantumResponseMetaJSON `json:"-"` +} + +// httpSummaryPostQuantumResponseMetaJSON contains the JSON metadata for the struct +// [HTTPSummaryPostQuantumResponseMeta] +type httpSummaryPostQuantumResponseMetaJSON struct { + DateRange apijson.Field + LastUpdated apijson.Field + Normalization apijson.Field + ConfidenceInfo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *HTTPSummaryPostQuantumResponseMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r httpSummaryPostQuantumResponseMetaJSON) RawJSON() string { + return r.raw +} + +type HTTPSummaryPostQuantumResponseMetaDateRange struct { + // Adjusted end of date range. + EndTime time.Time `json:"endTime,required" format:"date-time"` + // Adjusted start of date range. + StartTime time.Time `json:"startTime,required" format:"date-time"` + JSON httpSummaryPostQuantumResponseMetaDateRangeJSON `json:"-"` +} + +// httpSummaryPostQuantumResponseMetaDateRangeJSON contains the JSON metadata for +// the struct [HTTPSummaryPostQuantumResponseMetaDateRange] +type httpSummaryPostQuantumResponseMetaDateRangeJSON struct { + EndTime apijson.Field + StartTime apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *HTTPSummaryPostQuantumResponseMetaDateRange) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r httpSummaryPostQuantumResponseMetaDateRangeJSON) RawJSON() string { + return r.raw +} + +type HTTPSummaryPostQuantumResponseMetaConfidenceInfo struct { + Annotations []HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotation `json:"annotations"` + Level int64 `json:"level"` + JSON httpSummaryPostQuantumResponseMetaConfidenceInfoJSON `json:"-"` +} + +// httpSummaryPostQuantumResponseMetaConfidenceInfoJSON contains the JSON metadata +// for the struct [HTTPSummaryPostQuantumResponseMetaConfidenceInfo] +type httpSummaryPostQuantumResponseMetaConfidenceInfoJSON struct { + Annotations apijson.Field + Level apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *HTTPSummaryPostQuantumResponseMetaConfidenceInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r httpSummaryPostQuantumResponseMetaConfidenceInfoJSON) RawJSON() string { + return r.raw +} + +type HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotation struct { + DataSource string `json:"dataSource,required"` + Description string `json:"description,required"` + EventType string `json:"eventType,required"` + IsInstantaneous interface{} `json:"isInstantaneous,required"` + EndTime time.Time `json:"endTime" format:"date-time"` + LinkedURL string `json:"linkedUrl"` + StartTime time.Time `json:"startTime" format:"date-time"` + JSON httpSummaryPostQuantumResponseMetaConfidenceInfoAnnotationJSON `json:"-"` +} + +// httpSummaryPostQuantumResponseMetaConfidenceInfoAnnotationJSON contains the JSON +// metadata for the struct +// [HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotation] +type httpSummaryPostQuantumResponseMetaConfidenceInfoAnnotationJSON struct { + DataSource apijson.Field + Description apijson.Field + EventType apijson.Field + IsInstantaneous apijson.Field + EndTime apijson.Field + LinkedURL apijson.Field + StartTime apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r httpSummaryPostQuantumResponseMetaConfidenceInfoAnnotationJSON) RawJSON() string { + return r.raw +} + +type HTTPSummaryPostQuantumResponseSummary0 struct { + NotSupported string `json:"NOT_SUPPORTED,required"` + Supported string `json:"SUPPORTED,required"` + JSON httpSummaryPostQuantumResponseSummary0JSON `json:"-"` +} + +// httpSummaryPostQuantumResponseSummary0JSON contains the JSON metadata for the +// struct [HTTPSummaryPostQuantumResponseSummary0] +type httpSummaryPostQuantumResponseSummary0JSON struct { + NotSupported apijson.Field + Supported apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *HTTPSummaryPostQuantumResponseSummary0) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r httpSummaryPostQuantumResponseSummary0JSON) RawJSON() string { + return r.raw +} + type HTTPSummaryTLSVersionResponse struct { Meta HTTPSummaryTLSVersionResponseMeta `json:"meta,required"` Summary0 HTTPSummaryTLSVersionResponseSummary0 `json:"summary_0,required"` @@ -2513,6 +2682,239 @@ func (r httpSummaryOSResponseEnvelopeJSON) RawJSON() string { return r.raw } +type HTTPSummaryPostQuantumParams struct { + // Array of comma separated list of ASNs, start with `-` to exclude from results. + // For example, `-174, 3356` excludes results from AS174, but includes results from + // AS3356. + ASN param.Field[[]string] `query:"asn"` + // Filter for bot class. Refer to + // [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/). + BotClass param.Field[[]HTTPSummaryPostQuantumParamsBotClass] `query:"botClass"` + // Array of comma separated list of continents (alpha-2 continent codes). Start + // with `-` to exclude from results. For example, `-EU,NA` excludes results from + // Europe, but includes results from North America. + Continent param.Field[[]string] `query:"continent"` + // End of the date range (inclusive). + DateEnd param.Field[[]time.Time] `query:"dateEnd" format:"date-time"` + // For example, use `7d` and `7dControl` to compare this week with the previous + // week. Use this parameter or set specific start and end dates (`dateStart` and + // `dateEnd` parameters). + DateRange param.Field[[]HTTPSummaryPostQuantumParamsDateRange] `query:"dateRange"` + // Array of datetimes to filter the start of a series. + DateStart param.Field[[]time.Time] `query:"dateStart" format:"date-time"` + // Filter for device type. + DeviceType param.Field[[]HTTPSummaryPostQuantumParamsDeviceType] `query:"deviceType"` + // Format results are returned in. + Format param.Field[HTTPSummaryPostQuantumParamsFormat] `query:"format"` + // Filter for http protocol. + HTTPProtocol param.Field[[]HTTPSummaryPostQuantumParamsHTTPProtocol] `query:"httpProtocol"` + // Filter for http version. + HTTPVersion param.Field[[]HTTPSummaryPostQuantumParamsHTTPVersion] `query:"httpVersion"` + // Filter for ip version. + IPVersion param.Field[[]HTTPSummaryPostQuantumParamsIPVersion] `query:"ipVersion"` + // Array of comma separated list of locations (alpha-2 country codes). Start with + // `-` to exclude from results. For example, `-US,PT` excludes results from the US, + // but includes results from PT. + Location param.Field[[]string] `query:"location"` + // Array of names that will be used to name the series in responses. + Name param.Field[[]string] `query:"name"` + // Filter for os name. + OS param.Field[[]HTTPSummaryPostQuantumParamsOS] `query:"os"` + // Filter for tls version. + TLSVersion param.Field[[]HTTPSummaryPostQuantumParamsTLSVersion] `query:"tlsVersion"` +} + +// URLQuery serializes [HTTPSummaryPostQuantumParams]'s query parameters as +// `url.Values`. +func (r HTTPSummaryPostQuantumParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatRepeat, + NestedFormat: apiquery.NestedQueryFormatBrackets, + }) +} + +type HTTPSummaryPostQuantumParamsBotClass string + +const ( + HTTPSummaryPostQuantumParamsBotClassLikelyAutomated HTTPSummaryPostQuantumParamsBotClass = "LIKELY_AUTOMATED" + HTTPSummaryPostQuantumParamsBotClassLikelyHuman HTTPSummaryPostQuantumParamsBotClass = "LIKELY_HUMAN" +) + +func (r HTTPSummaryPostQuantumParamsBotClass) IsKnown() bool { + switch r { + case HTTPSummaryPostQuantumParamsBotClassLikelyAutomated, HTTPSummaryPostQuantumParamsBotClassLikelyHuman: + return true + } + return false +} + +type HTTPSummaryPostQuantumParamsDateRange string + +const ( + HTTPSummaryPostQuantumParamsDateRange1d HTTPSummaryPostQuantumParamsDateRange = "1d" + HTTPSummaryPostQuantumParamsDateRange2d HTTPSummaryPostQuantumParamsDateRange = "2d" + HTTPSummaryPostQuantumParamsDateRange7d HTTPSummaryPostQuantumParamsDateRange = "7d" + HTTPSummaryPostQuantumParamsDateRange14d HTTPSummaryPostQuantumParamsDateRange = "14d" + HTTPSummaryPostQuantumParamsDateRange28d HTTPSummaryPostQuantumParamsDateRange = "28d" + HTTPSummaryPostQuantumParamsDateRange12w HTTPSummaryPostQuantumParamsDateRange = "12w" + HTTPSummaryPostQuantumParamsDateRange24w HTTPSummaryPostQuantumParamsDateRange = "24w" + HTTPSummaryPostQuantumParamsDateRange52w HTTPSummaryPostQuantumParamsDateRange = "52w" + HTTPSummaryPostQuantumParamsDateRange1dControl HTTPSummaryPostQuantumParamsDateRange = "1dControl" + HTTPSummaryPostQuantumParamsDateRange2dControl HTTPSummaryPostQuantumParamsDateRange = "2dControl" + HTTPSummaryPostQuantumParamsDateRange7dControl HTTPSummaryPostQuantumParamsDateRange = "7dControl" + HTTPSummaryPostQuantumParamsDateRange14dControl HTTPSummaryPostQuantumParamsDateRange = "14dControl" + HTTPSummaryPostQuantumParamsDateRange28dControl HTTPSummaryPostQuantumParamsDateRange = "28dControl" + HTTPSummaryPostQuantumParamsDateRange12wControl HTTPSummaryPostQuantumParamsDateRange = "12wControl" + HTTPSummaryPostQuantumParamsDateRange24wControl HTTPSummaryPostQuantumParamsDateRange = "24wControl" +) + +func (r HTTPSummaryPostQuantumParamsDateRange) IsKnown() bool { + switch r { + case HTTPSummaryPostQuantumParamsDateRange1d, HTTPSummaryPostQuantumParamsDateRange2d, HTTPSummaryPostQuantumParamsDateRange7d, HTTPSummaryPostQuantumParamsDateRange14d, HTTPSummaryPostQuantumParamsDateRange28d, HTTPSummaryPostQuantumParamsDateRange12w, HTTPSummaryPostQuantumParamsDateRange24w, HTTPSummaryPostQuantumParamsDateRange52w, HTTPSummaryPostQuantumParamsDateRange1dControl, HTTPSummaryPostQuantumParamsDateRange2dControl, HTTPSummaryPostQuantumParamsDateRange7dControl, HTTPSummaryPostQuantumParamsDateRange14dControl, HTTPSummaryPostQuantumParamsDateRange28dControl, HTTPSummaryPostQuantumParamsDateRange12wControl, HTTPSummaryPostQuantumParamsDateRange24wControl: + return true + } + return false +} + +type HTTPSummaryPostQuantumParamsDeviceType string + +const ( + HTTPSummaryPostQuantumParamsDeviceTypeDesktop HTTPSummaryPostQuantumParamsDeviceType = "DESKTOP" + HTTPSummaryPostQuantumParamsDeviceTypeMobile HTTPSummaryPostQuantumParamsDeviceType = "MOBILE" + HTTPSummaryPostQuantumParamsDeviceTypeOther HTTPSummaryPostQuantumParamsDeviceType = "OTHER" +) + +func (r HTTPSummaryPostQuantumParamsDeviceType) IsKnown() bool { + switch r { + case HTTPSummaryPostQuantumParamsDeviceTypeDesktop, HTTPSummaryPostQuantumParamsDeviceTypeMobile, HTTPSummaryPostQuantumParamsDeviceTypeOther: + return true + } + return false +} + +// Format results are returned in. +type HTTPSummaryPostQuantumParamsFormat string + +const ( + HTTPSummaryPostQuantumParamsFormatJson HTTPSummaryPostQuantumParamsFormat = "JSON" + HTTPSummaryPostQuantumParamsFormatCsv HTTPSummaryPostQuantumParamsFormat = "CSV" +) + +func (r HTTPSummaryPostQuantumParamsFormat) IsKnown() bool { + switch r { + case HTTPSummaryPostQuantumParamsFormatJson, HTTPSummaryPostQuantumParamsFormatCsv: + return true + } + return false +} + +type HTTPSummaryPostQuantumParamsHTTPProtocol string + +const ( + HTTPSummaryPostQuantumParamsHTTPProtocolHTTP HTTPSummaryPostQuantumParamsHTTPProtocol = "HTTP" + HTTPSummaryPostQuantumParamsHTTPProtocolHTTPS HTTPSummaryPostQuantumParamsHTTPProtocol = "HTTPS" +) + +func (r HTTPSummaryPostQuantumParamsHTTPProtocol) IsKnown() bool { + switch r { + case HTTPSummaryPostQuantumParamsHTTPProtocolHTTP, HTTPSummaryPostQuantumParamsHTTPProtocolHTTPS: + return true + } + return false +} + +type HTTPSummaryPostQuantumParamsHTTPVersion string + +const ( + HTTPSummaryPostQuantumParamsHTTPVersionHttPv1 HTTPSummaryPostQuantumParamsHTTPVersion = "HTTPv1" + HTTPSummaryPostQuantumParamsHTTPVersionHttPv2 HTTPSummaryPostQuantumParamsHTTPVersion = "HTTPv2" + HTTPSummaryPostQuantumParamsHTTPVersionHttPv3 HTTPSummaryPostQuantumParamsHTTPVersion = "HTTPv3" +) + +func (r HTTPSummaryPostQuantumParamsHTTPVersion) IsKnown() bool { + switch r { + case HTTPSummaryPostQuantumParamsHTTPVersionHttPv1, HTTPSummaryPostQuantumParamsHTTPVersionHttPv2, HTTPSummaryPostQuantumParamsHTTPVersionHttPv3: + return true + } + return false +} + +type HTTPSummaryPostQuantumParamsIPVersion string + +const ( + HTTPSummaryPostQuantumParamsIPVersionIPv4 HTTPSummaryPostQuantumParamsIPVersion = "IPv4" + HTTPSummaryPostQuantumParamsIPVersionIPv6 HTTPSummaryPostQuantumParamsIPVersion = "IPv6" +) + +func (r HTTPSummaryPostQuantumParamsIPVersion) IsKnown() bool { + switch r { + case HTTPSummaryPostQuantumParamsIPVersionIPv4, HTTPSummaryPostQuantumParamsIPVersionIPv6: + return true + } + return false +} + +type HTTPSummaryPostQuantumParamsOS string + +const ( + HTTPSummaryPostQuantumParamsOSWindows HTTPSummaryPostQuantumParamsOS = "WINDOWS" + HTTPSummaryPostQuantumParamsOSMacosx HTTPSummaryPostQuantumParamsOS = "MACOSX" + HTTPSummaryPostQuantumParamsOSIos HTTPSummaryPostQuantumParamsOS = "IOS" + HTTPSummaryPostQuantumParamsOSAndroid HTTPSummaryPostQuantumParamsOS = "ANDROID" + HTTPSummaryPostQuantumParamsOSChromeos HTTPSummaryPostQuantumParamsOS = "CHROMEOS" + HTTPSummaryPostQuantumParamsOSLinux HTTPSummaryPostQuantumParamsOS = "LINUX" + HTTPSummaryPostQuantumParamsOSSmartTv HTTPSummaryPostQuantumParamsOS = "SMART_TV" +) + +func (r HTTPSummaryPostQuantumParamsOS) IsKnown() bool { + switch r { + case HTTPSummaryPostQuantumParamsOSWindows, HTTPSummaryPostQuantumParamsOSMacosx, HTTPSummaryPostQuantumParamsOSIos, HTTPSummaryPostQuantumParamsOSAndroid, HTTPSummaryPostQuantumParamsOSChromeos, HTTPSummaryPostQuantumParamsOSLinux, HTTPSummaryPostQuantumParamsOSSmartTv: + return true + } + return false +} + +type HTTPSummaryPostQuantumParamsTLSVersion string + +const ( + HTTPSummaryPostQuantumParamsTLSVersionTlSv1_0 HTTPSummaryPostQuantumParamsTLSVersion = "TLSv1_0" + HTTPSummaryPostQuantumParamsTLSVersionTlSv1_1 HTTPSummaryPostQuantumParamsTLSVersion = "TLSv1_1" + HTTPSummaryPostQuantumParamsTLSVersionTlSv1_2 HTTPSummaryPostQuantumParamsTLSVersion = "TLSv1_2" + HTTPSummaryPostQuantumParamsTLSVersionTlSv1_3 HTTPSummaryPostQuantumParamsTLSVersion = "TLSv1_3" + HTTPSummaryPostQuantumParamsTLSVersionTlSvQuic HTTPSummaryPostQuantumParamsTLSVersion = "TLSvQUIC" +) + +func (r HTTPSummaryPostQuantumParamsTLSVersion) IsKnown() bool { + switch r { + case HTTPSummaryPostQuantumParamsTLSVersionTlSv1_0, HTTPSummaryPostQuantumParamsTLSVersionTlSv1_1, HTTPSummaryPostQuantumParamsTLSVersionTlSv1_2, HTTPSummaryPostQuantumParamsTLSVersionTlSv1_3, HTTPSummaryPostQuantumParamsTLSVersionTlSvQuic: + return true + } + return false +} + +type HTTPSummaryPostQuantumResponseEnvelope struct { + Result HTTPSummaryPostQuantumResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON httpSummaryPostQuantumResponseEnvelopeJSON `json:"-"` +} + +// httpSummaryPostQuantumResponseEnvelopeJSON contains the JSON metadata for the +// struct [HTTPSummaryPostQuantumResponseEnvelope] +type httpSummaryPostQuantumResponseEnvelopeJSON struct { + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *HTTPSummaryPostQuantumResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r httpSummaryPostQuantumResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + type HTTPSummaryTLSVersionParams struct { // Array of comma separated list of ASNs, start with `-` to exclude from results. // For example, `-174, 3356` excludes results from AS174, but includes results from diff --git a/radar/httpsummary_test.go b/radar/httpsummary_test.go index 3faad2768d..3962f55dd7 100644 --- a/radar/httpsummary_test.go +++ b/radar/httpsummary_test.go @@ -243,6 +243,45 @@ func TestHTTPSummaryOSWithOptionalParams(t *testing.T) { } } +func TestHTTPSummaryPostQuantumWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Radar.HTTP.Summary.PostQuantum(context.TODO(), radar.HTTPSummaryPostQuantumParams{ + ASN: cloudflare.F([]string{"string", "string", "string"}), + BotClass: cloudflare.F([]radar.HTTPSummaryPostQuantumParamsBotClass{radar.HTTPSummaryPostQuantumParamsBotClassLikelyAutomated, radar.HTTPSummaryPostQuantumParamsBotClassLikelyHuman}), + Continent: cloudflare.F([]string{"string", "string", "string"}), + DateEnd: cloudflare.F([]time.Time{time.Now(), time.Now(), time.Now()}), + DateRange: cloudflare.F([]radar.HTTPSummaryPostQuantumParamsDateRange{radar.HTTPSummaryPostQuantumParamsDateRange1d, radar.HTTPSummaryPostQuantumParamsDateRange2d, radar.HTTPSummaryPostQuantumParamsDateRange7d}), + DateStart: cloudflare.F([]time.Time{time.Now(), time.Now(), time.Now()}), + DeviceType: cloudflare.F([]radar.HTTPSummaryPostQuantumParamsDeviceType{radar.HTTPSummaryPostQuantumParamsDeviceTypeDesktop, radar.HTTPSummaryPostQuantumParamsDeviceTypeMobile, radar.HTTPSummaryPostQuantumParamsDeviceTypeOther}), + Format: cloudflare.F(radar.HTTPSummaryPostQuantumParamsFormatJson), + HTTPProtocol: cloudflare.F([]radar.HTTPSummaryPostQuantumParamsHTTPProtocol{radar.HTTPSummaryPostQuantumParamsHTTPProtocolHTTP, radar.HTTPSummaryPostQuantumParamsHTTPProtocolHTTPS}), + HTTPVersion: cloudflare.F([]radar.HTTPSummaryPostQuantumParamsHTTPVersion{radar.HTTPSummaryPostQuantumParamsHTTPVersionHttPv1, radar.HTTPSummaryPostQuantumParamsHTTPVersionHttPv2, radar.HTTPSummaryPostQuantumParamsHTTPVersionHttPv3}), + IPVersion: cloudflare.F([]radar.HTTPSummaryPostQuantumParamsIPVersion{radar.HTTPSummaryPostQuantumParamsIPVersionIPv4, radar.HTTPSummaryPostQuantumParamsIPVersionIPv6}), + Location: cloudflare.F([]string{"string", "string", "string"}), + Name: cloudflare.F([]string{"string", "string", "string"}), + OS: cloudflare.F([]radar.HTTPSummaryPostQuantumParamsOS{radar.HTTPSummaryPostQuantumParamsOSWindows, radar.HTTPSummaryPostQuantumParamsOSMacosx, radar.HTTPSummaryPostQuantumParamsOSIos}), + TLSVersion: cloudflare.F([]radar.HTTPSummaryPostQuantumParamsTLSVersion{radar.HTTPSummaryPostQuantumParamsTLSVersionTlSv1_0, radar.HTTPSummaryPostQuantumParamsTLSVersionTlSv1_1, radar.HTTPSummaryPostQuantumParamsTLSVersionTlSv1_2}), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + func TestHTTPSummaryTLSVersionWithOptionalParams(t *testing.T) { baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { diff --git a/radar/httptimeseriesgroup.go b/radar/httptimeseriesgroup.go index 07dd6fac17..8cf1dce270 100644 --- a/radar/httptimeseriesgroup.go +++ b/radar/httptimeseriesgroup.go @@ -145,6 +145,20 @@ func (r *HTTPTimeseriesGroupService) OS(ctx context.Context, query HTTPTimeserie return } +// Get a time series of the percentage distribution of traffic per Post Quantum +// suport. +func (r *HTTPTimeseriesGroupService) PostQuantum(ctx context.Context, query HTTPTimeseriesGroupPostQuantumParams, opts ...option.RequestOption) (res *HTTPTimeseriesGroupPostQuantumResponse, err error) { + opts = append(r.Options[:], opts...) + var env HTTPTimeseriesGroupPostQuantumResponseEnvelope + path := "radar/http/timeseries_groups/post_quantum" + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + // Get a time series of the percentage distribution of traffic per TLS protocol // version. func (r *HTTPTimeseriesGroupService) TLSVersion(ctx context.Context, query HTTPTimeseriesGroupTLSVersionParams, opts ...option.RequestOption) (res *HTTPTimeseriesGroupTLSVersionResponse, err error) { @@ -538,6 +552,54 @@ func (r httpTimeseriesGroupOSResponseSerie0JSON) RawJSON() string { return r.raw } +type HTTPTimeseriesGroupPostQuantumResponse struct { + Meta interface{} `json:"meta,required"` + Serie0 HTTPTimeseriesGroupPostQuantumResponseSerie0 `json:"serie_0,required"` + JSON httpTimeseriesGroupPostQuantumResponseJSON `json:"-"` +} + +// httpTimeseriesGroupPostQuantumResponseJSON contains the JSON metadata for the +// struct [HTTPTimeseriesGroupPostQuantumResponse] +type httpTimeseriesGroupPostQuantumResponseJSON struct { + Meta apijson.Field + Serie0 apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *HTTPTimeseriesGroupPostQuantumResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r httpTimeseriesGroupPostQuantumResponseJSON) RawJSON() string { + return r.raw +} + +type HTTPTimeseriesGroupPostQuantumResponseSerie0 struct { + NotSupported []string `json:"NOT_SUPPORTED,required"` + Supported []string `json:"SUPPORTED,required"` + Timestamps []string `json:"timestamps,required"` + JSON httpTimeseriesGroupPostQuantumResponseSerie0JSON `json:"-"` +} + +// httpTimeseriesGroupPostQuantumResponseSerie0JSON contains the JSON metadata for +// the struct [HTTPTimeseriesGroupPostQuantumResponseSerie0] +type httpTimeseriesGroupPostQuantumResponseSerie0JSON struct { + NotSupported apijson.Field + Supported apijson.Field + Timestamps apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *HTTPTimeseriesGroupPostQuantumResponseSerie0) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r httpTimeseriesGroupPostQuantumResponseSerie0JSON) RawJSON() string { + return r.raw +} + type HTTPTimeseriesGroupTLSVersionResponse struct { Meta interface{} `json:"meta,required"` Serie0 HTTPTimeseriesGroupTLSVersionResponseSerie0 `json:"serie_0,required"` @@ -2541,6 +2603,263 @@ func (r httpTimeseriesGroupOSResponseEnvelopeJSON) RawJSON() string { return r.raw } +type HTTPTimeseriesGroupPostQuantumParams struct { + // Aggregation interval results should be returned in (for example, in 15 minutes + // or 1 hour intervals). Refer to + // [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). + AggInterval param.Field[HTTPTimeseriesGroupPostQuantumParamsAggInterval] `query:"aggInterval"` + // Array of comma separated list of ASNs, start with `-` to exclude from results. + // For example, `-174, 3356` excludes results from AS174, but includes results from + // AS3356. + ASN param.Field[[]string] `query:"asn"` + // Filter for bot class. Refer to + // [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/). + BotClass param.Field[[]HTTPTimeseriesGroupPostQuantumParamsBotClass] `query:"botClass"` + // Array of comma separated list of continents (alpha-2 continent codes). Start + // with `-` to exclude from results. For example, `-EU,NA` excludes results from + // Europe, but includes results from North America. + Continent param.Field[[]string] `query:"continent"` + // End of the date range (inclusive). + DateEnd param.Field[[]time.Time] `query:"dateEnd" format:"date-time"` + // For example, use `7d` and `7dControl` to compare this week with the previous + // week. Use this parameter or set specific start and end dates (`dateStart` and + // `dateEnd` parameters). + DateRange param.Field[[]HTTPTimeseriesGroupPostQuantumParamsDateRange] `query:"dateRange"` + // Array of datetimes to filter the start of a series. + DateStart param.Field[[]time.Time] `query:"dateStart" format:"date-time"` + // Filter for device type. + DeviceType param.Field[[]HTTPTimeseriesGroupPostQuantumParamsDeviceType] `query:"deviceType"` + // Format results are returned in. + Format param.Field[HTTPTimeseriesGroupPostQuantumParamsFormat] `query:"format"` + // Filter for http protocol. + HTTPProtocol param.Field[[]HTTPTimeseriesGroupPostQuantumParamsHTTPProtocol] `query:"httpProtocol"` + // Filter for http version. + HTTPVersion param.Field[[]HTTPTimeseriesGroupPostQuantumParamsHTTPVersion] `query:"httpVersion"` + // Filter for ip version. + IPVersion param.Field[[]HTTPTimeseriesGroupPostQuantumParamsIPVersion] `query:"ipVersion"` + // Array of comma separated list of locations (alpha-2 country codes). Start with + // `-` to exclude from results. For example, `-US,PT` excludes results from the US, + // but includes results from PT. + Location param.Field[[]string] `query:"location"` + // Array of names that will be used to name the series in responses. + Name param.Field[[]string] `query:"name"` + // Filter for os name. + OS param.Field[[]HTTPTimeseriesGroupPostQuantumParamsOS] `query:"os"` + // Filter for tls version. + TLSVersion param.Field[[]HTTPTimeseriesGroupPostQuantumParamsTLSVersion] `query:"tlsVersion"` +} + +// URLQuery serializes [HTTPTimeseriesGroupPostQuantumParams]'s query parameters as +// `url.Values`. +func (r HTTPTimeseriesGroupPostQuantumParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatRepeat, + NestedFormat: apiquery.NestedQueryFormatBrackets, + }) +} + +// Aggregation interval results should be returned in (for example, in 15 minutes +// or 1 hour intervals). Refer to +// [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). +type HTTPTimeseriesGroupPostQuantumParamsAggInterval string + +const ( + HTTPTimeseriesGroupPostQuantumParamsAggInterval15m HTTPTimeseriesGroupPostQuantumParamsAggInterval = "15m" + HTTPTimeseriesGroupPostQuantumParamsAggInterval1h HTTPTimeseriesGroupPostQuantumParamsAggInterval = "1h" + HTTPTimeseriesGroupPostQuantumParamsAggInterval1d HTTPTimeseriesGroupPostQuantumParamsAggInterval = "1d" + HTTPTimeseriesGroupPostQuantumParamsAggInterval1w HTTPTimeseriesGroupPostQuantumParamsAggInterval = "1w" +) + +func (r HTTPTimeseriesGroupPostQuantumParamsAggInterval) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupPostQuantumParamsAggInterval15m, HTTPTimeseriesGroupPostQuantumParamsAggInterval1h, HTTPTimeseriesGroupPostQuantumParamsAggInterval1d, HTTPTimeseriesGroupPostQuantumParamsAggInterval1w: + return true + } + return false +} + +type HTTPTimeseriesGroupPostQuantumParamsBotClass string + +const ( + HTTPTimeseriesGroupPostQuantumParamsBotClassLikelyAutomated HTTPTimeseriesGroupPostQuantumParamsBotClass = "LIKELY_AUTOMATED" + HTTPTimeseriesGroupPostQuantumParamsBotClassLikelyHuman HTTPTimeseriesGroupPostQuantumParamsBotClass = "LIKELY_HUMAN" +) + +func (r HTTPTimeseriesGroupPostQuantumParamsBotClass) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupPostQuantumParamsBotClassLikelyAutomated, HTTPTimeseriesGroupPostQuantumParamsBotClassLikelyHuman: + return true + } + return false +} + +type HTTPTimeseriesGroupPostQuantumParamsDateRange string + +const ( + HTTPTimeseriesGroupPostQuantumParamsDateRange1d HTTPTimeseriesGroupPostQuantumParamsDateRange = "1d" + HTTPTimeseriesGroupPostQuantumParamsDateRange2d HTTPTimeseriesGroupPostQuantumParamsDateRange = "2d" + HTTPTimeseriesGroupPostQuantumParamsDateRange7d HTTPTimeseriesGroupPostQuantumParamsDateRange = "7d" + HTTPTimeseriesGroupPostQuantumParamsDateRange14d HTTPTimeseriesGroupPostQuantumParamsDateRange = "14d" + HTTPTimeseriesGroupPostQuantumParamsDateRange28d HTTPTimeseriesGroupPostQuantumParamsDateRange = "28d" + HTTPTimeseriesGroupPostQuantumParamsDateRange12w HTTPTimeseriesGroupPostQuantumParamsDateRange = "12w" + HTTPTimeseriesGroupPostQuantumParamsDateRange24w HTTPTimeseriesGroupPostQuantumParamsDateRange = "24w" + HTTPTimeseriesGroupPostQuantumParamsDateRange52w HTTPTimeseriesGroupPostQuantumParamsDateRange = "52w" + HTTPTimeseriesGroupPostQuantumParamsDateRange1dControl HTTPTimeseriesGroupPostQuantumParamsDateRange = "1dControl" + HTTPTimeseriesGroupPostQuantumParamsDateRange2dControl HTTPTimeseriesGroupPostQuantumParamsDateRange = "2dControl" + HTTPTimeseriesGroupPostQuantumParamsDateRange7dControl HTTPTimeseriesGroupPostQuantumParamsDateRange = "7dControl" + HTTPTimeseriesGroupPostQuantumParamsDateRange14dControl HTTPTimeseriesGroupPostQuantumParamsDateRange = "14dControl" + HTTPTimeseriesGroupPostQuantumParamsDateRange28dControl HTTPTimeseriesGroupPostQuantumParamsDateRange = "28dControl" + HTTPTimeseriesGroupPostQuantumParamsDateRange12wControl HTTPTimeseriesGroupPostQuantumParamsDateRange = "12wControl" + HTTPTimeseriesGroupPostQuantumParamsDateRange24wControl HTTPTimeseriesGroupPostQuantumParamsDateRange = "24wControl" +) + +func (r HTTPTimeseriesGroupPostQuantumParamsDateRange) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupPostQuantumParamsDateRange1d, HTTPTimeseriesGroupPostQuantumParamsDateRange2d, HTTPTimeseriesGroupPostQuantumParamsDateRange7d, HTTPTimeseriesGroupPostQuantumParamsDateRange14d, HTTPTimeseriesGroupPostQuantumParamsDateRange28d, HTTPTimeseriesGroupPostQuantumParamsDateRange12w, HTTPTimeseriesGroupPostQuantumParamsDateRange24w, HTTPTimeseriesGroupPostQuantumParamsDateRange52w, HTTPTimeseriesGroupPostQuantumParamsDateRange1dControl, HTTPTimeseriesGroupPostQuantumParamsDateRange2dControl, HTTPTimeseriesGroupPostQuantumParamsDateRange7dControl, HTTPTimeseriesGroupPostQuantumParamsDateRange14dControl, HTTPTimeseriesGroupPostQuantumParamsDateRange28dControl, HTTPTimeseriesGroupPostQuantumParamsDateRange12wControl, HTTPTimeseriesGroupPostQuantumParamsDateRange24wControl: + return true + } + return false +} + +type HTTPTimeseriesGroupPostQuantumParamsDeviceType string + +const ( + HTTPTimeseriesGroupPostQuantumParamsDeviceTypeDesktop HTTPTimeseriesGroupPostQuantumParamsDeviceType = "DESKTOP" + HTTPTimeseriesGroupPostQuantumParamsDeviceTypeMobile HTTPTimeseriesGroupPostQuantumParamsDeviceType = "MOBILE" + HTTPTimeseriesGroupPostQuantumParamsDeviceTypeOther HTTPTimeseriesGroupPostQuantumParamsDeviceType = "OTHER" +) + +func (r HTTPTimeseriesGroupPostQuantumParamsDeviceType) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupPostQuantumParamsDeviceTypeDesktop, HTTPTimeseriesGroupPostQuantumParamsDeviceTypeMobile, HTTPTimeseriesGroupPostQuantumParamsDeviceTypeOther: + return true + } + return false +} + +// Format results are returned in. +type HTTPTimeseriesGroupPostQuantumParamsFormat string + +const ( + HTTPTimeseriesGroupPostQuantumParamsFormatJson HTTPTimeseriesGroupPostQuantumParamsFormat = "JSON" + HTTPTimeseriesGroupPostQuantumParamsFormatCsv HTTPTimeseriesGroupPostQuantumParamsFormat = "CSV" +) + +func (r HTTPTimeseriesGroupPostQuantumParamsFormat) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupPostQuantumParamsFormatJson, HTTPTimeseriesGroupPostQuantumParamsFormatCsv: + return true + } + return false +} + +type HTTPTimeseriesGroupPostQuantumParamsHTTPProtocol string + +const ( + HTTPTimeseriesGroupPostQuantumParamsHTTPProtocolHTTP HTTPTimeseriesGroupPostQuantumParamsHTTPProtocol = "HTTP" + HTTPTimeseriesGroupPostQuantumParamsHTTPProtocolHTTPS HTTPTimeseriesGroupPostQuantumParamsHTTPProtocol = "HTTPS" +) + +func (r HTTPTimeseriesGroupPostQuantumParamsHTTPProtocol) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupPostQuantumParamsHTTPProtocolHTTP, HTTPTimeseriesGroupPostQuantumParamsHTTPProtocolHTTPS: + return true + } + return false +} + +type HTTPTimeseriesGroupPostQuantumParamsHTTPVersion string + +const ( + HTTPTimeseriesGroupPostQuantumParamsHTTPVersionHttPv1 HTTPTimeseriesGroupPostQuantumParamsHTTPVersion = "HTTPv1" + HTTPTimeseriesGroupPostQuantumParamsHTTPVersionHttPv2 HTTPTimeseriesGroupPostQuantumParamsHTTPVersion = "HTTPv2" + HTTPTimeseriesGroupPostQuantumParamsHTTPVersionHttPv3 HTTPTimeseriesGroupPostQuantumParamsHTTPVersion = "HTTPv3" +) + +func (r HTTPTimeseriesGroupPostQuantumParamsHTTPVersion) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupPostQuantumParamsHTTPVersionHttPv1, HTTPTimeseriesGroupPostQuantumParamsHTTPVersionHttPv2, HTTPTimeseriesGroupPostQuantumParamsHTTPVersionHttPv3: + return true + } + return false +} + +type HTTPTimeseriesGroupPostQuantumParamsIPVersion string + +const ( + HTTPTimeseriesGroupPostQuantumParamsIPVersionIPv4 HTTPTimeseriesGroupPostQuantumParamsIPVersion = "IPv4" + HTTPTimeseriesGroupPostQuantumParamsIPVersionIPv6 HTTPTimeseriesGroupPostQuantumParamsIPVersion = "IPv6" +) + +func (r HTTPTimeseriesGroupPostQuantumParamsIPVersion) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupPostQuantumParamsIPVersionIPv4, HTTPTimeseriesGroupPostQuantumParamsIPVersionIPv6: + return true + } + return false +} + +type HTTPTimeseriesGroupPostQuantumParamsOS string + +const ( + HTTPTimeseriesGroupPostQuantumParamsOSWindows HTTPTimeseriesGroupPostQuantumParamsOS = "WINDOWS" + HTTPTimeseriesGroupPostQuantumParamsOSMacosx HTTPTimeseriesGroupPostQuantumParamsOS = "MACOSX" + HTTPTimeseriesGroupPostQuantumParamsOSIos HTTPTimeseriesGroupPostQuantumParamsOS = "IOS" + HTTPTimeseriesGroupPostQuantumParamsOSAndroid HTTPTimeseriesGroupPostQuantumParamsOS = "ANDROID" + HTTPTimeseriesGroupPostQuantumParamsOSChromeos HTTPTimeseriesGroupPostQuantumParamsOS = "CHROMEOS" + HTTPTimeseriesGroupPostQuantumParamsOSLinux HTTPTimeseriesGroupPostQuantumParamsOS = "LINUX" + HTTPTimeseriesGroupPostQuantumParamsOSSmartTv HTTPTimeseriesGroupPostQuantumParamsOS = "SMART_TV" +) + +func (r HTTPTimeseriesGroupPostQuantumParamsOS) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupPostQuantumParamsOSWindows, HTTPTimeseriesGroupPostQuantumParamsOSMacosx, HTTPTimeseriesGroupPostQuantumParamsOSIos, HTTPTimeseriesGroupPostQuantumParamsOSAndroid, HTTPTimeseriesGroupPostQuantumParamsOSChromeos, HTTPTimeseriesGroupPostQuantumParamsOSLinux, HTTPTimeseriesGroupPostQuantumParamsOSSmartTv: + return true + } + return false +} + +type HTTPTimeseriesGroupPostQuantumParamsTLSVersion string + +const ( + HTTPTimeseriesGroupPostQuantumParamsTLSVersionTlSv1_0 HTTPTimeseriesGroupPostQuantumParamsTLSVersion = "TLSv1_0" + HTTPTimeseriesGroupPostQuantumParamsTLSVersionTlSv1_1 HTTPTimeseriesGroupPostQuantumParamsTLSVersion = "TLSv1_1" + HTTPTimeseriesGroupPostQuantumParamsTLSVersionTlSv1_2 HTTPTimeseriesGroupPostQuantumParamsTLSVersion = "TLSv1_2" + HTTPTimeseriesGroupPostQuantumParamsTLSVersionTlSv1_3 HTTPTimeseriesGroupPostQuantumParamsTLSVersion = "TLSv1_3" + HTTPTimeseriesGroupPostQuantumParamsTLSVersionTlSvQuic HTTPTimeseriesGroupPostQuantumParamsTLSVersion = "TLSvQUIC" +) + +func (r HTTPTimeseriesGroupPostQuantumParamsTLSVersion) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupPostQuantumParamsTLSVersionTlSv1_0, HTTPTimeseriesGroupPostQuantumParamsTLSVersionTlSv1_1, HTTPTimeseriesGroupPostQuantumParamsTLSVersionTlSv1_2, HTTPTimeseriesGroupPostQuantumParamsTLSVersionTlSv1_3, HTTPTimeseriesGroupPostQuantumParamsTLSVersionTlSvQuic: + return true + } + return false +} + +type HTTPTimeseriesGroupPostQuantumResponseEnvelope struct { + Result HTTPTimeseriesGroupPostQuantumResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON httpTimeseriesGroupPostQuantumResponseEnvelopeJSON `json:"-"` +} + +// httpTimeseriesGroupPostQuantumResponseEnvelopeJSON contains the JSON metadata +// for the struct [HTTPTimeseriesGroupPostQuantumResponseEnvelope] +type httpTimeseriesGroupPostQuantumResponseEnvelopeJSON struct { + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *HTTPTimeseriesGroupPostQuantumResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r httpTimeseriesGroupPostQuantumResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + type HTTPTimeseriesGroupTLSVersionParams struct { // Aggregation interval results should be returned in (for example, in 15 minutes // or 1 hour intervals). Refer to diff --git a/radar/httptimeseriesgroup_test.go b/radar/httptimeseriesgroup_test.go index f7fd68ef1b..278a4022ff 100644 --- a/radar/httptimeseriesgroup_test.go +++ b/radar/httptimeseriesgroup_test.go @@ -330,6 +330,46 @@ func TestHTTPTimeseriesGroupOSWithOptionalParams(t *testing.T) { } } +func TestHTTPTimeseriesGroupPostQuantumWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Radar.HTTP.TimeseriesGroups.PostQuantum(context.TODO(), radar.HTTPTimeseriesGroupPostQuantumParams{ + AggInterval: cloudflare.F(radar.HTTPTimeseriesGroupPostQuantumParamsAggInterval1h), + ASN: cloudflare.F([]string{"string", "string", "string"}), + BotClass: cloudflare.F([]radar.HTTPTimeseriesGroupPostQuantumParamsBotClass{radar.HTTPTimeseriesGroupPostQuantumParamsBotClassLikelyAutomated, radar.HTTPTimeseriesGroupPostQuantumParamsBotClassLikelyHuman}), + Continent: cloudflare.F([]string{"string", "string", "string"}), + DateEnd: cloudflare.F([]time.Time{time.Now(), time.Now(), time.Now()}), + DateRange: cloudflare.F([]radar.HTTPTimeseriesGroupPostQuantumParamsDateRange{radar.HTTPTimeseriesGroupPostQuantumParamsDateRange1d, radar.HTTPTimeseriesGroupPostQuantumParamsDateRange2d, radar.HTTPTimeseriesGroupPostQuantumParamsDateRange7d}), + DateStart: cloudflare.F([]time.Time{time.Now(), time.Now(), time.Now()}), + DeviceType: cloudflare.F([]radar.HTTPTimeseriesGroupPostQuantumParamsDeviceType{radar.HTTPTimeseriesGroupPostQuantumParamsDeviceTypeDesktop, radar.HTTPTimeseriesGroupPostQuantumParamsDeviceTypeMobile, radar.HTTPTimeseriesGroupPostQuantumParamsDeviceTypeOther}), + Format: cloudflare.F(radar.HTTPTimeseriesGroupPostQuantumParamsFormatJson), + HTTPProtocol: cloudflare.F([]radar.HTTPTimeseriesGroupPostQuantumParamsHTTPProtocol{radar.HTTPTimeseriesGroupPostQuantumParamsHTTPProtocolHTTP, radar.HTTPTimeseriesGroupPostQuantumParamsHTTPProtocolHTTPS}), + HTTPVersion: cloudflare.F([]radar.HTTPTimeseriesGroupPostQuantumParamsHTTPVersion{radar.HTTPTimeseriesGroupPostQuantumParamsHTTPVersionHttPv1, radar.HTTPTimeseriesGroupPostQuantumParamsHTTPVersionHttPv2, radar.HTTPTimeseriesGroupPostQuantumParamsHTTPVersionHttPv3}), + IPVersion: cloudflare.F([]radar.HTTPTimeseriesGroupPostQuantumParamsIPVersion{radar.HTTPTimeseriesGroupPostQuantumParamsIPVersionIPv4, radar.HTTPTimeseriesGroupPostQuantumParamsIPVersionIPv6}), + Location: cloudflare.F([]string{"string", "string", "string"}), + Name: cloudflare.F([]string{"string", "string", "string"}), + OS: cloudflare.F([]radar.HTTPTimeseriesGroupPostQuantumParamsOS{radar.HTTPTimeseriesGroupPostQuantumParamsOSWindows, radar.HTTPTimeseriesGroupPostQuantumParamsOSMacosx, radar.HTTPTimeseriesGroupPostQuantumParamsOSIos}), + TLSVersion: cloudflare.F([]radar.HTTPTimeseriesGroupPostQuantumParamsTLSVersion{radar.HTTPTimeseriesGroupPostQuantumParamsTLSVersionTlSv1_0, radar.HTTPTimeseriesGroupPostQuantumParamsTLSVersionTlSv1_1, radar.HTTPTimeseriesGroupPostQuantumParamsTLSVersionTlSv1_2}), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + func TestHTTPTimeseriesGroupTLSVersionWithOptionalParams(t *testing.T) { baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { diff --git a/snippets/content.go b/snippets/content.go index fccdefc648..71339be23f 100644 --- a/snippets/content.go +++ b/snippets/content.go @@ -3,6 +3,12 @@ package snippets import ( + "context" + "fmt" + "net/http" + + "github.com/cloudflare/cloudflare-go/v2/internal/param" + "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" ) @@ -22,3 +28,17 @@ func NewContentService(opts ...option.RequestOption) (r *ContentService) { r.Options = opts return } + +// Snippet Content +func (r *ContentService) Get(ctx context.Context, snippetName string, query ContentGetParams, opts ...option.RequestOption) (res *http.Response, err error) { + opts = append(r.Options[:], opts...) + opts = append([]option.RequestOption{option.WithHeader("Accept", "multipart/form-data")}, opts...) + path := fmt.Sprintf("zones/%s/snippets/%s/content", query.ZoneID, snippetName) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + return +} + +type ContentGetParams struct { + // Identifier + ZoneID param.Field[string] `path:"zone_id,required"` +} diff --git a/snippets/content_test.go b/snippets/content_test.go new file mode 100644 index 0000000000..a7c3080863 --- /dev/null +++ b/snippets/content_test.go @@ -0,0 +1,58 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package snippets_test + +import ( + "bytes" + "context" + "errors" + "io" + "net/http" + "net/http/httptest" + "testing" + + "github.com/cloudflare/cloudflare-go/v2" + "github.com/cloudflare/cloudflare-go/v2/option" + "github.com/cloudflare/cloudflare-go/v2/snippets" +) + +func TestContentGet(t *testing.T) { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(200) + w.Write([]byte("abc")) + })) + defer server.Close() + baseURL := server.URL + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + resp, err := client.Snippets.Content.Get( + context.TODO(), + "snippet_name_01", + snippets.ContentGetParams{ + ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } + defer resp.Body.Close() + + b, err := io.ReadAll(resp.Body) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } + if !bytes.Equal(b, []byte("abc")) { + t.Fatalf("return value not %s: %s", "abc", b) + } +} diff --git a/snippets/rule.go b/snippets/rule.go index 5504717e45..3065fd02f3 100644 --- a/snippets/rule.go +++ b/snippets/rule.go @@ -3,7 +3,16 @@ package snippets import ( + "context" + "fmt" + "net/http" + + "github.com/cloudflare/cloudflare-go/v2/internal/apijson" + "github.com/cloudflare/cloudflare-go/v2/internal/pagination" + "github.com/cloudflare/cloudflare-go/v2/internal/param" + "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" + "github.com/cloudflare/cloudflare-go/v2/shared" ) // RuleService contains methods and other services that help with interacting with @@ -22,3 +31,167 @@ func NewRuleService(opts ...option.RequestOption) (r *RuleService) { r.Options = opts return } + +// Put Rules +func (r *RuleService) Update(ctx context.Context, params RuleUpdateParams, opts ...option.RequestOption) (res *[]RuleUpdateResponse, err error) { + opts = append(r.Options[:], opts...) + var env RuleUpdateResponseEnvelope + path := fmt.Sprintf("zones/%s/snippets/snippet_rules", params.ZoneID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Rules +func (r *RuleService) List(ctx context.Context, query RuleListParams, opts ...option.RequestOption) (res *pagination.SinglePage[RuleListResponse], err error) { + var raw *http.Response + opts = append(r.Options, opts...) + opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) + path := fmt.Sprintf("zones/%s/snippets/snippet_rules", query.ZoneID) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) + if err != nil { + return nil, err + } + err = cfg.Execute() + if err != nil { + return nil, err + } + res.SetPageConfig(cfg, raw) + return res, nil +} + +// Rules +func (r *RuleService) ListAutoPaging(ctx context.Context, query RuleListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[RuleListResponse] { + return pagination.NewSinglePageAutoPager(r.List(ctx, query, opts...)) +} + +type RuleUpdateResponse struct { + Description string `json:"description"` + Enabled bool `json:"enabled"` + Expression string `json:"expression"` + // Snippet identifying name + SnippetName string `json:"snippet_name"` + JSON ruleUpdateResponseJSON `json:"-"` +} + +// ruleUpdateResponseJSON contains the JSON metadata for the struct +// [RuleUpdateResponse] +type ruleUpdateResponseJSON struct { + Description apijson.Field + Enabled apijson.Field + Expression apijson.Field + SnippetName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RuleUpdateResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r ruleUpdateResponseJSON) RawJSON() string { + return r.raw +} + +type RuleListResponse struct { + Description string `json:"description"` + Enabled bool `json:"enabled"` + Expression string `json:"expression"` + // Snippet identifying name + SnippetName string `json:"snippet_name"` + JSON ruleListResponseJSON `json:"-"` +} + +// ruleListResponseJSON contains the JSON metadata for the struct +// [RuleListResponse] +type ruleListResponseJSON struct { + Description apijson.Field + Enabled apijson.Field + Expression apijson.Field + SnippetName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RuleListResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r ruleListResponseJSON) RawJSON() string { + return r.raw +} + +type RuleUpdateParams struct { + // Identifier + ZoneID param.Field[string] `path:"zone_id,required"` + // List of snippet rules + Rules param.Field[[]RuleUpdateParamsRule] `json:"rules"` +} + +func (r RuleUpdateParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type RuleUpdateParamsRule struct { + Description param.Field[string] `json:"description"` + Enabled param.Field[bool] `json:"enabled"` + Expression param.Field[string] `json:"expression"` + // Snippet identifying name + SnippetName param.Field[string] `json:"snippet_name"` +} + +func (r RuleUpdateParamsRule) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type RuleUpdateResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RuleUpdateResponseEnvelopeSuccess `json:"success,required"` + // List of snippet rules + Result []RuleUpdateResponse `json:"result"` + JSON ruleUpdateResponseEnvelopeJSON `json:"-"` +} + +// ruleUpdateResponseEnvelopeJSON contains the JSON metadata for the struct +// [RuleUpdateResponseEnvelope] +type ruleUpdateResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RuleUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r ruleUpdateResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RuleUpdateResponseEnvelopeSuccess bool + +const ( + RuleUpdateResponseEnvelopeSuccessTrue RuleUpdateResponseEnvelopeSuccess = true +) + +func (r RuleUpdateResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case RuleUpdateResponseEnvelopeSuccessTrue: + return true + } + return false +} + +type RuleListParams struct { + // Identifier + ZoneID param.Field[string] `path:"zone_id,required"` +} diff --git a/snippets/rule_test.go b/snippets/rule_test.go new file mode 100644 index 0000000000..4ffb27c49c --- /dev/null +++ b/snippets/rule_test.go @@ -0,0 +1,81 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package snippets_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go/v2" + "github.com/cloudflare/cloudflare-go/v2/internal/testutil" + "github.com/cloudflare/cloudflare-go/v2/option" + "github.com/cloudflare/cloudflare-go/v2/snippets" +) + +func TestRuleUpdateWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Snippets.Rules.Update(context.TODO(), snippets.RuleUpdateParams{ + ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + Rules: cloudflare.F([]snippets.RuleUpdateParamsRule{{ + Description: cloudflare.F("Rule description"), + Enabled: cloudflare.F(true), + Expression: cloudflare.F("http.cookie eq \"a=b\""), + SnippetName: cloudflare.F("snippet_name_01"), + }, { + Description: cloudflare.F("Rule description"), + Enabled: cloudflare.F(true), + Expression: cloudflare.F("http.cookie eq \"a=b\""), + SnippetName: cloudflare.F("snippet_name_01"), + }, { + Description: cloudflare.F("Rule description"), + Enabled: cloudflare.F(true), + Expression: cloudflare.F("http.cookie eq \"a=b\""), + SnippetName: cloudflare.F("snippet_name_01"), + }}), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestRuleList(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Snippets.Rules.List(context.TODO(), snippets.RuleListParams{ + ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/snippets/snippet.go b/snippets/snippet.go index ae4c416e63..3b69497cb5 100644 --- a/snippets/snippet.go +++ b/snippets/snippet.go @@ -3,7 +3,16 @@ package snippets import ( + "context" + "fmt" + "net/http" + + "github.com/cloudflare/cloudflare-go/v2/internal/apijson" + "github.com/cloudflare/cloudflare-go/v2/internal/pagination" + "github.com/cloudflare/cloudflare-go/v2/internal/param" + "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" + "github.com/cloudflare/cloudflare-go/v2/shared" ) // SnippetService contains methods and other services that help with interacting @@ -26,3 +35,253 @@ func NewSnippetService(opts ...option.RequestOption) (r *SnippetService) { r.Rules = NewRuleService(opts...) return } + +// Put Snippet +func (r *SnippetService) Update(ctx context.Context, snippetName string, params SnippetUpdateParams, opts ...option.RequestOption) (res *Snippet, err error) { + opts = append(r.Options[:], opts...) + var env SnippetUpdateResponseEnvelope + path := fmt.Sprintf("zones/%s/snippets/%s", params.ZoneID, snippetName) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// All Snippets +func (r *SnippetService) List(ctx context.Context, query SnippetListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Snippet], err error) { + var raw *http.Response + opts = append(r.Options, opts...) + opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) + path := fmt.Sprintf("zones/%s/snippets", query.ZoneID) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) + if err != nil { + return nil, err + } + err = cfg.Execute() + if err != nil { + return nil, err + } + res.SetPageConfig(cfg, raw) + return res, nil +} + +// All Snippets +func (r *SnippetService) ListAutoPaging(ctx context.Context, query SnippetListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Snippet] { + return pagination.NewSinglePageAutoPager(r.List(ctx, query, opts...)) +} + +// Delete Snippet +func (r *SnippetService) Delete(ctx context.Context, snippetName string, body SnippetDeleteParams, opts ...option.RequestOption) (res *SnippetDeleteResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("zones/%s/snippets/%s", body.ZoneID, snippetName) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + return +} + +// Snippet +func (r *SnippetService) Get(ctx context.Context, snippetName string, query SnippetGetParams, opts ...option.RequestOption) (res *Snippet, err error) { + opts = append(r.Options[:], opts...) + var env SnippetGetResponseEnvelope + path := fmt.Sprintf("zones/%s/snippets/%s", query.ZoneID, snippetName) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Snippet Information +type Snippet struct { + // Creation time of the snippet + CreatedOn string `json:"created_on"` + // Modification time of the snippet + ModifiedOn string `json:"modified_on"` + // Snippet identifying name + SnippetName string `json:"snippet_name"` + JSON snippetJSON `json:"-"` +} + +// snippetJSON contains the JSON metadata for the struct [Snippet] +type snippetJSON struct { + CreatedOn apijson.Field + ModifiedOn apijson.Field + SnippetName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *Snippet) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r snippetJSON) RawJSON() string { + return r.raw +} + +type SnippetDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success SnippetDeleteResponseSuccess `json:"success,required"` + JSON snippetDeleteResponseJSON `json:"-"` +} + +// snippetDeleteResponseJSON contains the JSON metadata for the struct +// [SnippetDeleteResponse] +type snippetDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SnippetDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r snippetDeleteResponseJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type SnippetDeleteResponseSuccess bool + +const ( + SnippetDeleteResponseSuccessTrue SnippetDeleteResponseSuccess = true +) + +func (r SnippetDeleteResponseSuccess) IsKnown() bool { + switch r { + case SnippetDeleteResponseSuccessTrue: + return true + } + return false +} + +type SnippetUpdateParams struct { + // Identifier + ZoneID param.Field[string] `path:"zone_id,required"` + // Content files of uploaded snippet + Files param.Field[string] `json:"files"` + Metadata param.Field[SnippetUpdateParamsMetadata] `json:"metadata"` +} + +func (r SnippetUpdateParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type SnippetUpdateParamsMetadata struct { + // Main module name of uploaded snippet + MainModule param.Field[string] `json:"main_module"` +} + +func (r SnippetUpdateParamsMetadata) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type SnippetUpdateResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success SnippetUpdateResponseEnvelopeSuccess `json:"success,required"` + // Snippet Information + Result Snippet `json:"result"` + JSON snippetUpdateResponseEnvelopeJSON `json:"-"` +} + +// snippetUpdateResponseEnvelopeJSON contains the JSON metadata for the struct +// [SnippetUpdateResponseEnvelope] +type snippetUpdateResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SnippetUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r snippetUpdateResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type SnippetUpdateResponseEnvelopeSuccess bool + +const ( + SnippetUpdateResponseEnvelopeSuccessTrue SnippetUpdateResponseEnvelopeSuccess = true +) + +func (r SnippetUpdateResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case SnippetUpdateResponseEnvelopeSuccessTrue: + return true + } + return false +} + +type SnippetListParams struct { + // Identifier + ZoneID param.Field[string] `path:"zone_id,required"` +} + +type SnippetDeleteParams struct { + // Identifier + ZoneID param.Field[string] `path:"zone_id,required"` +} + +type SnippetGetParams struct { + // Identifier + ZoneID param.Field[string] `path:"zone_id,required"` +} + +type SnippetGetResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success SnippetGetResponseEnvelopeSuccess `json:"success,required"` + // Snippet Information + Result Snippet `json:"result"` + JSON snippetGetResponseEnvelopeJSON `json:"-"` +} + +// snippetGetResponseEnvelopeJSON contains the JSON metadata for the struct +// [SnippetGetResponseEnvelope] +type snippetGetResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SnippetGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r snippetGetResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type SnippetGetResponseEnvelopeSuccess bool + +const ( + SnippetGetResponseEnvelopeSuccessTrue SnippetGetResponseEnvelopeSuccess = true +) + +func (r SnippetGetResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case SnippetGetResponseEnvelopeSuccessTrue: + return true + } + return false +} diff --git a/snippets/snippet_test.go b/snippets/snippet_test.go new file mode 100644 index 0000000000..568d017b55 --- /dev/null +++ b/snippets/snippet_test.go @@ -0,0 +1,131 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package snippets_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go/v2" + "github.com/cloudflare/cloudflare-go/v2/internal/testutil" + "github.com/cloudflare/cloudflare-go/v2/option" + "github.com/cloudflare/cloudflare-go/v2/snippets" +) + +func TestSnippetUpdateWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Snippets.Update( + context.TODO(), + "snippet_name_01", + snippets.SnippetUpdateParams{ + ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + Files: cloudflare.F("export { async function fetch(request, env) {return new Response('some_response') } }"), + Metadata: cloudflare.F(snippets.SnippetUpdateParamsMetadata{ + MainModule: cloudflare.F("main.js"), + }), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSnippetList(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Snippets.List(context.TODO(), snippets.SnippetListParams{ + ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSnippetDelete(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Snippets.Delete( + context.TODO(), + "snippet_name_01", + snippets.SnippetDeleteParams{ + ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSnippetGet(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Snippets.Get( + context.TODO(), + "snippet_name_01", + snippets.SnippetGetParams{ + ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/web3/hostname.go b/web3/hostname.go index 981241cc4a..1580dbdba3 100644 --- a/web3/hostname.go +++ b/web3/hostname.go @@ -36,7 +36,7 @@ func NewHostnameService(opts ...option.RequestOption) (r *HostnameService) { } // Create Web3 Hostname -func (r *HostnameService) New(ctx context.Context, zoneIdentifier string, body HostnameNewParams, opts ...option.RequestOption) (res *HostnameNewResponse, err error) { +func (r *HostnameService) New(ctx context.Context, zoneIdentifier string, body HostnameNewParams, opts ...option.RequestOption) (res *Hostname, err error) { opts = append(r.Options[:], opts...) var env HostnameNewResponseEnvelope path := fmt.Sprintf("zones/%s/web3/hostnames", zoneIdentifier) @@ -49,7 +49,7 @@ func (r *HostnameService) New(ctx context.Context, zoneIdentifier string, body H } // List Web3 Hostnames -func (r *HostnameService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *pagination.SinglePage[HostnameListResponse], err error) { +func (r *HostnameService) List(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *pagination.SinglePage[Hostname], 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 *HostnameService) List(ctx context.Context, zoneIdentifier string, opts } // List Web3 Hostnames -func (r *HostnameService) ListAutoPaging(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) *pagination.SinglePageAutoPager[HostnameListResponse] { +func (r *HostnameService) ListAutoPaging(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Hostname] { return pagination.NewSinglePageAutoPager(r.List(ctx, zoneIdentifier, opts...)) } @@ -85,7 +85,7 @@ func (r *HostnameService) Delete(ctx context.Context, zoneIdentifier string, ide } // Edit Web3 Hostname -func (r *HostnameService) Edit(ctx context.Context, zoneIdentifier string, identifier string, body HostnameEditParams, opts ...option.RequestOption) (res *HostnameEditResponse, err error) { +func (r *HostnameService) Edit(ctx context.Context, zoneIdentifier string, identifier string, body HostnameEditParams, opts ...option.RequestOption) (res *Hostname, err error) { opts = append(r.Options[:], opts...) var env HostnameEditResponseEnvelope path := fmt.Sprintf("zones/%s/web3/hostnames/%s", zoneIdentifier, identifier) @@ -98,7 +98,7 @@ func (r *HostnameService) Edit(ctx context.Context, zoneIdentifier string, ident } // Web3 Hostname Details -func (r *HostnameService) Get(ctx context.Context, zoneIdentifier string, identifier string, opts ...option.RequestOption) (res *HostnameGetResponse, err error) { +func (r *HostnameService) Get(ctx context.Context, zoneIdentifier string, identifier string, opts ...option.RequestOption) (res *Hostname, err error) { opts = append(r.Options[:], opts...) var env HostnameGetResponseEnvelope path := fmt.Sprintf("zones/%s/web3/hostnames/%s", zoneIdentifier, identifier) @@ -110,7 +110,7 @@ func (r *HostnameService) Get(ctx context.Context, zoneIdentifier string, identi return } -type HostnameNewResponse struct { +type Hostname struct { // Identifier ID string `json:"id"` CreatedOn time.Time `json:"created_on" format:"date-time"` @@ -122,15 +122,14 @@ type HostnameNewResponse struct { // The hostname that will point to the target gateway via CNAME. Name string `json:"name"` // Status of the hostname's activation. - Status HostnameNewResponseStatus `json:"status"` + Status HostnameStatus `json:"status"` // Target gateway of the hostname. - Target HostnameNewResponseTarget `json:"target"` - JSON hostnameNewResponseJSON `json:"-"` + Target HostnameTarget `json:"target"` + JSON hostnameJSON `json:"-"` } -// hostnameNewResponseJSON contains the JSON metadata for the struct -// [HostnameNewResponse] -type hostnameNewResponseJSON struct { +// hostnameJSON contains the JSON metadata for the struct [Hostname] +type hostnameJSON struct { ID apijson.Field CreatedOn apijson.Field Description apijson.Field @@ -143,120 +142,46 @@ type hostnameNewResponseJSON struct { ExtraFields map[string]apijson.Field } -func (r *HostnameNewResponse) UnmarshalJSON(data []byte) (err error) { +func (r *Hostname) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r hostnameNewResponseJSON) RawJSON() string { +func (r hostnameJSON) RawJSON() string { return r.raw } -// Status of the hostname's activation. -type HostnameNewResponseStatus string - -const ( - HostnameNewResponseStatusActive HostnameNewResponseStatus = "active" - HostnameNewResponseStatusPending HostnameNewResponseStatus = "pending" - HostnameNewResponseStatusDeleting HostnameNewResponseStatus = "deleting" - HostnameNewResponseStatusError HostnameNewResponseStatus = "error" -) - -func (r HostnameNewResponseStatus) IsKnown() bool { - switch r { - case HostnameNewResponseStatusActive, HostnameNewResponseStatusPending, HostnameNewResponseStatusDeleting, HostnameNewResponseStatusError: - return true - } - return false -} - -// Target gateway of the hostname. -type HostnameNewResponseTarget string - -const ( - HostnameNewResponseTargetEthereum HostnameNewResponseTarget = "ethereum" - HostnameNewResponseTargetIPFS HostnameNewResponseTarget = "ipfs" - HostnameNewResponseTargetIPFSUniversalPath HostnameNewResponseTarget = "ipfs_universal_path" -) - -func (r HostnameNewResponseTarget) IsKnown() bool { - switch r { - case HostnameNewResponseTargetEthereum, HostnameNewResponseTargetIPFS, HostnameNewResponseTargetIPFSUniversalPath: - return true - } - return false -} - -type HostnameListResponse struct { - // Identifier - ID string `json:"id"` - CreatedOn time.Time `json:"created_on" format:"date-time"` - // An optional description of the hostname. - Description string `json:"description"` - // DNSLink value used if the target is ipfs. - Dnslink string `json:"dnslink"` - ModifiedOn time.Time `json:"modified_on" format:"date-time"` - // The hostname that will point to the target gateway via CNAME. - Name string `json:"name"` - // Status of the hostname's activation. - Status HostnameListResponseStatus `json:"status"` - // Target gateway of the hostname. - Target HostnameListResponseTarget `json:"target"` - JSON hostnameListResponseJSON `json:"-"` -} - -// hostnameListResponseJSON contains the JSON metadata for the struct -// [HostnameListResponse] -type hostnameListResponseJSON struct { - ID apijson.Field - CreatedOn apijson.Field - Description apijson.Field - Dnslink apijson.Field - ModifiedOn apijson.Field - Name apijson.Field - Status apijson.Field - Target apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *HostnameListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r hostnameListResponseJSON) RawJSON() string { - return r.raw -} +func (r Hostname) ImplementsRulesListItemGetResponseUnion() {} // Status of the hostname's activation. -type HostnameListResponseStatus string +type HostnameStatus string const ( - HostnameListResponseStatusActive HostnameListResponseStatus = "active" - HostnameListResponseStatusPending HostnameListResponseStatus = "pending" - HostnameListResponseStatusDeleting HostnameListResponseStatus = "deleting" - HostnameListResponseStatusError HostnameListResponseStatus = "error" + HostnameStatusActive HostnameStatus = "active" + HostnameStatusPending HostnameStatus = "pending" + HostnameStatusDeleting HostnameStatus = "deleting" + HostnameStatusError HostnameStatus = "error" ) -func (r HostnameListResponseStatus) IsKnown() bool { +func (r HostnameStatus) IsKnown() bool { switch r { - case HostnameListResponseStatusActive, HostnameListResponseStatusPending, HostnameListResponseStatusDeleting, HostnameListResponseStatusError: + case HostnameStatusActive, HostnameStatusPending, HostnameStatusDeleting, HostnameStatusError: return true } return false } // Target gateway of the hostname. -type HostnameListResponseTarget string +type HostnameTarget string const ( - HostnameListResponseTargetEthereum HostnameListResponseTarget = "ethereum" - HostnameListResponseTargetIPFS HostnameListResponseTarget = "ipfs" - HostnameListResponseTargetIPFSUniversalPath HostnameListResponseTarget = "ipfs_universal_path" + HostnameTargetEthereum HostnameTarget = "ethereum" + HostnameTargetIPFS HostnameTarget = "ipfs" + HostnameTargetIPFSUniversalPath HostnameTarget = "ipfs_universal_path" ) -func (r HostnameListResponseTarget) IsKnown() bool { +func (r HostnameTarget) IsKnown() bool { switch r { - case HostnameListResponseTargetEthereum, HostnameListResponseTargetIPFS, HostnameListResponseTargetIPFSUniversalPath: + case HostnameTargetEthereum, HostnameTargetIPFS, HostnameTargetIPFSUniversalPath: return true } return false @@ -284,158 +209,6 @@ func (r hostnameDeleteResponseJSON) RawJSON() string { return r.raw } -type HostnameEditResponse struct { - // Identifier - ID string `json:"id"` - CreatedOn time.Time `json:"created_on" format:"date-time"` - // An optional description of the hostname. - Description string `json:"description"` - // DNSLink value used if the target is ipfs. - Dnslink string `json:"dnslink"` - ModifiedOn time.Time `json:"modified_on" format:"date-time"` - // The hostname that will point to the target gateway via CNAME. - Name string `json:"name"` - // Status of the hostname's activation. - Status HostnameEditResponseStatus `json:"status"` - // Target gateway of the hostname. - Target HostnameEditResponseTarget `json:"target"` - JSON hostnameEditResponseJSON `json:"-"` -} - -// hostnameEditResponseJSON contains the JSON metadata for the struct -// [HostnameEditResponse] -type hostnameEditResponseJSON struct { - ID apijson.Field - CreatedOn apijson.Field - Description apijson.Field - Dnslink apijson.Field - ModifiedOn apijson.Field - Name apijson.Field - Status apijson.Field - Target apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *HostnameEditResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r hostnameEditResponseJSON) RawJSON() string { - return r.raw -} - -// Status of the hostname's activation. -type HostnameEditResponseStatus string - -const ( - HostnameEditResponseStatusActive HostnameEditResponseStatus = "active" - HostnameEditResponseStatusPending HostnameEditResponseStatus = "pending" - HostnameEditResponseStatusDeleting HostnameEditResponseStatus = "deleting" - HostnameEditResponseStatusError HostnameEditResponseStatus = "error" -) - -func (r HostnameEditResponseStatus) IsKnown() bool { - switch r { - case HostnameEditResponseStatusActive, HostnameEditResponseStatusPending, HostnameEditResponseStatusDeleting, HostnameEditResponseStatusError: - return true - } - return false -} - -// Target gateway of the hostname. -type HostnameEditResponseTarget string - -const ( - HostnameEditResponseTargetEthereum HostnameEditResponseTarget = "ethereum" - HostnameEditResponseTargetIPFS HostnameEditResponseTarget = "ipfs" - HostnameEditResponseTargetIPFSUniversalPath HostnameEditResponseTarget = "ipfs_universal_path" -) - -func (r HostnameEditResponseTarget) IsKnown() bool { - switch r { - case HostnameEditResponseTargetEthereum, HostnameEditResponseTargetIPFS, HostnameEditResponseTargetIPFSUniversalPath: - return true - } - return false -} - -type HostnameGetResponse struct { - // Identifier - ID string `json:"id"` - CreatedOn time.Time `json:"created_on" format:"date-time"` - // An optional description of the hostname. - Description string `json:"description"` - // DNSLink value used if the target is ipfs. - Dnslink string `json:"dnslink"` - ModifiedOn time.Time `json:"modified_on" format:"date-time"` - // The hostname that will point to the target gateway via CNAME. - Name string `json:"name"` - // Status of the hostname's activation. - Status HostnameGetResponseStatus `json:"status"` - // Target gateway of the hostname. - Target HostnameGetResponseTarget `json:"target"` - JSON hostnameGetResponseJSON `json:"-"` -} - -// hostnameGetResponseJSON contains the JSON metadata for the struct -// [HostnameGetResponse] -type hostnameGetResponseJSON struct { - ID apijson.Field - CreatedOn apijson.Field - Description apijson.Field - Dnslink apijson.Field - ModifiedOn apijson.Field - Name apijson.Field - Status apijson.Field - Target apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *HostnameGetResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r hostnameGetResponseJSON) RawJSON() string { - return r.raw -} - -// Status of the hostname's activation. -type HostnameGetResponseStatus string - -const ( - HostnameGetResponseStatusActive HostnameGetResponseStatus = "active" - HostnameGetResponseStatusPending HostnameGetResponseStatus = "pending" - HostnameGetResponseStatusDeleting HostnameGetResponseStatus = "deleting" - HostnameGetResponseStatusError HostnameGetResponseStatus = "error" -) - -func (r HostnameGetResponseStatus) IsKnown() bool { - switch r { - case HostnameGetResponseStatusActive, HostnameGetResponseStatusPending, HostnameGetResponseStatusDeleting, HostnameGetResponseStatusError: - return true - } - return false -} - -// Target gateway of the hostname. -type HostnameGetResponseTarget string - -const ( - HostnameGetResponseTargetEthereum HostnameGetResponseTarget = "ethereum" - HostnameGetResponseTargetIPFS HostnameGetResponseTarget = "ipfs" - HostnameGetResponseTargetIPFSUniversalPath HostnameGetResponseTarget = "ipfs_universal_path" -) - -func (r HostnameGetResponseTarget) IsKnown() bool { - switch r { - case HostnameGetResponseTargetEthereum, HostnameGetResponseTargetIPFS, HostnameGetResponseTargetIPFSUniversalPath: - return true - } - return false -} - type HostnameNewParams struct { // Target gateway of the hostname. Target param.Field[HostnameNewParamsTarget] `json:"target,required"` @@ -469,7 +242,7 @@ func (r HostnameNewParamsTarget) IsKnown() bool { type HostnameNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result HostnameNewResponse `json:"result,required"` + Result Hostname `json:"result,required"` // Whether the API call was successful Success HostnameNewResponseEnvelopeSuccess `json:"success,required"` JSON hostnameNewResponseEnvelopeJSON `json:"-"` @@ -566,7 +339,7 @@ func (r HostnameEditParams) MarshalJSON() (data []byte, err error) { type HostnameEditResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result HostnameEditResponse `json:"result,required"` + Result Hostname `json:"result,required"` // Whether the API call was successful Success HostnameEditResponseEnvelopeSuccess `json:"success,required"` JSON hostnameEditResponseEnvelopeJSON `json:"-"` @@ -609,7 +382,7 @@ func (r HostnameEditResponseEnvelopeSuccess) IsKnown() bool { type HostnameGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result HostnameGetResponse `json:"result,required"` + Result Hostname `json:"result,required"` // Whether the API call was successful Success HostnameGetResponseEnvelopeSuccess `json:"success,required"` JSON hostnameGetResponseEnvelopeJSON `json:"-"` diff --git a/web3/hostnameipfsuniversalpathcontentlist.go b/web3/hostnameipfsuniversalpathcontentlist.go index ee783cc05e..9ea2cdec0e 100644 --- a/web3/hostnameipfsuniversalpathcontentlist.go +++ b/web3/hostnameipfsuniversalpathcontentlist.go @@ -36,7 +36,7 @@ func NewHostnameIPFSUniversalPathContentListService(opts ...option.RequestOption } // Update IPFS Universal Path Gateway Content List -func (r *HostnameIPFSUniversalPathContentListService) Update(ctx context.Context, zoneIdentifier string, identifier string, body HostnameIPFSUniversalPathContentListUpdateParams, opts ...option.RequestOption) (res *HostnameIPFSUniversalPathContentListUpdateResponse, err error) { +func (r *HostnameIPFSUniversalPathContentListService) Update(ctx context.Context, zoneIdentifier string, identifier string, body HostnameIPFSUniversalPathContentListUpdateParams, opts ...option.RequestOption) (res *ContentList, err error) { opts = append(r.Options[:], opts...) var env HostnameIPFSUniversalPathContentListUpdateResponseEnvelope path := fmt.Sprintf("zones/%s/web3/hostnames/%s/ipfs_universal_path/content_list", zoneIdentifier, identifier) @@ -49,7 +49,7 @@ func (r *HostnameIPFSUniversalPathContentListService) Update(ctx context.Context } // IPFS Universal Path Gateway Content List Details -func (r *HostnameIPFSUniversalPathContentListService) Get(ctx context.Context, zoneIdentifier string, identifier string, opts ...option.RequestOption) (res *HostnameIPFSUniversalPathContentListGetResponse, err error) { +func (r *HostnameIPFSUniversalPathContentListService) Get(ctx context.Context, zoneIdentifier string, identifier string, opts ...option.RequestOption) (res *ContentList, err error) { opts = append(r.Options[:], opts...) var env HostnameIPFSUniversalPathContentListGetResponseEnvelope path := fmt.Sprintf("zones/%s/web3/hostnames/%s/ipfs_universal_path/content_list", zoneIdentifier, identifier) @@ -61,75 +61,37 @@ func (r *HostnameIPFSUniversalPathContentListService) Get(ctx context.Context, z return } -type HostnameIPFSUniversalPathContentListUpdateResponse struct { +type ContentList struct { // Behavior of the content list. - Action HostnameIPFSUniversalPathContentListUpdateResponseAction `json:"action"` - JSON hostnameIPFSUniversalPathContentListUpdateResponseJSON `json:"-"` + Action ContentListAction `json:"action"` + JSON contentListJSON `json:"-"` } -// hostnameIPFSUniversalPathContentListUpdateResponseJSON contains the JSON -// metadata for the struct [HostnameIPFSUniversalPathContentListUpdateResponse] -type hostnameIPFSUniversalPathContentListUpdateResponseJSON struct { +// contentListJSON contains the JSON metadata for the struct [ContentList] +type contentListJSON struct { Action apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *HostnameIPFSUniversalPathContentListUpdateResponse) UnmarshalJSON(data []byte) (err error) { +func (r *ContentList) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r hostnameIPFSUniversalPathContentListUpdateResponseJSON) RawJSON() string { +func (r contentListJSON) RawJSON() string { return r.raw } // Behavior of the content list. -type HostnameIPFSUniversalPathContentListUpdateResponseAction string +type ContentListAction string const ( - HostnameIPFSUniversalPathContentListUpdateResponseActionBlock HostnameIPFSUniversalPathContentListUpdateResponseAction = "block" + ContentListActionBlock ContentListAction = "block" ) -func (r HostnameIPFSUniversalPathContentListUpdateResponseAction) IsKnown() bool { +func (r ContentListAction) IsKnown() bool { switch r { - case HostnameIPFSUniversalPathContentListUpdateResponseActionBlock: - return true - } - return false -} - -type HostnameIPFSUniversalPathContentListGetResponse struct { - // Behavior of the content list. - Action HostnameIPFSUniversalPathContentListGetResponseAction `json:"action"` - JSON hostnameIPFSUniversalPathContentListGetResponseJSON `json:"-"` -} - -// hostnameIPFSUniversalPathContentListGetResponseJSON contains the JSON metadata -// for the struct [HostnameIPFSUniversalPathContentListGetResponse] -type hostnameIPFSUniversalPathContentListGetResponseJSON struct { - Action apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *HostnameIPFSUniversalPathContentListGetResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r hostnameIPFSUniversalPathContentListGetResponseJSON) RawJSON() string { - return r.raw -} - -// Behavior of the content list. -type HostnameIPFSUniversalPathContentListGetResponseAction string - -const ( - HostnameIPFSUniversalPathContentListGetResponseActionBlock HostnameIPFSUniversalPathContentListGetResponseAction = "block" -) - -func (r HostnameIPFSUniversalPathContentListGetResponseAction) IsKnown() bool { - switch r { - case HostnameIPFSUniversalPathContentListGetResponseActionBlock: + case ContentListActionBlock: return true } return false @@ -192,9 +154,9 @@ func (r HostnameIPFSUniversalPathContentListUpdateParamsEntriesType) IsKnown() b } type HostnameIPFSUniversalPathContentListUpdateResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result HostnameIPFSUniversalPathContentListUpdateResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result ContentList `json:"result,required"` // Whether the API call was successful Success HostnameIPFSUniversalPathContentListUpdateResponseEnvelopeSuccess `json:"success,required"` JSON hostnameIPFSUniversalPathContentListUpdateResponseEnvelopeJSON `json:"-"` @@ -236,9 +198,9 @@ func (r HostnameIPFSUniversalPathContentListUpdateResponseEnvelopeSuccess) IsKno } type HostnameIPFSUniversalPathContentListGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result HostnameIPFSUniversalPathContentListGetResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result ContentList `json:"result,required"` // Whether the API call was successful Success HostnameIPFSUniversalPathContentListGetResponseEnvelopeSuccess `json:"success,required"` JSON hostnameIPFSUniversalPathContentListGetResponseEnvelopeJSON `json:"-"` From 57e8e6d58da80a2dde5f621d74059908b4017768 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 15:01:58 +0000 Subject: [PATCH 045/127] feat(api): OpenAPI spec update via Stainless API (#1888) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 81d08c8bc1..71f2b6643d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5f1479806ff9a382d425b33f45765681c248cf0895cd4fb79eec5b51a55ea23a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dfb06f468003bf271bbf77aaade038e4081d449575111471df8b538b19d56935.yml From c0be306fd8fb63ce02c7e9fbfafddc97b767b39f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 16:32:54 +0000 Subject: [PATCH 046/127] feat(api): OpenAPI spec update via Stainless API (#1889) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 71f2b6643d..81d08c8bc1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dfb06f468003bf271bbf77aaade038e4081d449575111471df8b538b19d56935.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5f1479806ff9a382d425b33f45765681c248cf0895cd4fb79eec5b51a55ea23a.yml From 278feb23418e1974670ce173ec6ebc97be15cd6e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 16:34:41 +0000 Subject: [PATCH 047/127] feat(api): OpenAPI spec update via Stainless API (#1890) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 81d08c8bc1..71f2b6643d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5f1479806ff9a382d425b33f45765681c248cf0895cd4fb79eec5b51a55ea23a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dfb06f468003bf271bbf77aaade038e4081d449575111471df8b538b19d56935.yml From 2cff27f6a857961d5f94027aff420f41c576efb1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 16:47:26 +0000 Subject: [PATCH 048/127] feat(api): OpenAPI spec update via Stainless API (#1891) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 71f2b6643d..81d08c8bc1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dfb06f468003bf271bbf77aaade038e4081d449575111471df8b538b19d56935.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5f1479806ff9a382d425b33f45765681c248cf0895cd4fb79eec5b51a55ea23a.yml From fa7b98ab4532ba420924456504fe6fc94fd3f0b6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 16:57:07 +0000 Subject: [PATCH 049/127] feat(api): OpenAPI spec update via Stainless API (#1892) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 81d08c8bc1..8bca1053e0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5f1479806ff9a382d425b33f45765681c248cf0895cd4fb79eec5b51a55ea23a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-65a6d404b4bd56399cc02e7cbf9c66c5fba8a82b04fa771357564b7199e5c53e.yml From fb652dbfcf915fc7f2525d2af16b48a0022c8245 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 17:37:18 +0000 Subject: [PATCH 050/127] feat(api): update via SDK Studio (#1893) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8bca1053e0..0520d4dfb7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-65a6d404b4bd56399cc02e7cbf9c66c5fba8a82b04fa771357564b7199e5c53e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cc3299608e8bb30103d79d6bdc29758d43899b0393afe2153bea75e201ac0795.yml From 3cc9b874efa61b14547bf052bff81e8e42fc100a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 20:08:31 +0000 Subject: [PATCH 051/127] feat(api): OpenAPI spec update via Stainless API (#1894) --- .github/workflows/ci.yml | 3 +++ .stats.yml | 2 +- scripts/mock | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c1b374f18..80950ba264 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,9 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Setup go + uses: actions/setup-go@v5 + - name: Bootstrap run: ./scripts/bootstrap diff --git a/.stats.yml b/.stats.yml index 0520d4dfb7..2a6632a64c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cc3299608e8bb30103d79d6bdc29758d43899b0393afe2153bea75e201ac0795.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7add9c69609ff21483285ac9b11d2325b0b64fd980726fe0d40fcb51da472afb.yml diff --git a/scripts/mock b/scripts/mock index 5a8c35b725..fe89a1d084 100755 --- a/scripts/mock +++ b/scripts/mock @@ -21,7 +21,7 @@ echo "==> Starting mock server with URL ${URL}" # Run prism mock on the given spec if [ "$1" == "--daemon" ]; then - npm exec --package=@stoplight/prism-cli@~5.3.2 -- prism mock "$URL" &> .prism.log & + npm exec --package=@stoplight/prism-cli@~5.8 -- prism mock "$URL" &> .prism.log & # Wait for server to come online echo -n "Waiting for server" @@ -37,5 +37,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stoplight/prism-cli@~5.3.2 -- prism mock "$URL" + npm exec --package=@stoplight/prism-cli@~5.8 -- prism mock "$URL" fi From 2941913d15d28648fc952ac574c615277b86ce93 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 21:37:30 +0000 Subject: [PATCH 052/127] feat(api): OpenAPI spec update via Stainless API (#1895) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 2a6632a64c..0520d4dfb7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7add9c69609ff21483285ac9b11d2325b0b64fd980726fe0d40fcb51da472afb.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cc3299608e8bb30103d79d6bdc29758d43899b0393afe2153bea75e201ac0795.yml From 1cce5eb5123acad23e466ab898226a0dc201d96e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 21:47:58 +0000 Subject: [PATCH 053/127] feat(api): OpenAPI spec update via Stainless API (#1896) --- .stats.yml | 2 +- scripts/bootstrap | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0520d4dfb7..2a6632a64c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cc3299608e8bb30103d79d6bdc29758d43899b0393afe2153bea75e201ac0795.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7add9c69609ff21483285ac9b11d2325b0b64fd980726fe0d40fcb51da472afb.yml diff --git a/scripts/bootstrap b/scripts/bootstrap index 6a819d278e..ed03e527a4 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -13,4 +13,4 @@ fi echo "==> Installing Go dependencies…" -go mod install +go mod tidy From 8d66bd019da1e6f39944c5203bcd3f1cbce0dafe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 23:41:27 +0000 Subject: [PATCH 054/127] feat(api): OpenAPI spec update via Stainless API (#1897) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 2a6632a64c..0520d4dfb7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7add9c69609ff21483285ac9b11d2325b0b64fd980726fe0d40fcb51da472afb.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cc3299608e8bb30103d79d6bdc29758d43899b0393afe2153bea75e201ac0795.yml From 9ce240b192d7732ac2f69d7700efda1b731c846f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 23:43:04 +0000 Subject: [PATCH 055/127] feat(api): OpenAPI spec update via Stainless API (#1898) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 0520d4dfb7..2a6632a64c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cc3299608e8bb30103d79d6bdc29758d43899b0393afe2153bea75e201ac0795.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7add9c69609ff21483285ac9b11d2325b0b64fd980726fe0d40fcb51da472afb.yml From 0afd2663ec41fccea421cbad7e2f43e71ee0aaee Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 00:09:22 +0000 Subject: [PATCH 056/127] feat(api): OpenAPI spec update via Stainless API (#1899) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 2a6632a64c..0520d4dfb7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7add9c69609ff21483285ac9b11d2325b0b64fd980726fe0d40fcb51da472afb.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cc3299608e8bb30103d79d6bdc29758d43899b0393afe2153bea75e201ac0795.yml From ed983c50704eab5085fc5b98a32811352452d107 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 02:54:06 +0000 Subject: [PATCH 057/127] feat(api): OpenAPI spec update via Stainless API (#1900) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 0520d4dfb7..2a6632a64c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cc3299608e8bb30103d79d6bdc29758d43899b0393afe2153bea75e201ac0795.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7add9c69609ff21483285ac9b11d2325b0b64fd980726fe0d40fcb51da472afb.yml From febb26e50b012e7463dbd0911fed2d388833f21f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 05:17:43 +0000 Subject: [PATCH 058/127] feat(api): update via SDK Studio (#1901) --- api.md | 41 +-- speed/page.go | 119 ++++++ speed/page_test.go | 37 ++ speed/pagetest.go | 448 +++++++++++++++++++++++ speed/{test_test.go => pagetest_test.go} | 30 +- speed/schedule.go | 203 ++++++++++ speed/schedule_test.go | 60 +++ speed/speed.go | 328 ----------------- speed/speed_test.go | 112 ------ speed/test.go | 448 ----------------------- 10 files changed, 901 insertions(+), 925 deletions(-) create mode 100644 speed/pagetest.go rename speed/{test_test.go => pagetest_test.go} (81%) delete mode 100644 speed/speed_test.go delete mode 100644 speed/test.go diff --git a/api.md b/api.md index dccb5a7feb..90413577a7 100644 --- a/api.md +++ b/api.md @@ -6578,28 +6578,6 @@ Response Types: - speed.LabeledRegion - speed.LighthouseReport - speed.Trend -- speed.SpeedDeleteResponse - -Methods: - -- client.Speed.Delete(ctx context.Context, url string, params speed.SpeedDeleteParams) (speed.SpeedDeleteResponse, error) -- client.Speed.ScheduleGet(ctx context.Context, url string, params speed.SpeedScheduleGetParams) (speed.Schedule, error) -- client.Speed.TrendsList(ctx context.Context, url string, params speed.SpeedTrendsListParams) (speed.Trend, error) - -## Tests - -Response Types: - -- speed.Test -- speed.TestListResponse -- speed.TestDeleteResponse - -Methods: - -- client.Speed.Tests.New(ctx context.Context, url string, params speed.TestNewParams) (speed.Test, error) -- client.Speed.Tests.List(ctx context.Context, url string, params speed.TestListParams) (speed.TestListResponse, error) -- client.Speed.Tests.Delete(ctx context.Context, url string, params speed.TestDeleteParams) (speed.TestDeleteResponse, error) -- client.Speed.Tests.Get(ctx context.Context, url string, testID string, query speed.TestGetParams) (speed.Test, error) ## Schedule @@ -6607,10 +6585,13 @@ Response Types: - speed.Schedule - speed.ScheduleNewResponse +- speed.ScheduleDeleteResponse Methods: - client.Speed.Schedule.New(ctx context.Context, url string, params speed.ScheduleNewParams) (speed.ScheduleNewResponse, error) +- client.Speed.Schedule.Delete(ctx context.Context, url string, params speed.ScheduleDeleteParams) (speed.ScheduleDeleteResponse, error) +- client.Speed.Schedule.Get(ctx context.Context, url string, params speed.ScheduleGetParams) (speed.Schedule, error) ## Availabilities @@ -6631,6 +6612,22 @@ Response Types: Methods: - client.Speed.Pages.List(ctx context.Context, query speed.PageListParams) (pagination.SinglePage[speed.PageListResponse], error) +- client.Speed.Pages.Trend(ctx context.Context, url string, params speed.PageTrendParams) (speed.Trend, error) + +### Tests + +Response Types: + +- speed.Test +- speed.PageTestListResponse +- speed.PageTestDeleteResponse + +Methods: + +- client.Speed.Pages.Tests.New(ctx context.Context, url string, params speed.PageTestNewParams) (speed.Test, error) +- client.Speed.Pages.Tests.List(ctx context.Context, url string, params speed.PageTestListParams) (speed.PageTestListResponse, error) +- client.Speed.Pages.Tests.Delete(ctx context.Context, url string, params speed.PageTestDeleteParams) (speed.PageTestDeleteResponse, error) +- client.Speed.Pages.Tests.Get(ctx context.Context, url string, testID string, query speed.PageTestGetParams) (speed.Test, error) # DCVDelegation diff --git a/speed/page.go b/speed/page.go index 65b2d3dad1..65eb5b2f48 100644 --- a/speed/page.go +++ b/speed/page.go @@ -6,8 +6,11 @@ import ( "context" "fmt" "net/http" + "net/url" + "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" + "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/pagination" "github.com/cloudflare/cloudflare-go/v2/internal/param" "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" @@ -20,6 +23,7 @@ import ( // directly, and instead use the [NewPageService] method instead. type PageService struct { Options []option.RequestOption + Tests *PageTestService } // NewPageService generates a new service that applies the given options to each @@ -28,6 +32,7 @@ type PageService struct { func NewPageService(opts ...option.RequestOption) (r *PageService) { r = &PageService{} r.Options = opts + r.Tests = NewPageTestService(opts...) return } @@ -54,6 +59,19 @@ func (r *PageService) ListAutoPaging(ctx context.Context, query PageListParams, return pagination.NewSinglePageAutoPager(r.List(ctx, query, opts...)) } +// Lists the core web vital metrics trend over time for a specific page. +func (r *PageService) Trend(ctx context.Context, url string, params PageTrendParams, opts ...option.RequestOption) (res *Trend, err error) { + opts = append(r.Options[:], opts...) + var env PageTrendResponseEnvelope + path := fmt.Sprintf("zones/%s/speed_api/pages/%s/trend", params.ZoneID, url) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + type PageListResponse struct { // A test region with a label. Region LabeledRegion `json:"region"` @@ -104,3 +122,104 @@ type PageListParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` } + +type PageTrendParams struct { + // Identifier + ZoneID param.Field[string] `path:"zone_id,required"` + // The type of device. + DeviceType param.Field[PageTrendParamsDeviceType] `query:"deviceType,required"` + // A comma-separated list of metrics to include in the results. + Metrics param.Field[string] `query:"metrics,required"` + // A test region. + Region param.Field[PageTrendParamsRegion] `query:"region,required"` + Start param.Field[time.Time] `query:"start,required" format:"date-time"` + // The timezone of the start and end timestamps. + Tz param.Field[string] `query:"tz,required"` + End param.Field[time.Time] `query:"end" format:"date-time"` +} + +// URLQuery serializes [PageTrendParams]'s query parameters as `url.Values`. +func (r PageTrendParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatRepeat, + NestedFormat: apiquery.NestedQueryFormatBrackets, + }) +} + +// The type of device. +type PageTrendParamsDeviceType string + +const ( + PageTrendParamsDeviceTypeDesktop PageTrendParamsDeviceType = "DESKTOP" + PageTrendParamsDeviceTypeMobile PageTrendParamsDeviceType = "MOBILE" +) + +func (r PageTrendParamsDeviceType) IsKnown() bool { + switch r { + case PageTrendParamsDeviceTypeDesktop, PageTrendParamsDeviceTypeMobile: + return true + } + return false +} + +// A test region. +type PageTrendParamsRegion string + +const ( + PageTrendParamsRegionAsiaEast1 PageTrendParamsRegion = "asia-east1" + PageTrendParamsRegionAsiaNortheast1 PageTrendParamsRegion = "asia-northeast1" + PageTrendParamsRegionAsiaNortheast2 PageTrendParamsRegion = "asia-northeast2" + PageTrendParamsRegionAsiaSouth1 PageTrendParamsRegion = "asia-south1" + PageTrendParamsRegionAsiaSoutheast1 PageTrendParamsRegion = "asia-southeast1" + PageTrendParamsRegionAustraliaSoutheast1 PageTrendParamsRegion = "australia-southeast1" + PageTrendParamsRegionEuropeNorth1 PageTrendParamsRegion = "europe-north1" + PageTrendParamsRegionEuropeSouthwest1 PageTrendParamsRegion = "europe-southwest1" + PageTrendParamsRegionEuropeWest1 PageTrendParamsRegion = "europe-west1" + PageTrendParamsRegionEuropeWest2 PageTrendParamsRegion = "europe-west2" + PageTrendParamsRegionEuropeWest3 PageTrendParamsRegion = "europe-west3" + PageTrendParamsRegionEuropeWest4 PageTrendParamsRegion = "europe-west4" + PageTrendParamsRegionEuropeWest8 PageTrendParamsRegion = "europe-west8" + PageTrendParamsRegionEuropeWest9 PageTrendParamsRegion = "europe-west9" + PageTrendParamsRegionMeWest1 PageTrendParamsRegion = "me-west1" + PageTrendParamsRegionSouthamericaEast1 PageTrendParamsRegion = "southamerica-east1" + PageTrendParamsRegionUsCentral1 PageTrendParamsRegion = "us-central1" + PageTrendParamsRegionUsEast1 PageTrendParamsRegion = "us-east1" + PageTrendParamsRegionUsEast4 PageTrendParamsRegion = "us-east4" + PageTrendParamsRegionUsSouth1 PageTrendParamsRegion = "us-south1" + PageTrendParamsRegionUsWest1 PageTrendParamsRegion = "us-west1" +) + +func (r PageTrendParamsRegion) IsKnown() bool { + switch r { + case PageTrendParamsRegionAsiaEast1, PageTrendParamsRegionAsiaNortheast1, PageTrendParamsRegionAsiaNortheast2, PageTrendParamsRegionAsiaSouth1, PageTrendParamsRegionAsiaSoutheast1, PageTrendParamsRegionAustraliaSoutheast1, PageTrendParamsRegionEuropeNorth1, PageTrendParamsRegionEuropeSouthwest1, PageTrendParamsRegionEuropeWest1, PageTrendParamsRegionEuropeWest2, PageTrendParamsRegionEuropeWest3, PageTrendParamsRegionEuropeWest4, PageTrendParamsRegionEuropeWest8, PageTrendParamsRegionEuropeWest9, PageTrendParamsRegionMeWest1, PageTrendParamsRegionSouthamericaEast1, PageTrendParamsRegionUsCentral1, PageTrendParamsRegionUsEast1, PageTrendParamsRegionUsEast4, PageTrendParamsRegionUsSouth1, PageTrendParamsRegionUsWest1: + return true + } + return false +} + +type PageTrendResponseEnvelope struct { + Errors interface{} `json:"errors,required"` + Messages interface{} `json:"messages,required"` + Success interface{} `json:"success,required"` + Result Trend `json:"result"` + JSON pageTrendResponseEnvelopeJSON `json:"-"` +} + +// pageTrendResponseEnvelopeJSON contains the JSON metadata for the struct +// [PageTrendResponseEnvelope] +type pageTrendResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *PageTrendResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r pageTrendResponseEnvelopeJSON) RawJSON() string { + return r.raw +} diff --git a/speed/page_test.go b/speed/page_test.go index 9a91a8ff91..266fdd1151 100644 --- a/speed/page_test.go +++ b/speed/page_test.go @@ -7,6 +7,7 @@ import ( "errors" "os" "testing" + "time" "github.com/cloudflare/cloudflare-go/v2" "github.com/cloudflare/cloudflare-go/v2/internal/testutil" @@ -38,3 +39,39 @@ func TestPageList(t *testing.T) { t.Fatalf("err should be nil: %s", err.Error()) } } + +func TestPageTrendWithOptionalParams(t *testing.T) { + t.Skip("TODO: investigate broken test") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Speed.Pages.Trend( + context.TODO(), + "example.com", + speed.PageTrendParams{ + ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + DeviceType: cloudflare.F(speed.PageTrendParamsDeviceTypeDesktop), + Metrics: cloudflare.F("performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls"), + Region: cloudflare.F(speed.PageTrendParamsRegionUsCentral1), + Start: cloudflare.F(time.Now()), + Tz: cloudflare.F("string"), + End: cloudflare.F(time.Now()), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/speed/pagetest.go b/speed/pagetest.go new file mode 100644 index 0000000000..6c58ce933b --- /dev/null +++ b/speed/pagetest.go @@ -0,0 +1,448 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package speed + +import ( + "context" + "fmt" + "net/http" + "net/url" + "time" + + "github.com/cloudflare/cloudflare-go/v2/internal/apijson" + "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" + "github.com/cloudflare/cloudflare-go/v2/internal/param" + "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" + "github.com/cloudflare/cloudflare-go/v2/option" + "github.com/cloudflare/cloudflare-go/v2/shared" +) + +// PageTestService contains methods and other services that help with interacting +// with the cloudflare API. Note, unlike clients, this service does not read +// variables from the environment automatically. You should not instantiate this +// service directly, and instead use the [NewPageTestService] method instead. +type PageTestService struct { + Options []option.RequestOption +} + +// NewPageTestService generates a new service that applies the given options to +// each request. These options are applied after the parent client's options (if +// there is one), and before any request-specific options. +func NewPageTestService(opts ...option.RequestOption) (r *PageTestService) { + r = &PageTestService{} + r.Options = opts + return +} + +// Starts a test for a specific webpage, in a specific region. +func (r *PageTestService) New(ctx context.Context, url string, params PageTestNewParams, opts ...option.RequestOption) (res *Test, err error) { + opts = append(r.Options[:], opts...) + var env PageTestNewResponseEnvelope + path := fmt.Sprintf("zones/%s/speed_api/pages/%s/tests", params.ZoneID, url) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Test history (list of tests) for a specific webpage. +func (r *PageTestService) List(ctx context.Context, url string, params PageTestListParams, opts ...option.RequestOption) (res *PageTestListResponse, err error) { + opts = append(r.Options[:], opts...) + path := fmt.Sprintf("zones/%s/speed_api/pages/%s/tests", params.ZoneID, url) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, params, &res, opts...) + return +} + +// Deletes all tests for a specific webpage from a specific region. Deleted tests +// are still counted as part of the quota. +func (r *PageTestService) Delete(ctx context.Context, url string, params PageTestDeleteParams, opts ...option.RequestOption) (res *PageTestDeleteResponse, err error) { + opts = append(r.Options[:], opts...) + var env PageTestDeleteResponseEnvelope + path := fmt.Sprintf("zones/%s/speed_api/pages/%s/tests", params.ZoneID, url) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Retrieves the result of a specific test. +func (r *PageTestService) Get(ctx context.Context, url string, testID string, query PageTestGetParams, opts ...option.RequestOption) (res *Test, err error) { + opts = append(r.Options[:], opts...) + var env PageTestGetResponseEnvelope + path := fmt.Sprintf("zones/%s/speed_api/pages/%s/tests/%s", query.ZoneID, url, testID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +type Test struct { + // UUID + ID string `json:"id"` + Date time.Time `json:"date" format:"date-time"` + // The Lighthouse report. + DesktopReport LighthouseReport `json:"desktopReport"` + // The Lighthouse report. + MobileReport LighthouseReport `json:"mobileReport"` + // A test region with a label. + Region LabeledRegion `json:"region"` + // The frequency of the test. + ScheduleFrequency TestScheduleFrequency `json:"scheduleFrequency"` + // A URL. + URL string `json:"url"` + JSON testJSON `json:"-"` +} + +// testJSON contains the JSON metadata for the struct [Test] +type testJSON struct { + ID apijson.Field + Date apijson.Field + DesktopReport apijson.Field + MobileReport apijson.Field + Region apijson.Field + ScheduleFrequency apijson.Field + URL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *Test) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r testJSON) RawJSON() string { + return r.raw +} + +// The frequency of the test. +type TestScheduleFrequency string + +const ( + TestScheduleFrequencyDaily TestScheduleFrequency = "DAILY" + TestScheduleFrequencyWeekly TestScheduleFrequency = "WEEKLY" +) + +func (r TestScheduleFrequency) IsKnown() bool { + switch r { + case TestScheduleFrequencyDaily, TestScheduleFrequencyWeekly: + return true + } + return false +} + +type PageTestListResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful. + Success bool `json:"success,required"` + ResultInfo PageTestListResponseResultInfo `json:"result_info"` + JSON pageTestListResponseJSON `json:"-"` +} + +// pageTestListResponseJSON contains the JSON metadata for the struct +// [PageTestListResponse] +type pageTestListResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + ResultInfo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *PageTestListResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r pageTestListResponseJSON) RawJSON() string { + return r.raw +} + +type PageTestListResponseResultInfo struct { + Count int64 `json:"count"` + Page int64 `json:"page"` + PerPage int64 `json:"per_page"` + TotalCount int64 `json:"total_count"` + JSON pageTestListResponseResultInfoJSON `json:"-"` +} + +// pageTestListResponseResultInfoJSON contains the JSON metadata for the struct +// [PageTestListResponseResultInfo] +type pageTestListResponseResultInfoJSON struct { + Count apijson.Field + Page apijson.Field + PerPage apijson.Field + TotalCount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *PageTestListResponseResultInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r pageTestListResponseResultInfoJSON) RawJSON() string { + return r.raw +} + +type PageTestDeleteResponse struct { + // Number of items affected. + Count float64 `json:"count"` + JSON pageTestDeleteResponseJSON `json:"-"` +} + +// pageTestDeleteResponseJSON contains the JSON metadata for the struct +// [PageTestDeleteResponse] +type pageTestDeleteResponseJSON struct { + Count apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *PageTestDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r pageTestDeleteResponseJSON) RawJSON() string { + return r.raw +} + +type PageTestNewParams struct { + // Identifier + ZoneID param.Field[string] `path:"zone_id,required"` + // A test region. + Region param.Field[PageTestNewParamsRegion] `json:"region"` +} + +func (r PageTestNewParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// A test region. +type PageTestNewParamsRegion string + +const ( + PageTestNewParamsRegionAsiaEast1 PageTestNewParamsRegion = "asia-east1" + PageTestNewParamsRegionAsiaNortheast1 PageTestNewParamsRegion = "asia-northeast1" + PageTestNewParamsRegionAsiaNortheast2 PageTestNewParamsRegion = "asia-northeast2" + PageTestNewParamsRegionAsiaSouth1 PageTestNewParamsRegion = "asia-south1" + PageTestNewParamsRegionAsiaSoutheast1 PageTestNewParamsRegion = "asia-southeast1" + PageTestNewParamsRegionAustraliaSoutheast1 PageTestNewParamsRegion = "australia-southeast1" + PageTestNewParamsRegionEuropeNorth1 PageTestNewParamsRegion = "europe-north1" + PageTestNewParamsRegionEuropeSouthwest1 PageTestNewParamsRegion = "europe-southwest1" + PageTestNewParamsRegionEuropeWest1 PageTestNewParamsRegion = "europe-west1" + PageTestNewParamsRegionEuropeWest2 PageTestNewParamsRegion = "europe-west2" + PageTestNewParamsRegionEuropeWest3 PageTestNewParamsRegion = "europe-west3" + PageTestNewParamsRegionEuropeWest4 PageTestNewParamsRegion = "europe-west4" + PageTestNewParamsRegionEuropeWest8 PageTestNewParamsRegion = "europe-west8" + PageTestNewParamsRegionEuropeWest9 PageTestNewParamsRegion = "europe-west9" + PageTestNewParamsRegionMeWest1 PageTestNewParamsRegion = "me-west1" + PageTestNewParamsRegionSouthamericaEast1 PageTestNewParamsRegion = "southamerica-east1" + PageTestNewParamsRegionUsCentral1 PageTestNewParamsRegion = "us-central1" + PageTestNewParamsRegionUsEast1 PageTestNewParamsRegion = "us-east1" + PageTestNewParamsRegionUsEast4 PageTestNewParamsRegion = "us-east4" + PageTestNewParamsRegionUsSouth1 PageTestNewParamsRegion = "us-south1" + PageTestNewParamsRegionUsWest1 PageTestNewParamsRegion = "us-west1" +) + +func (r PageTestNewParamsRegion) IsKnown() bool { + switch r { + case PageTestNewParamsRegionAsiaEast1, PageTestNewParamsRegionAsiaNortheast1, PageTestNewParamsRegionAsiaNortheast2, PageTestNewParamsRegionAsiaSouth1, PageTestNewParamsRegionAsiaSoutheast1, PageTestNewParamsRegionAustraliaSoutheast1, PageTestNewParamsRegionEuropeNorth1, PageTestNewParamsRegionEuropeSouthwest1, PageTestNewParamsRegionEuropeWest1, PageTestNewParamsRegionEuropeWest2, PageTestNewParamsRegionEuropeWest3, PageTestNewParamsRegionEuropeWest4, PageTestNewParamsRegionEuropeWest8, PageTestNewParamsRegionEuropeWest9, PageTestNewParamsRegionMeWest1, PageTestNewParamsRegionSouthamericaEast1, PageTestNewParamsRegionUsCentral1, PageTestNewParamsRegionUsEast1, PageTestNewParamsRegionUsEast4, PageTestNewParamsRegionUsSouth1, PageTestNewParamsRegionUsWest1: + return true + } + return false +} + +type PageTestNewResponseEnvelope struct { + Errors interface{} `json:"errors,required"` + Messages interface{} `json:"messages,required"` + Success interface{} `json:"success,required"` + Result Test `json:"result"` + JSON pageTestNewResponseEnvelopeJSON `json:"-"` +} + +// pageTestNewResponseEnvelopeJSON contains the JSON metadata for the struct +// [PageTestNewResponseEnvelope] +type pageTestNewResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *PageTestNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r pageTestNewResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type PageTestListParams struct { + // Identifier + ZoneID param.Field[string] `path:"zone_id,required"` + Page param.Field[int64] `query:"page"` + PerPage param.Field[int64] `query:"per_page"` + // A test region. + Region param.Field[PageTestListParamsRegion] `query:"region"` +} + +// URLQuery serializes [PageTestListParams]'s query parameters as `url.Values`. +func (r PageTestListParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatRepeat, + NestedFormat: apiquery.NestedQueryFormatBrackets, + }) +} + +// A test region. +type PageTestListParamsRegion string + +const ( + PageTestListParamsRegionAsiaEast1 PageTestListParamsRegion = "asia-east1" + PageTestListParamsRegionAsiaNortheast1 PageTestListParamsRegion = "asia-northeast1" + PageTestListParamsRegionAsiaNortheast2 PageTestListParamsRegion = "asia-northeast2" + PageTestListParamsRegionAsiaSouth1 PageTestListParamsRegion = "asia-south1" + PageTestListParamsRegionAsiaSoutheast1 PageTestListParamsRegion = "asia-southeast1" + PageTestListParamsRegionAustraliaSoutheast1 PageTestListParamsRegion = "australia-southeast1" + PageTestListParamsRegionEuropeNorth1 PageTestListParamsRegion = "europe-north1" + PageTestListParamsRegionEuropeSouthwest1 PageTestListParamsRegion = "europe-southwest1" + PageTestListParamsRegionEuropeWest1 PageTestListParamsRegion = "europe-west1" + PageTestListParamsRegionEuropeWest2 PageTestListParamsRegion = "europe-west2" + PageTestListParamsRegionEuropeWest3 PageTestListParamsRegion = "europe-west3" + PageTestListParamsRegionEuropeWest4 PageTestListParamsRegion = "europe-west4" + PageTestListParamsRegionEuropeWest8 PageTestListParamsRegion = "europe-west8" + PageTestListParamsRegionEuropeWest9 PageTestListParamsRegion = "europe-west9" + PageTestListParamsRegionMeWest1 PageTestListParamsRegion = "me-west1" + PageTestListParamsRegionSouthamericaEast1 PageTestListParamsRegion = "southamerica-east1" + PageTestListParamsRegionUsCentral1 PageTestListParamsRegion = "us-central1" + PageTestListParamsRegionUsEast1 PageTestListParamsRegion = "us-east1" + PageTestListParamsRegionUsEast4 PageTestListParamsRegion = "us-east4" + PageTestListParamsRegionUsSouth1 PageTestListParamsRegion = "us-south1" + PageTestListParamsRegionUsWest1 PageTestListParamsRegion = "us-west1" +) + +func (r PageTestListParamsRegion) IsKnown() bool { + switch r { + case PageTestListParamsRegionAsiaEast1, PageTestListParamsRegionAsiaNortheast1, PageTestListParamsRegionAsiaNortheast2, PageTestListParamsRegionAsiaSouth1, PageTestListParamsRegionAsiaSoutheast1, PageTestListParamsRegionAustraliaSoutheast1, PageTestListParamsRegionEuropeNorth1, PageTestListParamsRegionEuropeSouthwest1, PageTestListParamsRegionEuropeWest1, PageTestListParamsRegionEuropeWest2, PageTestListParamsRegionEuropeWest3, PageTestListParamsRegionEuropeWest4, PageTestListParamsRegionEuropeWest8, PageTestListParamsRegionEuropeWest9, PageTestListParamsRegionMeWest1, PageTestListParamsRegionSouthamericaEast1, PageTestListParamsRegionUsCentral1, PageTestListParamsRegionUsEast1, PageTestListParamsRegionUsEast4, PageTestListParamsRegionUsSouth1, PageTestListParamsRegionUsWest1: + return true + } + return false +} + +type PageTestDeleteParams struct { + // Identifier + ZoneID param.Field[string] `path:"zone_id,required"` + // A test region. + Region param.Field[PageTestDeleteParamsRegion] `query:"region"` +} + +// URLQuery serializes [PageTestDeleteParams]'s query parameters as `url.Values`. +func (r PageTestDeleteParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatRepeat, + NestedFormat: apiquery.NestedQueryFormatBrackets, + }) +} + +// A test region. +type PageTestDeleteParamsRegion string + +const ( + PageTestDeleteParamsRegionAsiaEast1 PageTestDeleteParamsRegion = "asia-east1" + PageTestDeleteParamsRegionAsiaNortheast1 PageTestDeleteParamsRegion = "asia-northeast1" + PageTestDeleteParamsRegionAsiaNortheast2 PageTestDeleteParamsRegion = "asia-northeast2" + PageTestDeleteParamsRegionAsiaSouth1 PageTestDeleteParamsRegion = "asia-south1" + PageTestDeleteParamsRegionAsiaSoutheast1 PageTestDeleteParamsRegion = "asia-southeast1" + PageTestDeleteParamsRegionAustraliaSoutheast1 PageTestDeleteParamsRegion = "australia-southeast1" + PageTestDeleteParamsRegionEuropeNorth1 PageTestDeleteParamsRegion = "europe-north1" + PageTestDeleteParamsRegionEuropeSouthwest1 PageTestDeleteParamsRegion = "europe-southwest1" + PageTestDeleteParamsRegionEuropeWest1 PageTestDeleteParamsRegion = "europe-west1" + PageTestDeleteParamsRegionEuropeWest2 PageTestDeleteParamsRegion = "europe-west2" + PageTestDeleteParamsRegionEuropeWest3 PageTestDeleteParamsRegion = "europe-west3" + PageTestDeleteParamsRegionEuropeWest4 PageTestDeleteParamsRegion = "europe-west4" + PageTestDeleteParamsRegionEuropeWest8 PageTestDeleteParamsRegion = "europe-west8" + PageTestDeleteParamsRegionEuropeWest9 PageTestDeleteParamsRegion = "europe-west9" + PageTestDeleteParamsRegionMeWest1 PageTestDeleteParamsRegion = "me-west1" + PageTestDeleteParamsRegionSouthamericaEast1 PageTestDeleteParamsRegion = "southamerica-east1" + PageTestDeleteParamsRegionUsCentral1 PageTestDeleteParamsRegion = "us-central1" + PageTestDeleteParamsRegionUsEast1 PageTestDeleteParamsRegion = "us-east1" + PageTestDeleteParamsRegionUsEast4 PageTestDeleteParamsRegion = "us-east4" + PageTestDeleteParamsRegionUsSouth1 PageTestDeleteParamsRegion = "us-south1" + PageTestDeleteParamsRegionUsWest1 PageTestDeleteParamsRegion = "us-west1" +) + +func (r PageTestDeleteParamsRegion) IsKnown() bool { + switch r { + case PageTestDeleteParamsRegionAsiaEast1, PageTestDeleteParamsRegionAsiaNortheast1, PageTestDeleteParamsRegionAsiaNortheast2, PageTestDeleteParamsRegionAsiaSouth1, PageTestDeleteParamsRegionAsiaSoutheast1, PageTestDeleteParamsRegionAustraliaSoutheast1, PageTestDeleteParamsRegionEuropeNorth1, PageTestDeleteParamsRegionEuropeSouthwest1, PageTestDeleteParamsRegionEuropeWest1, PageTestDeleteParamsRegionEuropeWest2, PageTestDeleteParamsRegionEuropeWest3, PageTestDeleteParamsRegionEuropeWest4, PageTestDeleteParamsRegionEuropeWest8, PageTestDeleteParamsRegionEuropeWest9, PageTestDeleteParamsRegionMeWest1, PageTestDeleteParamsRegionSouthamericaEast1, PageTestDeleteParamsRegionUsCentral1, PageTestDeleteParamsRegionUsEast1, PageTestDeleteParamsRegionUsEast4, PageTestDeleteParamsRegionUsSouth1, PageTestDeleteParamsRegionUsWest1: + return true + } + return false +} + +type PageTestDeleteResponseEnvelope struct { + Errors interface{} `json:"errors,required"` + Messages interface{} `json:"messages,required"` + Success interface{} `json:"success,required"` + Result PageTestDeleteResponse `json:"result"` + JSON pageTestDeleteResponseEnvelopeJSON `json:"-"` +} + +// pageTestDeleteResponseEnvelopeJSON contains the JSON metadata for the struct +// [PageTestDeleteResponseEnvelope] +type pageTestDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *PageTestDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r pageTestDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type PageTestGetParams struct { + // Identifier + ZoneID param.Field[string] `path:"zone_id,required"` +} + +type PageTestGetResponseEnvelope struct { + Errors interface{} `json:"errors,required"` + Messages interface{} `json:"messages,required"` + Success interface{} `json:"success,required"` + Result Test `json:"result"` + JSON pageTestGetResponseEnvelopeJSON `json:"-"` +} + +// pageTestGetResponseEnvelopeJSON contains the JSON metadata for the struct +// [PageTestGetResponseEnvelope] +type pageTestGetResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *PageTestGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r pageTestGetResponseEnvelopeJSON) RawJSON() string { + return r.raw +} diff --git a/speed/test_test.go b/speed/pagetest_test.go similarity index 81% rename from speed/test_test.go rename to speed/pagetest_test.go index 0518443bbd..1ddefc7bb6 100644 --- a/speed/test_test.go +++ b/speed/pagetest_test.go @@ -14,7 +14,7 @@ import ( "github.com/cloudflare/cloudflare-go/v2/speed" ) -func TestTestNewWithOptionalParams(t *testing.T) { +func TestPageTestNewWithOptionalParams(t *testing.T) { baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -27,12 +27,12 @@ func TestTestNewWithOptionalParams(t *testing.T) { option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), option.WithAPIEmail("user@example.com"), ) - _, err := client.Speed.Tests.New( + _, err := client.Speed.Pages.Tests.New( context.TODO(), "example.com", - speed.TestNewParams{ + speed.PageTestNewParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Region: cloudflare.F(speed.TestNewParamsRegionUsCentral1), + Region: cloudflare.F(speed.PageTestNewParamsRegionUsCentral1), }, ) if err != nil { @@ -44,7 +44,7 @@ func TestTestNewWithOptionalParams(t *testing.T) { } } -func TestTestListWithOptionalParams(t *testing.T) { +func TestPageTestListWithOptionalParams(t *testing.T) { baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -57,14 +57,14 @@ func TestTestListWithOptionalParams(t *testing.T) { option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), option.WithAPIEmail("user@example.com"), ) - _, err := client.Speed.Tests.List( + _, err := client.Speed.Pages.Tests.List( context.TODO(), "example.com", - speed.TestListParams{ + speed.PageTestListParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Page: cloudflare.F(int64(1)), PerPage: cloudflare.F(int64(20)), - Region: cloudflare.F(speed.TestListParamsRegionUsCentral1), + Region: cloudflare.F(speed.PageTestListParamsRegionUsCentral1), }, ) if err != nil { @@ -76,7 +76,7 @@ func TestTestListWithOptionalParams(t *testing.T) { } } -func TestTestDeleteWithOptionalParams(t *testing.T) { +func TestPageTestDeleteWithOptionalParams(t *testing.T) { baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -89,12 +89,12 @@ func TestTestDeleteWithOptionalParams(t *testing.T) { option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), option.WithAPIEmail("user@example.com"), ) - _, err := client.Speed.Tests.Delete( + _, err := client.Speed.Pages.Tests.Delete( context.TODO(), "example.com", - speed.TestDeleteParams{ + speed.PageTestDeleteParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Region: cloudflare.F(speed.TestDeleteParamsRegionUsCentral1), + Region: cloudflare.F(speed.PageTestDeleteParamsRegionUsCentral1), }, ) if err != nil { @@ -106,7 +106,7 @@ func TestTestDeleteWithOptionalParams(t *testing.T) { } } -func TestTestGet(t *testing.T) { +func TestPageTestGet(t *testing.T) { baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -119,11 +119,11 @@ func TestTestGet(t *testing.T) { option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), option.WithAPIEmail("user@example.com"), ) - _, err := client.Speed.Tests.Get( + _, err := client.Speed.Pages.Tests.Get( context.TODO(), "example.com", "string", - speed.TestGetParams{ + speed.PageTestGetParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) diff --git a/speed/schedule.go b/speed/schedule.go index 6ffa6980c4..348100e0d0 100644 --- a/speed/schedule.go +++ b/speed/schedule.go @@ -45,6 +45,32 @@ func (r *ScheduleService) New(ctx context.Context, url string, params ScheduleNe return } +// Deletes a scheduled test for a page. +func (r *ScheduleService) Delete(ctx context.Context, url string, params ScheduleDeleteParams, opts ...option.RequestOption) (res *ScheduleDeleteResponse, err error) { + opts = append(r.Options[:], opts...) + var env ScheduleDeleteResponseEnvelope + path := fmt.Sprintf("zones/%s/speed_api/schedule/%s", params.ZoneID, url) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Retrieves the test schedule for a page in a specific region. +func (r *ScheduleService) Get(ctx context.Context, url string, params ScheduleGetParams, opts ...option.RequestOption) (res *Schedule, err error) { + opts = append(r.Options[:], opts...) + var env ScheduleGetResponseEnvelope + path := fmt.Sprintf("zones/%s/speed_api/schedule/%s", params.ZoneID, url) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + // The test schedule. type Schedule struct { // The frequency of the test. @@ -148,6 +174,28 @@ func (r scheduleNewResponseJSON) RawJSON() string { return r.raw } +type ScheduleDeleteResponse struct { + // Number of items affected. + Count float64 `json:"count"` + JSON scheduleDeleteResponseJSON `json:"-"` +} + +// scheduleDeleteResponseJSON contains the JSON metadata for the struct +// [ScheduleDeleteResponse] +type scheduleDeleteResponseJSON struct { + Count apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ScheduleDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r scheduleDeleteResponseJSON) RawJSON() string { + return r.raw +} + type ScheduleNewParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` @@ -224,3 +272,158 @@ func (r *ScheduleNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { func (r scheduleNewResponseEnvelopeJSON) RawJSON() string { return r.raw } + +type ScheduleDeleteParams struct { + // Identifier + ZoneID param.Field[string] `path:"zone_id,required"` + // A test region. + Region param.Field[ScheduleDeleteParamsRegion] `query:"region"` +} + +// URLQuery serializes [ScheduleDeleteParams]'s query parameters as `url.Values`. +func (r ScheduleDeleteParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatRepeat, + NestedFormat: apiquery.NestedQueryFormatBrackets, + }) +} + +// A test region. +type ScheduleDeleteParamsRegion string + +const ( + ScheduleDeleteParamsRegionAsiaEast1 ScheduleDeleteParamsRegion = "asia-east1" + ScheduleDeleteParamsRegionAsiaNortheast1 ScheduleDeleteParamsRegion = "asia-northeast1" + ScheduleDeleteParamsRegionAsiaNortheast2 ScheduleDeleteParamsRegion = "asia-northeast2" + ScheduleDeleteParamsRegionAsiaSouth1 ScheduleDeleteParamsRegion = "asia-south1" + ScheduleDeleteParamsRegionAsiaSoutheast1 ScheduleDeleteParamsRegion = "asia-southeast1" + ScheduleDeleteParamsRegionAustraliaSoutheast1 ScheduleDeleteParamsRegion = "australia-southeast1" + ScheduleDeleteParamsRegionEuropeNorth1 ScheduleDeleteParamsRegion = "europe-north1" + ScheduleDeleteParamsRegionEuropeSouthwest1 ScheduleDeleteParamsRegion = "europe-southwest1" + ScheduleDeleteParamsRegionEuropeWest1 ScheduleDeleteParamsRegion = "europe-west1" + ScheduleDeleteParamsRegionEuropeWest2 ScheduleDeleteParamsRegion = "europe-west2" + ScheduleDeleteParamsRegionEuropeWest3 ScheduleDeleteParamsRegion = "europe-west3" + ScheduleDeleteParamsRegionEuropeWest4 ScheduleDeleteParamsRegion = "europe-west4" + ScheduleDeleteParamsRegionEuropeWest8 ScheduleDeleteParamsRegion = "europe-west8" + ScheduleDeleteParamsRegionEuropeWest9 ScheduleDeleteParamsRegion = "europe-west9" + ScheduleDeleteParamsRegionMeWest1 ScheduleDeleteParamsRegion = "me-west1" + ScheduleDeleteParamsRegionSouthamericaEast1 ScheduleDeleteParamsRegion = "southamerica-east1" + ScheduleDeleteParamsRegionUsCentral1 ScheduleDeleteParamsRegion = "us-central1" + ScheduleDeleteParamsRegionUsEast1 ScheduleDeleteParamsRegion = "us-east1" + ScheduleDeleteParamsRegionUsEast4 ScheduleDeleteParamsRegion = "us-east4" + ScheduleDeleteParamsRegionUsSouth1 ScheduleDeleteParamsRegion = "us-south1" + ScheduleDeleteParamsRegionUsWest1 ScheduleDeleteParamsRegion = "us-west1" +) + +func (r ScheduleDeleteParamsRegion) IsKnown() bool { + switch r { + case ScheduleDeleteParamsRegionAsiaEast1, ScheduleDeleteParamsRegionAsiaNortheast1, ScheduleDeleteParamsRegionAsiaNortheast2, ScheduleDeleteParamsRegionAsiaSouth1, ScheduleDeleteParamsRegionAsiaSoutheast1, ScheduleDeleteParamsRegionAustraliaSoutheast1, ScheduleDeleteParamsRegionEuropeNorth1, ScheduleDeleteParamsRegionEuropeSouthwest1, ScheduleDeleteParamsRegionEuropeWest1, ScheduleDeleteParamsRegionEuropeWest2, ScheduleDeleteParamsRegionEuropeWest3, ScheduleDeleteParamsRegionEuropeWest4, ScheduleDeleteParamsRegionEuropeWest8, ScheduleDeleteParamsRegionEuropeWest9, ScheduleDeleteParamsRegionMeWest1, ScheduleDeleteParamsRegionSouthamericaEast1, ScheduleDeleteParamsRegionUsCentral1, ScheduleDeleteParamsRegionUsEast1, ScheduleDeleteParamsRegionUsEast4, ScheduleDeleteParamsRegionUsSouth1, ScheduleDeleteParamsRegionUsWest1: + return true + } + return false +} + +type ScheduleDeleteResponseEnvelope struct { + Errors interface{} `json:"errors,required"` + Messages interface{} `json:"messages,required"` + Success interface{} `json:"success,required"` + Result ScheduleDeleteResponse `json:"result"` + JSON scheduleDeleteResponseEnvelopeJSON `json:"-"` +} + +// scheduleDeleteResponseEnvelopeJSON contains the JSON metadata for the struct +// [ScheduleDeleteResponseEnvelope] +type scheduleDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ScheduleDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r scheduleDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type ScheduleGetParams struct { + // Identifier + ZoneID param.Field[string] `path:"zone_id,required"` + // A test region. + Region param.Field[ScheduleGetParamsRegion] `query:"region"` +} + +// URLQuery serializes [ScheduleGetParams]'s query parameters as `url.Values`. +func (r ScheduleGetParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatRepeat, + NestedFormat: apiquery.NestedQueryFormatBrackets, + }) +} + +// A test region. +type ScheduleGetParamsRegion string + +const ( + ScheduleGetParamsRegionAsiaEast1 ScheduleGetParamsRegion = "asia-east1" + ScheduleGetParamsRegionAsiaNortheast1 ScheduleGetParamsRegion = "asia-northeast1" + ScheduleGetParamsRegionAsiaNortheast2 ScheduleGetParamsRegion = "asia-northeast2" + ScheduleGetParamsRegionAsiaSouth1 ScheduleGetParamsRegion = "asia-south1" + ScheduleGetParamsRegionAsiaSoutheast1 ScheduleGetParamsRegion = "asia-southeast1" + ScheduleGetParamsRegionAustraliaSoutheast1 ScheduleGetParamsRegion = "australia-southeast1" + ScheduleGetParamsRegionEuropeNorth1 ScheduleGetParamsRegion = "europe-north1" + ScheduleGetParamsRegionEuropeSouthwest1 ScheduleGetParamsRegion = "europe-southwest1" + ScheduleGetParamsRegionEuropeWest1 ScheduleGetParamsRegion = "europe-west1" + ScheduleGetParamsRegionEuropeWest2 ScheduleGetParamsRegion = "europe-west2" + ScheduleGetParamsRegionEuropeWest3 ScheduleGetParamsRegion = "europe-west3" + ScheduleGetParamsRegionEuropeWest4 ScheduleGetParamsRegion = "europe-west4" + ScheduleGetParamsRegionEuropeWest8 ScheduleGetParamsRegion = "europe-west8" + ScheduleGetParamsRegionEuropeWest9 ScheduleGetParamsRegion = "europe-west9" + ScheduleGetParamsRegionMeWest1 ScheduleGetParamsRegion = "me-west1" + ScheduleGetParamsRegionSouthamericaEast1 ScheduleGetParamsRegion = "southamerica-east1" + ScheduleGetParamsRegionUsCentral1 ScheduleGetParamsRegion = "us-central1" + ScheduleGetParamsRegionUsEast1 ScheduleGetParamsRegion = "us-east1" + ScheduleGetParamsRegionUsEast4 ScheduleGetParamsRegion = "us-east4" + ScheduleGetParamsRegionUsSouth1 ScheduleGetParamsRegion = "us-south1" + ScheduleGetParamsRegionUsWest1 ScheduleGetParamsRegion = "us-west1" +) + +func (r ScheduleGetParamsRegion) IsKnown() bool { + switch r { + case ScheduleGetParamsRegionAsiaEast1, ScheduleGetParamsRegionAsiaNortheast1, ScheduleGetParamsRegionAsiaNortheast2, ScheduleGetParamsRegionAsiaSouth1, ScheduleGetParamsRegionAsiaSoutheast1, ScheduleGetParamsRegionAustraliaSoutheast1, ScheduleGetParamsRegionEuropeNorth1, ScheduleGetParamsRegionEuropeSouthwest1, ScheduleGetParamsRegionEuropeWest1, ScheduleGetParamsRegionEuropeWest2, ScheduleGetParamsRegionEuropeWest3, ScheduleGetParamsRegionEuropeWest4, ScheduleGetParamsRegionEuropeWest8, ScheduleGetParamsRegionEuropeWest9, ScheduleGetParamsRegionMeWest1, ScheduleGetParamsRegionSouthamericaEast1, ScheduleGetParamsRegionUsCentral1, ScheduleGetParamsRegionUsEast1, ScheduleGetParamsRegionUsEast4, ScheduleGetParamsRegionUsSouth1, ScheduleGetParamsRegionUsWest1: + return true + } + return false +} + +type ScheduleGetResponseEnvelope struct { + Errors interface{} `json:"errors,required"` + Messages interface{} `json:"messages,required"` + Success interface{} `json:"success,required"` + // The test schedule. + Result Schedule `json:"result"` + JSON scheduleGetResponseEnvelopeJSON `json:"-"` +} + +// scheduleGetResponseEnvelopeJSON contains the JSON metadata for the struct +// [ScheduleGetResponseEnvelope] +type scheduleGetResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ScheduleGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r scheduleGetResponseEnvelopeJSON) RawJSON() string { + return r.raw +} diff --git a/speed/schedule_test.go b/speed/schedule_test.go index 63ad41de94..41e87e63c3 100644 --- a/speed/schedule_test.go +++ b/speed/schedule_test.go @@ -43,3 +43,63 @@ func TestScheduleNewWithOptionalParams(t *testing.T) { t.Fatalf("err should be nil: %s", err.Error()) } } + +func TestScheduleDeleteWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Speed.Schedule.Delete( + context.TODO(), + "example.com", + speed.ScheduleDeleteParams{ + ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + Region: cloudflare.F(speed.ScheduleDeleteParamsRegionUsCentral1), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestScheduleGetWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Speed.Schedule.Get( + context.TODO(), + "example.com", + speed.ScheduleGetParams{ + ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + Region: cloudflare.F(speed.ScheduleGetParamsRegionUsCentral1), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/speed/speed.go b/speed/speed.go index e35127dbe4..20617e2ca3 100644 --- a/speed/speed.go +++ b/speed/speed.go @@ -3,16 +3,7 @@ package speed import ( - "context" - "fmt" - "net/http" - "net/url" - "time" - "github.com/cloudflare/cloudflare-go/v2/internal/apijson" - "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" - "github.com/cloudflare/cloudflare-go/v2/internal/param" - "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" ) @@ -22,7 +13,6 @@ import ( // directly, and instead use the [NewSpeedService] method instead. type SpeedService struct { Options []option.RequestOption - Tests *TestService Schedule *ScheduleService Availabilities *AvailabilityService Pages *PageService @@ -34,52 +24,12 @@ type SpeedService struct { func NewSpeedService(opts ...option.RequestOption) (r *SpeedService) { r = &SpeedService{} r.Options = opts - r.Tests = NewTestService(opts...) r.Schedule = NewScheduleService(opts...) r.Availabilities = NewAvailabilityService(opts...) r.Pages = NewPageService(opts...) return } -// Deletes a scheduled test for a page. -func (r *SpeedService) Delete(ctx context.Context, url string, params SpeedDeleteParams, opts ...option.RequestOption) (res *SpeedDeleteResponse, err error) { - opts = append(r.Options[:], opts...) - var env SpeedDeleteResponseEnvelope - path := fmt.Sprintf("zones/%s/speed_api/schedule/%s", params.ZoneID, url) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, params, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// Retrieves the test schedule for a page in a specific region. -func (r *SpeedService) ScheduleGet(ctx context.Context, url string, params SpeedScheduleGetParams, opts ...option.RequestOption) (res *Schedule, err error) { - opts = append(r.Options[:], opts...) - var env SpeedScheduleGetResponseEnvelope - path := fmt.Sprintf("zones/%s/speed_api/schedule/%s", params.ZoneID, url) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, params, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// Lists the core web vital metrics trend over time for a specific page. -func (r *SpeedService) TrendsList(ctx context.Context, url string, params SpeedTrendsListParams, opts ...option.RequestOption) (res *Trend, err error) { - opts = append(r.Options[:], opts...) - var env SpeedTrendsListResponseEnvelope - path := fmt.Sprintf("zones/%s/speed_api/pages/%s/trend", params.ZoneID, url) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, params, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - // A test region with a label. type LabeledRegion struct { Label string `json:"label"` @@ -315,281 +265,3 @@ func (r *Trend) UnmarshalJSON(data []byte) (err error) { func (r trendJSON) RawJSON() string { return r.raw } - -type SpeedDeleteResponse struct { - // Number of items affected. - Count float64 `json:"count"` - JSON speedDeleteResponseJSON `json:"-"` -} - -// speedDeleteResponseJSON contains the JSON metadata for the struct -// [SpeedDeleteResponse] -type speedDeleteResponseJSON struct { - Count apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SpeedDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r speedDeleteResponseJSON) RawJSON() string { - return r.raw -} - -type SpeedDeleteParams struct { - // Identifier - ZoneID param.Field[string] `path:"zone_id,required"` - // A test region. - Region param.Field[SpeedDeleteParamsRegion] `query:"region"` -} - -// URLQuery serializes [SpeedDeleteParams]'s query parameters as `url.Values`. -func (r SpeedDeleteParams) URLQuery() (v url.Values) { - return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ - ArrayFormat: apiquery.ArrayQueryFormatRepeat, - NestedFormat: apiquery.NestedQueryFormatBrackets, - }) -} - -// A test region. -type SpeedDeleteParamsRegion string - -const ( - SpeedDeleteParamsRegionAsiaEast1 SpeedDeleteParamsRegion = "asia-east1" - SpeedDeleteParamsRegionAsiaNortheast1 SpeedDeleteParamsRegion = "asia-northeast1" - SpeedDeleteParamsRegionAsiaNortheast2 SpeedDeleteParamsRegion = "asia-northeast2" - SpeedDeleteParamsRegionAsiaSouth1 SpeedDeleteParamsRegion = "asia-south1" - SpeedDeleteParamsRegionAsiaSoutheast1 SpeedDeleteParamsRegion = "asia-southeast1" - SpeedDeleteParamsRegionAustraliaSoutheast1 SpeedDeleteParamsRegion = "australia-southeast1" - SpeedDeleteParamsRegionEuropeNorth1 SpeedDeleteParamsRegion = "europe-north1" - SpeedDeleteParamsRegionEuropeSouthwest1 SpeedDeleteParamsRegion = "europe-southwest1" - SpeedDeleteParamsRegionEuropeWest1 SpeedDeleteParamsRegion = "europe-west1" - SpeedDeleteParamsRegionEuropeWest2 SpeedDeleteParamsRegion = "europe-west2" - SpeedDeleteParamsRegionEuropeWest3 SpeedDeleteParamsRegion = "europe-west3" - SpeedDeleteParamsRegionEuropeWest4 SpeedDeleteParamsRegion = "europe-west4" - SpeedDeleteParamsRegionEuropeWest8 SpeedDeleteParamsRegion = "europe-west8" - SpeedDeleteParamsRegionEuropeWest9 SpeedDeleteParamsRegion = "europe-west9" - SpeedDeleteParamsRegionMeWest1 SpeedDeleteParamsRegion = "me-west1" - SpeedDeleteParamsRegionSouthamericaEast1 SpeedDeleteParamsRegion = "southamerica-east1" - SpeedDeleteParamsRegionUsCentral1 SpeedDeleteParamsRegion = "us-central1" - SpeedDeleteParamsRegionUsEast1 SpeedDeleteParamsRegion = "us-east1" - SpeedDeleteParamsRegionUsEast4 SpeedDeleteParamsRegion = "us-east4" - SpeedDeleteParamsRegionUsSouth1 SpeedDeleteParamsRegion = "us-south1" - SpeedDeleteParamsRegionUsWest1 SpeedDeleteParamsRegion = "us-west1" -) - -func (r SpeedDeleteParamsRegion) IsKnown() bool { - switch r { - case SpeedDeleteParamsRegionAsiaEast1, SpeedDeleteParamsRegionAsiaNortheast1, SpeedDeleteParamsRegionAsiaNortheast2, SpeedDeleteParamsRegionAsiaSouth1, SpeedDeleteParamsRegionAsiaSoutheast1, SpeedDeleteParamsRegionAustraliaSoutheast1, SpeedDeleteParamsRegionEuropeNorth1, SpeedDeleteParamsRegionEuropeSouthwest1, SpeedDeleteParamsRegionEuropeWest1, SpeedDeleteParamsRegionEuropeWest2, SpeedDeleteParamsRegionEuropeWest3, SpeedDeleteParamsRegionEuropeWest4, SpeedDeleteParamsRegionEuropeWest8, SpeedDeleteParamsRegionEuropeWest9, SpeedDeleteParamsRegionMeWest1, SpeedDeleteParamsRegionSouthamericaEast1, SpeedDeleteParamsRegionUsCentral1, SpeedDeleteParamsRegionUsEast1, SpeedDeleteParamsRegionUsEast4, SpeedDeleteParamsRegionUsSouth1, SpeedDeleteParamsRegionUsWest1: - return true - } - return false -} - -type SpeedDeleteResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Success interface{} `json:"success,required"` - Result SpeedDeleteResponse `json:"result"` - JSON speedDeleteResponseEnvelopeJSON `json:"-"` -} - -// speedDeleteResponseEnvelopeJSON contains the JSON metadata for the struct -// [SpeedDeleteResponseEnvelope] -type speedDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - Result apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SpeedDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r speedDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -type SpeedScheduleGetParams struct { - // Identifier - ZoneID param.Field[string] `path:"zone_id,required"` - // A test region. - Region param.Field[SpeedScheduleGetParamsRegion] `query:"region"` -} - -// URLQuery serializes [SpeedScheduleGetParams]'s query parameters as `url.Values`. -func (r SpeedScheduleGetParams) URLQuery() (v url.Values) { - return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ - ArrayFormat: apiquery.ArrayQueryFormatRepeat, - NestedFormat: apiquery.NestedQueryFormatBrackets, - }) -} - -// A test region. -type SpeedScheduleGetParamsRegion string - -const ( - SpeedScheduleGetParamsRegionAsiaEast1 SpeedScheduleGetParamsRegion = "asia-east1" - SpeedScheduleGetParamsRegionAsiaNortheast1 SpeedScheduleGetParamsRegion = "asia-northeast1" - SpeedScheduleGetParamsRegionAsiaNortheast2 SpeedScheduleGetParamsRegion = "asia-northeast2" - SpeedScheduleGetParamsRegionAsiaSouth1 SpeedScheduleGetParamsRegion = "asia-south1" - SpeedScheduleGetParamsRegionAsiaSoutheast1 SpeedScheduleGetParamsRegion = "asia-southeast1" - SpeedScheduleGetParamsRegionAustraliaSoutheast1 SpeedScheduleGetParamsRegion = "australia-southeast1" - SpeedScheduleGetParamsRegionEuropeNorth1 SpeedScheduleGetParamsRegion = "europe-north1" - SpeedScheduleGetParamsRegionEuropeSouthwest1 SpeedScheduleGetParamsRegion = "europe-southwest1" - SpeedScheduleGetParamsRegionEuropeWest1 SpeedScheduleGetParamsRegion = "europe-west1" - SpeedScheduleGetParamsRegionEuropeWest2 SpeedScheduleGetParamsRegion = "europe-west2" - SpeedScheduleGetParamsRegionEuropeWest3 SpeedScheduleGetParamsRegion = "europe-west3" - SpeedScheduleGetParamsRegionEuropeWest4 SpeedScheduleGetParamsRegion = "europe-west4" - SpeedScheduleGetParamsRegionEuropeWest8 SpeedScheduleGetParamsRegion = "europe-west8" - SpeedScheduleGetParamsRegionEuropeWest9 SpeedScheduleGetParamsRegion = "europe-west9" - SpeedScheduleGetParamsRegionMeWest1 SpeedScheduleGetParamsRegion = "me-west1" - SpeedScheduleGetParamsRegionSouthamericaEast1 SpeedScheduleGetParamsRegion = "southamerica-east1" - SpeedScheduleGetParamsRegionUsCentral1 SpeedScheduleGetParamsRegion = "us-central1" - SpeedScheduleGetParamsRegionUsEast1 SpeedScheduleGetParamsRegion = "us-east1" - SpeedScheduleGetParamsRegionUsEast4 SpeedScheduleGetParamsRegion = "us-east4" - SpeedScheduleGetParamsRegionUsSouth1 SpeedScheduleGetParamsRegion = "us-south1" - SpeedScheduleGetParamsRegionUsWest1 SpeedScheduleGetParamsRegion = "us-west1" -) - -func (r SpeedScheduleGetParamsRegion) IsKnown() bool { - switch r { - case SpeedScheduleGetParamsRegionAsiaEast1, SpeedScheduleGetParamsRegionAsiaNortheast1, SpeedScheduleGetParamsRegionAsiaNortheast2, SpeedScheduleGetParamsRegionAsiaSouth1, SpeedScheduleGetParamsRegionAsiaSoutheast1, SpeedScheduleGetParamsRegionAustraliaSoutheast1, SpeedScheduleGetParamsRegionEuropeNorth1, SpeedScheduleGetParamsRegionEuropeSouthwest1, SpeedScheduleGetParamsRegionEuropeWest1, SpeedScheduleGetParamsRegionEuropeWest2, SpeedScheduleGetParamsRegionEuropeWest3, SpeedScheduleGetParamsRegionEuropeWest4, SpeedScheduleGetParamsRegionEuropeWest8, SpeedScheduleGetParamsRegionEuropeWest9, SpeedScheduleGetParamsRegionMeWest1, SpeedScheduleGetParamsRegionSouthamericaEast1, SpeedScheduleGetParamsRegionUsCentral1, SpeedScheduleGetParamsRegionUsEast1, SpeedScheduleGetParamsRegionUsEast4, SpeedScheduleGetParamsRegionUsSouth1, SpeedScheduleGetParamsRegionUsWest1: - return true - } - return false -} - -type SpeedScheduleGetResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Success interface{} `json:"success,required"` - // The test schedule. - Result Schedule `json:"result"` - JSON speedScheduleGetResponseEnvelopeJSON `json:"-"` -} - -// speedScheduleGetResponseEnvelopeJSON contains the JSON metadata for the struct -// [SpeedScheduleGetResponseEnvelope] -type speedScheduleGetResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - Result apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SpeedScheduleGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r speedScheduleGetResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -type SpeedTrendsListParams struct { - // Identifier - ZoneID param.Field[string] `path:"zone_id,required"` - // The type of device. - DeviceType param.Field[SpeedTrendsListParamsDeviceType] `query:"deviceType,required"` - // A comma-separated list of metrics to include in the results. - Metrics param.Field[string] `query:"metrics,required"` - // A test region. - Region param.Field[SpeedTrendsListParamsRegion] `query:"region,required"` - Start param.Field[time.Time] `query:"start,required" format:"date-time"` - // The timezone of the start and end timestamps. - Tz param.Field[string] `query:"tz,required"` - End param.Field[time.Time] `query:"end" format:"date-time"` -} - -// URLQuery serializes [SpeedTrendsListParams]'s query parameters as `url.Values`. -func (r SpeedTrendsListParams) URLQuery() (v url.Values) { - return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ - ArrayFormat: apiquery.ArrayQueryFormatRepeat, - NestedFormat: apiquery.NestedQueryFormatBrackets, - }) -} - -// The type of device. -type SpeedTrendsListParamsDeviceType string - -const ( - SpeedTrendsListParamsDeviceTypeDesktop SpeedTrendsListParamsDeviceType = "DESKTOP" - SpeedTrendsListParamsDeviceTypeMobile SpeedTrendsListParamsDeviceType = "MOBILE" -) - -func (r SpeedTrendsListParamsDeviceType) IsKnown() bool { - switch r { - case SpeedTrendsListParamsDeviceTypeDesktop, SpeedTrendsListParamsDeviceTypeMobile: - return true - } - return false -} - -// A test region. -type SpeedTrendsListParamsRegion string - -const ( - SpeedTrendsListParamsRegionAsiaEast1 SpeedTrendsListParamsRegion = "asia-east1" - SpeedTrendsListParamsRegionAsiaNortheast1 SpeedTrendsListParamsRegion = "asia-northeast1" - SpeedTrendsListParamsRegionAsiaNortheast2 SpeedTrendsListParamsRegion = "asia-northeast2" - SpeedTrendsListParamsRegionAsiaSouth1 SpeedTrendsListParamsRegion = "asia-south1" - SpeedTrendsListParamsRegionAsiaSoutheast1 SpeedTrendsListParamsRegion = "asia-southeast1" - SpeedTrendsListParamsRegionAustraliaSoutheast1 SpeedTrendsListParamsRegion = "australia-southeast1" - SpeedTrendsListParamsRegionEuropeNorth1 SpeedTrendsListParamsRegion = "europe-north1" - SpeedTrendsListParamsRegionEuropeSouthwest1 SpeedTrendsListParamsRegion = "europe-southwest1" - SpeedTrendsListParamsRegionEuropeWest1 SpeedTrendsListParamsRegion = "europe-west1" - SpeedTrendsListParamsRegionEuropeWest2 SpeedTrendsListParamsRegion = "europe-west2" - SpeedTrendsListParamsRegionEuropeWest3 SpeedTrendsListParamsRegion = "europe-west3" - SpeedTrendsListParamsRegionEuropeWest4 SpeedTrendsListParamsRegion = "europe-west4" - SpeedTrendsListParamsRegionEuropeWest8 SpeedTrendsListParamsRegion = "europe-west8" - SpeedTrendsListParamsRegionEuropeWest9 SpeedTrendsListParamsRegion = "europe-west9" - SpeedTrendsListParamsRegionMeWest1 SpeedTrendsListParamsRegion = "me-west1" - SpeedTrendsListParamsRegionSouthamericaEast1 SpeedTrendsListParamsRegion = "southamerica-east1" - SpeedTrendsListParamsRegionUsCentral1 SpeedTrendsListParamsRegion = "us-central1" - SpeedTrendsListParamsRegionUsEast1 SpeedTrendsListParamsRegion = "us-east1" - SpeedTrendsListParamsRegionUsEast4 SpeedTrendsListParamsRegion = "us-east4" - SpeedTrendsListParamsRegionUsSouth1 SpeedTrendsListParamsRegion = "us-south1" - SpeedTrendsListParamsRegionUsWest1 SpeedTrendsListParamsRegion = "us-west1" -) - -func (r SpeedTrendsListParamsRegion) IsKnown() bool { - switch r { - case SpeedTrendsListParamsRegionAsiaEast1, SpeedTrendsListParamsRegionAsiaNortheast1, SpeedTrendsListParamsRegionAsiaNortheast2, SpeedTrendsListParamsRegionAsiaSouth1, SpeedTrendsListParamsRegionAsiaSoutheast1, SpeedTrendsListParamsRegionAustraliaSoutheast1, SpeedTrendsListParamsRegionEuropeNorth1, SpeedTrendsListParamsRegionEuropeSouthwest1, SpeedTrendsListParamsRegionEuropeWest1, SpeedTrendsListParamsRegionEuropeWest2, SpeedTrendsListParamsRegionEuropeWest3, SpeedTrendsListParamsRegionEuropeWest4, SpeedTrendsListParamsRegionEuropeWest8, SpeedTrendsListParamsRegionEuropeWest9, SpeedTrendsListParamsRegionMeWest1, SpeedTrendsListParamsRegionSouthamericaEast1, SpeedTrendsListParamsRegionUsCentral1, SpeedTrendsListParamsRegionUsEast1, SpeedTrendsListParamsRegionUsEast4, SpeedTrendsListParamsRegionUsSouth1, SpeedTrendsListParamsRegionUsWest1: - return true - } - return false -} - -type SpeedTrendsListResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Success interface{} `json:"success,required"` - Result Trend `json:"result"` - JSON speedTrendsListResponseEnvelopeJSON `json:"-"` -} - -// speedTrendsListResponseEnvelopeJSON contains the JSON metadata for the struct -// [SpeedTrendsListResponseEnvelope] -type speedTrendsListResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - Result apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SpeedTrendsListResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r speedTrendsListResponseEnvelopeJSON) RawJSON() string { - return r.raw -} diff --git a/speed/speed_test.go b/speed/speed_test.go deleted file mode 100644 index 27c06ace97..0000000000 --- a/speed/speed_test.go +++ /dev/null @@ -1,112 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -package speed_test - -import ( - "context" - "errors" - "os" - "testing" - "time" - - "github.com/cloudflare/cloudflare-go/v2" - "github.com/cloudflare/cloudflare-go/v2/internal/testutil" - "github.com/cloudflare/cloudflare-go/v2/option" - "github.com/cloudflare/cloudflare-go/v2/speed" -) - -func TestSpeedDeleteWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.Speed.Delete( - context.TODO(), - "example.com", - speed.SpeedDeleteParams{ - ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Region: cloudflare.F(speed.SpeedDeleteParamsRegionUsCentral1), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestSpeedScheduleGetWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.Speed.ScheduleGet( - context.TODO(), - "example.com", - speed.SpeedScheduleGetParams{ - ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Region: cloudflare.F(speed.SpeedScheduleGetParamsRegionUsCentral1), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestSpeedTrendsListWithOptionalParams(t *testing.T) { - t.Skip("TODO: investigate broken test") - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.Speed.TrendsList( - context.TODO(), - "example.com", - speed.SpeedTrendsListParams{ - ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - DeviceType: cloudflare.F(speed.SpeedTrendsListParamsDeviceTypeDesktop), - Metrics: cloudflare.F("performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls"), - Region: cloudflare.F(speed.SpeedTrendsListParamsRegionUsCentral1), - Start: cloudflare.F(time.Now()), - Tz: cloudflare.F("string"), - End: cloudflare.F(time.Now()), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/speed/test.go b/speed/test.go deleted file mode 100644 index e97b41dea9..0000000000 --- a/speed/test.go +++ /dev/null @@ -1,448 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -package speed - -import ( - "context" - "fmt" - "net/http" - "net/url" - "time" - - "github.com/cloudflare/cloudflare-go/v2/internal/apijson" - "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" - "github.com/cloudflare/cloudflare-go/v2/internal/param" - "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" - "github.com/cloudflare/cloudflare-go/v2/option" - "github.com/cloudflare/cloudflare-go/v2/shared" -) - -// TestService contains methods and other services that help with interacting with -// the cloudflare API. Note, unlike clients, this service does not read variables -// from the environment automatically. You should not instantiate this service -// directly, and instead use the [NewTestService] method instead. -type TestService struct { - Options []option.RequestOption -} - -// NewTestService generates a new service that applies the given options to each -// request. These options are applied after the parent client's options (if there -// is one), and before any request-specific options. -func NewTestService(opts ...option.RequestOption) (r *TestService) { - r = &TestService{} - r.Options = opts - return -} - -// Starts a test for a specific webpage, in a specific region. -func (r *TestService) New(ctx context.Context, url string, params TestNewParams, opts ...option.RequestOption) (res *Test, err error) { - opts = append(r.Options[:], opts...) - var env TestNewResponseEnvelope - path := fmt.Sprintf("zones/%s/speed_api/pages/%s/tests", params.ZoneID, url) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// Test history (list of tests) for a specific webpage. -func (r *TestService) List(ctx context.Context, url string, params TestListParams, opts ...option.RequestOption) (res *TestListResponse, err error) { - opts = append(r.Options[:], opts...) - path := fmt.Sprintf("zones/%s/speed_api/pages/%s/tests", params.ZoneID, url) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, params, &res, opts...) - return -} - -// Deletes all tests for a specific webpage from a specific region. Deleted tests -// are still counted as part of the quota. -func (r *TestService) Delete(ctx context.Context, url string, params TestDeleteParams, opts ...option.RequestOption) (res *TestDeleteResponse, err error) { - opts = append(r.Options[:], opts...) - var env TestDeleteResponseEnvelope - path := fmt.Sprintf("zones/%s/speed_api/pages/%s/tests", params.ZoneID, url) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, params, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// Retrieves the result of a specific test. -func (r *TestService) Get(ctx context.Context, url string, testID string, query TestGetParams, opts ...option.RequestOption) (res *Test, err error) { - opts = append(r.Options[:], opts...) - var env TestGetResponseEnvelope - path := fmt.Sprintf("zones/%s/speed_api/pages/%s/tests/%s", query.ZoneID, url, testID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -type Test struct { - // UUID - ID string `json:"id"` - Date time.Time `json:"date" format:"date-time"` - // The Lighthouse report. - DesktopReport LighthouseReport `json:"desktopReport"` - // The Lighthouse report. - MobileReport LighthouseReport `json:"mobileReport"` - // A test region with a label. - Region LabeledRegion `json:"region"` - // The frequency of the test. - ScheduleFrequency TestScheduleFrequency `json:"scheduleFrequency"` - // A URL. - URL string `json:"url"` - JSON testJSON `json:"-"` -} - -// testJSON contains the JSON metadata for the struct [Test] -type testJSON struct { - ID apijson.Field - Date apijson.Field - DesktopReport apijson.Field - MobileReport apijson.Field - Region apijson.Field - ScheduleFrequency apijson.Field - URL apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *Test) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r testJSON) RawJSON() string { - return r.raw -} - -// The frequency of the test. -type TestScheduleFrequency string - -const ( - TestScheduleFrequencyDaily TestScheduleFrequency = "DAILY" - TestScheduleFrequencyWeekly TestScheduleFrequency = "WEEKLY" -) - -func (r TestScheduleFrequency) IsKnown() bool { - switch r { - case TestScheduleFrequencyDaily, TestScheduleFrequencyWeekly: - return true - } - return false -} - -type TestListResponse struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful. - Success bool `json:"success,required"` - ResultInfo TestListResponseResultInfo `json:"result_info"` - JSON testListResponseJSON `json:"-"` -} - -// testListResponseJSON contains the JSON metadata for the struct -// [TestListResponse] -type testListResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - ResultInfo apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *TestListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r testListResponseJSON) RawJSON() string { - return r.raw -} - -type TestListResponseResultInfo struct { - Count int64 `json:"count"` - Page int64 `json:"page"` - PerPage int64 `json:"per_page"` - TotalCount int64 `json:"total_count"` - JSON testListResponseResultInfoJSON `json:"-"` -} - -// testListResponseResultInfoJSON contains the JSON metadata for the struct -// [TestListResponseResultInfo] -type testListResponseResultInfoJSON struct { - Count apijson.Field - Page apijson.Field - PerPage apijson.Field - TotalCount apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *TestListResponseResultInfo) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r testListResponseResultInfoJSON) RawJSON() string { - return r.raw -} - -type TestDeleteResponse struct { - // Number of items affected. - Count float64 `json:"count"` - JSON testDeleteResponseJSON `json:"-"` -} - -// testDeleteResponseJSON contains the JSON metadata for the struct -// [TestDeleteResponse] -type testDeleteResponseJSON struct { - Count apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *TestDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r testDeleteResponseJSON) RawJSON() string { - return r.raw -} - -type TestNewParams struct { - // Identifier - ZoneID param.Field[string] `path:"zone_id,required"` - // A test region. - Region param.Field[TestNewParamsRegion] `json:"region"` -} - -func (r TestNewParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// A test region. -type TestNewParamsRegion string - -const ( - TestNewParamsRegionAsiaEast1 TestNewParamsRegion = "asia-east1" - TestNewParamsRegionAsiaNortheast1 TestNewParamsRegion = "asia-northeast1" - TestNewParamsRegionAsiaNortheast2 TestNewParamsRegion = "asia-northeast2" - TestNewParamsRegionAsiaSouth1 TestNewParamsRegion = "asia-south1" - TestNewParamsRegionAsiaSoutheast1 TestNewParamsRegion = "asia-southeast1" - TestNewParamsRegionAustraliaSoutheast1 TestNewParamsRegion = "australia-southeast1" - TestNewParamsRegionEuropeNorth1 TestNewParamsRegion = "europe-north1" - TestNewParamsRegionEuropeSouthwest1 TestNewParamsRegion = "europe-southwest1" - TestNewParamsRegionEuropeWest1 TestNewParamsRegion = "europe-west1" - TestNewParamsRegionEuropeWest2 TestNewParamsRegion = "europe-west2" - TestNewParamsRegionEuropeWest3 TestNewParamsRegion = "europe-west3" - TestNewParamsRegionEuropeWest4 TestNewParamsRegion = "europe-west4" - TestNewParamsRegionEuropeWest8 TestNewParamsRegion = "europe-west8" - TestNewParamsRegionEuropeWest9 TestNewParamsRegion = "europe-west9" - TestNewParamsRegionMeWest1 TestNewParamsRegion = "me-west1" - TestNewParamsRegionSouthamericaEast1 TestNewParamsRegion = "southamerica-east1" - TestNewParamsRegionUsCentral1 TestNewParamsRegion = "us-central1" - TestNewParamsRegionUsEast1 TestNewParamsRegion = "us-east1" - TestNewParamsRegionUsEast4 TestNewParamsRegion = "us-east4" - TestNewParamsRegionUsSouth1 TestNewParamsRegion = "us-south1" - TestNewParamsRegionUsWest1 TestNewParamsRegion = "us-west1" -) - -func (r TestNewParamsRegion) IsKnown() bool { - switch r { - case TestNewParamsRegionAsiaEast1, TestNewParamsRegionAsiaNortheast1, TestNewParamsRegionAsiaNortheast2, TestNewParamsRegionAsiaSouth1, TestNewParamsRegionAsiaSoutheast1, TestNewParamsRegionAustraliaSoutheast1, TestNewParamsRegionEuropeNorth1, TestNewParamsRegionEuropeSouthwest1, TestNewParamsRegionEuropeWest1, TestNewParamsRegionEuropeWest2, TestNewParamsRegionEuropeWest3, TestNewParamsRegionEuropeWest4, TestNewParamsRegionEuropeWest8, TestNewParamsRegionEuropeWest9, TestNewParamsRegionMeWest1, TestNewParamsRegionSouthamericaEast1, TestNewParamsRegionUsCentral1, TestNewParamsRegionUsEast1, TestNewParamsRegionUsEast4, TestNewParamsRegionUsSouth1, TestNewParamsRegionUsWest1: - return true - } - return false -} - -type TestNewResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Success interface{} `json:"success,required"` - Result Test `json:"result"` - JSON testNewResponseEnvelopeJSON `json:"-"` -} - -// testNewResponseEnvelopeJSON contains the JSON metadata for the struct -// [TestNewResponseEnvelope] -type testNewResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - Result apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *TestNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r testNewResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -type TestListParams struct { - // Identifier - ZoneID param.Field[string] `path:"zone_id,required"` - Page param.Field[int64] `query:"page"` - PerPage param.Field[int64] `query:"per_page"` - // A test region. - Region param.Field[TestListParamsRegion] `query:"region"` -} - -// URLQuery serializes [TestListParams]'s query parameters as `url.Values`. -func (r TestListParams) URLQuery() (v url.Values) { - return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ - ArrayFormat: apiquery.ArrayQueryFormatRepeat, - NestedFormat: apiquery.NestedQueryFormatBrackets, - }) -} - -// A test region. -type TestListParamsRegion string - -const ( - TestListParamsRegionAsiaEast1 TestListParamsRegion = "asia-east1" - TestListParamsRegionAsiaNortheast1 TestListParamsRegion = "asia-northeast1" - TestListParamsRegionAsiaNortheast2 TestListParamsRegion = "asia-northeast2" - TestListParamsRegionAsiaSouth1 TestListParamsRegion = "asia-south1" - TestListParamsRegionAsiaSoutheast1 TestListParamsRegion = "asia-southeast1" - TestListParamsRegionAustraliaSoutheast1 TestListParamsRegion = "australia-southeast1" - TestListParamsRegionEuropeNorth1 TestListParamsRegion = "europe-north1" - TestListParamsRegionEuropeSouthwest1 TestListParamsRegion = "europe-southwest1" - TestListParamsRegionEuropeWest1 TestListParamsRegion = "europe-west1" - TestListParamsRegionEuropeWest2 TestListParamsRegion = "europe-west2" - TestListParamsRegionEuropeWest3 TestListParamsRegion = "europe-west3" - TestListParamsRegionEuropeWest4 TestListParamsRegion = "europe-west4" - TestListParamsRegionEuropeWest8 TestListParamsRegion = "europe-west8" - TestListParamsRegionEuropeWest9 TestListParamsRegion = "europe-west9" - TestListParamsRegionMeWest1 TestListParamsRegion = "me-west1" - TestListParamsRegionSouthamericaEast1 TestListParamsRegion = "southamerica-east1" - TestListParamsRegionUsCentral1 TestListParamsRegion = "us-central1" - TestListParamsRegionUsEast1 TestListParamsRegion = "us-east1" - TestListParamsRegionUsEast4 TestListParamsRegion = "us-east4" - TestListParamsRegionUsSouth1 TestListParamsRegion = "us-south1" - TestListParamsRegionUsWest1 TestListParamsRegion = "us-west1" -) - -func (r TestListParamsRegion) IsKnown() bool { - switch r { - case TestListParamsRegionAsiaEast1, TestListParamsRegionAsiaNortheast1, TestListParamsRegionAsiaNortheast2, TestListParamsRegionAsiaSouth1, TestListParamsRegionAsiaSoutheast1, TestListParamsRegionAustraliaSoutheast1, TestListParamsRegionEuropeNorth1, TestListParamsRegionEuropeSouthwest1, TestListParamsRegionEuropeWest1, TestListParamsRegionEuropeWest2, TestListParamsRegionEuropeWest3, TestListParamsRegionEuropeWest4, TestListParamsRegionEuropeWest8, TestListParamsRegionEuropeWest9, TestListParamsRegionMeWest1, TestListParamsRegionSouthamericaEast1, TestListParamsRegionUsCentral1, TestListParamsRegionUsEast1, TestListParamsRegionUsEast4, TestListParamsRegionUsSouth1, TestListParamsRegionUsWest1: - return true - } - return false -} - -type TestDeleteParams struct { - // Identifier - ZoneID param.Field[string] `path:"zone_id,required"` - // A test region. - Region param.Field[TestDeleteParamsRegion] `query:"region"` -} - -// URLQuery serializes [TestDeleteParams]'s query parameters as `url.Values`. -func (r TestDeleteParams) URLQuery() (v url.Values) { - return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ - ArrayFormat: apiquery.ArrayQueryFormatRepeat, - NestedFormat: apiquery.NestedQueryFormatBrackets, - }) -} - -// A test region. -type TestDeleteParamsRegion string - -const ( - TestDeleteParamsRegionAsiaEast1 TestDeleteParamsRegion = "asia-east1" - TestDeleteParamsRegionAsiaNortheast1 TestDeleteParamsRegion = "asia-northeast1" - TestDeleteParamsRegionAsiaNortheast2 TestDeleteParamsRegion = "asia-northeast2" - TestDeleteParamsRegionAsiaSouth1 TestDeleteParamsRegion = "asia-south1" - TestDeleteParamsRegionAsiaSoutheast1 TestDeleteParamsRegion = "asia-southeast1" - TestDeleteParamsRegionAustraliaSoutheast1 TestDeleteParamsRegion = "australia-southeast1" - TestDeleteParamsRegionEuropeNorth1 TestDeleteParamsRegion = "europe-north1" - TestDeleteParamsRegionEuropeSouthwest1 TestDeleteParamsRegion = "europe-southwest1" - TestDeleteParamsRegionEuropeWest1 TestDeleteParamsRegion = "europe-west1" - TestDeleteParamsRegionEuropeWest2 TestDeleteParamsRegion = "europe-west2" - TestDeleteParamsRegionEuropeWest3 TestDeleteParamsRegion = "europe-west3" - TestDeleteParamsRegionEuropeWest4 TestDeleteParamsRegion = "europe-west4" - TestDeleteParamsRegionEuropeWest8 TestDeleteParamsRegion = "europe-west8" - TestDeleteParamsRegionEuropeWest9 TestDeleteParamsRegion = "europe-west9" - TestDeleteParamsRegionMeWest1 TestDeleteParamsRegion = "me-west1" - TestDeleteParamsRegionSouthamericaEast1 TestDeleteParamsRegion = "southamerica-east1" - TestDeleteParamsRegionUsCentral1 TestDeleteParamsRegion = "us-central1" - TestDeleteParamsRegionUsEast1 TestDeleteParamsRegion = "us-east1" - TestDeleteParamsRegionUsEast4 TestDeleteParamsRegion = "us-east4" - TestDeleteParamsRegionUsSouth1 TestDeleteParamsRegion = "us-south1" - TestDeleteParamsRegionUsWest1 TestDeleteParamsRegion = "us-west1" -) - -func (r TestDeleteParamsRegion) IsKnown() bool { - switch r { - case TestDeleteParamsRegionAsiaEast1, TestDeleteParamsRegionAsiaNortheast1, TestDeleteParamsRegionAsiaNortheast2, TestDeleteParamsRegionAsiaSouth1, TestDeleteParamsRegionAsiaSoutheast1, TestDeleteParamsRegionAustraliaSoutheast1, TestDeleteParamsRegionEuropeNorth1, TestDeleteParamsRegionEuropeSouthwest1, TestDeleteParamsRegionEuropeWest1, TestDeleteParamsRegionEuropeWest2, TestDeleteParamsRegionEuropeWest3, TestDeleteParamsRegionEuropeWest4, TestDeleteParamsRegionEuropeWest8, TestDeleteParamsRegionEuropeWest9, TestDeleteParamsRegionMeWest1, TestDeleteParamsRegionSouthamericaEast1, TestDeleteParamsRegionUsCentral1, TestDeleteParamsRegionUsEast1, TestDeleteParamsRegionUsEast4, TestDeleteParamsRegionUsSouth1, TestDeleteParamsRegionUsWest1: - return true - } - return false -} - -type TestDeleteResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Success interface{} `json:"success,required"` - Result TestDeleteResponse `json:"result"` - JSON testDeleteResponseEnvelopeJSON `json:"-"` -} - -// testDeleteResponseEnvelopeJSON contains the JSON metadata for the struct -// [TestDeleteResponseEnvelope] -type testDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - Result apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *TestDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r testDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -type TestGetParams struct { - // Identifier - ZoneID param.Field[string] `path:"zone_id,required"` -} - -type TestGetResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Success interface{} `json:"success,required"` - Result Test `json:"result"` - JSON testGetResponseEnvelopeJSON `json:"-"` -} - -// testGetResponseEnvelopeJSON contains the JSON metadata for the struct -// [TestGetResponseEnvelope] -type testGetResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - Result apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *TestGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r testGetResponseEnvelopeJSON) RawJSON() string { - return r.raw -} From 7fa905b981baaca160edaa67208af517a37f1902 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 07:57:57 +0000 Subject: [PATCH 059/127] feat(api): OpenAPI spec update via Stainless API (#1902) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 2a6632a64c..0520d4dfb7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7add9c69609ff21483285ac9b11d2325b0b64fd980726fe0d40fcb51da472afb.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cc3299608e8bb30103d79d6bdc29758d43899b0393afe2153bea75e201ac0795.yml From 94fd2fa0767c6ec5cbbbc4aa25a20eb5a981f1af Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 07:59:53 +0000 Subject: [PATCH 060/127] feat(api): update via SDK Studio (#1903) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 0520d4dfb7..2a6632a64c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cc3299608e8bb30103d79d6bdc29758d43899b0393afe2153bea75e201ac0795.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7add9c69609ff21483285ac9b11d2325b0b64fd980726fe0d40fcb51da472afb.yml From ba91f415500e7c54c7ba4d3577cf16c3fa5c7aec Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 09:48:26 +0000 Subject: [PATCH 061/127] feat(api): OpenAPI spec update via Stainless API (#1904) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 2a6632a64c..0520d4dfb7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7add9c69609ff21483285ac9b11d2325b0b64fd980726fe0d40fcb51da472afb.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cc3299608e8bb30103d79d6bdc29758d43899b0393afe2153bea75e201ac0795.yml From 685462c64a343e7fc48a84e5fbac276b802ad87a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 09:59:13 +0000 Subject: [PATCH 062/127] feat(api): OpenAPI spec update via Stainless API (#1905) --- .stats.yml | 2 +- url_scanner/urlscanner.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0520d4dfb7..3a8d5c3a55 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cc3299608e8bb30103d79d6bdc29758d43899b0393afe2153bea75e201ac0795.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e766041655f0afd0c3d17f358598272442d420c51c0d73c87f17f5a0d9dc3990.yml diff --git a/url_scanner/urlscanner.go b/url_scanner/urlscanner.go index 793430f506..7d1de54408 100644 --- a/url_scanner/urlscanner.go +++ b/url_scanner/urlscanner.go @@ -135,19 +135,19 @@ type URLScannerScanParams struct { NextCursor param.Field[string] `query:"next_cursor"` // Filter scans by main page Autonomous System Number (ASN). PageASN param.Field[string] `query:"page_asn"` - // Filter scans by main page hostname . + // Filter scans by main page hostname (domain of effective URL). PageHostname param.Field[string] `query:"page_hostname"` // Filter scans by main page IP address (IPv4 or IPv6). PageIP param.Field[string] `query:"page_ip"` - // Filter scans by exact match URL path (also supports suffix search). + // Filter scans by exact match of effective URL path (also supports suffix search). PagePath param.Field[string] `query:"page_path"` - // Filter scans by exact match to scanned URL (_after redirects_) + // Filter scans by submitted or scanned URL PageURL param.Field[string] `query:"page_url"` // Filter scans by url path of _any_ request made by the webpage. Path param.Field[string] `query:"path"` // Scan uuid ScanID param.Field[string] `query:"scanId" format:"uuid"` - // Filter scans by exact match URL of _any_ request made by the webpage + // Filter scans by URL of _any_ request made by the webpage URL param.Field[string] `query:"url"` } From 22b6349e0d7c83d31644c2fd98d6a7080c626c3f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 10:35:08 +0000 Subject: [PATCH 063/127] feat(api): OpenAPI spec update via Stainless API (#1906) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 3a8d5c3a55..9fa1711d73 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e766041655f0afd0c3d17f358598272442d420c51c0d73c87f17f5a0d9dc3990.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efb5805d496f252c658aad63c93537ff3b2ff4c164999f326a7061d0b22866a4.yml From 1d233d25733b913506d8835c23ff367c9968c78a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 13:42:12 +0000 Subject: [PATCH 064/127] feat(api): OpenAPI spec update via Stainless API (#1907) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 9fa1711d73..3a8d5c3a55 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efb5805d496f252c658aad63c93537ff3b2ff4c164999f326a7061d0b22866a4.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e766041655f0afd0c3d17f358598272442d420c51c0d73c87f17f5a0d9dc3990.yml From 2a88d765c8f143eecd8a12ea18b468876ef11673 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 13:43:55 +0000 Subject: [PATCH 065/127] feat(api): OpenAPI spec update via Stainless API (#1908) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 3a8d5c3a55..9fa1711d73 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e766041655f0afd0c3d17f358598272442d420c51c0d73c87f17f5a0d9dc3990.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efb5805d496f252c658aad63c93537ff3b2ff4c164999f326a7061d0b22866a4.yml From 11023d8e319dcc3281c1cae785d5a5d1de4c6a48 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 14:03:41 +0000 Subject: [PATCH 066/127] feat(api): OpenAPI spec update via Stainless API (#1909) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 9fa1711d73..3a8d5c3a55 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efb5805d496f252c658aad63c93537ff3b2ff4c164999f326a7061d0b22866a4.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e766041655f0afd0c3d17f358598272442d420c51c0d73c87f17f5a0d9dc3990.yml From 7a423454dcc878c055549f942c49148d78edd661 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 14:05:21 +0000 Subject: [PATCH 067/127] feat(api): OpenAPI spec update via Stainless API (#1910) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 3a8d5c3a55..9fa1711d73 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e766041655f0afd0c3d17f358598272442d420c51c0d73c87f17f5a0d9dc3990.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efb5805d496f252c658aad63c93537ff3b2ff4c164999f326a7061d0b22866a4.yml From b51a8e25b8eb25679b285aebc311df9c82d555d1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 14:11:48 +0000 Subject: [PATCH 068/127] feat(api): OpenAPI spec update via Stainless API (#1911) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 9fa1711d73..3a8d5c3a55 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efb5805d496f252c658aad63c93537ff3b2ff4c164999f326a7061d0b22866a4.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e766041655f0afd0c3d17f358598272442d420c51c0d73c87f17f5a0d9dc3990.yml From 1ca418c9eba6abf032ace448fdebac2967b57204 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 15:00:24 +0000 Subject: [PATCH 069/127] feat(api): OpenAPI spec update via Stainless API (#1912) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 3a8d5c3a55..9fa1711d73 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e766041655f0afd0c3d17f358598272442d420c51c0d73c87f17f5a0d9dc3990.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efb5805d496f252c658aad63c93537ff3b2ff4c164999f326a7061d0b22866a4.yml From fa9e05d044453f62628f0cf447ded615af5b0c06 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 15:29:33 +0000 Subject: [PATCH 070/127] feat(api): OpenAPI spec update via Stainless API (#1913) --- .stats.yml | 2 +- acm/totaltls.go | 8 ++--- .../hostnameassociation.go | 16 +++++----- client_certificates/clientcertificate.go | 16 +++++----- custom_certificates/customcertificate.go | 32 +++++++++---------- custom_certificates/prioritize.go | 4 +-- custom_hostnames/customhostname.go | 24 +++++++------- custom_hostnames/fallbackorigin.go | 24 +++++++------- dcv_delegation/uuid.go | 4 +-- hostnames/settingtls.go | 20 ++++++------ keyless_certificates/keylesscertificate.go | 20 ++++++------ mtls_certificates/association.go | 8 ++--- mtls_certificates/mtlscertificate.go | 16 +++++----- origin_ca_certificates/origincacertificate.go | 26 +++++++-------- .../origincacertificate_test.go | 2 +- origin_tls_client_auth/hostname.go | 16 +++++----- origin_tls_client_auth/hostnamecertificate.go | 24 +++++++------- origin_tls_client_auth/origintlsclientauth.go | 24 +++++++------- origin_tls_client_auth/setting.go | 8 ++--- ssl/analyze.go | 8 ++--- ssl/certificatepack.go | 24 +++++++------- ssl/certificatepackorder.go | 8 ++--- ssl/certificatepackquota.go | 8 ++--- ssl/universalsetting.go | 8 ++--- ssl/verification.go | 8 ++--- 25 files changed, 179 insertions(+), 179 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9fa1711d73..12919edfc0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-efb5805d496f252c658aad63c93537ff3b2ff4c164999f326a7061d0b22866a4.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0afa9378dad17dedd91687a59735a917fefb1adadc097a7902ccaae3ebdda360.yml diff --git a/acm/totaltls.go b/acm/totaltls.go index 3750802ac1..6a60926d92 100644 --- a/acm/totaltls.go +++ b/acm/totaltls.go @@ -210,9 +210,9 @@ func (r TotalTLSNewParamsCertificateAuthority) IsKnown() bool { type TotalTLSNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result TotalTLSNewResponse `json:"result,required"` // Whether the API call was successful Success TotalTLSNewResponseEnvelopeSuccess `json:"success,required"` + Result TotalTLSNewResponse `json:"result"` JSON totalTLSNewResponseEnvelopeJSON `json:"-"` } @@ -221,8 +221,8 @@ type TotalTLSNewResponseEnvelope struct { type totalTLSNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -258,9 +258,9 @@ type TotalTLSGetParams struct { type TotalTLSGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result TotalTLSGetResponse `json:"result,required"` // Whether the API call was successful Success TotalTLSGetResponseEnvelopeSuccess `json:"success,required"` + Result TotalTLSGetResponse `json:"result"` JSON totalTLSGetResponseEnvelopeJSON `json:"-"` } @@ -269,8 +269,8 @@ type TotalTLSGetResponseEnvelope struct { type totalTLSGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/certificate_authorities/hostnameassociation.go b/certificate_authorities/hostnameassociation.go index 54d6aeceec..508d035d32 100644 --- a/certificate_authorities/hostnameassociation.go +++ b/certificate_authorities/hostnameassociation.go @@ -129,11 +129,11 @@ func (r HostnameAssociationUpdateParams) MarshalJSON() (data []byte, err error) } type HostnameAssociationUpdateResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result HostnameAssociationUpdateResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success HostnameAssociationUpdateResponseEnvelopeSuccess `json:"success,required"` + Result HostnameAssociationUpdateResponse `json:"result"` JSON hostnameAssociationUpdateResponseEnvelopeJSON `json:"-"` } @@ -142,8 +142,8 @@ type HostnameAssociationUpdateResponseEnvelope struct { type hostnameAssociationUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -190,11 +190,11 @@ func (r HostnameAssociationGetParams) URLQuery() (v url.Values) { } type HostnameAssociationGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result HostnameAssociationGetResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success HostnameAssociationGetResponseEnvelopeSuccess `json:"success,required"` + Result HostnameAssociationGetResponse `json:"result"` JSON hostnameAssociationGetResponseEnvelopeJSON `json:"-"` } @@ -203,8 +203,8 @@ type HostnameAssociationGetResponseEnvelope struct { type hostnameAssociationGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/client_certificates/clientcertificate.go b/client_certificates/clientcertificate.go index 61598cb1aa..799a2033f5 100644 --- a/client_certificates/clientcertificate.go +++ b/client_certificates/clientcertificate.go @@ -247,9 +247,9 @@ func (r ClientCertificateNewParams) MarshalJSON() (data []byte, err error) { type ClientCertificateNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result ClientCertificate `json:"result,required"` // Whether the API call was successful Success ClientCertificateNewResponseEnvelopeSuccess `json:"success,required"` + Result ClientCertificate `json:"result"` JSON clientCertificateNewResponseEnvelopeJSON `json:"-"` } @@ -258,8 +258,8 @@ type ClientCertificateNewResponseEnvelope struct { type clientCertificateNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -338,9 +338,9 @@ type ClientCertificateDeleteParams struct { type ClientCertificateDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result ClientCertificate `json:"result,required"` // Whether the API call was successful Success ClientCertificateDeleteResponseEnvelopeSuccess `json:"success,required"` + Result ClientCertificate `json:"result"` JSON clientCertificateDeleteResponseEnvelopeJSON `json:"-"` } @@ -349,8 +349,8 @@ type ClientCertificateDeleteResponseEnvelope struct { type clientCertificateDeleteResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -386,9 +386,9 @@ type ClientCertificateEditParams struct { type ClientCertificateEditResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result ClientCertificate `json:"result,required"` // Whether the API call was successful Success ClientCertificateEditResponseEnvelopeSuccess `json:"success,required"` + Result ClientCertificate `json:"result"` JSON clientCertificateEditResponseEnvelopeJSON `json:"-"` } @@ -397,8 +397,8 @@ type ClientCertificateEditResponseEnvelope struct { type clientCertificateEditResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -434,9 +434,9 @@ type ClientCertificateGetParams struct { type ClientCertificateGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result ClientCertificate `json:"result,required"` // Whether the API call was successful Success ClientCertificateGetResponseEnvelopeSuccess `json:"success,required"` + Result ClientCertificate `json:"result"` JSON clientCertificateGetResponseEnvelopeJSON `json:"-"` } @@ -445,8 +445,8 @@ type ClientCertificateGetResponseEnvelope struct { type clientCertificateGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/custom_certificates/customcertificate.go b/custom_certificates/customcertificate.go index ee67ded407..3c3d3fbe06 100644 --- a/custom_certificates/customcertificate.go +++ b/custom_certificates/customcertificate.go @@ -409,11 +409,11 @@ func (r CustomCertificateNewParamsType) IsKnown() bool { } type CustomCertificateNewResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result CustomCertificateNewResponseUnion `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success CustomCertificateNewResponseEnvelopeSuccess `json:"success,required"` + Result CustomCertificateNewResponseUnion `json:"result"` JSON customCertificateNewResponseEnvelopeJSON `json:"-"` } @@ -422,8 +422,8 @@ type CustomCertificateNewResponseEnvelope struct { type customCertificateNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -514,11 +514,11 @@ type CustomCertificateDeleteParams struct { } type CustomCertificateDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result CustomCertificateDeleteResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success CustomCertificateDeleteResponseEnvelopeSuccess `json:"success,required"` + Result CustomCertificateDeleteResponse `json:"result"` JSON customCertificateDeleteResponseEnvelopeJSON `json:"-"` } @@ -527,8 +527,8 @@ type CustomCertificateDeleteResponseEnvelope struct { type customCertificateDeleteResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -593,11 +593,11 @@ func (r CustomCertificateEditParams) MarshalJSON() (data []byte, err error) { } type CustomCertificateEditResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result CustomCertificateEditResponseUnion `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success CustomCertificateEditResponseEnvelopeSuccess `json:"success,required"` + Result CustomCertificateEditResponseUnion `json:"result"` JSON customCertificateEditResponseEnvelopeJSON `json:"-"` } @@ -606,8 +606,8 @@ type CustomCertificateEditResponseEnvelope struct { type customCertificateEditResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -641,11 +641,11 @@ type CustomCertificateGetParams struct { } type CustomCertificateGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result CustomCertificateGetResponseUnion `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success CustomCertificateGetResponseEnvelopeSuccess `json:"success,required"` + Result CustomCertificateGetResponseUnion `json:"result"` JSON customCertificateGetResponseEnvelopeJSON `json:"-"` } @@ -654,8 +654,8 @@ type CustomCertificateGetResponseEnvelope struct { type customCertificateGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/custom_certificates/prioritize.go b/custom_certificates/prioritize.go index 66ab1d76aa..7c18727fc3 100644 --- a/custom_certificates/prioritize.go +++ b/custom_certificates/prioritize.go @@ -72,9 +72,9 @@ func (r PrioritizeUpdateParamsCertificate) MarshalJSON() (data []byte, err error type PrioritizeUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result []CustomCertificate `json:"result,required,nullable"` // Whether the API call was successful Success PrioritizeUpdateResponseEnvelopeSuccess `json:"success,required"` + Result []CustomCertificate `json:"result,nullable"` ResultInfo PrioritizeUpdateResponseEnvelopeResultInfo `json:"result_info"` JSON prioritizeUpdateResponseEnvelopeJSON `json:"-"` } @@ -84,8 +84,8 @@ type PrioritizeUpdateResponseEnvelope struct { type prioritizeUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field ResultInfo apijson.Field raw string ExtraFields map[string]apijson.Field diff --git a/custom_hostnames/customhostname.go b/custom_hostnames/customhostname.go index a7c54fc51e..05bd056728 100644 --- a/custom_hostnames/customhostname.go +++ b/custom_hostnames/customhostname.go @@ -2264,11 +2264,11 @@ func (r CustomHostnameNewParamsCustomMetadata) MarshalJSON() (data []byte, err e } type CustomHostnameNewResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result CustomHostnameNewResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success CustomHostnameNewResponseEnvelopeSuccess `json:"success,required"` + Result CustomHostnameNewResponse `json:"result"` JSON customHostnameNewResponseEnvelopeJSON `json:"-"` } @@ -2277,8 +2277,8 @@ type CustomHostnameNewResponseEnvelope struct { type customHostnameNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -2553,11 +2553,11 @@ func (r CustomHostnameEditParamsSSLSettingsTLS1_3) IsKnown() bool { } type CustomHostnameEditResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result CustomHostnameEditResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success CustomHostnameEditResponseEnvelopeSuccess `json:"success,required"` + Result CustomHostnameEditResponse `json:"result"` JSON customHostnameEditResponseEnvelopeJSON `json:"-"` } @@ -2566,8 +2566,8 @@ type CustomHostnameEditResponseEnvelope struct { type customHostnameEditResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -2601,11 +2601,11 @@ type CustomHostnameGetParams struct { } type CustomHostnameGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result CustomHostnameGetResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success CustomHostnameGetResponseEnvelopeSuccess `json:"success,required"` + Result CustomHostnameGetResponse `json:"result"` JSON customHostnameGetResponseEnvelopeJSON `json:"-"` } @@ -2614,8 +2614,8 @@ type CustomHostnameGetResponseEnvelope struct { type customHostnameGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/custom_hostnames/fallbackorigin.go b/custom_hostnames/fallbackorigin.go index 20a8e10969..647706af5b 100644 --- a/custom_hostnames/fallbackorigin.go +++ b/custom_hostnames/fallbackorigin.go @@ -136,11 +136,11 @@ func (r FallbackOriginUpdateParams) MarshalJSON() (data []byte, err error) { } type FallbackOriginUpdateResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result FallbackOriginUpdateResponseUnion `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success FallbackOriginUpdateResponseEnvelopeSuccess `json:"success,required"` + Result FallbackOriginUpdateResponseUnion `json:"result"` JSON fallbackOriginUpdateResponseEnvelopeJSON `json:"-"` } @@ -149,8 +149,8 @@ type FallbackOriginUpdateResponseEnvelope struct { type fallbackOriginUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -184,11 +184,11 @@ type FallbackOriginDeleteParams struct { } type FallbackOriginDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result FallbackOriginDeleteResponseUnion `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success FallbackOriginDeleteResponseEnvelopeSuccess `json:"success,required"` + Result FallbackOriginDeleteResponseUnion `json:"result"` JSON fallbackOriginDeleteResponseEnvelopeJSON `json:"-"` } @@ -197,8 +197,8 @@ type FallbackOriginDeleteResponseEnvelope struct { type fallbackOriginDeleteResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -232,11 +232,11 @@ type FallbackOriginGetParams struct { } type FallbackOriginGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result FallbackOriginGetResponseUnion `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success FallbackOriginGetResponseEnvelopeSuccess `json:"success,required"` + Result FallbackOriginGetResponseUnion `json:"result"` JSON fallbackOriginGetResponseEnvelopeJSON `json:"-"` } @@ -245,8 +245,8 @@ type FallbackOriginGetResponseEnvelope struct { type fallbackOriginGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/dcv_delegation/uuid.go b/dcv_delegation/uuid.go index 6c7bcc9dcc..8438a29c59 100644 --- a/dcv_delegation/uuid.go +++ b/dcv_delegation/uuid.go @@ -75,9 +75,9 @@ type UUIDGetParams struct { type UUIDGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result DCVDelegationUUID `json:"result,required"` // Whether the API call was successful Success UUIDGetResponseEnvelopeSuccess `json:"success,required"` + Result DCVDelegationUUID `json:"result"` JSON uuidGetResponseEnvelopeJSON `json:"-"` } @@ -86,8 +86,8 @@ type UUIDGetResponseEnvelope struct { type uuidGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/hostnames/settingtls.go b/hostnames/settingtls.go index f5cc028953..2717eb6773 100644 --- a/hostnames/settingtls.go +++ b/hostnames/settingtls.go @@ -246,9 +246,9 @@ func (r SettingTLSUpdateParamsSettingID) IsKnown() bool { type SettingTLSUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Setting `json:"result,required"` // Whether the API call was successful Success SettingTLSUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Setting `json:"result"` JSON settingTLSUpdateResponseEnvelopeJSON `json:"-"` } @@ -257,8 +257,8 @@ type SettingTLSUpdateResponseEnvelope struct { type settingTLSUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -309,11 +309,11 @@ func (r SettingTLSDeleteParamsSettingID) IsKnown() bool { } type SettingTLSDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result SettingTLSDeleteResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success SettingTLSDeleteResponseEnvelopeSuccess `json:"success,required"` + Result SettingTLSDeleteResponse `json:"result"` JSON settingTLSDeleteResponseEnvelopeJSON `json:"-"` } @@ -322,8 +322,8 @@ type SettingTLSDeleteResponseEnvelope struct { type settingTLSDeleteResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -374,11 +374,11 @@ func (r SettingTLSGetParamsSettingID) IsKnown() bool { } type SettingTLSGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result []SettingTLSGetResponse `json:"result,required,nullable"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success SettingTLSGetResponseEnvelopeSuccess `json:"success,required"` + Result []SettingTLSGetResponse `json:"result,nullable"` ResultInfo SettingTLSGetResponseEnvelopeResultInfo `json:"result_info"` JSON settingTLSGetResponseEnvelopeJSON `json:"-"` } @@ -388,8 +388,8 @@ type SettingTLSGetResponseEnvelope struct { type settingTLSGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field ResultInfo apijson.Field raw string ExtraFields map[string]apijson.Field diff --git a/keyless_certificates/keylesscertificate.go b/keyless_certificates/keylesscertificate.go index 3844dce7a9..510d4ad133 100644 --- a/keyless_certificates/keylesscertificate.go +++ b/keyless_certificates/keylesscertificate.go @@ -265,9 +265,9 @@ func (r KeylessCertificateNewParams) MarshalJSON() (data []byte, err error) { type KeylessCertificateNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result KeylessCertificate `json:"result,required"` // Whether the API call was successful Success KeylessCertificateNewResponseEnvelopeSuccess `json:"success,required"` + Result KeylessCertificate `json:"result"` JSON keylessCertificateNewResponseEnvelopeJSON `json:"-"` } @@ -276,8 +276,8 @@ type KeylessCertificateNewResponseEnvelope struct { type keylessCertificateNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -316,11 +316,11 @@ type KeylessCertificateDeleteParams struct { } type KeylessCertificateDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result KeylessCertificateDeleteResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success KeylessCertificateDeleteResponseEnvelopeSuccess `json:"success,required"` + Result KeylessCertificateDeleteResponse `json:"result"` JSON keylessCertificateDeleteResponseEnvelopeJSON `json:"-"` } @@ -329,8 +329,8 @@ type KeylessCertificateDeleteResponseEnvelope struct { type keylessCertificateDeleteResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -381,9 +381,9 @@ func (r KeylessCertificateEditParams) MarshalJSON() (data []byte, err error) { type KeylessCertificateEditResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result KeylessCertificate `json:"result,required"` // Whether the API call was successful Success KeylessCertificateEditResponseEnvelopeSuccess `json:"success,required"` + Result KeylessCertificate `json:"result"` JSON keylessCertificateEditResponseEnvelopeJSON `json:"-"` } @@ -392,8 +392,8 @@ type KeylessCertificateEditResponseEnvelope struct { type keylessCertificateEditResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -429,9 +429,9 @@ type KeylessCertificateGetParams struct { type KeylessCertificateGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result KeylessCertificate `json:"result,required"` // Whether the API call was successful Success KeylessCertificateGetResponseEnvelopeSuccess `json:"success,required"` + Result KeylessCertificate `json:"result"` JSON keylessCertificateGetResponseEnvelopeJSON `json:"-"` } @@ -440,8 +440,8 @@ type KeylessCertificateGetResponseEnvelope struct { type keylessCertificateGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/mtls_certificates/association.go b/mtls_certificates/association.go index e040290cda..29cfc43b48 100644 --- a/mtls_certificates/association.go +++ b/mtls_certificates/association.go @@ -76,11 +76,11 @@ type AssociationGetParams struct { } type AssociationGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result []CertificateAsssociation `json:"result,required,nullable"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success AssociationGetResponseEnvelopeSuccess `json:"success,required"` + Result []CertificateAsssociation `json:"result,nullable"` ResultInfo AssociationGetResponseEnvelopeResultInfo `json:"result_info"` JSON associationGetResponseEnvelopeJSON `json:"-"` } @@ -90,8 +90,8 @@ type AssociationGetResponseEnvelope struct { type associationGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field ResultInfo apijson.Field raw string ExtraFields map[string]apijson.Field diff --git a/mtls_certificates/mtlscertificate.go b/mtls_certificates/mtlscertificate.go index 7fd705d9ef..dd4521ed2d 100644 --- a/mtls_certificates/mtlscertificate.go +++ b/mtls_certificates/mtlscertificate.go @@ -211,11 +211,11 @@ func (r MTLSCertificateNewParams) MarshalJSON() (data []byte, err error) { } type MTLSCertificateNewResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result MTLSCertificateNewResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success MTLSCertificateNewResponseEnvelopeSuccess `json:"success,required"` + Result MTLSCertificateNewResponse `json:"result"` JSON mtlsCertificateNewResponseEnvelopeJSON `json:"-"` } @@ -224,8 +224,8 @@ type MTLSCertificateNewResponseEnvelope struct { type mtlsCertificateNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -266,9 +266,9 @@ type MTLSCertificateDeleteParams struct { type MTLSCertificateDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result MTLSCertificate `json:"result,required"` // Whether the API call was successful Success MTLSCertificateDeleteResponseEnvelopeSuccess `json:"success,required"` + Result MTLSCertificate `json:"result"` JSON mtlsCertificateDeleteResponseEnvelopeJSON `json:"-"` } @@ -277,8 +277,8 @@ type MTLSCertificateDeleteResponseEnvelope struct { type mtlsCertificateDeleteResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -314,9 +314,9 @@ type MTLSCertificateGetParams struct { type MTLSCertificateGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result MTLSCertificate `json:"result,required"` // Whether the API call was successful Success MTLSCertificateGetResponseEnvelopeSuccess `json:"success,required"` + Result MTLSCertificate `json:"result"` JSON mtlsCertificateGetResponseEnvelopeJSON `json:"-"` } @@ -325,8 +325,8 @@ type MTLSCertificateGetResponseEnvelope struct { type mtlsCertificateGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/origin_ca_certificates/origincacertificate.go b/origin_ca_certificates/origincacertificate.go index cb9609892c..a446ce978f 100644 --- a/origin_ca_certificates/origincacertificate.go +++ b/origin_ca_certificates/origincacertificate.go @@ -305,11 +305,11 @@ func (r OriginCACertificateNewParamsRequestedValidity) IsKnown() bool { } type OriginCACertificateNewResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result OriginCACertificateNewResponseUnion `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success OriginCACertificateNewResponseEnvelopeSuccess `json:"success,required"` + Result OriginCACertificateNewResponseUnion `json:"result"` JSON originCACertificateNewResponseEnvelopeJSON `json:"-"` } @@ -318,8 +318,8 @@ type OriginCACertificateNewResponseEnvelope struct { type originCACertificateNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -349,7 +349,7 @@ func (r OriginCACertificateNewResponseEnvelopeSuccess) IsKnown() bool { type OriginCACertificateListParams struct { // Identifier - Identifier param.Field[string] `query:"identifier"` + ZoneID param.Field[string] `query:"zone_id"` } // URLQuery serializes [OriginCACertificateListParams]'s query parameters as @@ -362,11 +362,11 @@ func (r OriginCACertificateListParams) URLQuery() (v url.Values) { } type OriginCACertificateDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result OriginCACertificateDeleteResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success OriginCACertificateDeleteResponseEnvelopeSuccess `json:"success,required"` + Result OriginCACertificateDeleteResponse `json:"result"` JSON originCACertificateDeleteResponseEnvelopeJSON `json:"-"` } @@ -375,8 +375,8 @@ type OriginCACertificateDeleteResponseEnvelope struct { type originCACertificateDeleteResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -405,11 +405,11 @@ func (r OriginCACertificateDeleteResponseEnvelopeSuccess) IsKnown() bool { } type OriginCACertificateGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result OriginCACertificateGetResponseUnion `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success OriginCACertificateGetResponseEnvelopeSuccess `json:"success,required"` + Result OriginCACertificateGetResponseUnion `json:"result"` JSON originCACertificateGetResponseEnvelopeJSON `json:"-"` } @@ -418,8 +418,8 @@ type OriginCACertificateGetResponseEnvelope struct { type originCACertificateGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/origin_ca_certificates/origincacertificate_test.go b/origin_ca_certificates/origincacertificate_test.go index 106ff41613..50dd8acff4 100644 --- a/origin_ca_certificates/origincacertificate_test.go +++ b/origin_ca_certificates/origincacertificate_test.go @@ -56,7 +56,7 @@ func TestOriginCACertificateListWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.OriginCACertificates.List(context.TODO(), origin_ca_certificates.OriginCACertificateListParams{ - Identifier: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }) if err != nil { var apierr *cloudflare.Error diff --git a/origin_tls_client_auth/hostname.go b/origin_tls_client_auth/hostname.go index e5c3bdc948..0e39cf7087 100644 --- a/origin_tls_client_auth/hostname.go +++ b/origin_tls_client_auth/hostname.go @@ -195,11 +195,11 @@ func (r HostnameUpdateParamsConfig) MarshalJSON() (data []byte, err error) { } type HostnameUpdateResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result []AuthenticatedOriginPull `json:"result,required,nullable"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success HostnameUpdateResponseEnvelopeSuccess `json:"success,required"` + Result []AuthenticatedOriginPull `json:"result,nullable"` ResultInfo HostnameUpdateResponseEnvelopeResultInfo `json:"result_info"` JSON hostnameUpdateResponseEnvelopeJSON `json:"-"` } @@ -209,8 +209,8 @@ type HostnameUpdateResponseEnvelope struct { type hostnameUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field ResultInfo apijson.Field raw string ExtraFields map[string]apijson.Field @@ -276,11 +276,11 @@ type HostnameGetParams struct { } type HostnameGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result AuthenticatedOriginPull `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success HostnameGetResponseEnvelopeSuccess `json:"success,required"` + Result AuthenticatedOriginPull `json:"result"` JSON hostnameGetResponseEnvelopeJSON `json:"-"` } @@ -289,8 +289,8 @@ type HostnameGetResponseEnvelope struct { type hostnameGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/origin_tls_client_auth/hostnamecertificate.go b/origin_tls_client_auth/hostnamecertificate.go index 16929ae86c..342d4839c9 100644 --- a/origin_tls_client_auth/hostnamecertificate.go +++ b/origin_tls_client_auth/hostnamecertificate.go @@ -303,11 +303,11 @@ func (r HostnameCertificateNewParams) MarshalJSON() (data []byte, err error) { } type HostnameCertificateNewResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result HostnameCertificateNewResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success HostnameCertificateNewResponseEnvelopeSuccess `json:"success,required"` + Result HostnameCertificateNewResponse `json:"result"` JSON hostnameCertificateNewResponseEnvelopeJSON `json:"-"` } @@ -316,8 +316,8 @@ type HostnameCertificateNewResponseEnvelope struct { type hostnameCertificateNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -356,11 +356,11 @@ type HostnameCertificateDeleteParams struct { } type HostnameCertificateDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result HostnameCertificateDeleteResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success HostnameCertificateDeleteResponseEnvelopeSuccess `json:"success,required"` + Result HostnameCertificateDeleteResponse `json:"result"` JSON hostnameCertificateDeleteResponseEnvelopeJSON `json:"-"` } @@ -369,8 +369,8 @@ type HostnameCertificateDeleteResponseEnvelope struct { type hostnameCertificateDeleteResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -404,11 +404,11 @@ type HostnameCertificateGetParams struct { } type HostnameCertificateGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result HostnameCertificateGetResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success HostnameCertificateGetResponseEnvelopeSuccess `json:"success,required"` + Result HostnameCertificateGetResponse `json:"result"` JSON hostnameCertificateGetResponseEnvelopeJSON `json:"-"` } @@ -417,8 +417,8 @@ type HostnameCertificateGetResponseEnvelope struct { type hostnameCertificateGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/origin_tls_client_auth/origintlsclientauth.go b/origin_tls_client_auth/origintlsclientauth.go index b1485268ce..172251197f 100644 --- a/origin_tls_client_auth/origintlsclientauth.go +++ b/origin_tls_client_auth/origintlsclientauth.go @@ -235,11 +235,11 @@ func (r OriginTLSClientAuthNewParams) MarshalJSON() (data []byte, err error) { } type OriginTLSClientAuthNewResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result OriginTLSClientAuthNewResponseUnion `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success OriginTLSClientAuthNewResponseEnvelopeSuccess `json:"success,required"` + Result OriginTLSClientAuthNewResponseUnion `json:"result"` JSON originTLSClientAuthNewResponseEnvelopeJSON `json:"-"` } @@ -248,8 +248,8 @@ type OriginTLSClientAuthNewResponseEnvelope struct { type originTLSClientAuthNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -288,11 +288,11 @@ type OriginTLSClientAuthDeleteParams struct { } type OriginTLSClientAuthDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result OriginTLSClientAuthDeleteResponseUnion `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success OriginTLSClientAuthDeleteResponseEnvelopeSuccess `json:"success,required"` + Result OriginTLSClientAuthDeleteResponseUnion `json:"result"` JSON originTLSClientAuthDeleteResponseEnvelopeJSON `json:"-"` } @@ -301,8 +301,8 @@ type OriginTLSClientAuthDeleteResponseEnvelope struct { type originTLSClientAuthDeleteResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -336,11 +336,11 @@ type OriginTLSClientAuthGetParams struct { } type OriginTLSClientAuthGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result OriginTLSClientAuthGetResponseUnion `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success OriginTLSClientAuthGetResponseEnvelopeSuccess `json:"success,required"` + Result OriginTLSClientAuthGetResponseUnion `json:"result"` JSON originTLSClientAuthGetResponseEnvelopeJSON `json:"-"` } @@ -349,8 +349,8 @@ type OriginTLSClientAuthGetResponseEnvelope struct { type originTLSClientAuthGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/origin_tls_client_auth/setting.go b/origin_tls_client_auth/setting.go index f873c6de30..f0baa8c91c 100644 --- a/origin_tls_client_auth/setting.go +++ b/origin_tls_client_auth/setting.go @@ -118,9 +118,9 @@ func (r SettingUpdateParams) MarshalJSON() (data []byte, err error) { type SettingUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result SettingUpdateResponse `json:"result,required"` // Whether the API call was successful Success SettingUpdateResponseEnvelopeSuccess `json:"success,required"` + Result SettingUpdateResponse `json:"result"` JSON settingUpdateResponseEnvelopeJSON `json:"-"` } @@ -129,8 +129,8 @@ type SettingUpdateResponseEnvelope struct { type settingUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -166,9 +166,9 @@ type SettingGetParams struct { type SettingGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result SettingGetResponse `json:"result,required"` // Whether the API call was successful Success SettingGetResponseEnvelopeSuccess `json:"success,required"` + Result SettingGetResponse `json:"result"` JSON settingGetResponseEnvelopeJSON `json:"-"` } @@ -177,8 +177,8 @@ type SettingGetResponseEnvelope struct { type settingGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/ssl/analyze.go b/ssl/analyze.go index ae1b61c4a3..be238844e7 100644 --- a/ssl/analyze.go +++ b/ssl/analyze.go @@ -81,11 +81,11 @@ func (r AnalyzeNewParams) MarshalJSON() (data []byte, err error) { } type AnalyzeNewResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result AnalyzeNewResponseUnion `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success AnalyzeNewResponseEnvelopeSuccess `json:"success,required"` + Result AnalyzeNewResponseUnion `json:"result"` JSON analyzeNewResponseEnvelopeJSON `json:"-"` } @@ -94,8 +94,8 @@ type AnalyzeNewResponseEnvelope struct { type analyzeNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/ssl/certificatepack.go b/ssl/certificatepack.go index 208035831d..ef2988edca 100644 --- a/ssl/certificatepack.go +++ b/ssl/certificatepack.go @@ -337,11 +337,11 @@ type CertificatePackDeleteParams struct { } type CertificatePackDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result CertificatePackDeleteResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success CertificatePackDeleteResponseEnvelopeSuccess `json:"success,required"` + Result CertificatePackDeleteResponse `json:"result"` JSON certificatePackDeleteResponseEnvelopeJSON `json:"-"` } @@ -350,8 +350,8 @@ type CertificatePackDeleteResponseEnvelope struct { type certificatePackDeleteResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -390,11 +390,11 @@ func (r CertificatePackEditParams) MarshalJSON() (data []byte, err error) { } type CertificatePackEditResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result CertificatePackEditResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success CertificatePackEditResponseEnvelopeSuccess `json:"success,required"` + Result CertificatePackEditResponse `json:"result"` JSON certificatePackEditResponseEnvelopeJSON `json:"-"` } @@ -403,8 +403,8 @@ type CertificatePackEditResponseEnvelope struct { type certificatePackEditResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -438,11 +438,11 @@ type CertificatePackGetParams struct { } type CertificatePackGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result CertificatePackGetResponseUnion `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success CertificatePackGetResponseEnvelopeSuccess `json:"success,required"` + Result CertificatePackGetResponseUnion `json:"result"` JSON certificatePackGetResponseEnvelopeJSON `json:"-"` } @@ -451,8 +451,8 @@ type CertificatePackGetResponseEnvelope struct { type certificatePackGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/ssl/certificatepackorder.go b/ssl/certificatepackorder.go index 2fb0a6119a..41aba5397a 100644 --- a/ssl/certificatepackorder.go +++ b/ssl/certificatepackorder.go @@ -289,11 +289,11 @@ func (r CertificatePackOrderNewParamsValidityDays) IsKnown() bool { } type CertificatePackOrderNewResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result CertificatePackOrderNewResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success CertificatePackOrderNewResponseEnvelopeSuccess `json:"success,required"` + Result CertificatePackOrderNewResponse `json:"result"` JSON certificatePackOrderNewResponseEnvelopeJSON `json:"-"` } @@ -302,8 +302,8 @@ type CertificatePackOrderNewResponseEnvelope struct { type certificatePackOrderNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/ssl/certificatepackquota.go b/ssl/certificatepackquota.go index 9eab428c8c..f9542749be 100644 --- a/ssl/certificatepackquota.go +++ b/ssl/certificatepackquota.go @@ -97,11 +97,11 @@ type CertificatePackQuotaGetParams struct { } type CertificatePackQuotaGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result CertificatePackQuotaGetResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success CertificatePackQuotaGetResponseEnvelopeSuccess `json:"success,required"` + Result CertificatePackQuotaGetResponse `json:"result"` JSON certificatePackQuotaGetResponseEnvelopeJSON `json:"-"` } @@ -110,8 +110,8 @@ type CertificatePackQuotaGetResponseEnvelope struct { type certificatePackQuotaGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/ssl/universalsetting.go b/ssl/universalsetting.go index 8278e2bf15..419ae5c5ef 100644 --- a/ssl/universalsetting.go +++ b/ssl/universalsetting.go @@ -150,9 +150,9 @@ func (r UniversalSettingEditParams) MarshalJSON() (data []byte, err error) { type UniversalSettingEditResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result UniversalSSLSettings `json:"result,required"` // Whether the API call was successful Success UniversalSettingEditResponseEnvelopeSuccess `json:"success,required"` + Result UniversalSSLSettings `json:"result"` JSON universalSettingEditResponseEnvelopeJSON `json:"-"` } @@ -161,8 +161,8 @@ type UniversalSettingEditResponseEnvelope struct { type universalSettingEditResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -198,9 +198,9 @@ type UniversalSettingGetParams struct { type UniversalSettingGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result UniversalSSLSettings `json:"result,required"` // Whether the API call was successful Success UniversalSettingGetResponseEnvelopeSuccess `json:"success,required"` + Result UniversalSSLSettings `json:"result"` JSON universalSettingGetResponseEnvelopeJSON `json:"-"` } @@ -209,8 +209,8 @@ type UniversalSettingGetResponseEnvelope struct { type universalSettingGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/ssl/verification.go b/ssl/verification.go index 53561d7294..01fd7e4fee 100644 --- a/ssl/verification.go +++ b/ssl/verification.go @@ -312,11 +312,11 @@ func (r VerificationEditParamsValidationMethod) IsKnown() bool { } type VerificationEditResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result VerificationEditResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success VerificationEditResponseEnvelopeSuccess `json:"success,required"` + Result VerificationEditResponse `json:"result"` JSON verificationEditResponseEnvelopeJSON `json:"-"` } @@ -325,8 +325,8 @@ type VerificationEditResponseEnvelope struct { type verificationEditResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } From 7c54539b04741a68c187b7d84822b719c65e18b2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 15:36:01 +0000 Subject: [PATCH 071/127] feat(api): OpenAPI spec update via Stainless API (#1914) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 12919edfc0..503bdb15f0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0afa9378dad17dedd91687a59735a917fefb1adadc097a7902ccaae3ebdda360.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a7c20b28582aadd124a5e37be4a2f961781bf7fb19cbe48de45020601d8228de.yml From 23742c3ac032893a12b7319d457ff0ed2995f6c2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 15:37:43 +0000 Subject: [PATCH 072/127] feat(api): OpenAPI spec update via Stainless API (#1915) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 503bdb15f0..12919edfc0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a7c20b28582aadd124a5e37be4a2f961781bf7fb19cbe48de45020601d8228de.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0afa9378dad17dedd91687a59735a917fefb1adadc097a7902ccaae3ebdda360.yml From 45a7df6f2bec4fcc90ea054c002d925ae70a76e8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 15:39:21 +0000 Subject: [PATCH 073/127] feat(api): OpenAPI spec update via Stainless API (#1916) --- .stats.yml | 2 +- dns/record.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 12919edfc0..02aba39c94 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0afa9378dad17dedd91687a59735a917fefb1adadc097a7902ccaae3ebdda360.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-48863e9e0b885e8402a025dcb412e3cc2cafc43c14de76072c5635c82a6fde9a.yml diff --git a/dns/record.go b/dns/record.go index 05bb51034c..86870a91a3 100644 --- a/dns/record.go +++ b/dns/record.go @@ -3378,7 +3378,7 @@ func (r URIRecord) implementsDNSRecord() {} // Components of a URI record. type URIRecordData struct { // The record content. - Content string `json:"content"` + Target string `json:"target"` // The record weight. Weight float64 `json:"weight"` JSON uriRecordDataJSON `json:"-"` @@ -3386,7 +3386,7 @@ type URIRecordData struct { // uriRecordDataJSON contains the JSON metadata for the struct [URIRecordData] type uriRecordDataJSON struct { - Content apijson.Field + Target apijson.Field Weight apijson.Field raw string ExtraFields map[string]apijson.Field @@ -3445,7 +3445,7 @@ func (r URIRecordParam) implementsDNSRecordUnionParam() {} // Components of a URI record. type URIRecordDataParam struct { // The record content. - Content param.Field[string] `json:"content"` + Target param.Field[string] `json:"target"` // The record weight. Weight param.Field[float64] `json:"weight"` } From 13723cbed4a51bf1f0f3939383e0532b962b9891 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 16:07:53 +0000 Subject: [PATCH 074/127] feat(api): OpenAPI spec update via Stainless API (#1917) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 02aba39c94..fd69035376 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-48863e9e0b885e8402a025dcb412e3cc2cafc43c14de76072c5635c82a6fde9a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c009571890021a3ddaeb9603ffbfa1f8f23f2ec22c247cd9a1c3bda38e37cac6.yml From d2945a88489c9dd16c95a92ae6e005fd00374be8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 16:29:35 +0000 Subject: [PATCH 075/127] feat(api): OpenAPI spec update via Stainless API (#1918) --- .stats.yml | 2 +- shared/union.go | 1 + workers/ai.go | 30 +++++++++++++++++++++++------- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/.stats.yml b/.stats.yml index fd69035376..a020cecdf8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c009571890021a3ddaeb9603ffbfa1f8f23f2ec22c247cd9a1c3bda38e37cac6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5c41a7aa9877639ecb82e8e278d9d8d77a58f9d308ed8e8f570cd3243f130e05.yml diff --git a/shared/union.go b/shared/union.go index d895ef68a2..7537786749 100644 --- a/shared/union.go +++ b/shared/union.go @@ -82,6 +82,7 @@ func (UnionString) ImplementsRateLimitsRateLimitEditResponseUnion() func (UnionString) ImplementsRateLimitsRateLimitGetResponseUnion() {} func (UnionString) ImplementsWorkersAIRunResponseUnion() {} func (UnionString) ImplementsWorkersAIRunParamsBodyTextEmbeddingsTextUnion() {} +func (UnionString) ImplementsWorkersAIRunParamsBodyImageToTextImageUnion() {} func (UnionString) ImplementsKVNamespaceUpdateResponseUnion() {} func (UnionString) ImplementsKVNamespaceDeleteResponseUnion() {} func (UnionString) ImplementsKVNamespaceBulkUpdateResponseUnion() {} diff --git a/workers/ai.go b/workers/ai.go index 72088ae256..a19742b0f1 100644 --- a/workers/ai.go +++ b/workers/ai.go @@ -55,7 +55,8 @@ func (r *AIService) Run(ctx context.Context, modelName string, params AIRunParam } // Union satisfied by [workers.AIRunResponseTextClassification], -// [shared.UnionString], [workers.AIRunResponseSentenceSimilarity], +// [shared.UnionString], [shared.UnionString], +// [workers.AIRunResponseSentenceSimilarity], // [workers.AIRunResponseTextEmbeddings], [workers.AIRunResponseSpeechRecognition], // [workers.AIRunResponseImageClassification], // [workers.AIRunResponseObjectDetection], [workers.AIRunResponseObject], @@ -77,6 +78,10 @@ func init() { TypeFilter: gjson.String, Type: reflect.TypeOf(shared.UnionString("")), }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, apijson.UnionVariant{ TypeFilter: gjson.JSON, Type: reflect.TypeOf(AIRunResponseSentenceSimilarity{}), @@ -494,12 +499,12 @@ func (r AIRunParamsBodySummarization) MarshalJSON() (data []byte, err error) { func (r AIRunParamsBodySummarization) implementsWorkersAIRunParamsBodyUnion() {} type AIRunParamsBodyImageToText struct { - Image param.Field[[]float64] `json:"image,required"` - MaxTokens param.Field[int64] `json:"max_tokens"` - Messages param.Field[[]AIRunParamsBodyImageToTextMessage] `json:"messages"` - Prompt param.Field[string] `json:"prompt"` - Raw param.Field[bool] `json:"raw"` - Temperature param.Field[float64] `json:"temperature"` + Image param.Field[AIRunParamsBodyImageToTextImageUnion] `json:"image,required" format:"base64"` + MaxTokens param.Field[int64] `json:"max_tokens"` + Messages param.Field[[]AIRunParamsBodyImageToTextMessage] `json:"messages"` + Prompt param.Field[string] `json:"prompt"` + Raw param.Field[bool] `json:"raw"` + Temperature param.Field[float64] `json:"temperature"` } func (r AIRunParamsBodyImageToText) MarshalJSON() (data []byte, err error) { @@ -508,6 +513,17 @@ func (r AIRunParamsBodyImageToText) MarshalJSON() (data []byte, err error) { func (r AIRunParamsBodyImageToText) implementsWorkersAIRunParamsBodyUnion() {} +// Satisfied by [workers.AIRunParamsBodyImageToTextImageArray], +// [shared.UnionString]. +type AIRunParamsBodyImageToTextImageUnion interface { + ImplementsWorkersAIRunParamsBodyImageToTextImageUnion() +} + +type AIRunParamsBodyImageToTextImageArray []float64 + +func (r AIRunParamsBodyImageToTextImageArray) ImplementsWorkersAIRunParamsBodyImageToTextImageUnion() { +} + type AIRunParamsBodyImageToTextMessage struct { Content param.Field[string] `json:"content,required"` Role param.Field[string] `json:"role,required"` From ce25fff2934f388f401c3ddbe13eacba4a495603 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 16:31:17 +0000 Subject: [PATCH 076/127] feat(api): OpenAPI spec update via Stainless API (#1919) --- .stats.yml | 2 +- shared/union.go | 1 - workers/ai.go | 30 +++++++----------------------- 3 files changed, 8 insertions(+), 25 deletions(-) diff --git a/.stats.yml b/.stats.yml index a020cecdf8..fd69035376 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5c41a7aa9877639ecb82e8e278d9d8d77a58f9d308ed8e8f570cd3243f130e05.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c009571890021a3ddaeb9603ffbfa1f8f23f2ec22c247cd9a1c3bda38e37cac6.yml diff --git a/shared/union.go b/shared/union.go index 7537786749..d895ef68a2 100644 --- a/shared/union.go +++ b/shared/union.go @@ -82,7 +82,6 @@ func (UnionString) ImplementsRateLimitsRateLimitEditResponseUnion() func (UnionString) ImplementsRateLimitsRateLimitGetResponseUnion() {} func (UnionString) ImplementsWorkersAIRunResponseUnion() {} func (UnionString) ImplementsWorkersAIRunParamsBodyTextEmbeddingsTextUnion() {} -func (UnionString) ImplementsWorkersAIRunParamsBodyImageToTextImageUnion() {} func (UnionString) ImplementsKVNamespaceUpdateResponseUnion() {} func (UnionString) ImplementsKVNamespaceDeleteResponseUnion() {} func (UnionString) ImplementsKVNamespaceBulkUpdateResponseUnion() {} diff --git a/workers/ai.go b/workers/ai.go index a19742b0f1..72088ae256 100644 --- a/workers/ai.go +++ b/workers/ai.go @@ -55,8 +55,7 @@ func (r *AIService) Run(ctx context.Context, modelName string, params AIRunParam } // Union satisfied by [workers.AIRunResponseTextClassification], -// [shared.UnionString], [shared.UnionString], -// [workers.AIRunResponseSentenceSimilarity], +// [shared.UnionString], [workers.AIRunResponseSentenceSimilarity], // [workers.AIRunResponseTextEmbeddings], [workers.AIRunResponseSpeechRecognition], // [workers.AIRunResponseImageClassification], // [workers.AIRunResponseObjectDetection], [workers.AIRunResponseObject], @@ -78,10 +77,6 @@ func init() { TypeFilter: gjson.String, Type: reflect.TypeOf(shared.UnionString("")), }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, apijson.UnionVariant{ TypeFilter: gjson.JSON, Type: reflect.TypeOf(AIRunResponseSentenceSimilarity{}), @@ -499,12 +494,12 @@ func (r AIRunParamsBodySummarization) MarshalJSON() (data []byte, err error) { func (r AIRunParamsBodySummarization) implementsWorkersAIRunParamsBodyUnion() {} type AIRunParamsBodyImageToText struct { - Image param.Field[AIRunParamsBodyImageToTextImageUnion] `json:"image,required" format:"base64"` - MaxTokens param.Field[int64] `json:"max_tokens"` - Messages param.Field[[]AIRunParamsBodyImageToTextMessage] `json:"messages"` - Prompt param.Field[string] `json:"prompt"` - Raw param.Field[bool] `json:"raw"` - Temperature param.Field[float64] `json:"temperature"` + Image param.Field[[]float64] `json:"image,required"` + MaxTokens param.Field[int64] `json:"max_tokens"` + Messages param.Field[[]AIRunParamsBodyImageToTextMessage] `json:"messages"` + Prompt param.Field[string] `json:"prompt"` + Raw param.Field[bool] `json:"raw"` + Temperature param.Field[float64] `json:"temperature"` } func (r AIRunParamsBodyImageToText) MarshalJSON() (data []byte, err error) { @@ -513,17 +508,6 @@ func (r AIRunParamsBodyImageToText) MarshalJSON() (data []byte, err error) { func (r AIRunParamsBodyImageToText) implementsWorkersAIRunParamsBodyUnion() {} -// Satisfied by [workers.AIRunParamsBodyImageToTextImageArray], -// [shared.UnionString]. -type AIRunParamsBodyImageToTextImageUnion interface { - ImplementsWorkersAIRunParamsBodyImageToTextImageUnion() -} - -type AIRunParamsBodyImageToTextImageArray []float64 - -func (r AIRunParamsBodyImageToTextImageArray) ImplementsWorkersAIRunParamsBodyImageToTextImageUnion() { -} - type AIRunParamsBodyImageToTextMessage struct { Content param.Field[string] `json:"content,required"` Role param.Field[string] `json:"role,required"` From faa828610cafcc3114b17e78253a5380606f2140 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 16:32:56 +0000 Subject: [PATCH 077/127] feat(api): OpenAPI spec update via Stainless API (#1920) --- .stats.yml | 2 +- shared/union.go | 1 + workers/ai.go | 30 +++++++++++++++++++++++------- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/.stats.yml b/.stats.yml index fd69035376..a020cecdf8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c009571890021a3ddaeb9603ffbfa1f8f23f2ec22c247cd9a1c3bda38e37cac6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5c41a7aa9877639ecb82e8e278d9d8d77a58f9d308ed8e8f570cd3243f130e05.yml diff --git a/shared/union.go b/shared/union.go index d895ef68a2..7537786749 100644 --- a/shared/union.go +++ b/shared/union.go @@ -82,6 +82,7 @@ func (UnionString) ImplementsRateLimitsRateLimitEditResponseUnion() func (UnionString) ImplementsRateLimitsRateLimitGetResponseUnion() {} func (UnionString) ImplementsWorkersAIRunResponseUnion() {} func (UnionString) ImplementsWorkersAIRunParamsBodyTextEmbeddingsTextUnion() {} +func (UnionString) ImplementsWorkersAIRunParamsBodyImageToTextImageUnion() {} func (UnionString) ImplementsKVNamespaceUpdateResponseUnion() {} func (UnionString) ImplementsKVNamespaceDeleteResponseUnion() {} func (UnionString) ImplementsKVNamespaceBulkUpdateResponseUnion() {} diff --git a/workers/ai.go b/workers/ai.go index 72088ae256..a19742b0f1 100644 --- a/workers/ai.go +++ b/workers/ai.go @@ -55,7 +55,8 @@ func (r *AIService) Run(ctx context.Context, modelName string, params AIRunParam } // Union satisfied by [workers.AIRunResponseTextClassification], -// [shared.UnionString], [workers.AIRunResponseSentenceSimilarity], +// [shared.UnionString], [shared.UnionString], +// [workers.AIRunResponseSentenceSimilarity], // [workers.AIRunResponseTextEmbeddings], [workers.AIRunResponseSpeechRecognition], // [workers.AIRunResponseImageClassification], // [workers.AIRunResponseObjectDetection], [workers.AIRunResponseObject], @@ -77,6 +78,10 @@ func init() { TypeFilter: gjson.String, Type: reflect.TypeOf(shared.UnionString("")), }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, apijson.UnionVariant{ TypeFilter: gjson.JSON, Type: reflect.TypeOf(AIRunResponseSentenceSimilarity{}), @@ -494,12 +499,12 @@ func (r AIRunParamsBodySummarization) MarshalJSON() (data []byte, err error) { func (r AIRunParamsBodySummarization) implementsWorkersAIRunParamsBodyUnion() {} type AIRunParamsBodyImageToText struct { - Image param.Field[[]float64] `json:"image,required"` - MaxTokens param.Field[int64] `json:"max_tokens"` - Messages param.Field[[]AIRunParamsBodyImageToTextMessage] `json:"messages"` - Prompt param.Field[string] `json:"prompt"` - Raw param.Field[bool] `json:"raw"` - Temperature param.Field[float64] `json:"temperature"` + Image param.Field[AIRunParamsBodyImageToTextImageUnion] `json:"image,required" format:"base64"` + MaxTokens param.Field[int64] `json:"max_tokens"` + Messages param.Field[[]AIRunParamsBodyImageToTextMessage] `json:"messages"` + Prompt param.Field[string] `json:"prompt"` + Raw param.Field[bool] `json:"raw"` + Temperature param.Field[float64] `json:"temperature"` } func (r AIRunParamsBodyImageToText) MarshalJSON() (data []byte, err error) { @@ -508,6 +513,17 @@ func (r AIRunParamsBodyImageToText) MarshalJSON() (data []byte, err error) { func (r AIRunParamsBodyImageToText) implementsWorkersAIRunParamsBodyUnion() {} +// Satisfied by [workers.AIRunParamsBodyImageToTextImageArray], +// [shared.UnionString]. +type AIRunParamsBodyImageToTextImageUnion interface { + ImplementsWorkersAIRunParamsBodyImageToTextImageUnion() +} + +type AIRunParamsBodyImageToTextImageArray []float64 + +func (r AIRunParamsBodyImageToTextImageArray) ImplementsWorkersAIRunParamsBodyImageToTextImageUnion() { +} + type AIRunParamsBodyImageToTextMessage struct { Content param.Field[string] `json:"content,required"` Role param.Field[string] `json:"role,required"` From 27e33d69f5790412c65284363e941fdca6e28795 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 16:50:22 +0000 Subject: [PATCH 078/127] feat(api): OpenAPI spec update via Stainless API (#1922) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index a020cecdf8..8fae5c54f8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5c41a7aa9877639ecb82e8e278d9d8d77a58f9d308ed8e8f570cd3243f130e05.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b0d89a44594a538f28d67466ef388dba28a1d7113208c98c53efa08388310de6.yml From f3f59a80efcde43c52e189f592ca5ca0a8442f7a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 16:57:27 +0000 Subject: [PATCH 079/127] feat(api): OpenAPI spec update via Stainless API (#1923) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8fae5c54f8..a020cecdf8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b0d89a44594a538f28d67466ef388dba28a1d7113208c98c53efa08388310de6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5c41a7aa9877639ecb82e8e278d9d8d77a58f9d308ed8e8f570cd3243f130e05.yml From ae817994ea52c0921a2ab588e4ffd88f736fb50f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 17:09:20 +0000 Subject: [PATCH 080/127] feat(api): OpenAPI spec update via Stainless API (#1924) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index a020cecdf8..8fae5c54f8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5c41a7aa9877639ecb82e8e278d9d8d77a58f9d308ed8e8f570cd3243f130e05.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b0d89a44594a538f28d67466ef388dba28a1d7113208c98c53efa08388310de6.yml From 14af5b255965475fbd82f6e6ca3fd57b757c2449 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 18:30:07 +0000 Subject: [PATCH 081/127] feat(api): OpenAPI spec update via Stainless API (#1925) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8fae5c54f8..a020cecdf8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b0d89a44594a538f28d67466ef388dba28a1d7113208c98c53efa08388310de6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5c41a7aa9877639ecb82e8e278d9d8d77a58f9d308ed8e8f570cd3243f130e05.yml From c54229ee081f621eda59819d7caca62bb5bd50cd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 18:44:38 +0000 Subject: [PATCH 082/127] feat(api): OpenAPI spec update via Stainless API (#1926) --- .stats.yml | 2 +- intel/indicatorfeed.go | 64 +++++++++++++++++++------------- intel/indicatorfeedpermission.go | 40 +++++++++++--------- 3 files changed, 62 insertions(+), 44 deletions(-) diff --git a/.stats.yml b/.stats.yml index a020cecdf8..7f7c7cf8f5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5c41a7aa9877639ecb82e8e278d9d8d77a58f9d308ed8e8f570cd3243f130e05.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6229bf7c4bed6b9026088be8817d3c8111576b2d12ff5220d193f479f230e449.yml diff --git a/intel/indicatorfeed.go b/intel/indicatorfeed.go index 1fff0aaad4..018d96fc62 100644 --- a/intel/indicatorfeed.go +++ b/intel/indicatorfeed.go @@ -114,6 +114,10 @@ type IndicatorFeedNewResponse struct { CreatedOn time.Time `json:"created_on" format:"date-time"` // The description of the example test Description string `json:"description"` + // Whether the indicator feed can be attributed to a provider + IsAttributable bool `json:"is_attributable"` + // Whether the indicator feed is exposed to customers + IsPublic bool `json:"is_public"` // The date and time when the data entry was last modified ModifiedOn time.Time `json:"modified_on" format:"date-time"` // The name of the indicator feed @@ -124,13 +128,15 @@ type IndicatorFeedNewResponse struct { // indicatorFeedNewResponseJSON contains the JSON metadata for the struct // [IndicatorFeedNewResponse] type indicatorFeedNewResponseJSON struct { - ID apijson.Field - CreatedOn apijson.Field - Description apijson.Field - ModifiedOn apijson.Field - Name apijson.Field - raw string - ExtraFields map[string]apijson.Field + ID apijson.Field + CreatedOn apijson.Field + Description apijson.Field + IsAttributable apijson.Field + IsPublic apijson.Field + ModifiedOn apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field } func (r *IndicatorFeedNewResponse) UnmarshalJSON(data []byte) (err error) { @@ -176,6 +182,10 @@ type IndicatorFeedListResponse struct { CreatedOn time.Time `json:"created_on" format:"date-time"` // The description of the example test Description string `json:"description"` + // Whether the indicator feed can be attributed to a provider + IsAttributable bool `json:"is_attributable"` + // Whether the indicator feed is exposed to customers + IsPublic bool `json:"is_public"` // The date and time when the data entry was last modified ModifiedOn time.Time `json:"modified_on" format:"date-time"` // The name of the indicator feed @@ -186,13 +196,15 @@ type IndicatorFeedListResponse struct { // indicatorFeedListResponseJSON contains the JSON metadata for the struct // [IndicatorFeedListResponse] type indicatorFeedListResponseJSON struct { - ID apijson.Field - CreatedOn apijson.Field - Description apijson.Field - ModifiedOn apijson.Field - Name apijson.Field - raw string - ExtraFields map[string]apijson.Field + ID apijson.Field + CreatedOn apijson.Field + Description apijson.Field + IsAttributable apijson.Field + IsPublic apijson.Field + ModifiedOn apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field } func (r *IndicatorFeedListResponse) UnmarshalJSON(data []byte) (err error) { @@ -274,11 +286,11 @@ func (r IndicatorFeedNewParams) MarshalJSON() (data []byte, err error) { } type IndicatorFeedNewResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result IndicatorFeedNewResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success IndicatorFeedNewResponseEnvelopeSuccess `json:"success,required"` + Result IndicatorFeedNewResponse `json:"result"` JSON indicatorFeedNewResponseEnvelopeJSON `json:"-"` } @@ -287,8 +299,8 @@ type IndicatorFeedNewResponseEnvelope struct { type indicatorFeedNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -328,11 +340,11 @@ func (r IndicatorFeedUpdateParams) MarshalJSON() (data []byte, err error) { } type IndicatorFeedUpdateResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result IndicatorFeedUpdateResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success IndicatorFeedUpdateResponseEnvelopeSuccess `json:"success,required"` + Result IndicatorFeedUpdateResponse `json:"result"` JSON indicatorFeedUpdateResponseEnvelopeJSON `json:"-"` } @@ -341,8 +353,8 @@ type IndicatorFeedUpdateResponseEnvelope struct { type indicatorFeedUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -386,11 +398,11 @@ type IndicatorFeedGetParams struct { } type IndicatorFeedGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result IndicatorFeedGetResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success IndicatorFeedGetResponseEnvelopeSuccess `json:"success,required"` + Result IndicatorFeedGetResponse `json:"result"` JSON indicatorFeedGetResponseEnvelopeJSON `json:"-"` } @@ -399,8 +411,8 @@ type IndicatorFeedGetResponseEnvelope struct { type indicatorFeedGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/intel/indicatorfeedpermission.go b/intel/indicatorfeedpermission.go index 347ff965b6..a7c3b73d06 100644 --- a/intel/indicatorfeedpermission.go +++ b/intel/indicatorfeedpermission.go @@ -98,6 +98,10 @@ type IndicatorFeedPermissionListResponse struct { ID int64 `json:"id"` // The description of the example test Description string `json:"description"` + // Whether the indicator feed can be attributed to a provider + IsAttributable bool `json:"is_attributable"` + // Whether the indicator feed is exposed to customers + IsPublic bool `json:"is_public"` // The name of the indicator feed Name string `json:"name"` JSON indicatorFeedPermissionListResponseJSON `json:"-"` @@ -106,11 +110,13 @@ type IndicatorFeedPermissionListResponse struct { // indicatorFeedPermissionListResponseJSON contains the JSON metadata for the // struct [IndicatorFeedPermissionListResponse] type indicatorFeedPermissionListResponseJSON struct { - ID apijson.Field - Description apijson.Field - Name apijson.Field - raw string - ExtraFields map[string]apijson.Field + ID apijson.Field + Description apijson.Field + IsAttributable apijson.Field + IsPublic apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field } func (r *IndicatorFeedPermissionListResponse) UnmarshalJSON(data []byte) (err error) { @@ -157,11 +163,11 @@ func (r IndicatorFeedPermissionNewParams) MarshalJSON() (data []byte, err error) } type IndicatorFeedPermissionNewResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result IndicatorFeedPermissionNewResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success IndicatorFeedPermissionNewResponseEnvelopeSuccess `json:"success,required"` + Result IndicatorFeedPermissionNewResponse `json:"result"` JSON indicatorFeedPermissionNewResponseEnvelopeJSON `json:"-"` } @@ -170,8 +176,8 @@ type IndicatorFeedPermissionNewResponseEnvelope struct { type indicatorFeedPermissionNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -205,11 +211,11 @@ type IndicatorFeedPermissionListParams struct { } type IndicatorFeedPermissionListResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result []IndicatorFeedPermissionListResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success IndicatorFeedPermissionListResponseEnvelopeSuccess `json:"success,required"` + Result []IndicatorFeedPermissionListResponse `json:"result"` JSON indicatorFeedPermissionListResponseEnvelopeJSON `json:"-"` } @@ -218,8 +224,8 @@ type IndicatorFeedPermissionListResponseEnvelope struct { type indicatorFeedPermissionListResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -261,11 +267,11 @@ func (r IndicatorFeedPermissionDeleteParams) MarshalJSON() (data []byte, err err } type IndicatorFeedPermissionDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result IndicatorFeedPermissionDeleteResponse `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success IndicatorFeedPermissionDeleteResponseEnvelopeSuccess `json:"success,required"` + Result IndicatorFeedPermissionDeleteResponse `json:"result"` JSON indicatorFeedPermissionDeleteResponseEnvelopeJSON `json:"-"` } @@ -274,8 +280,8 @@ type IndicatorFeedPermissionDeleteResponseEnvelope struct { type indicatorFeedPermissionDeleteResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } From 8a91755ab1be8a757e7e791e64b93360bf1885cc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 20:28:21 +0000 Subject: [PATCH 083/127] feat(api): OpenAPI spec update via Stainless API (#1927) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 7f7c7cf8f5..eb5eed706c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6229bf7c4bed6b9026088be8817d3c8111576b2d12ff5220d193f479f230e449.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e6ed3919a136e0134ddbd7ee801ec8094853455e73da8b1310a5c4bd14615aa0.yml From 5d85f848409036d34fd976d64402a228c7a32c5a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 20:31:10 +0000 Subject: [PATCH 084/127] feat(api): OpenAPI spec update via Stainless API (#1928) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index eb5eed706c..7f7c7cf8f5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e6ed3919a136e0134ddbd7ee801ec8094853455e73da8b1310a5c4bd14615aa0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6229bf7c4bed6b9026088be8817d3c8111576b2d12ff5220d193f479f230e449.yml From 702d17dea9050b80d0089dbf89c7ccc106998ece Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 21:00:27 +0000 Subject: [PATCH 085/127] feat(api): OpenAPI spec update via Stainless API (#1929) --- .stats.yml | 4 +- api.md | 8 ++ intel/whois.go | 276 ++++++++++++++++++++++++++++++++++++++++++++ intel/whois_test.go | 41 +++++++ 4 files changed, 327 insertions(+), 2 deletions(-) create mode 100644 intel/whois_test.go diff --git a/.stats.yml b/.stats.yml index 7f7c7cf8f5..f959c2939b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6229bf7c4bed6b9026088be8817d3c8111576b2d12ff5220d193f479f230e449.yml +configured_endpoints: 1268 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7a581c61bc42c6e3e48c58c941255dca8f4b7b2e5aafd402a61c6438c2830071.yml diff --git a/api.md b/api.md index 90413577a7..94e742e014 100644 --- a/api.md +++ b/api.md @@ -3341,6 +3341,14 @@ Methods: ## Whois +Response Types: + +- intel.WhoisGetResponse + +Methods: + +- client.Intel.Whois.Get(ctx context.Context, params intel.WhoisGetParams) (intel.WhoisGetResponse, error) + ## IndicatorFeeds Response Types: diff --git a/intel/whois.go b/intel/whois.go index 48fe59ae7d..ece63a5b8f 100644 --- a/intel/whois.go +++ b/intel/whois.go @@ -3,7 +3,18 @@ package intel import ( + "context" + "fmt" + "net/http" + "net/url" + "time" + + "github.com/cloudflare/cloudflare-go/v2/internal/apijson" + "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" + "github.com/cloudflare/cloudflare-go/v2/internal/param" + "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" + "github.com/cloudflare/cloudflare-go/v2/shared" ) // WhoisService contains methods and other services that help with interacting with @@ -22,3 +33,268 @@ func NewWhoisService(opts ...option.RequestOption) (r *WhoisService) { r.Options = opts return } + +// Get WHOIS Record +func (r *WhoisService) Get(ctx context.Context, params WhoisGetParams, opts ...option.RequestOption) (res *WhoisGetResponse, err error) { + opts = append(r.Options[:], opts...) + var env WhoisGetResponseEnvelope + path := fmt.Sprintf("accounts/%s/intel/whois", params.AccountID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +type WhoisGetResponse struct { + Dnnsec interface{} `json:"dnnsec,required"` + Domain string `json:"domain,required"` + Extension string `json:"extension,required"` + Found bool `json:"found,required"` + Nameservers []string `json:"nameservers,required"` + Punycode string `json:"punycode,required"` + Registrant string `json:"registrant,required"` + Registrar string `json:"registrar,required"` + ID string `json:"id"` + AdministrativeCity string `json:"administrative_city"` + AdministrativeCountry string `json:"administrative_country"` + AdministrativeEmail string `json:"administrative_email"` + AdministrativeFax string `json:"administrative_fax"` + AdministrativeFaxExt string `json:"administrative_fax_ext"` + AdministrativeID string `json:"administrative_id"` + AdministrativeName string `json:"administrative_name"` + AdministrativeOrg string `json:"administrative_org"` + AdministrativePhone string `json:"administrative_phone"` + AdministrativePhoneExt string `json:"administrative_phone_ext"` + AdministrativePostalCode string `json:"administrative_postal_code"` + AdministrativeProvince string `json:"administrative_province"` + AdministrativeReferralURL string `json:"administrative_referral_url"` + AdministrativeStreet string `json:"administrative_street"` + BillingCity string `json:"billing_city"` + BillingCountry string `json:"billing_country"` + BillingEmail string `json:"billing_email"` + BillingFax string `json:"billing_fax"` + BillingFaxExt string `json:"billing_fax_ext"` + BillingID string `json:"billing_id"` + BillingName string `json:"billing_name"` + BillingOrg string `json:"billing_org"` + BillingPhone string `json:"billing_phone"` + BillingPhoneExt string `json:"billing_phone_ext"` + BillingPostalCode string `json:"billing_postal_code"` + BillingProvince string `json:"billing_province"` + BillingReferralURL string `json:"billing_referral_url"` + BillingStreet string `json:"billing_street"` + CreatedDate time.Time `json:"created_date" format:"date-time"` + CreatedDateRaw string `json:"created_date_raw"` + DNSSEC bool `json:"dnssec"` + ExpirationDate time.Time `json:"expiration_date" format:"date-time"` + ExpirationDateRaw string `json:"expiration_date_raw"` + RegistrantCity string `json:"registrant_city"` + RegistrantCountry string `json:"registrant_country"` + RegistrantEmail string `json:"registrant_email"` + RegistrantFax string `json:"registrant_fax"` + RegistrantFaxExt string `json:"registrant_fax_ext"` + RegistrantID string `json:"registrant_id"` + RegistrantName string `json:"registrant_name"` + RegistrantOrg string `json:"registrant_org"` + RegistrantPhone string `json:"registrant_phone"` + RegistrantPhoneExt string `json:"registrant_phone_ext"` + RegistrantPostalCode string `json:"registrant_postal_code"` + RegistrantProvince string `json:"registrant_province"` + RegistrantReferralURL string `json:"registrant_referral_url"` + RegistrantStreet string `json:"registrant_street"` + RegistrarCity string `json:"registrar_city"` + RegistrarCountry string `json:"registrar_country"` + RegistrarEmail string `json:"registrar_email"` + RegistrarFax string `json:"registrar_fax"` + RegistrarFaxExt string `json:"registrar_fax_ext"` + RegistrarID string `json:"registrar_id"` + RegistrarName string `json:"registrar_name"` + RegistrarOrg string `json:"registrar_org"` + RegistrarPhone string `json:"registrar_phone"` + RegistrarPhoneExt string `json:"registrar_phone_ext"` + RegistrarPostalCode string `json:"registrar_postal_code"` + RegistrarProvince string `json:"registrar_province"` + RegistrarReferralURL string `json:"registrar_referral_url"` + RegistrarStreet string `json:"registrar_street"` + Status []string `json:"status"` + TechnicalCity string `json:"technical_city"` + TechnicalCountry string `json:"technical_country"` + TechnicalEmail string `json:"technical_email"` + TechnicalFax string `json:"technical_fax"` + TechnicalFaxExt string `json:"technical_fax_ext"` + TechnicalID string `json:"technical_id"` + TechnicalName string `json:"technical_name"` + TechnicalOrg string `json:"technical_org"` + TechnicalPhone string `json:"technical_phone"` + TechnicalPhoneExt string `json:"technical_phone_ext"` + TechnicalPostalCode string `json:"technical_postal_code"` + TechnicalProvince string `json:"technical_province"` + TechnicalReferralURL string `json:"technical_referral_url"` + TechnicalStreet string `json:"technical_street"` + UpdatedDate time.Time `json:"updated_date" format:"date-time"` + UpdatedDateRaw string `json:"updated_date_raw"` + WhoisServer string `json:"whois_server"` + JSON whoisGetResponseJSON `json:"-"` +} + +// whoisGetResponseJSON contains the JSON metadata for the struct +// [WhoisGetResponse] +type whoisGetResponseJSON struct { + Dnnsec apijson.Field + Domain apijson.Field + Extension apijson.Field + Found apijson.Field + Nameservers apijson.Field + Punycode apijson.Field + Registrant apijson.Field + Registrar apijson.Field + ID apijson.Field + AdministrativeCity apijson.Field + AdministrativeCountry apijson.Field + AdministrativeEmail apijson.Field + AdministrativeFax apijson.Field + AdministrativeFaxExt apijson.Field + AdministrativeID apijson.Field + AdministrativeName apijson.Field + AdministrativeOrg apijson.Field + AdministrativePhone apijson.Field + AdministrativePhoneExt apijson.Field + AdministrativePostalCode apijson.Field + AdministrativeProvince apijson.Field + AdministrativeReferralURL apijson.Field + AdministrativeStreet apijson.Field + BillingCity apijson.Field + BillingCountry apijson.Field + BillingEmail apijson.Field + BillingFax apijson.Field + BillingFaxExt apijson.Field + BillingID apijson.Field + BillingName apijson.Field + BillingOrg apijson.Field + BillingPhone apijson.Field + BillingPhoneExt apijson.Field + BillingPostalCode apijson.Field + BillingProvince apijson.Field + BillingReferralURL apijson.Field + BillingStreet apijson.Field + CreatedDate apijson.Field + CreatedDateRaw apijson.Field + DNSSEC apijson.Field + ExpirationDate apijson.Field + ExpirationDateRaw apijson.Field + RegistrantCity apijson.Field + RegistrantCountry apijson.Field + RegistrantEmail apijson.Field + RegistrantFax apijson.Field + RegistrantFaxExt apijson.Field + RegistrantID apijson.Field + RegistrantName apijson.Field + RegistrantOrg apijson.Field + RegistrantPhone apijson.Field + RegistrantPhoneExt apijson.Field + RegistrantPostalCode apijson.Field + RegistrantProvince apijson.Field + RegistrantReferralURL apijson.Field + RegistrantStreet apijson.Field + RegistrarCity apijson.Field + RegistrarCountry apijson.Field + RegistrarEmail apijson.Field + RegistrarFax apijson.Field + RegistrarFaxExt apijson.Field + RegistrarID apijson.Field + RegistrarName apijson.Field + RegistrarOrg apijson.Field + RegistrarPhone apijson.Field + RegistrarPhoneExt apijson.Field + RegistrarPostalCode apijson.Field + RegistrarProvince apijson.Field + RegistrarReferralURL apijson.Field + RegistrarStreet apijson.Field + Status apijson.Field + TechnicalCity apijson.Field + TechnicalCountry apijson.Field + TechnicalEmail apijson.Field + TechnicalFax apijson.Field + TechnicalFaxExt apijson.Field + TechnicalID apijson.Field + TechnicalName apijson.Field + TechnicalOrg apijson.Field + TechnicalPhone apijson.Field + TechnicalPhoneExt apijson.Field + TechnicalPostalCode apijson.Field + TechnicalProvince apijson.Field + TechnicalReferralURL apijson.Field + TechnicalStreet apijson.Field + UpdatedDate apijson.Field + UpdatedDateRaw apijson.Field + WhoisServer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *WhoisGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r whoisGetResponseJSON) RawJSON() string { + return r.raw +} + +type WhoisGetParams struct { + // Identifier + AccountID param.Field[string] `path:"account_id,required"` + Domain param.Field[string] `query:"domain"` +} + +// URLQuery serializes [WhoisGetParams]'s query parameters as `url.Values`. +func (r WhoisGetParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatRepeat, + NestedFormat: apiquery.NestedQueryFormatBrackets, + }) +} + +type WhoisGetResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result WhoisGetResponse `json:"result,required"` + // Whether the API call was successful + Success WhoisGetResponseEnvelopeSuccess `json:"success,required"` + JSON whoisGetResponseEnvelopeJSON `json:"-"` +} + +// whoisGetResponseEnvelopeJSON contains the JSON metadata for the struct +// [WhoisGetResponseEnvelope] +type whoisGetResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *WhoisGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r whoisGetResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type WhoisGetResponseEnvelopeSuccess bool + +const ( + WhoisGetResponseEnvelopeSuccessTrue WhoisGetResponseEnvelopeSuccess = true +) + +func (r WhoisGetResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case WhoisGetResponseEnvelopeSuccessTrue: + return true + } + return false +} diff --git a/intel/whois_test.go b/intel/whois_test.go new file mode 100644 index 0000000000..85465963b5 --- /dev/null +++ b/intel/whois_test.go @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package intel_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go/v2" + "github.com/cloudflare/cloudflare-go/v2/intel" + "github.com/cloudflare/cloudflare-go/v2/internal/testutil" + "github.com/cloudflare/cloudflare-go/v2/option" +) + +func TestWhoisGetWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Intel.Whois.Get(context.TODO(), intel.WhoisGetParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + Domain: cloudflare.F("string"), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} From 4ffb75853cbdb0a677a3278dc4fd34333de196f2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 21:02:04 +0000 Subject: [PATCH 086/127] feat(api): OpenAPI spec update via Stainless API (#1930) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index f959c2939b..f8966a9125 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1268 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7a581c61bc42c6e3e48c58c941255dca8f4b7b2e5aafd402a61c6438c2830071.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0ca9f3bf36e4be37e5ff9fff004f125665870f7b965d04ba56aea67a98964371.yml From 1b28fd4f92990771c889e3a97566e03695a9f3f9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 21:07:04 +0000 Subject: [PATCH 087/127] feat(api): OpenAPI spec update via Stainless API (#1931) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index f8966a9125..f959c2939b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1268 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0ca9f3bf36e4be37e5ff9fff004f125665870f7b965d04ba56aea67a98964371.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7a581c61bc42c6e3e48c58c941255dca8f4b7b2e5aafd402a61c6438c2830071.yml From 438210cee9277f8d32fb03a13202aee50021922e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 21:08:51 +0000 Subject: [PATCH 088/127] feat(api): OpenAPI spec update via Stainless API (#1932) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index f959c2939b..f8966a9125 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1268 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7a581c61bc42c6e3e48c58c941255dca8f4b7b2e5aafd402a61c6438c2830071.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0ca9f3bf36e4be37e5ff9fff004f125665870f7b965d04ba56aea67a98964371.yml From 9b5abc3ce18318def6ee61eca3bd6512458c97a0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 22:34:49 +0000 Subject: [PATCH 089/127] feat(api): OpenAPI spec update via Stainless API (#1933) --- .stats.yml | 2 +- api.md | 12 +-- cloudforce_one/request.go | 132 +++++++++++------------------- cloudforce_one/requestmessage.go | 119 ++++++++++----------------- cloudforce_one/requestpriority.go | 123 ++++++++++------------------ intel/whois.go | 4 +- shared/union.go | 3 - 7 files changed, 144 insertions(+), 251 deletions(-) diff --git a/.stats.yml b/.stats.yml index f8966a9125..93dca313ca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1268 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0ca9f3bf36e4be37e5ff9fff004f125665870f7b965d04ba56aea67a98964371.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-505671bfda248aa18b0c8d7d77487bd5f80d971bfb468e28ab0f08cf9156670f.yml diff --git a/api.md b/api.md index 94e742e014..42de5c2ed2 100644 --- a/api.md +++ b/api.md @@ -6730,14 +6730,14 @@ Response Types: - cloudforce_one.Quota - cloudforce_one.RequestConstants - cloudforce_one.RequestTypes -- cloudforce_one.RequestDeleteResponseUnion +- cloudforce_one.RequestDeleteResponse Methods: - client.CloudforceOne.Requests.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestNewParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestUpdateParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.List(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestListParams) (pagination.V4PagePaginationArray[cloudforce_one.ListItem], error) -- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponse, error) - client.CloudforceOne.Requests.Constants(ctx context.Context, accountIdentifier string) (cloudforce_one.RequestConstants, error) - client.CloudforceOne.Requests.Get(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) @@ -6748,13 +6748,13 @@ Methods: Response Types: - cloudforce_one.Message -- cloudforce_one.RequestMessageDeleteResponseUnion +- cloudforce_one.RequestMessageDeleteResponse Methods: - client.CloudforceOne.Requests.Message.New(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageNewParams) (cloudforce_one.Message, error) - client.CloudforceOne.Requests.Message.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, body cloudforce_one.RequestMessageUpdateParams) (cloudforce_one.Message, error) -- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponse, error) - client.CloudforceOne.Requests.Message.Get(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageGetParams) ([]cloudforce_one.Message, error) ### Priority @@ -6768,13 +6768,13 @@ Response Types: - cloudforce_one.Label - cloudforce_one.Priority -- cloudforce_one.RequestPriorityDeleteResponseUnion +- cloudforce_one.RequestPriorityDeleteResponse Methods: - client.CloudforceOne.Requests.Priority.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestPriorityNewParams) (cloudforce_one.Priority, error) - client.CloudforceOne.Requests.Priority.Update(ctx context.Context, accountIdentifier string, priorityIdentifer string, body cloudforce_one.RequestPriorityUpdateParams) (cloudforce_one.Item, error) -- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponse, error) - client.CloudforceOne.Requests.Priority.Get(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Priority.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) diff --git a/cloudforce_one/request.go b/cloudforce_one/request.go index ce028e3612..a5865d5f35 100644 --- a/cloudforce_one/request.go +++ b/cloudforce_one/request.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -15,7 +14,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestService contains methods and other services that help with interacting @@ -93,15 +91,10 @@ func (r *RequestService) ListAutoPaging(ctx context.Context, accountIdentifier s } // Delete a Request -func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponseUnion, err error) { +func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s", accountIdentifier, requestIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -469,30 +462,46 @@ func (r RequestConstantsTlp) IsKnown() bool { type RequestTypes []string -// Union satisfied by [cloudforce_one.RequestDeleteResponseUnknown], -// [cloudforce_one.RequestDeleteResponseArray] or [shared.UnionString]. -type RequestDeleteResponseUnion interface { - ImplementsCloudforceOneRequestDeleteResponseUnion() +type RequestDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestDeleteResponseSuccess `json:"success,required"` + JSON requestDeleteResponseJSON `json:"-"` +} + +// requestDeleteResponseJSON contains the JSON metadata for the struct +// [RequestDeleteResponse] +type requestDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +func (r requestDeleteResponseJSON) RawJSON() string { + return r.raw } -type RequestDeleteResponseArray []interface{} +// Whether the API call was successful +type RequestDeleteResponseSuccess bool -func (r RequestDeleteResponseArray) ImplementsCloudforceOneRequestDeleteResponseUnion() {} +const ( + RequestDeleteResponseSuccessTrue RequestDeleteResponseSuccess = true +) + +func (r RequestDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestDeleteResponseSuccessTrue: + return true + } + return false +} type RequestNewParams struct { // Request content @@ -533,9 +542,9 @@ func (r RequestNewParamsTlp) IsKnown() bool { type RequestNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestNewResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestNewResponseEnvelopeJSON `json:"-"` } @@ -544,8 +553,8 @@ type RequestNewResponseEnvelope struct { type requestNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -612,9 +621,9 @@ func (r RequestUpdateParamsTlp) IsKnown() bool { type RequestUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestUpdateResponseEnvelopeJSON `json:"-"` } @@ -623,8 +632,8 @@ type RequestUpdateResponseEnvelope struct { type requestUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -715,55 +724,12 @@ func (r RequestListParamsStatus) IsKnown() bool { return false } -type RequestDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestDeleteResponseEnvelopeJSON contains the JSON metadata for the struct -// [RequestDeleteResponseEnvelope] -type requestDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestDeleteResponseEnvelopeSuccess bool - -const ( - RequestDeleteResponseEnvelopeSuccessTrue RequestDeleteResponseEnvelopeSuccess = true -) - -func (r RequestDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestConstantsResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestConstants `json:"result,required"` // Whether the API call was successful Success RequestConstantsResponseEnvelopeSuccess `json:"success,required"` + Result RequestConstants `json:"result"` JSON requestConstantsResponseEnvelopeJSON `json:"-"` } @@ -772,8 +738,8 @@ type RequestConstantsResponseEnvelope struct { type requestConstantsResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -804,9 +770,9 @@ func (r RequestConstantsResponseEnvelopeSuccess) IsKnown() bool { type RequestGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestGetResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestGetResponseEnvelopeJSON `json:"-"` } @@ -815,8 +781,8 @@ type RequestGetResponseEnvelope struct { type requestGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -847,9 +813,9 @@ func (r RequestGetResponseEnvelopeSuccess) IsKnown() bool { type RequestQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Quota `json:"result,required"` // Whether the API call was successful Success RequestQuotaResponseEnvelopeSuccess `json:"success,required"` + Result Quota `json:"result"` JSON requestQuotaResponseEnvelopeJSON `json:"-"` } @@ -858,8 +824,8 @@ type RequestQuotaResponseEnvelope struct { type requestQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -890,9 +856,9 @@ func (r RequestQuotaResponseEnvelopeSuccess) IsKnown() bool { type RequestTypesResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestTypes `json:"result,required"` // Whether the API call was successful Success RequestTypesResponseEnvelopeSuccess `json:"success,required"` + Result RequestTypes `json:"result"` JSON requestTypesResponseEnvelopeJSON `json:"-"` } @@ -901,8 +867,8 @@ type RequestTypesResponseEnvelope struct { type requestTypesResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestmessage.go b/cloudforce_one/requestmessage.go index b5a88e43b5..f3949be2ee 100644 --- a/cloudforce_one/requestmessage.go +++ b/cloudforce_one/requestmessage.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -14,7 +13,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestMessageService contains methods and other services that help with @@ -64,15 +62,10 @@ func (r *RequestMessageService) Update(ctx context.Context, accountIdentifier st } // Delete a Request Message -func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponseUnion, err error) { +func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestMessageDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s/message/%v", accountIdentifier, requestIdentifier, messageIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -125,30 +118,45 @@ func (r messageJSON) RawJSON() string { return r.raw } -// Union satisfied by [cloudforce_one.RequestMessageDeleteResponseUnknown], -// [cloudforce_one.RequestMessageDeleteResponseArray] or [shared.UnionString]. -type RequestMessageDeleteResponseUnion interface { - ImplementsCloudforceOneRequestMessageDeleteResponseUnion() +type RequestMessageDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestMessageDeleteResponseSuccess `json:"success,required"` + JSON requestMessageDeleteResponseJSON `json:"-"` +} + +// requestMessageDeleteResponseJSON contains the JSON metadata for the struct +// [RequestMessageDeleteResponse] +type requestMessageDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestMessageDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestMessageDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestMessageDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +func (r requestMessageDeleteResponseJSON) RawJSON() string { + return r.raw } -type RequestMessageDeleteResponseArray []interface{} +// Whether the API call was successful +type RequestMessageDeleteResponseSuccess bool + +const ( + RequestMessageDeleteResponseSuccessTrue RequestMessageDeleteResponseSuccess = true +) -func (r RequestMessageDeleteResponseArray) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() { +func (r RequestMessageDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestMessageDeleteResponseSuccessTrue: + return true + } + return false } type RequestMessageNewParams struct { @@ -163,9 +171,9 @@ func (r RequestMessageNewParams) MarshalJSON() (data []byte, err error) { type RequestMessageNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageNewResponseEnvelopeSuccess `json:"success,required"` + Result Message `json:"result"` JSON requestMessageNewResponseEnvelopeJSON `json:"-"` } @@ -174,8 +182,8 @@ type RequestMessageNewResponseEnvelope struct { type requestMessageNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -242,9 +250,9 @@ func (r RequestMessageUpdateParamsTlp) IsKnown() bool { type RequestMessageUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Message `json:"result"` JSON requestMessageUpdateResponseEnvelopeJSON `json:"-"` } @@ -253,8 +261,8 @@ type RequestMessageUpdateResponseEnvelope struct { type requestMessageUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -282,49 +290,6 @@ func (r RequestMessageUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } -type RequestMessageDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestMessageDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestMessageDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestMessageDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestMessageDeleteResponseEnvelopeJSON contains the JSON metadata for the -// struct [RequestMessageDeleteResponseEnvelope] -type requestMessageDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestMessageDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestMessageDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestMessageDeleteResponseEnvelopeSuccess bool - -const ( - RequestMessageDeleteResponseEnvelopeSuccessTrue RequestMessageDeleteResponseEnvelopeSuccess = true -) - -func (r RequestMessageDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestMessageDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestMessageGetParams struct { // Page number of results Page param.Field[int64] `json:"page,required"` @@ -363,9 +328,9 @@ func (r RequestMessageGetParamsSortOrder) IsKnown() bool { type RequestMessageGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result []Message `json:"result,required"` // Whether the API call was successful Success RequestMessageGetResponseEnvelopeSuccess `json:"success,required"` + Result []Message `json:"result"` JSON requestMessageGetResponseEnvelopeJSON `json:"-"` } @@ -374,8 +339,8 @@ type RequestMessageGetResponseEnvelope struct { type requestMessageGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestpriority.go b/cloudforce_one/requestpriority.go index 702df8b577..eef29460bf 100644 --- a/cloudforce_one/requestpriority.go +++ b/cloudforce_one/requestpriority.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -14,7 +13,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestPriorityService contains methods and other services that help with @@ -62,15 +60,10 @@ func (r *RequestPriorityService) Update(ctx context.Context, accountIdentifier s } // Delete a Priority Intelligence Report -func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponseUnion, err error) { +func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestPriorityDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/priority/%s", accountIdentifier, priorityIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -196,30 +189,45 @@ func (r PriorityEditTlp) IsKnown() bool { return false } -// Union satisfied by [cloudforce_one.RequestPriorityDeleteResponseUnknown], -// [cloudforce_one.RequestPriorityDeleteResponseArray] or [shared.UnionString]. -type RequestPriorityDeleteResponseUnion interface { - ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() +type RequestPriorityDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestPriorityDeleteResponseSuccess `json:"success,required"` + JSON requestPriorityDeleteResponseJSON `json:"-"` } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestPriorityDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestPriorityDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +// requestPriorityDeleteResponseJSON contains the JSON metadata for the struct +// [RequestPriorityDeleteResponse] +type requestPriorityDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field } -type RequestPriorityDeleteResponseArray []interface{} +func (r *RequestPriorityDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} -func (r RequestPriorityDeleteResponseArray) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() { +func (r requestPriorityDeleteResponseJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestPriorityDeleteResponseSuccess bool + +const ( + RequestPriorityDeleteResponseSuccessTrue RequestPriorityDeleteResponseSuccess = true +) + +func (r RequestPriorityDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestPriorityDeleteResponseSuccessTrue: + return true + } + return false } type RequestPriorityNewParams struct { @@ -233,9 +241,9 @@ func (r RequestPriorityNewParams) MarshalJSON() (data []byte, err error) { type RequestPriorityNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Priority `json:"result,required"` // Whether the API call was successful Success RequestPriorityNewResponseEnvelopeSuccess `json:"success,required"` + Result Priority `json:"result"` JSON requestPriorityNewResponseEnvelopeJSON `json:"-"` } @@ -244,8 +252,8 @@ type RequestPriorityNewResponseEnvelope struct { type requestPriorityNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -284,9 +292,9 @@ func (r RequestPriorityUpdateParams) MarshalJSON() (data []byte, err error) { type RequestPriorityUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestPriorityUpdateResponseEnvelopeJSON `json:"-"` } @@ -295,8 +303,8 @@ type RequestPriorityUpdateResponseEnvelope struct { type requestPriorityUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -324,55 +332,12 @@ func (r RequestPriorityUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } -type RequestPriorityDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestPriorityDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestPriorityDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestPriorityDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestPriorityDeleteResponseEnvelopeJSON contains the JSON metadata for the -// struct [RequestPriorityDeleteResponseEnvelope] -type requestPriorityDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestPriorityDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestPriorityDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestPriorityDeleteResponseEnvelopeSuccess bool - -const ( - RequestPriorityDeleteResponseEnvelopeSuccessTrue RequestPriorityDeleteResponseEnvelopeSuccess = true -) - -func (r RequestPriorityDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestPriorityDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestPriorityGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityGetResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestPriorityGetResponseEnvelopeJSON `json:"-"` } @@ -381,8 +346,8 @@ type RequestPriorityGetResponseEnvelope struct { type requestPriorityGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -413,9 +378,9 @@ func (r RequestPriorityGetResponseEnvelopeSuccess) IsKnown() bool { type RequestPriorityQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Quota `json:"result,required"` // Whether the API call was successful Success RequestPriorityQuotaResponseEnvelopeSuccess `json:"success,required"` + Result Quota `json:"result"` JSON requestPriorityQuotaResponseEnvelopeJSON `json:"-"` } @@ -424,8 +389,8 @@ type RequestPriorityQuotaResponseEnvelope struct { type requestPriorityQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/intel/whois.go b/intel/whois.go index ece63a5b8f..5655c7c1a8 100644 --- a/intel/whois.go +++ b/intel/whois.go @@ -259,9 +259,9 @@ func (r WhoisGetParams) URLQuery() (v url.Values) { type WhoisGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result WhoisGetResponse `json:"result,required"` // Whether the API call was successful Success WhoisGetResponseEnvelopeSuccess `json:"success,required"` + Result WhoisGetResponse `json:"result"` JSON whoisGetResponseEnvelopeJSON `json:"-"` } @@ -270,8 +270,8 @@ type WhoisGetResponseEnvelope struct { type whoisGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/shared/union.go b/shared/union.go index 7537786749..212561aacd 100644 --- a/shared/union.go +++ b/shared/union.go @@ -166,9 +166,6 @@ func (UnionString) ImplementsOriginPostQuantumEncryptionOriginPostQuantumEncrypt } func (UnionString) ImplementsHostnamesSettingValueUnionParam() {} func (UnionString) ImplementsHostnamesSettingValueUnion() {} -func (UnionString) ImplementsCloudforceOneRequestDeleteResponseUnion() {} -func (UnionString) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() {} -func (UnionString) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() {} func (UnionString) ImplementsEventNotificationsR2ConfigurationQueueDeleteResponseUnion() {} type UnionInt int64 From 3f438107105c7de83ffa5999f5a622c417b8644e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 22:59:12 +0000 Subject: [PATCH 090/127] feat(api): OpenAPI spec update via Stainless API (#1934) --- .stats.yml | 2 +- api.md | 12 +-- cloudforce_one/request.go | 132 +++++++++++++++++++----------- cloudforce_one/requestmessage.go | 119 +++++++++++++++++---------- cloudforce_one/requestpriority.go | 123 ++++++++++++++++++---------- intel/whois.go | 4 +- shared/union.go | 3 + 7 files changed, 251 insertions(+), 144 deletions(-) diff --git a/.stats.yml b/.stats.yml index 93dca313ca..f8966a9125 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1268 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-505671bfda248aa18b0c8d7d77487bd5f80d971bfb468e28ab0f08cf9156670f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0ca9f3bf36e4be37e5ff9fff004f125665870f7b965d04ba56aea67a98964371.yml diff --git a/api.md b/api.md index 42de5c2ed2..94e742e014 100644 --- a/api.md +++ b/api.md @@ -6730,14 +6730,14 @@ Response Types: - cloudforce_one.Quota - cloudforce_one.RequestConstants - cloudforce_one.RequestTypes -- cloudforce_one.RequestDeleteResponse +- cloudforce_one.RequestDeleteResponseUnion Methods: - client.CloudforceOne.Requests.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestNewParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestUpdateParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.List(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestListParams) (pagination.V4PagePaginationArray[cloudforce_one.ListItem], error) -- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponse, error) +- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponseUnion, error) - client.CloudforceOne.Requests.Constants(ctx context.Context, accountIdentifier string) (cloudforce_one.RequestConstants, error) - client.CloudforceOne.Requests.Get(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) @@ -6748,13 +6748,13 @@ Methods: Response Types: - cloudforce_one.Message -- cloudforce_one.RequestMessageDeleteResponse +- cloudforce_one.RequestMessageDeleteResponseUnion Methods: - client.CloudforceOne.Requests.Message.New(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageNewParams) (cloudforce_one.Message, error) - client.CloudforceOne.Requests.Message.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, body cloudforce_one.RequestMessageUpdateParams) (cloudforce_one.Message, error) -- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponse, error) +- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponseUnion, error) - client.CloudforceOne.Requests.Message.Get(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageGetParams) ([]cloudforce_one.Message, error) ### Priority @@ -6768,13 +6768,13 @@ Response Types: - cloudforce_one.Label - cloudforce_one.Priority -- cloudforce_one.RequestPriorityDeleteResponse +- cloudforce_one.RequestPriorityDeleteResponseUnion Methods: - client.CloudforceOne.Requests.Priority.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestPriorityNewParams) (cloudforce_one.Priority, error) - client.CloudforceOne.Requests.Priority.Update(ctx context.Context, accountIdentifier string, priorityIdentifer string, body cloudforce_one.RequestPriorityUpdateParams) (cloudforce_one.Item, error) -- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponse, error) +- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponseUnion, error) - client.CloudforceOne.Requests.Priority.Get(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Priority.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) diff --git a/cloudforce_one/request.go b/cloudforce_one/request.go index a5865d5f35..ce028e3612 100644 --- a/cloudforce_one/request.go +++ b/cloudforce_one/request.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/option" "github.com/cloudflare/cloudflare-go/v2/shared" + "github.com/tidwall/gjson" ) // RequestService contains methods and other services that help with interacting @@ -91,10 +93,15 @@ func (r *RequestService) ListAutoPaging(ctx context.Context, accountIdentifier s } // Delete a Request -func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponse, err error) { +func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) + var env RequestDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s", accountIdentifier, requestIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result return } @@ -462,46 +469,30 @@ func (r RequestConstantsTlp) IsKnown() bool { type RequestTypes []string -type RequestDeleteResponse struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success RequestDeleteResponseSuccess `json:"success,required"` - JSON requestDeleteResponseJSON `json:"-"` -} - -// requestDeleteResponseJSON contains the JSON metadata for the struct -// [RequestDeleteResponse] -type requestDeleteResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) +// Union satisfied by [cloudforce_one.RequestDeleteResponseUnknown], +// [cloudforce_one.RequestDeleteResponseArray] or [shared.UnionString]. +type RequestDeleteResponseUnion interface { + ImplementsCloudforceOneRequestDeleteResponseUnion() } -func (r requestDeleteResponseJSON) RawJSON() string { - return r.raw +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*RequestDeleteResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(RequestDeleteResponseArray{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) } -// Whether the API call was successful -type RequestDeleteResponseSuccess bool +type RequestDeleteResponseArray []interface{} -const ( - RequestDeleteResponseSuccessTrue RequestDeleteResponseSuccess = true -) - -func (r RequestDeleteResponseSuccess) IsKnown() bool { - switch r { - case RequestDeleteResponseSuccessTrue: - return true - } - return false -} +func (r RequestDeleteResponseArray) ImplementsCloudforceOneRequestDeleteResponseUnion() {} type RequestNewParams struct { // Request content @@ -542,9 +533,9 @@ func (r RequestNewParamsTlp) IsKnown() bool { type RequestNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestNewResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestNewResponseEnvelopeJSON `json:"-"` } @@ -553,8 +544,8 @@ type RequestNewResponseEnvelope struct { type requestNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -621,9 +612,9 @@ func (r RequestUpdateParamsTlp) IsKnown() bool { type RequestUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestUpdateResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestUpdateResponseEnvelopeJSON `json:"-"` } @@ -632,8 +623,8 @@ type RequestUpdateResponseEnvelope struct { type requestUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -724,12 +715,55 @@ func (r RequestListParamsStatus) IsKnown() bool { return false } +type RequestDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestDeleteResponseUnion `json:"result,required"` + // Whether the API call was successful + Success RequestDeleteResponseEnvelopeSuccess `json:"success,required"` + JSON requestDeleteResponseEnvelopeJSON `json:"-"` +} + +// requestDeleteResponseEnvelopeJSON contains the JSON metadata for the struct +// [RequestDeleteResponseEnvelope] +type requestDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r requestDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestDeleteResponseEnvelopeSuccess bool + +const ( + RequestDeleteResponseEnvelopeSuccessTrue RequestDeleteResponseEnvelopeSuccess = true +) + +func (r RequestDeleteResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case RequestDeleteResponseEnvelopeSuccessTrue: + return true + } + return false +} + type RequestConstantsResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestConstants `json:"result,required"` // Whether the API call was successful Success RequestConstantsResponseEnvelopeSuccess `json:"success,required"` - Result RequestConstants `json:"result"` JSON requestConstantsResponseEnvelopeJSON `json:"-"` } @@ -738,8 +772,8 @@ type RequestConstantsResponseEnvelope struct { type requestConstantsResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -770,9 +804,9 @@ func (r RequestConstantsResponseEnvelopeSuccess) IsKnown() bool { type RequestGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestGetResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestGetResponseEnvelopeJSON `json:"-"` } @@ -781,8 +815,8 @@ type RequestGetResponseEnvelope struct { type requestGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -813,9 +847,9 @@ func (r RequestGetResponseEnvelopeSuccess) IsKnown() bool { type RequestQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Quota `json:"result,required"` // Whether the API call was successful Success RequestQuotaResponseEnvelopeSuccess `json:"success,required"` - Result Quota `json:"result"` JSON requestQuotaResponseEnvelopeJSON `json:"-"` } @@ -824,8 +858,8 @@ type RequestQuotaResponseEnvelope struct { type requestQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -856,9 +890,9 @@ func (r RequestQuotaResponseEnvelopeSuccess) IsKnown() bool { type RequestTypesResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestTypes `json:"result,required"` // Whether the API call was successful Success RequestTypesResponseEnvelopeSuccess `json:"success,required"` - Result RequestTypes `json:"result"` JSON requestTypesResponseEnvelopeJSON `json:"-"` } @@ -867,8 +901,8 @@ type RequestTypesResponseEnvelope struct { type requestTypesResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestmessage.go b/cloudforce_one/requestmessage.go index f3949be2ee..b5a88e43b5 100644 --- a/cloudforce_one/requestmessage.go +++ b/cloudforce_one/requestmessage.go @@ -6,6 +6,7 @@ import ( "context" "fmt" "net/http" + "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -13,6 +14,7 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" + "github.com/tidwall/gjson" ) // RequestMessageService contains methods and other services that help with @@ -62,10 +64,15 @@ func (r *RequestMessageService) Update(ctx context.Context, accountIdentifier st } // Delete a Request Message -func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponse, err error) { +func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) + var env RequestMessageDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s/message/%v", accountIdentifier, requestIdentifier, messageIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result return } @@ -118,45 +125,30 @@ func (r messageJSON) RawJSON() string { return r.raw } -type RequestMessageDeleteResponse struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success RequestMessageDeleteResponseSuccess `json:"success,required"` - JSON requestMessageDeleteResponseJSON `json:"-"` -} - -// requestMessageDeleteResponseJSON contains the JSON metadata for the struct -// [RequestMessageDeleteResponse] -type requestMessageDeleteResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestMessageDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) +// Union satisfied by [cloudforce_one.RequestMessageDeleteResponseUnknown], +// [cloudforce_one.RequestMessageDeleteResponseArray] or [shared.UnionString]. +type RequestMessageDeleteResponseUnion interface { + ImplementsCloudforceOneRequestMessageDeleteResponseUnion() } -func (r requestMessageDeleteResponseJSON) RawJSON() string { - return r.raw +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*RequestMessageDeleteResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(RequestMessageDeleteResponseArray{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) } -// Whether the API call was successful -type RequestMessageDeleteResponseSuccess bool - -const ( - RequestMessageDeleteResponseSuccessTrue RequestMessageDeleteResponseSuccess = true -) +type RequestMessageDeleteResponseArray []interface{} -func (r RequestMessageDeleteResponseSuccess) IsKnown() bool { - switch r { - case RequestMessageDeleteResponseSuccessTrue: - return true - } - return false +func (r RequestMessageDeleteResponseArray) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() { } type RequestMessageNewParams struct { @@ -171,9 +163,9 @@ func (r RequestMessageNewParams) MarshalJSON() (data []byte, err error) { type RequestMessageNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageNewResponseEnvelopeSuccess `json:"success,required"` - Result Message `json:"result"` JSON requestMessageNewResponseEnvelopeJSON `json:"-"` } @@ -182,8 +174,8 @@ type RequestMessageNewResponseEnvelope struct { type requestMessageNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -250,9 +242,9 @@ func (r RequestMessageUpdateParamsTlp) IsKnown() bool { type RequestMessageUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageUpdateResponseEnvelopeSuccess `json:"success,required"` - Result Message `json:"result"` JSON requestMessageUpdateResponseEnvelopeJSON `json:"-"` } @@ -261,8 +253,8 @@ type RequestMessageUpdateResponseEnvelope struct { type requestMessageUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -290,6 +282,49 @@ func (r RequestMessageUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } +type RequestMessageDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestMessageDeleteResponseUnion `json:"result,required"` + // Whether the API call was successful + Success RequestMessageDeleteResponseEnvelopeSuccess `json:"success,required"` + JSON requestMessageDeleteResponseEnvelopeJSON `json:"-"` +} + +// requestMessageDeleteResponseEnvelopeJSON contains the JSON metadata for the +// struct [RequestMessageDeleteResponseEnvelope] +type requestMessageDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestMessageDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r requestMessageDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestMessageDeleteResponseEnvelopeSuccess bool + +const ( + RequestMessageDeleteResponseEnvelopeSuccessTrue RequestMessageDeleteResponseEnvelopeSuccess = true +) + +func (r RequestMessageDeleteResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case RequestMessageDeleteResponseEnvelopeSuccessTrue: + return true + } + return false +} + type RequestMessageGetParams struct { // Page number of results Page param.Field[int64] `json:"page,required"` @@ -328,9 +363,9 @@ func (r RequestMessageGetParamsSortOrder) IsKnown() bool { type RequestMessageGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result []Message `json:"result,required"` // Whether the API call was successful Success RequestMessageGetResponseEnvelopeSuccess `json:"success,required"` - Result []Message `json:"result"` JSON requestMessageGetResponseEnvelopeJSON `json:"-"` } @@ -339,8 +374,8 @@ type RequestMessageGetResponseEnvelope struct { type requestMessageGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestpriority.go b/cloudforce_one/requestpriority.go index eef29460bf..702df8b577 100644 --- a/cloudforce_one/requestpriority.go +++ b/cloudforce_one/requestpriority.go @@ -6,6 +6,7 @@ import ( "context" "fmt" "net/http" + "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -13,6 +14,7 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" + "github.com/tidwall/gjson" ) // RequestPriorityService contains methods and other services that help with @@ -60,10 +62,15 @@ func (r *RequestPriorityService) Update(ctx context.Context, accountIdentifier s } // Delete a Priority Intelligence Report -func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponse, err error) { +func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) + var env RequestPriorityDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/priority/%s", accountIdentifier, priorityIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result return } @@ -189,45 +196,30 @@ func (r PriorityEditTlp) IsKnown() bool { return false } -type RequestPriorityDeleteResponse struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success RequestPriorityDeleteResponseSuccess `json:"success,required"` - JSON requestPriorityDeleteResponseJSON `json:"-"` +// Union satisfied by [cloudforce_one.RequestPriorityDeleteResponseUnknown], +// [cloudforce_one.RequestPriorityDeleteResponseArray] or [shared.UnionString]. +type RequestPriorityDeleteResponseUnion interface { + ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() } -// requestPriorityDeleteResponseJSON contains the JSON metadata for the struct -// [RequestPriorityDeleteResponse] -type requestPriorityDeleteResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*RequestPriorityDeleteResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(RequestPriorityDeleteResponseArray{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) } -func (r *RequestPriorityDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} +type RequestPriorityDeleteResponseArray []interface{} -func (r requestPriorityDeleteResponseJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestPriorityDeleteResponseSuccess bool - -const ( - RequestPriorityDeleteResponseSuccessTrue RequestPriorityDeleteResponseSuccess = true -) - -func (r RequestPriorityDeleteResponseSuccess) IsKnown() bool { - switch r { - case RequestPriorityDeleteResponseSuccessTrue: - return true - } - return false +func (r RequestPriorityDeleteResponseArray) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() { } type RequestPriorityNewParams struct { @@ -241,9 +233,9 @@ func (r RequestPriorityNewParams) MarshalJSON() (data []byte, err error) { type RequestPriorityNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Priority `json:"result,required"` // Whether the API call was successful Success RequestPriorityNewResponseEnvelopeSuccess `json:"success,required"` - Result Priority `json:"result"` JSON requestPriorityNewResponseEnvelopeJSON `json:"-"` } @@ -252,8 +244,8 @@ type RequestPriorityNewResponseEnvelope struct { type requestPriorityNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -292,9 +284,9 @@ func (r RequestPriorityUpdateParams) MarshalJSON() (data []byte, err error) { type RequestPriorityUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityUpdateResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestPriorityUpdateResponseEnvelopeJSON `json:"-"` } @@ -303,8 +295,8 @@ type RequestPriorityUpdateResponseEnvelope struct { type requestPriorityUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -332,12 +324,55 @@ func (r RequestPriorityUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } +type RequestPriorityDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestPriorityDeleteResponseUnion `json:"result,required"` + // Whether the API call was successful + Success RequestPriorityDeleteResponseEnvelopeSuccess `json:"success,required"` + JSON requestPriorityDeleteResponseEnvelopeJSON `json:"-"` +} + +// requestPriorityDeleteResponseEnvelopeJSON contains the JSON metadata for the +// struct [RequestPriorityDeleteResponseEnvelope] +type requestPriorityDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestPriorityDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r requestPriorityDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestPriorityDeleteResponseEnvelopeSuccess bool + +const ( + RequestPriorityDeleteResponseEnvelopeSuccessTrue RequestPriorityDeleteResponseEnvelopeSuccess = true +) + +func (r RequestPriorityDeleteResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case RequestPriorityDeleteResponseEnvelopeSuccessTrue: + return true + } + return false +} + type RequestPriorityGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityGetResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestPriorityGetResponseEnvelopeJSON `json:"-"` } @@ -346,8 +381,8 @@ type RequestPriorityGetResponseEnvelope struct { type requestPriorityGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -378,9 +413,9 @@ func (r RequestPriorityGetResponseEnvelopeSuccess) IsKnown() bool { type RequestPriorityQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Quota `json:"result,required"` // Whether the API call was successful Success RequestPriorityQuotaResponseEnvelopeSuccess `json:"success,required"` - Result Quota `json:"result"` JSON requestPriorityQuotaResponseEnvelopeJSON `json:"-"` } @@ -389,8 +424,8 @@ type RequestPriorityQuotaResponseEnvelope struct { type requestPriorityQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/intel/whois.go b/intel/whois.go index 5655c7c1a8..ece63a5b8f 100644 --- a/intel/whois.go +++ b/intel/whois.go @@ -259,9 +259,9 @@ func (r WhoisGetParams) URLQuery() (v url.Values) { type WhoisGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result WhoisGetResponse `json:"result,required"` // Whether the API call was successful Success WhoisGetResponseEnvelopeSuccess `json:"success,required"` - Result WhoisGetResponse `json:"result"` JSON whoisGetResponseEnvelopeJSON `json:"-"` } @@ -270,8 +270,8 @@ type WhoisGetResponseEnvelope struct { type whoisGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/shared/union.go b/shared/union.go index 212561aacd..7537786749 100644 --- a/shared/union.go +++ b/shared/union.go @@ -166,6 +166,9 @@ func (UnionString) ImplementsOriginPostQuantumEncryptionOriginPostQuantumEncrypt } func (UnionString) ImplementsHostnamesSettingValueUnionParam() {} func (UnionString) ImplementsHostnamesSettingValueUnion() {} +func (UnionString) ImplementsCloudforceOneRequestDeleteResponseUnion() {} +func (UnionString) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() {} +func (UnionString) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() {} func (UnionString) ImplementsEventNotificationsR2ConfigurationQueueDeleteResponseUnion() {} type UnionInt int64 From 97ce462c0bc8062a0fa8ed1d5e7bd3a33e44d856 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 3 May 2024 05:15:06 +0000 Subject: [PATCH 091/127] feat(api): OpenAPI spec update via Stainless API (#1935) --- .stats.yml | 4 +- api.md | 24 +++-- cloudforce_one/request.go | 132 +++++++++++----------------- cloudforce_one/requestmessage.go | 119 +++++++++---------------- cloudforce_one/requestpriority.go | 123 ++++++++++---------------- intel/indicatorfeed.go | 50 +++++++---- intel/indicatorfeed_test.go | 7 +- intel/indicatorfeedsnapshot.go | 128 +++++++++++++++++++++++++++ intel/indicatorfeedsnapshot_test.go | 46 ++++++++++ intel/whois.go | 4 +- shared/union.go | 3 - workers/ai.go | 7 +- 12 files changed, 369 insertions(+), 278 deletions(-) create mode 100644 intel/indicatorfeedsnapshot.go create mode 100644 intel/indicatorfeedsnapshot_test.go diff --git a/.stats.yml b/.stats.yml index f8966a9125..b0cb3255a6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1268 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0ca9f3bf36e4be37e5ff9fff004f125665870f7b965d04ba56aea67a98964371.yml +configured_endpoints: 1269 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-35412fd158c3e184d9aa368a2fd1c169ec542af1a1892f41155afe8df8ad79bf.yml diff --git a/api.md b/api.md index 94e742e014..7f3a94dce4 100644 --- a/api.md +++ b/api.md @@ -3361,11 +3361,21 @@ Response Types: Methods: - client.Intel.IndicatorFeeds.New(ctx context.Context, params intel.IndicatorFeedNewParams) (intel.IndicatorFeedNewResponse, error) -- client.Intel.IndicatorFeeds.Update(ctx context.Context, feedID int64, params intel.IndicatorFeedUpdateParams) (intel.IndicatorFeedUpdateResponse, error) +- client.Intel.IndicatorFeeds.Update(ctx context.Context, feedID int64, params intel.IndicatorFeedUpdateParams) (intel.IndicatorFeedUpdateResponse, error) - client.Intel.IndicatorFeeds.List(ctx context.Context, query intel.IndicatorFeedListParams) (pagination.SinglePage[intel.IndicatorFeedListResponse], error) - client.Intel.IndicatorFeeds.Data(ctx context.Context, feedID int64, query intel.IndicatorFeedDataParams) (string, error) - client.Intel.IndicatorFeeds.Get(ctx context.Context, feedID int64, query intel.IndicatorFeedGetParams) (intel.IndicatorFeedGetResponse, error) +### Snapshots + +Response Types: + +- intel.IndicatorFeedSnapshotUpdateResponse + +Methods: + +- client.Intel.IndicatorFeeds.Snapshots.Update(ctx context.Context, feedID int64, params intel.IndicatorFeedSnapshotUpdateParams) (intel.IndicatorFeedSnapshotUpdateResponse, error) + ### Permissions Response Types: @@ -6730,14 +6740,14 @@ Response Types: - cloudforce_one.Quota - cloudforce_one.RequestConstants - cloudforce_one.RequestTypes -- cloudforce_one.RequestDeleteResponseUnion +- cloudforce_one.RequestDeleteResponse Methods: - client.CloudforceOne.Requests.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestNewParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestUpdateParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.List(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestListParams) (pagination.V4PagePaginationArray[cloudforce_one.ListItem], error) -- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponse, error) - client.CloudforceOne.Requests.Constants(ctx context.Context, accountIdentifier string) (cloudforce_one.RequestConstants, error) - client.CloudforceOne.Requests.Get(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) @@ -6748,13 +6758,13 @@ Methods: Response Types: - cloudforce_one.Message -- cloudforce_one.RequestMessageDeleteResponseUnion +- cloudforce_one.RequestMessageDeleteResponse Methods: - client.CloudforceOne.Requests.Message.New(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageNewParams) (cloudforce_one.Message, error) - client.CloudforceOne.Requests.Message.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, body cloudforce_one.RequestMessageUpdateParams) (cloudforce_one.Message, error) -- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponse, error) - client.CloudforceOne.Requests.Message.Get(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageGetParams) ([]cloudforce_one.Message, error) ### Priority @@ -6768,13 +6778,13 @@ Response Types: - cloudforce_one.Label - cloudforce_one.Priority -- cloudforce_one.RequestPriorityDeleteResponseUnion +- cloudforce_one.RequestPriorityDeleteResponse Methods: - client.CloudforceOne.Requests.Priority.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestPriorityNewParams) (cloudforce_one.Priority, error) - client.CloudforceOne.Requests.Priority.Update(ctx context.Context, accountIdentifier string, priorityIdentifer string, body cloudforce_one.RequestPriorityUpdateParams) (cloudforce_one.Item, error) -- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponse, error) - client.CloudforceOne.Requests.Priority.Get(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Priority.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) diff --git a/cloudforce_one/request.go b/cloudforce_one/request.go index ce028e3612..a5865d5f35 100644 --- a/cloudforce_one/request.go +++ b/cloudforce_one/request.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -15,7 +14,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestService contains methods and other services that help with interacting @@ -93,15 +91,10 @@ func (r *RequestService) ListAutoPaging(ctx context.Context, accountIdentifier s } // Delete a Request -func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponseUnion, err error) { +func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s", accountIdentifier, requestIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -469,30 +462,46 @@ func (r RequestConstantsTlp) IsKnown() bool { type RequestTypes []string -// Union satisfied by [cloudforce_one.RequestDeleteResponseUnknown], -// [cloudforce_one.RequestDeleteResponseArray] or [shared.UnionString]. -type RequestDeleteResponseUnion interface { - ImplementsCloudforceOneRequestDeleteResponseUnion() +type RequestDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestDeleteResponseSuccess `json:"success,required"` + JSON requestDeleteResponseJSON `json:"-"` +} + +// requestDeleteResponseJSON contains the JSON metadata for the struct +// [RequestDeleteResponse] +type requestDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +func (r requestDeleteResponseJSON) RawJSON() string { + return r.raw } -type RequestDeleteResponseArray []interface{} +// Whether the API call was successful +type RequestDeleteResponseSuccess bool -func (r RequestDeleteResponseArray) ImplementsCloudforceOneRequestDeleteResponseUnion() {} +const ( + RequestDeleteResponseSuccessTrue RequestDeleteResponseSuccess = true +) + +func (r RequestDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestDeleteResponseSuccessTrue: + return true + } + return false +} type RequestNewParams struct { // Request content @@ -533,9 +542,9 @@ func (r RequestNewParamsTlp) IsKnown() bool { type RequestNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestNewResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestNewResponseEnvelopeJSON `json:"-"` } @@ -544,8 +553,8 @@ type RequestNewResponseEnvelope struct { type requestNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -612,9 +621,9 @@ func (r RequestUpdateParamsTlp) IsKnown() bool { type RequestUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestUpdateResponseEnvelopeJSON `json:"-"` } @@ -623,8 +632,8 @@ type RequestUpdateResponseEnvelope struct { type requestUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -715,55 +724,12 @@ func (r RequestListParamsStatus) IsKnown() bool { return false } -type RequestDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestDeleteResponseEnvelopeJSON contains the JSON metadata for the struct -// [RequestDeleteResponseEnvelope] -type requestDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestDeleteResponseEnvelopeSuccess bool - -const ( - RequestDeleteResponseEnvelopeSuccessTrue RequestDeleteResponseEnvelopeSuccess = true -) - -func (r RequestDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestConstantsResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestConstants `json:"result,required"` // Whether the API call was successful Success RequestConstantsResponseEnvelopeSuccess `json:"success,required"` + Result RequestConstants `json:"result"` JSON requestConstantsResponseEnvelopeJSON `json:"-"` } @@ -772,8 +738,8 @@ type RequestConstantsResponseEnvelope struct { type requestConstantsResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -804,9 +770,9 @@ func (r RequestConstantsResponseEnvelopeSuccess) IsKnown() bool { type RequestGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestGetResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestGetResponseEnvelopeJSON `json:"-"` } @@ -815,8 +781,8 @@ type RequestGetResponseEnvelope struct { type requestGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -847,9 +813,9 @@ func (r RequestGetResponseEnvelopeSuccess) IsKnown() bool { type RequestQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Quota `json:"result,required"` // Whether the API call was successful Success RequestQuotaResponseEnvelopeSuccess `json:"success,required"` + Result Quota `json:"result"` JSON requestQuotaResponseEnvelopeJSON `json:"-"` } @@ -858,8 +824,8 @@ type RequestQuotaResponseEnvelope struct { type requestQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -890,9 +856,9 @@ func (r RequestQuotaResponseEnvelopeSuccess) IsKnown() bool { type RequestTypesResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestTypes `json:"result,required"` // Whether the API call was successful Success RequestTypesResponseEnvelopeSuccess `json:"success,required"` + Result RequestTypes `json:"result"` JSON requestTypesResponseEnvelopeJSON `json:"-"` } @@ -901,8 +867,8 @@ type RequestTypesResponseEnvelope struct { type requestTypesResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestmessage.go b/cloudforce_one/requestmessage.go index b5a88e43b5..f3949be2ee 100644 --- a/cloudforce_one/requestmessage.go +++ b/cloudforce_one/requestmessage.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -14,7 +13,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestMessageService contains methods and other services that help with @@ -64,15 +62,10 @@ func (r *RequestMessageService) Update(ctx context.Context, accountIdentifier st } // Delete a Request Message -func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponseUnion, err error) { +func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestMessageDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s/message/%v", accountIdentifier, requestIdentifier, messageIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -125,30 +118,45 @@ func (r messageJSON) RawJSON() string { return r.raw } -// Union satisfied by [cloudforce_one.RequestMessageDeleteResponseUnknown], -// [cloudforce_one.RequestMessageDeleteResponseArray] or [shared.UnionString]. -type RequestMessageDeleteResponseUnion interface { - ImplementsCloudforceOneRequestMessageDeleteResponseUnion() +type RequestMessageDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestMessageDeleteResponseSuccess `json:"success,required"` + JSON requestMessageDeleteResponseJSON `json:"-"` +} + +// requestMessageDeleteResponseJSON contains the JSON metadata for the struct +// [RequestMessageDeleteResponse] +type requestMessageDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestMessageDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestMessageDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestMessageDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +func (r requestMessageDeleteResponseJSON) RawJSON() string { + return r.raw } -type RequestMessageDeleteResponseArray []interface{} +// Whether the API call was successful +type RequestMessageDeleteResponseSuccess bool + +const ( + RequestMessageDeleteResponseSuccessTrue RequestMessageDeleteResponseSuccess = true +) -func (r RequestMessageDeleteResponseArray) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() { +func (r RequestMessageDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestMessageDeleteResponseSuccessTrue: + return true + } + return false } type RequestMessageNewParams struct { @@ -163,9 +171,9 @@ func (r RequestMessageNewParams) MarshalJSON() (data []byte, err error) { type RequestMessageNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageNewResponseEnvelopeSuccess `json:"success,required"` + Result Message `json:"result"` JSON requestMessageNewResponseEnvelopeJSON `json:"-"` } @@ -174,8 +182,8 @@ type RequestMessageNewResponseEnvelope struct { type requestMessageNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -242,9 +250,9 @@ func (r RequestMessageUpdateParamsTlp) IsKnown() bool { type RequestMessageUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Message `json:"result"` JSON requestMessageUpdateResponseEnvelopeJSON `json:"-"` } @@ -253,8 +261,8 @@ type RequestMessageUpdateResponseEnvelope struct { type requestMessageUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -282,49 +290,6 @@ func (r RequestMessageUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } -type RequestMessageDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestMessageDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestMessageDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestMessageDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestMessageDeleteResponseEnvelopeJSON contains the JSON metadata for the -// struct [RequestMessageDeleteResponseEnvelope] -type requestMessageDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestMessageDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestMessageDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestMessageDeleteResponseEnvelopeSuccess bool - -const ( - RequestMessageDeleteResponseEnvelopeSuccessTrue RequestMessageDeleteResponseEnvelopeSuccess = true -) - -func (r RequestMessageDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestMessageDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestMessageGetParams struct { // Page number of results Page param.Field[int64] `json:"page,required"` @@ -363,9 +328,9 @@ func (r RequestMessageGetParamsSortOrder) IsKnown() bool { type RequestMessageGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result []Message `json:"result,required"` // Whether the API call was successful Success RequestMessageGetResponseEnvelopeSuccess `json:"success,required"` + Result []Message `json:"result"` JSON requestMessageGetResponseEnvelopeJSON `json:"-"` } @@ -374,8 +339,8 @@ type RequestMessageGetResponseEnvelope struct { type requestMessageGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestpriority.go b/cloudforce_one/requestpriority.go index 702df8b577..eef29460bf 100644 --- a/cloudforce_one/requestpriority.go +++ b/cloudforce_one/requestpriority.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -14,7 +13,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestPriorityService contains methods and other services that help with @@ -62,15 +60,10 @@ func (r *RequestPriorityService) Update(ctx context.Context, accountIdentifier s } // Delete a Priority Intelligence Report -func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponseUnion, err error) { +func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestPriorityDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/priority/%s", accountIdentifier, priorityIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -196,30 +189,45 @@ func (r PriorityEditTlp) IsKnown() bool { return false } -// Union satisfied by [cloudforce_one.RequestPriorityDeleteResponseUnknown], -// [cloudforce_one.RequestPriorityDeleteResponseArray] or [shared.UnionString]. -type RequestPriorityDeleteResponseUnion interface { - ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() +type RequestPriorityDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestPriorityDeleteResponseSuccess `json:"success,required"` + JSON requestPriorityDeleteResponseJSON `json:"-"` } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestPriorityDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestPriorityDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +// requestPriorityDeleteResponseJSON contains the JSON metadata for the struct +// [RequestPriorityDeleteResponse] +type requestPriorityDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field } -type RequestPriorityDeleteResponseArray []interface{} +func (r *RequestPriorityDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} -func (r RequestPriorityDeleteResponseArray) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() { +func (r requestPriorityDeleteResponseJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestPriorityDeleteResponseSuccess bool + +const ( + RequestPriorityDeleteResponseSuccessTrue RequestPriorityDeleteResponseSuccess = true +) + +func (r RequestPriorityDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestPriorityDeleteResponseSuccessTrue: + return true + } + return false } type RequestPriorityNewParams struct { @@ -233,9 +241,9 @@ func (r RequestPriorityNewParams) MarshalJSON() (data []byte, err error) { type RequestPriorityNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Priority `json:"result,required"` // Whether the API call was successful Success RequestPriorityNewResponseEnvelopeSuccess `json:"success,required"` + Result Priority `json:"result"` JSON requestPriorityNewResponseEnvelopeJSON `json:"-"` } @@ -244,8 +252,8 @@ type RequestPriorityNewResponseEnvelope struct { type requestPriorityNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -284,9 +292,9 @@ func (r RequestPriorityUpdateParams) MarshalJSON() (data []byte, err error) { type RequestPriorityUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestPriorityUpdateResponseEnvelopeJSON `json:"-"` } @@ -295,8 +303,8 @@ type RequestPriorityUpdateResponseEnvelope struct { type requestPriorityUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -324,55 +332,12 @@ func (r RequestPriorityUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } -type RequestPriorityDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestPriorityDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestPriorityDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestPriorityDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestPriorityDeleteResponseEnvelopeJSON contains the JSON metadata for the -// struct [RequestPriorityDeleteResponseEnvelope] -type requestPriorityDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestPriorityDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestPriorityDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestPriorityDeleteResponseEnvelopeSuccess bool - -const ( - RequestPriorityDeleteResponseEnvelopeSuccessTrue RequestPriorityDeleteResponseEnvelopeSuccess = true -) - -func (r RequestPriorityDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestPriorityDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestPriorityGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityGetResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestPriorityGetResponseEnvelopeJSON `json:"-"` } @@ -381,8 +346,8 @@ type RequestPriorityGetResponseEnvelope struct { type requestPriorityGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -413,9 +378,9 @@ func (r RequestPriorityGetResponseEnvelopeSuccess) IsKnown() bool { type RequestPriorityQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Quota `json:"result,required"` // Whether the API call was successful Success RequestPriorityQuotaResponseEnvelopeSuccess `json:"success,required"` + Result Quota `json:"result"` JSON requestPriorityQuotaResponseEnvelopeJSON `json:"-"` } @@ -424,8 +389,8 @@ type RequestPriorityQuotaResponseEnvelope struct { type requestPriorityQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/intel/indicatorfeed.go b/intel/indicatorfeed.go index 018d96fc62..74e4a0bef0 100644 --- a/intel/indicatorfeed.go +++ b/intel/indicatorfeed.go @@ -23,6 +23,7 @@ import ( // instead. type IndicatorFeedService struct { Options []option.RequestOption + Snapshots *IndicatorFeedSnapshotService Permissions *IndicatorFeedPermissionService } @@ -32,6 +33,7 @@ type IndicatorFeedService struct { func NewIndicatorFeedService(opts ...option.RequestOption) (r *IndicatorFeedService) { r = &IndicatorFeedService{} r.Options = opts + r.Snapshots = NewIndicatorFeedSnapshotService(opts...) r.Permissions = NewIndicatorFeedPermissionService(opts...) return } @@ -49,11 +51,11 @@ func (r *IndicatorFeedService) New(ctx context.Context, params IndicatorFeedNewP return } -// Update indicator feed data +// Update indicator feed metadata func (r *IndicatorFeedService) Update(ctx context.Context, feedID int64, params IndicatorFeedUpdateParams, opts ...option.RequestOption) (res *IndicatorFeedUpdateResponse, err error) { opts = append(r.Options[:], opts...) var env IndicatorFeedUpdateResponseEnvelope - path := fmt.Sprintf("accounts/%s/intel/indicator-feeds/%v/snapshot", params.AccountID, feedID) + path := fmt.Sprintf("accounts/%s/intel/indicator-feeds/%v", params.AccountID, feedID) err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) if err != nil { return @@ -148,23 +150,35 @@ func (r indicatorFeedNewResponseJSON) RawJSON() string { } type IndicatorFeedUpdateResponse struct { - // Feed id - FileID int64 `json:"file_id"` - // Name of the file unified in our system - Filename string `json:"filename"` - // Current status of upload, should be unified - Status string `json:"status"` - JSON indicatorFeedUpdateResponseJSON `json:"-"` + // The unique identifier for the indicator feed + ID int64 `json:"id"` + // The date and time when the data entry was created + CreatedOn time.Time `json:"created_on" format:"date-time"` + // The description of the example test + Description string `json:"description"` + // Whether the indicator feed can be attributed to a provider + IsAttributable bool `json:"is_attributable"` + // Whether the indicator feed is exposed to customers + IsPublic bool `json:"is_public"` + // The date and time when the data entry was last modified + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // The name of the indicator feed + Name string `json:"name"` + JSON indicatorFeedUpdateResponseJSON `json:"-"` } // indicatorFeedUpdateResponseJSON contains the JSON metadata for the struct // [IndicatorFeedUpdateResponse] type indicatorFeedUpdateResponseJSON struct { - FileID apijson.Field - Filename apijson.Field - Status apijson.Field - raw string - ExtraFields map[string]apijson.Field + ID apijson.Field + CreatedOn apijson.Field + Description apijson.Field + IsAttributable apijson.Field + IsPublic apijson.Field + ModifiedOn apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field } func (r *IndicatorFeedUpdateResponse) UnmarshalJSON(data []byte) (err error) { @@ -331,8 +345,12 @@ func (r IndicatorFeedNewResponseEnvelopeSuccess) IsKnown() bool { type IndicatorFeedUpdateParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` - // The file to upload - Source param.Field[string] `json:"source"` + // The new description of the feed + FeedDescription param.Field[string] `json:"feed_description"` + // The new is_attributable value of the feed + IsAttributable param.Field[bool] `json:"is_attributable"` + // The new is_public value of the feed + IsPublic param.Field[bool] `json:"is_public"` } func (r IndicatorFeedUpdateParams) MarshalJSON() (data []byte, err error) { diff --git a/intel/indicatorfeed_test.go b/intel/indicatorfeed_test.go index 78e4e79f04..e3f2fb800e 100644 --- a/intel/indicatorfeed_test.go +++ b/intel/indicatorfeed_test.go @@ -42,7 +42,6 @@ func TestIndicatorFeedNewWithOptionalParams(t *testing.T) { } func TestIndicatorFeedUpdateWithOptionalParams(t *testing.T) { - t.Skip("TODO: investigate broken test") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -59,8 +58,10 @@ func TestIndicatorFeedUpdateWithOptionalParams(t *testing.T) { context.TODO(), int64(12), intel.IndicatorFeedUpdateParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Source: cloudflare.F("@/Users/me/test.stix2"), + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + FeedDescription: cloudflare.F("This is an example description"), + IsAttributable: cloudflare.F(true), + IsPublic: cloudflare.F(true), }, ) if err != nil { diff --git a/intel/indicatorfeedsnapshot.go b/intel/indicatorfeedsnapshot.go new file mode 100644 index 0000000000..0e36b78bc0 --- /dev/null +++ b/intel/indicatorfeedsnapshot.go @@ -0,0 +1,128 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package intel + +import ( + "context" + "fmt" + "net/http" + + "github.com/cloudflare/cloudflare-go/v2/internal/apijson" + "github.com/cloudflare/cloudflare-go/v2/internal/param" + "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" + "github.com/cloudflare/cloudflare-go/v2/option" + "github.com/cloudflare/cloudflare-go/v2/shared" +) + +// IndicatorFeedSnapshotService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewIndicatorFeedSnapshotService] +// method instead. +type IndicatorFeedSnapshotService struct { + Options []option.RequestOption +} + +// NewIndicatorFeedSnapshotService generates a new service that applies the given +// options to each request. These options are applied after the parent client's +// options (if there is one), and before any request-specific options. +func NewIndicatorFeedSnapshotService(opts ...option.RequestOption) (r *IndicatorFeedSnapshotService) { + r = &IndicatorFeedSnapshotService{} + r.Options = opts + return +} + +// Update indicator feed data +func (r *IndicatorFeedSnapshotService) Update(ctx context.Context, feedID int64, params IndicatorFeedSnapshotUpdateParams, opts ...option.RequestOption) (res *IndicatorFeedSnapshotUpdateResponse, err error) { + opts = append(r.Options[:], opts...) + var env IndicatorFeedSnapshotUpdateResponseEnvelope + path := fmt.Sprintf("accounts/%s/intel/indicator-feeds/%v/snapshot", params.AccountID, feedID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +type IndicatorFeedSnapshotUpdateResponse struct { + // Feed id + FileID int64 `json:"file_id"` + // Name of the file unified in our system + Filename string `json:"filename"` + // Current status of upload, should be unified + Status string `json:"status"` + JSON indicatorFeedSnapshotUpdateResponseJSON `json:"-"` +} + +// indicatorFeedSnapshotUpdateResponseJSON contains the JSON metadata for the +// struct [IndicatorFeedSnapshotUpdateResponse] +type indicatorFeedSnapshotUpdateResponseJSON struct { + FileID apijson.Field + Filename apijson.Field + Status apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IndicatorFeedSnapshotUpdateResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r indicatorFeedSnapshotUpdateResponseJSON) RawJSON() string { + return r.raw +} + +type IndicatorFeedSnapshotUpdateParams struct { + // Identifier + AccountID param.Field[string] `path:"account_id,required"` + // The file to upload + Source param.Field[string] `json:"source"` +} + +func (r IndicatorFeedSnapshotUpdateParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type IndicatorFeedSnapshotUpdateResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success IndicatorFeedSnapshotUpdateResponseEnvelopeSuccess `json:"success,required"` + Result IndicatorFeedSnapshotUpdateResponse `json:"result"` + JSON indicatorFeedSnapshotUpdateResponseEnvelopeJSON `json:"-"` +} + +// indicatorFeedSnapshotUpdateResponseEnvelopeJSON contains the JSON metadata for +// the struct [IndicatorFeedSnapshotUpdateResponseEnvelope] +type indicatorFeedSnapshotUpdateResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IndicatorFeedSnapshotUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r indicatorFeedSnapshotUpdateResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type IndicatorFeedSnapshotUpdateResponseEnvelopeSuccess bool + +const ( + IndicatorFeedSnapshotUpdateResponseEnvelopeSuccessTrue IndicatorFeedSnapshotUpdateResponseEnvelopeSuccess = true +) + +func (r IndicatorFeedSnapshotUpdateResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case IndicatorFeedSnapshotUpdateResponseEnvelopeSuccessTrue: + return true + } + return false +} diff --git a/intel/indicatorfeedsnapshot_test.go b/intel/indicatorfeedsnapshot_test.go new file mode 100644 index 0000000000..1744ee1930 --- /dev/null +++ b/intel/indicatorfeedsnapshot_test.go @@ -0,0 +1,46 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package intel_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go/v2" + "github.com/cloudflare/cloudflare-go/v2/intel" + "github.com/cloudflare/cloudflare-go/v2/internal/testutil" + "github.com/cloudflare/cloudflare-go/v2/option" +) + +func TestIndicatorFeedSnapshotUpdateWithOptionalParams(t *testing.T) { + t.Skip("TODO: investigate broken test") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Intel.IndicatorFeeds.Snapshots.Update( + context.TODO(), + int64(12), + intel.IndicatorFeedSnapshotUpdateParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + Source: cloudflare.F("@/Users/me/test.stix2"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/intel/whois.go b/intel/whois.go index ece63a5b8f..5655c7c1a8 100644 --- a/intel/whois.go +++ b/intel/whois.go @@ -259,9 +259,9 @@ func (r WhoisGetParams) URLQuery() (v url.Values) { type WhoisGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result WhoisGetResponse `json:"result,required"` // Whether the API call was successful Success WhoisGetResponseEnvelopeSuccess `json:"success,required"` + Result WhoisGetResponse `json:"result"` JSON whoisGetResponseEnvelopeJSON `json:"-"` } @@ -270,8 +270,8 @@ type WhoisGetResponseEnvelope struct { type whoisGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/shared/union.go b/shared/union.go index 7537786749..212561aacd 100644 --- a/shared/union.go +++ b/shared/union.go @@ -166,9 +166,6 @@ func (UnionString) ImplementsOriginPostQuantumEncryptionOriginPostQuantumEncrypt } func (UnionString) ImplementsHostnamesSettingValueUnionParam() {} func (UnionString) ImplementsHostnamesSettingValueUnion() {} -func (UnionString) ImplementsCloudforceOneRequestDeleteResponseUnion() {} -func (UnionString) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() {} -func (UnionString) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() {} func (UnionString) ImplementsEventNotificationsR2ConfigurationQueueDeleteResponseUnion() {} type UnionInt int64 diff --git a/workers/ai.go b/workers/ai.go index a19742b0f1..274b13f36f 100644 --- a/workers/ai.go +++ b/workers/ai.go @@ -55,8 +55,7 @@ func (r *AIService) Run(ctx context.Context, modelName string, params AIRunParam } // Union satisfied by [workers.AIRunResponseTextClassification], -// [shared.UnionString], [shared.UnionString], -// [workers.AIRunResponseSentenceSimilarity], +// [shared.UnionString], [workers.AIRunResponseSentenceSimilarity], // [workers.AIRunResponseTextEmbeddings], [workers.AIRunResponseSpeechRecognition], // [workers.AIRunResponseImageClassification], // [workers.AIRunResponseObjectDetection], [workers.AIRunResponseObject], @@ -78,10 +77,6 @@ func init() { TypeFilter: gjson.String, Type: reflect.TypeOf(shared.UnionString("")), }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, apijson.UnionVariant{ TypeFilter: gjson.JSON, Type: reflect.TypeOf(AIRunResponseSentenceSimilarity{}), From 6bf1a33522dad00d200ad2508469798cffe9f587 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 3 May 2024 05:16:48 +0000 Subject: [PATCH 092/127] feat(api): OpenAPI spec update via Stainless API (#1936) --- .stats.yml | 2 +- api.md | 12 +-- cloudforce_one/request.go | 132 +++++++++++++++++++----------- cloudforce_one/requestmessage.go | 119 +++++++++++++++++---------- cloudforce_one/requestpriority.go | 123 ++++++++++++++++++---------- intel/whois.go | 4 +- shared/union.go | 3 + workers/ai.go | 7 +- 8 files changed, 257 insertions(+), 145 deletions(-) diff --git a/.stats.yml b/.stats.yml index b0cb3255a6..ff732cc96d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1269 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-35412fd158c3e184d9aa368a2fd1c169ec542af1a1892f41155afe8df8ad79bf.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0ca9f3bf36e4be37e5ff9fff004f125665870f7b965d04ba56aea67a98964371.yml diff --git a/api.md b/api.md index 7f3a94dce4..3b02a20ab1 100644 --- a/api.md +++ b/api.md @@ -6740,14 +6740,14 @@ Response Types: - cloudforce_one.Quota - cloudforce_one.RequestConstants - cloudforce_one.RequestTypes -- cloudforce_one.RequestDeleteResponse +- cloudforce_one.RequestDeleteResponseUnion Methods: - client.CloudforceOne.Requests.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestNewParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestUpdateParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.List(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestListParams) (pagination.V4PagePaginationArray[cloudforce_one.ListItem], error) -- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponse, error) +- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponseUnion, error) - client.CloudforceOne.Requests.Constants(ctx context.Context, accountIdentifier string) (cloudforce_one.RequestConstants, error) - client.CloudforceOne.Requests.Get(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) @@ -6758,13 +6758,13 @@ Methods: Response Types: - cloudforce_one.Message -- cloudforce_one.RequestMessageDeleteResponse +- cloudforce_one.RequestMessageDeleteResponseUnion Methods: - client.CloudforceOne.Requests.Message.New(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageNewParams) (cloudforce_one.Message, error) - client.CloudforceOne.Requests.Message.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, body cloudforce_one.RequestMessageUpdateParams) (cloudforce_one.Message, error) -- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponse, error) +- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponseUnion, error) - client.CloudforceOne.Requests.Message.Get(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageGetParams) ([]cloudforce_one.Message, error) ### Priority @@ -6778,13 +6778,13 @@ Response Types: - cloudforce_one.Label - cloudforce_one.Priority -- cloudforce_one.RequestPriorityDeleteResponse +- cloudforce_one.RequestPriorityDeleteResponseUnion Methods: - client.CloudforceOne.Requests.Priority.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestPriorityNewParams) (cloudforce_one.Priority, error) - client.CloudforceOne.Requests.Priority.Update(ctx context.Context, accountIdentifier string, priorityIdentifer string, body cloudforce_one.RequestPriorityUpdateParams) (cloudforce_one.Item, error) -- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponse, error) +- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponseUnion, error) - client.CloudforceOne.Requests.Priority.Get(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Priority.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) diff --git a/cloudforce_one/request.go b/cloudforce_one/request.go index a5865d5f35..ce028e3612 100644 --- a/cloudforce_one/request.go +++ b/cloudforce_one/request.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/option" "github.com/cloudflare/cloudflare-go/v2/shared" + "github.com/tidwall/gjson" ) // RequestService contains methods and other services that help with interacting @@ -91,10 +93,15 @@ func (r *RequestService) ListAutoPaging(ctx context.Context, accountIdentifier s } // Delete a Request -func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponse, err error) { +func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) + var env RequestDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s", accountIdentifier, requestIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result return } @@ -462,46 +469,30 @@ func (r RequestConstantsTlp) IsKnown() bool { type RequestTypes []string -type RequestDeleteResponse struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success RequestDeleteResponseSuccess `json:"success,required"` - JSON requestDeleteResponseJSON `json:"-"` -} - -// requestDeleteResponseJSON contains the JSON metadata for the struct -// [RequestDeleteResponse] -type requestDeleteResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) +// Union satisfied by [cloudforce_one.RequestDeleteResponseUnknown], +// [cloudforce_one.RequestDeleteResponseArray] or [shared.UnionString]. +type RequestDeleteResponseUnion interface { + ImplementsCloudforceOneRequestDeleteResponseUnion() } -func (r requestDeleteResponseJSON) RawJSON() string { - return r.raw +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*RequestDeleteResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(RequestDeleteResponseArray{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) } -// Whether the API call was successful -type RequestDeleteResponseSuccess bool +type RequestDeleteResponseArray []interface{} -const ( - RequestDeleteResponseSuccessTrue RequestDeleteResponseSuccess = true -) - -func (r RequestDeleteResponseSuccess) IsKnown() bool { - switch r { - case RequestDeleteResponseSuccessTrue: - return true - } - return false -} +func (r RequestDeleteResponseArray) ImplementsCloudforceOneRequestDeleteResponseUnion() {} type RequestNewParams struct { // Request content @@ -542,9 +533,9 @@ func (r RequestNewParamsTlp) IsKnown() bool { type RequestNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestNewResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestNewResponseEnvelopeJSON `json:"-"` } @@ -553,8 +544,8 @@ type RequestNewResponseEnvelope struct { type requestNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -621,9 +612,9 @@ func (r RequestUpdateParamsTlp) IsKnown() bool { type RequestUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestUpdateResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestUpdateResponseEnvelopeJSON `json:"-"` } @@ -632,8 +623,8 @@ type RequestUpdateResponseEnvelope struct { type requestUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -724,12 +715,55 @@ func (r RequestListParamsStatus) IsKnown() bool { return false } +type RequestDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestDeleteResponseUnion `json:"result,required"` + // Whether the API call was successful + Success RequestDeleteResponseEnvelopeSuccess `json:"success,required"` + JSON requestDeleteResponseEnvelopeJSON `json:"-"` +} + +// requestDeleteResponseEnvelopeJSON contains the JSON metadata for the struct +// [RequestDeleteResponseEnvelope] +type requestDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r requestDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestDeleteResponseEnvelopeSuccess bool + +const ( + RequestDeleteResponseEnvelopeSuccessTrue RequestDeleteResponseEnvelopeSuccess = true +) + +func (r RequestDeleteResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case RequestDeleteResponseEnvelopeSuccessTrue: + return true + } + return false +} + type RequestConstantsResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestConstants `json:"result,required"` // Whether the API call was successful Success RequestConstantsResponseEnvelopeSuccess `json:"success,required"` - Result RequestConstants `json:"result"` JSON requestConstantsResponseEnvelopeJSON `json:"-"` } @@ -738,8 +772,8 @@ type RequestConstantsResponseEnvelope struct { type requestConstantsResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -770,9 +804,9 @@ func (r RequestConstantsResponseEnvelopeSuccess) IsKnown() bool { type RequestGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestGetResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestGetResponseEnvelopeJSON `json:"-"` } @@ -781,8 +815,8 @@ type RequestGetResponseEnvelope struct { type requestGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -813,9 +847,9 @@ func (r RequestGetResponseEnvelopeSuccess) IsKnown() bool { type RequestQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Quota `json:"result,required"` // Whether the API call was successful Success RequestQuotaResponseEnvelopeSuccess `json:"success,required"` - Result Quota `json:"result"` JSON requestQuotaResponseEnvelopeJSON `json:"-"` } @@ -824,8 +858,8 @@ type RequestQuotaResponseEnvelope struct { type requestQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -856,9 +890,9 @@ func (r RequestQuotaResponseEnvelopeSuccess) IsKnown() bool { type RequestTypesResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestTypes `json:"result,required"` // Whether the API call was successful Success RequestTypesResponseEnvelopeSuccess `json:"success,required"` - Result RequestTypes `json:"result"` JSON requestTypesResponseEnvelopeJSON `json:"-"` } @@ -867,8 +901,8 @@ type RequestTypesResponseEnvelope struct { type requestTypesResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestmessage.go b/cloudforce_one/requestmessage.go index f3949be2ee..b5a88e43b5 100644 --- a/cloudforce_one/requestmessage.go +++ b/cloudforce_one/requestmessage.go @@ -6,6 +6,7 @@ import ( "context" "fmt" "net/http" + "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -13,6 +14,7 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" + "github.com/tidwall/gjson" ) // RequestMessageService contains methods and other services that help with @@ -62,10 +64,15 @@ func (r *RequestMessageService) Update(ctx context.Context, accountIdentifier st } // Delete a Request Message -func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponse, err error) { +func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) + var env RequestMessageDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s/message/%v", accountIdentifier, requestIdentifier, messageIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result return } @@ -118,45 +125,30 @@ func (r messageJSON) RawJSON() string { return r.raw } -type RequestMessageDeleteResponse struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success RequestMessageDeleteResponseSuccess `json:"success,required"` - JSON requestMessageDeleteResponseJSON `json:"-"` -} - -// requestMessageDeleteResponseJSON contains the JSON metadata for the struct -// [RequestMessageDeleteResponse] -type requestMessageDeleteResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestMessageDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) +// Union satisfied by [cloudforce_one.RequestMessageDeleteResponseUnknown], +// [cloudforce_one.RequestMessageDeleteResponseArray] or [shared.UnionString]. +type RequestMessageDeleteResponseUnion interface { + ImplementsCloudforceOneRequestMessageDeleteResponseUnion() } -func (r requestMessageDeleteResponseJSON) RawJSON() string { - return r.raw +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*RequestMessageDeleteResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(RequestMessageDeleteResponseArray{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) } -// Whether the API call was successful -type RequestMessageDeleteResponseSuccess bool - -const ( - RequestMessageDeleteResponseSuccessTrue RequestMessageDeleteResponseSuccess = true -) +type RequestMessageDeleteResponseArray []interface{} -func (r RequestMessageDeleteResponseSuccess) IsKnown() bool { - switch r { - case RequestMessageDeleteResponseSuccessTrue: - return true - } - return false +func (r RequestMessageDeleteResponseArray) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() { } type RequestMessageNewParams struct { @@ -171,9 +163,9 @@ func (r RequestMessageNewParams) MarshalJSON() (data []byte, err error) { type RequestMessageNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageNewResponseEnvelopeSuccess `json:"success,required"` - Result Message `json:"result"` JSON requestMessageNewResponseEnvelopeJSON `json:"-"` } @@ -182,8 +174,8 @@ type RequestMessageNewResponseEnvelope struct { type requestMessageNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -250,9 +242,9 @@ func (r RequestMessageUpdateParamsTlp) IsKnown() bool { type RequestMessageUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageUpdateResponseEnvelopeSuccess `json:"success,required"` - Result Message `json:"result"` JSON requestMessageUpdateResponseEnvelopeJSON `json:"-"` } @@ -261,8 +253,8 @@ type RequestMessageUpdateResponseEnvelope struct { type requestMessageUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -290,6 +282,49 @@ func (r RequestMessageUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } +type RequestMessageDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestMessageDeleteResponseUnion `json:"result,required"` + // Whether the API call was successful + Success RequestMessageDeleteResponseEnvelopeSuccess `json:"success,required"` + JSON requestMessageDeleteResponseEnvelopeJSON `json:"-"` +} + +// requestMessageDeleteResponseEnvelopeJSON contains the JSON metadata for the +// struct [RequestMessageDeleteResponseEnvelope] +type requestMessageDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestMessageDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r requestMessageDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestMessageDeleteResponseEnvelopeSuccess bool + +const ( + RequestMessageDeleteResponseEnvelopeSuccessTrue RequestMessageDeleteResponseEnvelopeSuccess = true +) + +func (r RequestMessageDeleteResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case RequestMessageDeleteResponseEnvelopeSuccessTrue: + return true + } + return false +} + type RequestMessageGetParams struct { // Page number of results Page param.Field[int64] `json:"page,required"` @@ -328,9 +363,9 @@ func (r RequestMessageGetParamsSortOrder) IsKnown() bool { type RequestMessageGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result []Message `json:"result,required"` // Whether the API call was successful Success RequestMessageGetResponseEnvelopeSuccess `json:"success,required"` - Result []Message `json:"result"` JSON requestMessageGetResponseEnvelopeJSON `json:"-"` } @@ -339,8 +374,8 @@ type RequestMessageGetResponseEnvelope struct { type requestMessageGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestpriority.go b/cloudforce_one/requestpriority.go index eef29460bf..702df8b577 100644 --- a/cloudforce_one/requestpriority.go +++ b/cloudforce_one/requestpriority.go @@ -6,6 +6,7 @@ import ( "context" "fmt" "net/http" + "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -13,6 +14,7 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" + "github.com/tidwall/gjson" ) // RequestPriorityService contains methods and other services that help with @@ -60,10 +62,15 @@ func (r *RequestPriorityService) Update(ctx context.Context, accountIdentifier s } // Delete a Priority Intelligence Report -func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponse, err error) { +func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) + var env RequestPriorityDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/priority/%s", accountIdentifier, priorityIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result return } @@ -189,45 +196,30 @@ func (r PriorityEditTlp) IsKnown() bool { return false } -type RequestPriorityDeleteResponse struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success RequestPriorityDeleteResponseSuccess `json:"success,required"` - JSON requestPriorityDeleteResponseJSON `json:"-"` +// Union satisfied by [cloudforce_one.RequestPriorityDeleteResponseUnknown], +// [cloudforce_one.RequestPriorityDeleteResponseArray] or [shared.UnionString]. +type RequestPriorityDeleteResponseUnion interface { + ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() } -// requestPriorityDeleteResponseJSON contains the JSON metadata for the struct -// [RequestPriorityDeleteResponse] -type requestPriorityDeleteResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*RequestPriorityDeleteResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(RequestPriorityDeleteResponseArray{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) } -func (r *RequestPriorityDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} +type RequestPriorityDeleteResponseArray []interface{} -func (r requestPriorityDeleteResponseJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestPriorityDeleteResponseSuccess bool - -const ( - RequestPriorityDeleteResponseSuccessTrue RequestPriorityDeleteResponseSuccess = true -) - -func (r RequestPriorityDeleteResponseSuccess) IsKnown() bool { - switch r { - case RequestPriorityDeleteResponseSuccessTrue: - return true - } - return false +func (r RequestPriorityDeleteResponseArray) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() { } type RequestPriorityNewParams struct { @@ -241,9 +233,9 @@ func (r RequestPriorityNewParams) MarshalJSON() (data []byte, err error) { type RequestPriorityNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Priority `json:"result,required"` // Whether the API call was successful Success RequestPriorityNewResponseEnvelopeSuccess `json:"success,required"` - Result Priority `json:"result"` JSON requestPriorityNewResponseEnvelopeJSON `json:"-"` } @@ -252,8 +244,8 @@ type RequestPriorityNewResponseEnvelope struct { type requestPriorityNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -292,9 +284,9 @@ func (r RequestPriorityUpdateParams) MarshalJSON() (data []byte, err error) { type RequestPriorityUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityUpdateResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestPriorityUpdateResponseEnvelopeJSON `json:"-"` } @@ -303,8 +295,8 @@ type RequestPriorityUpdateResponseEnvelope struct { type requestPriorityUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -332,12 +324,55 @@ func (r RequestPriorityUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } +type RequestPriorityDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestPriorityDeleteResponseUnion `json:"result,required"` + // Whether the API call was successful + Success RequestPriorityDeleteResponseEnvelopeSuccess `json:"success,required"` + JSON requestPriorityDeleteResponseEnvelopeJSON `json:"-"` +} + +// requestPriorityDeleteResponseEnvelopeJSON contains the JSON metadata for the +// struct [RequestPriorityDeleteResponseEnvelope] +type requestPriorityDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestPriorityDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r requestPriorityDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestPriorityDeleteResponseEnvelopeSuccess bool + +const ( + RequestPriorityDeleteResponseEnvelopeSuccessTrue RequestPriorityDeleteResponseEnvelopeSuccess = true +) + +func (r RequestPriorityDeleteResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case RequestPriorityDeleteResponseEnvelopeSuccessTrue: + return true + } + return false +} + type RequestPriorityGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityGetResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestPriorityGetResponseEnvelopeJSON `json:"-"` } @@ -346,8 +381,8 @@ type RequestPriorityGetResponseEnvelope struct { type requestPriorityGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -378,9 +413,9 @@ func (r RequestPriorityGetResponseEnvelopeSuccess) IsKnown() bool { type RequestPriorityQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Quota `json:"result,required"` // Whether the API call was successful Success RequestPriorityQuotaResponseEnvelopeSuccess `json:"success,required"` - Result Quota `json:"result"` JSON requestPriorityQuotaResponseEnvelopeJSON `json:"-"` } @@ -389,8 +424,8 @@ type RequestPriorityQuotaResponseEnvelope struct { type requestPriorityQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/intel/whois.go b/intel/whois.go index 5655c7c1a8..ece63a5b8f 100644 --- a/intel/whois.go +++ b/intel/whois.go @@ -259,9 +259,9 @@ func (r WhoisGetParams) URLQuery() (v url.Values) { type WhoisGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result WhoisGetResponse `json:"result,required"` // Whether the API call was successful Success WhoisGetResponseEnvelopeSuccess `json:"success,required"` - Result WhoisGetResponse `json:"result"` JSON whoisGetResponseEnvelopeJSON `json:"-"` } @@ -270,8 +270,8 @@ type WhoisGetResponseEnvelope struct { type whoisGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/shared/union.go b/shared/union.go index 212561aacd..7537786749 100644 --- a/shared/union.go +++ b/shared/union.go @@ -166,6 +166,9 @@ func (UnionString) ImplementsOriginPostQuantumEncryptionOriginPostQuantumEncrypt } func (UnionString) ImplementsHostnamesSettingValueUnionParam() {} func (UnionString) ImplementsHostnamesSettingValueUnion() {} +func (UnionString) ImplementsCloudforceOneRequestDeleteResponseUnion() {} +func (UnionString) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() {} +func (UnionString) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() {} func (UnionString) ImplementsEventNotificationsR2ConfigurationQueueDeleteResponseUnion() {} type UnionInt int64 diff --git a/workers/ai.go b/workers/ai.go index 274b13f36f..a19742b0f1 100644 --- a/workers/ai.go +++ b/workers/ai.go @@ -55,7 +55,8 @@ func (r *AIService) Run(ctx context.Context, modelName string, params AIRunParam } // Union satisfied by [workers.AIRunResponseTextClassification], -// [shared.UnionString], [workers.AIRunResponseSentenceSimilarity], +// [shared.UnionString], [shared.UnionString], +// [workers.AIRunResponseSentenceSimilarity], // [workers.AIRunResponseTextEmbeddings], [workers.AIRunResponseSpeechRecognition], // [workers.AIRunResponseImageClassification], // [workers.AIRunResponseObjectDetection], [workers.AIRunResponseObject], @@ -77,6 +78,10 @@ func init() { TypeFilter: gjson.String, Type: reflect.TypeOf(shared.UnionString("")), }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, apijson.UnionVariant{ TypeFilter: gjson.JSON, Type: reflect.TypeOf(AIRunResponseSentenceSimilarity{}), From b36f46df1010d485f141c04b448e07c4191cd926 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 3 May 2024 10:47:22 +0000 Subject: [PATCH 093/127] feat(api): OpenAPI spec update via Stainless API (#1937) --- .stats.yml | 2 +- api.md | 12 +-- cloudforce_one/request.go | 132 +++++++++++------------------- cloudforce_one/requestmessage.go | 119 ++++++++++----------------- cloudforce_one/requestpriority.go | 123 ++++++++++------------------ intel/whois.go | 4 +- shared/union.go | 3 - workers/ai.go | 7 +- 8 files changed, 145 insertions(+), 257 deletions(-) diff --git a/.stats.yml b/.stats.yml index ff732cc96d..b0cb3255a6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1269 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0ca9f3bf36e4be37e5ff9fff004f125665870f7b965d04ba56aea67a98964371.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-35412fd158c3e184d9aa368a2fd1c169ec542af1a1892f41155afe8df8ad79bf.yml diff --git a/api.md b/api.md index 3b02a20ab1..7f3a94dce4 100644 --- a/api.md +++ b/api.md @@ -6740,14 +6740,14 @@ Response Types: - cloudforce_one.Quota - cloudforce_one.RequestConstants - cloudforce_one.RequestTypes -- cloudforce_one.RequestDeleteResponseUnion +- cloudforce_one.RequestDeleteResponse Methods: - client.CloudforceOne.Requests.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestNewParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestUpdateParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.List(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestListParams) (pagination.V4PagePaginationArray[cloudforce_one.ListItem], error) -- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponse, error) - client.CloudforceOne.Requests.Constants(ctx context.Context, accountIdentifier string) (cloudforce_one.RequestConstants, error) - client.CloudforceOne.Requests.Get(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) @@ -6758,13 +6758,13 @@ Methods: Response Types: - cloudforce_one.Message -- cloudforce_one.RequestMessageDeleteResponseUnion +- cloudforce_one.RequestMessageDeleteResponse Methods: - client.CloudforceOne.Requests.Message.New(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageNewParams) (cloudforce_one.Message, error) - client.CloudforceOne.Requests.Message.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, body cloudforce_one.RequestMessageUpdateParams) (cloudforce_one.Message, error) -- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponse, error) - client.CloudforceOne.Requests.Message.Get(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageGetParams) ([]cloudforce_one.Message, error) ### Priority @@ -6778,13 +6778,13 @@ Response Types: - cloudforce_one.Label - cloudforce_one.Priority -- cloudforce_one.RequestPriorityDeleteResponseUnion +- cloudforce_one.RequestPriorityDeleteResponse Methods: - client.CloudforceOne.Requests.Priority.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestPriorityNewParams) (cloudforce_one.Priority, error) - client.CloudforceOne.Requests.Priority.Update(ctx context.Context, accountIdentifier string, priorityIdentifer string, body cloudforce_one.RequestPriorityUpdateParams) (cloudforce_one.Item, error) -- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponse, error) - client.CloudforceOne.Requests.Priority.Get(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Priority.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) diff --git a/cloudforce_one/request.go b/cloudforce_one/request.go index ce028e3612..a5865d5f35 100644 --- a/cloudforce_one/request.go +++ b/cloudforce_one/request.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -15,7 +14,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestService contains methods and other services that help with interacting @@ -93,15 +91,10 @@ func (r *RequestService) ListAutoPaging(ctx context.Context, accountIdentifier s } // Delete a Request -func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponseUnion, err error) { +func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s", accountIdentifier, requestIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -469,30 +462,46 @@ func (r RequestConstantsTlp) IsKnown() bool { type RequestTypes []string -// Union satisfied by [cloudforce_one.RequestDeleteResponseUnknown], -// [cloudforce_one.RequestDeleteResponseArray] or [shared.UnionString]. -type RequestDeleteResponseUnion interface { - ImplementsCloudforceOneRequestDeleteResponseUnion() +type RequestDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestDeleteResponseSuccess `json:"success,required"` + JSON requestDeleteResponseJSON `json:"-"` +} + +// requestDeleteResponseJSON contains the JSON metadata for the struct +// [RequestDeleteResponse] +type requestDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +func (r requestDeleteResponseJSON) RawJSON() string { + return r.raw } -type RequestDeleteResponseArray []interface{} +// Whether the API call was successful +type RequestDeleteResponseSuccess bool -func (r RequestDeleteResponseArray) ImplementsCloudforceOneRequestDeleteResponseUnion() {} +const ( + RequestDeleteResponseSuccessTrue RequestDeleteResponseSuccess = true +) + +func (r RequestDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestDeleteResponseSuccessTrue: + return true + } + return false +} type RequestNewParams struct { // Request content @@ -533,9 +542,9 @@ func (r RequestNewParamsTlp) IsKnown() bool { type RequestNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestNewResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestNewResponseEnvelopeJSON `json:"-"` } @@ -544,8 +553,8 @@ type RequestNewResponseEnvelope struct { type requestNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -612,9 +621,9 @@ func (r RequestUpdateParamsTlp) IsKnown() bool { type RequestUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestUpdateResponseEnvelopeJSON `json:"-"` } @@ -623,8 +632,8 @@ type RequestUpdateResponseEnvelope struct { type requestUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -715,55 +724,12 @@ func (r RequestListParamsStatus) IsKnown() bool { return false } -type RequestDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestDeleteResponseEnvelopeJSON contains the JSON metadata for the struct -// [RequestDeleteResponseEnvelope] -type requestDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestDeleteResponseEnvelopeSuccess bool - -const ( - RequestDeleteResponseEnvelopeSuccessTrue RequestDeleteResponseEnvelopeSuccess = true -) - -func (r RequestDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestConstantsResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestConstants `json:"result,required"` // Whether the API call was successful Success RequestConstantsResponseEnvelopeSuccess `json:"success,required"` + Result RequestConstants `json:"result"` JSON requestConstantsResponseEnvelopeJSON `json:"-"` } @@ -772,8 +738,8 @@ type RequestConstantsResponseEnvelope struct { type requestConstantsResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -804,9 +770,9 @@ func (r RequestConstantsResponseEnvelopeSuccess) IsKnown() bool { type RequestGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestGetResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestGetResponseEnvelopeJSON `json:"-"` } @@ -815,8 +781,8 @@ type RequestGetResponseEnvelope struct { type requestGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -847,9 +813,9 @@ func (r RequestGetResponseEnvelopeSuccess) IsKnown() bool { type RequestQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Quota `json:"result,required"` // Whether the API call was successful Success RequestQuotaResponseEnvelopeSuccess `json:"success,required"` + Result Quota `json:"result"` JSON requestQuotaResponseEnvelopeJSON `json:"-"` } @@ -858,8 +824,8 @@ type RequestQuotaResponseEnvelope struct { type requestQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -890,9 +856,9 @@ func (r RequestQuotaResponseEnvelopeSuccess) IsKnown() bool { type RequestTypesResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestTypes `json:"result,required"` // Whether the API call was successful Success RequestTypesResponseEnvelopeSuccess `json:"success,required"` + Result RequestTypes `json:"result"` JSON requestTypesResponseEnvelopeJSON `json:"-"` } @@ -901,8 +867,8 @@ type RequestTypesResponseEnvelope struct { type requestTypesResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestmessage.go b/cloudforce_one/requestmessage.go index b5a88e43b5..f3949be2ee 100644 --- a/cloudforce_one/requestmessage.go +++ b/cloudforce_one/requestmessage.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -14,7 +13,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestMessageService contains methods and other services that help with @@ -64,15 +62,10 @@ func (r *RequestMessageService) Update(ctx context.Context, accountIdentifier st } // Delete a Request Message -func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponseUnion, err error) { +func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestMessageDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s/message/%v", accountIdentifier, requestIdentifier, messageIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -125,30 +118,45 @@ func (r messageJSON) RawJSON() string { return r.raw } -// Union satisfied by [cloudforce_one.RequestMessageDeleteResponseUnknown], -// [cloudforce_one.RequestMessageDeleteResponseArray] or [shared.UnionString]. -type RequestMessageDeleteResponseUnion interface { - ImplementsCloudforceOneRequestMessageDeleteResponseUnion() +type RequestMessageDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestMessageDeleteResponseSuccess `json:"success,required"` + JSON requestMessageDeleteResponseJSON `json:"-"` +} + +// requestMessageDeleteResponseJSON contains the JSON metadata for the struct +// [RequestMessageDeleteResponse] +type requestMessageDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestMessageDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestMessageDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestMessageDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +func (r requestMessageDeleteResponseJSON) RawJSON() string { + return r.raw } -type RequestMessageDeleteResponseArray []interface{} +// Whether the API call was successful +type RequestMessageDeleteResponseSuccess bool + +const ( + RequestMessageDeleteResponseSuccessTrue RequestMessageDeleteResponseSuccess = true +) -func (r RequestMessageDeleteResponseArray) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() { +func (r RequestMessageDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestMessageDeleteResponseSuccessTrue: + return true + } + return false } type RequestMessageNewParams struct { @@ -163,9 +171,9 @@ func (r RequestMessageNewParams) MarshalJSON() (data []byte, err error) { type RequestMessageNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageNewResponseEnvelopeSuccess `json:"success,required"` + Result Message `json:"result"` JSON requestMessageNewResponseEnvelopeJSON `json:"-"` } @@ -174,8 +182,8 @@ type RequestMessageNewResponseEnvelope struct { type requestMessageNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -242,9 +250,9 @@ func (r RequestMessageUpdateParamsTlp) IsKnown() bool { type RequestMessageUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Message `json:"result"` JSON requestMessageUpdateResponseEnvelopeJSON `json:"-"` } @@ -253,8 +261,8 @@ type RequestMessageUpdateResponseEnvelope struct { type requestMessageUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -282,49 +290,6 @@ func (r RequestMessageUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } -type RequestMessageDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestMessageDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestMessageDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestMessageDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestMessageDeleteResponseEnvelopeJSON contains the JSON metadata for the -// struct [RequestMessageDeleteResponseEnvelope] -type requestMessageDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestMessageDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestMessageDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestMessageDeleteResponseEnvelopeSuccess bool - -const ( - RequestMessageDeleteResponseEnvelopeSuccessTrue RequestMessageDeleteResponseEnvelopeSuccess = true -) - -func (r RequestMessageDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestMessageDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestMessageGetParams struct { // Page number of results Page param.Field[int64] `json:"page,required"` @@ -363,9 +328,9 @@ func (r RequestMessageGetParamsSortOrder) IsKnown() bool { type RequestMessageGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result []Message `json:"result,required"` // Whether the API call was successful Success RequestMessageGetResponseEnvelopeSuccess `json:"success,required"` + Result []Message `json:"result"` JSON requestMessageGetResponseEnvelopeJSON `json:"-"` } @@ -374,8 +339,8 @@ type RequestMessageGetResponseEnvelope struct { type requestMessageGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestpriority.go b/cloudforce_one/requestpriority.go index 702df8b577..eef29460bf 100644 --- a/cloudforce_one/requestpriority.go +++ b/cloudforce_one/requestpriority.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -14,7 +13,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestPriorityService contains methods and other services that help with @@ -62,15 +60,10 @@ func (r *RequestPriorityService) Update(ctx context.Context, accountIdentifier s } // Delete a Priority Intelligence Report -func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponseUnion, err error) { +func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestPriorityDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/priority/%s", accountIdentifier, priorityIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -196,30 +189,45 @@ func (r PriorityEditTlp) IsKnown() bool { return false } -// Union satisfied by [cloudforce_one.RequestPriorityDeleteResponseUnknown], -// [cloudforce_one.RequestPriorityDeleteResponseArray] or [shared.UnionString]. -type RequestPriorityDeleteResponseUnion interface { - ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() +type RequestPriorityDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestPriorityDeleteResponseSuccess `json:"success,required"` + JSON requestPriorityDeleteResponseJSON `json:"-"` } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestPriorityDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestPriorityDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +// requestPriorityDeleteResponseJSON contains the JSON metadata for the struct +// [RequestPriorityDeleteResponse] +type requestPriorityDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field } -type RequestPriorityDeleteResponseArray []interface{} +func (r *RequestPriorityDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} -func (r RequestPriorityDeleteResponseArray) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() { +func (r requestPriorityDeleteResponseJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestPriorityDeleteResponseSuccess bool + +const ( + RequestPriorityDeleteResponseSuccessTrue RequestPriorityDeleteResponseSuccess = true +) + +func (r RequestPriorityDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestPriorityDeleteResponseSuccessTrue: + return true + } + return false } type RequestPriorityNewParams struct { @@ -233,9 +241,9 @@ func (r RequestPriorityNewParams) MarshalJSON() (data []byte, err error) { type RequestPriorityNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Priority `json:"result,required"` // Whether the API call was successful Success RequestPriorityNewResponseEnvelopeSuccess `json:"success,required"` + Result Priority `json:"result"` JSON requestPriorityNewResponseEnvelopeJSON `json:"-"` } @@ -244,8 +252,8 @@ type RequestPriorityNewResponseEnvelope struct { type requestPriorityNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -284,9 +292,9 @@ func (r RequestPriorityUpdateParams) MarshalJSON() (data []byte, err error) { type RequestPriorityUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestPriorityUpdateResponseEnvelopeJSON `json:"-"` } @@ -295,8 +303,8 @@ type RequestPriorityUpdateResponseEnvelope struct { type requestPriorityUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -324,55 +332,12 @@ func (r RequestPriorityUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } -type RequestPriorityDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestPriorityDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestPriorityDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestPriorityDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestPriorityDeleteResponseEnvelopeJSON contains the JSON metadata for the -// struct [RequestPriorityDeleteResponseEnvelope] -type requestPriorityDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestPriorityDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestPriorityDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestPriorityDeleteResponseEnvelopeSuccess bool - -const ( - RequestPriorityDeleteResponseEnvelopeSuccessTrue RequestPriorityDeleteResponseEnvelopeSuccess = true -) - -func (r RequestPriorityDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestPriorityDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestPriorityGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityGetResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestPriorityGetResponseEnvelopeJSON `json:"-"` } @@ -381,8 +346,8 @@ type RequestPriorityGetResponseEnvelope struct { type requestPriorityGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -413,9 +378,9 @@ func (r RequestPriorityGetResponseEnvelopeSuccess) IsKnown() bool { type RequestPriorityQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Quota `json:"result,required"` // Whether the API call was successful Success RequestPriorityQuotaResponseEnvelopeSuccess `json:"success,required"` + Result Quota `json:"result"` JSON requestPriorityQuotaResponseEnvelopeJSON `json:"-"` } @@ -424,8 +389,8 @@ type RequestPriorityQuotaResponseEnvelope struct { type requestPriorityQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/intel/whois.go b/intel/whois.go index ece63a5b8f..5655c7c1a8 100644 --- a/intel/whois.go +++ b/intel/whois.go @@ -259,9 +259,9 @@ func (r WhoisGetParams) URLQuery() (v url.Values) { type WhoisGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result WhoisGetResponse `json:"result,required"` // Whether the API call was successful Success WhoisGetResponseEnvelopeSuccess `json:"success,required"` + Result WhoisGetResponse `json:"result"` JSON whoisGetResponseEnvelopeJSON `json:"-"` } @@ -270,8 +270,8 @@ type WhoisGetResponseEnvelope struct { type whoisGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/shared/union.go b/shared/union.go index 7537786749..212561aacd 100644 --- a/shared/union.go +++ b/shared/union.go @@ -166,9 +166,6 @@ func (UnionString) ImplementsOriginPostQuantumEncryptionOriginPostQuantumEncrypt } func (UnionString) ImplementsHostnamesSettingValueUnionParam() {} func (UnionString) ImplementsHostnamesSettingValueUnion() {} -func (UnionString) ImplementsCloudforceOneRequestDeleteResponseUnion() {} -func (UnionString) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() {} -func (UnionString) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() {} func (UnionString) ImplementsEventNotificationsR2ConfigurationQueueDeleteResponseUnion() {} type UnionInt int64 diff --git a/workers/ai.go b/workers/ai.go index a19742b0f1..274b13f36f 100644 --- a/workers/ai.go +++ b/workers/ai.go @@ -55,8 +55,7 @@ func (r *AIService) Run(ctx context.Context, modelName string, params AIRunParam } // Union satisfied by [workers.AIRunResponseTextClassification], -// [shared.UnionString], [shared.UnionString], -// [workers.AIRunResponseSentenceSimilarity], +// [shared.UnionString], [workers.AIRunResponseSentenceSimilarity], // [workers.AIRunResponseTextEmbeddings], [workers.AIRunResponseSpeechRecognition], // [workers.AIRunResponseImageClassification], // [workers.AIRunResponseObjectDetection], [workers.AIRunResponseObject], @@ -78,10 +77,6 @@ func init() { TypeFilter: gjson.String, Type: reflect.TypeOf(shared.UnionString("")), }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, apijson.UnionVariant{ TypeFilter: gjson.JSON, Type: reflect.TypeOf(AIRunResponseSentenceSimilarity{}), From 48003b339edc4b5dd4ad34b9e82eb84d767899f7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 3 May 2024 18:25:16 +0000 Subject: [PATCH 094/127] feat(api): OpenAPI spec update via Stainless API (#1940) --- .stats.yml | 2 +- api.md | 12 +-- cloudforce_one/request.go | 132 +++++++++++++++++++----------- cloudforce_one/requestmessage.go | 119 +++++++++++++++++---------- cloudforce_one/requestpriority.go | 123 ++++++++++++++++++---------- intel/whois.go | 4 +- shared/union.go | 3 + 7 files changed, 251 insertions(+), 144 deletions(-) diff --git a/.stats.yml b/.stats.yml index b0cb3255a6..7b854f2863 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1269 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-35412fd158c3e184d9aa368a2fd1c169ec542af1a1892f41155afe8df8ad79bf.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4fc19263c4199ac7a9f52555bb93fb6873cdf2fd27956ca936d69a5f32a26204.yml diff --git a/api.md b/api.md index 7f3a94dce4..3b02a20ab1 100644 --- a/api.md +++ b/api.md @@ -6740,14 +6740,14 @@ Response Types: - cloudforce_one.Quota - cloudforce_one.RequestConstants - cloudforce_one.RequestTypes -- cloudforce_one.RequestDeleteResponse +- cloudforce_one.RequestDeleteResponseUnion Methods: - client.CloudforceOne.Requests.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestNewParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestUpdateParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.List(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestListParams) (pagination.V4PagePaginationArray[cloudforce_one.ListItem], error) -- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponse, error) +- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponseUnion, error) - client.CloudforceOne.Requests.Constants(ctx context.Context, accountIdentifier string) (cloudforce_one.RequestConstants, error) - client.CloudforceOne.Requests.Get(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) @@ -6758,13 +6758,13 @@ Methods: Response Types: - cloudforce_one.Message -- cloudforce_one.RequestMessageDeleteResponse +- cloudforce_one.RequestMessageDeleteResponseUnion Methods: - client.CloudforceOne.Requests.Message.New(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageNewParams) (cloudforce_one.Message, error) - client.CloudforceOne.Requests.Message.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, body cloudforce_one.RequestMessageUpdateParams) (cloudforce_one.Message, error) -- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponse, error) +- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponseUnion, error) - client.CloudforceOne.Requests.Message.Get(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageGetParams) ([]cloudforce_one.Message, error) ### Priority @@ -6778,13 +6778,13 @@ Response Types: - cloudforce_one.Label - cloudforce_one.Priority -- cloudforce_one.RequestPriorityDeleteResponse +- cloudforce_one.RequestPriorityDeleteResponseUnion Methods: - client.CloudforceOne.Requests.Priority.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestPriorityNewParams) (cloudforce_one.Priority, error) - client.CloudforceOne.Requests.Priority.Update(ctx context.Context, accountIdentifier string, priorityIdentifer string, body cloudforce_one.RequestPriorityUpdateParams) (cloudforce_one.Item, error) -- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponse, error) +- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponseUnion, error) - client.CloudforceOne.Requests.Priority.Get(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Priority.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) diff --git a/cloudforce_one/request.go b/cloudforce_one/request.go index a5865d5f35..ce028e3612 100644 --- a/cloudforce_one/request.go +++ b/cloudforce_one/request.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/option" "github.com/cloudflare/cloudflare-go/v2/shared" + "github.com/tidwall/gjson" ) // RequestService contains methods and other services that help with interacting @@ -91,10 +93,15 @@ func (r *RequestService) ListAutoPaging(ctx context.Context, accountIdentifier s } // Delete a Request -func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponse, err error) { +func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) + var env RequestDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s", accountIdentifier, requestIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result return } @@ -462,46 +469,30 @@ func (r RequestConstantsTlp) IsKnown() bool { type RequestTypes []string -type RequestDeleteResponse struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success RequestDeleteResponseSuccess `json:"success,required"` - JSON requestDeleteResponseJSON `json:"-"` -} - -// requestDeleteResponseJSON contains the JSON metadata for the struct -// [RequestDeleteResponse] -type requestDeleteResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) +// Union satisfied by [cloudforce_one.RequestDeleteResponseUnknown], +// [cloudforce_one.RequestDeleteResponseArray] or [shared.UnionString]. +type RequestDeleteResponseUnion interface { + ImplementsCloudforceOneRequestDeleteResponseUnion() } -func (r requestDeleteResponseJSON) RawJSON() string { - return r.raw +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*RequestDeleteResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(RequestDeleteResponseArray{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) } -// Whether the API call was successful -type RequestDeleteResponseSuccess bool +type RequestDeleteResponseArray []interface{} -const ( - RequestDeleteResponseSuccessTrue RequestDeleteResponseSuccess = true -) - -func (r RequestDeleteResponseSuccess) IsKnown() bool { - switch r { - case RequestDeleteResponseSuccessTrue: - return true - } - return false -} +func (r RequestDeleteResponseArray) ImplementsCloudforceOneRequestDeleteResponseUnion() {} type RequestNewParams struct { // Request content @@ -542,9 +533,9 @@ func (r RequestNewParamsTlp) IsKnown() bool { type RequestNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestNewResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestNewResponseEnvelopeJSON `json:"-"` } @@ -553,8 +544,8 @@ type RequestNewResponseEnvelope struct { type requestNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -621,9 +612,9 @@ func (r RequestUpdateParamsTlp) IsKnown() bool { type RequestUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestUpdateResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestUpdateResponseEnvelopeJSON `json:"-"` } @@ -632,8 +623,8 @@ type RequestUpdateResponseEnvelope struct { type requestUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -724,12 +715,55 @@ func (r RequestListParamsStatus) IsKnown() bool { return false } +type RequestDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestDeleteResponseUnion `json:"result,required"` + // Whether the API call was successful + Success RequestDeleteResponseEnvelopeSuccess `json:"success,required"` + JSON requestDeleteResponseEnvelopeJSON `json:"-"` +} + +// requestDeleteResponseEnvelopeJSON contains the JSON metadata for the struct +// [RequestDeleteResponseEnvelope] +type requestDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r requestDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestDeleteResponseEnvelopeSuccess bool + +const ( + RequestDeleteResponseEnvelopeSuccessTrue RequestDeleteResponseEnvelopeSuccess = true +) + +func (r RequestDeleteResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case RequestDeleteResponseEnvelopeSuccessTrue: + return true + } + return false +} + type RequestConstantsResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestConstants `json:"result,required"` // Whether the API call was successful Success RequestConstantsResponseEnvelopeSuccess `json:"success,required"` - Result RequestConstants `json:"result"` JSON requestConstantsResponseEnvelopeJSON `json:"-"` } @@ -738,8 +772,8 @@ type RequestConstantsResponseEnvelope struct { type requestConstantsResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -770,9 +804,9 @@ func (r RequestConstantsResponseEnvelopeSuccess) IsKnown() bool { type RequestGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestGetResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestGetResponseEnvelopeJSON `json:"-"` } @@ -781,8 +815,8 @@ type RequestGetResponseEnvelope struct { type requestGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -813,9 +847,9 @@ func (r RequestGetResponseEnvelopeSuccess) IsKnown() bool { type RequestQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Quota `json:"result,required"` // Whether the API call was successful Success RequestQuotaResponseEnvelopeSuccess `json:"success,required"` - Result Quota `json:"result"` JSON requestQuotaResponseEnvelopeJSON `json:"-"` } @@ -824,8 +858,8 @@ type RequestQuotaResponseEnvelope struct { type requestQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -856,9 +890,9 @@ func (r RequestQuotaResponseEnvelopeSuccess) IsKnown() bool { type RequestTypesResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestTypes `json:"result,required"` // Whether the API call was successful Success RequestTypesResponseEnvelopeSuccess `json:"success,required"` - Result RequestTypes `json:"result"` JSON requestTypesResponseEnvelopeJSON `json:"-"` } @@ -867,8 +901,8 @@ type RequestTypesResponseEnvelope struct { type requestTypesResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestmessage.go b/cloudforce_one/requestmessage.go index f3949be2ee..b5a88e43b5 100644 --- a/cloudforce_one/requestmessage.go +++ b/cloudforce_one/requestmessage.go @@ -6,6 +6,7 @@ import ( "context" "fmt" "net/http" + "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -13,6 +14,7 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" + "github.com/tidwall/gjson" ) // RequestMessageService contains methods and other services that help with @@ -62,10 +64,15 @@ func (r *RequestMessageService) Update(ctx context.Context, accountIdentifier st } // Delete a Request Message -func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponse, err error) { +func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) + var env RequestMessageDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s/message/%v", accountIdentifier, requestIdentifier, messageIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result return } @@ -118,45 +125,30 @@ func (r messageJSON) RawJSON() string { return r.raw } -type RequestMessageDeleteResponse struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success RequestMessageDeleteResponseSuccess `json:"success,required"` - JSON requestMessageDeleteResponseJSON `json:"-"` -} - -// requestMessageDeleteResponseJSON contains the JSON metadata for the struct -// [RequestMessageDeleteResponse] -type requestMessageDeleteResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestMessageDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) +// Union satisfied by [cloudforce_one.RequestMessageDeleteResponseUnknown], +// [cloudforce_one.RequestMessageDeleteResponseArray] or [shared.UnionString]. +type RequestMessageDeleteResponseUnion interface { + ImplementsCloudforceOneRequestMessageDeleteResponseUnion() } -func (r requestMessageDeleteResponseJSON) RawJSON() string { - return r.raw +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*RequestMessageDeleteResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(RequestMessageDeleteResponseArray{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) } -// Whether the API call was successful -type RequestMessageDeleteResponseSuccess bool - -const ( - RequestMessageDeleteResponseSuccessTrue RequestMessageDeleteResponseSuccess = true -) +type RequestMessageDeleteResponseArray []interface{} -func (r RequestMessageDeleteResponseSuccess) IsKnown() bool { - switch r { - case RequestMessageDeleteResponseSuccessTrue: - return true - } - return false +func (r RequestMessageDeleteResponseArray) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() { } type RequestMessageNewParams struct { @@ -171,9 +163,9 @@ func (r RequestMessageNewParams) MarshalJSON() (data []byte, err error) { type RequestMessageNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageNewResponseEnvelopeSuccess `json:"success,required"` - Result Message `json:"result"` JSON requestMessageNewResponseEnvelopeJSON `json:"-"` } @@ -182,8 +174,8 @@ type RequestMessageNewResponseEnvelope struct { type requestMessageNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -250,9 +242,9 @@ func (r RequestMessageUpdateParamsTlp) IsKnown() bool { type RequestMessageUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageUpdateResponseEnvelopeSuccess `json:"success,required"` - Result Message `json:"result"` JSON requestMessageUpdateResponseEnvelopeJSON `json:"-"` } @@ -261,8 +253,8 @@ type RequestMessageUpdateResponseEnvelope struct { type requestMessageUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -290,6 +282,49 @@ func (r RequestMessageUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } +type RequestMessageDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestMessageDeleteResponseUnion `json:"result,required"` + // Whether the API call was successful + Success RequestMessageDeleteResponseEnvelopeSuccess `json:"success,required"` + JSON requestMessageDeleteResponseEnvelopeJSON `json:"-"` +} + +// requestMessageDeleteResponseEnvelopeJSON contains the JSON metadata for the +// struct [RequestMessageDeleteResponseEnvelope] +type requestMessageDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestMessageDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r requestMessageDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestMessageDeleteResponseEnvelopeSuccess bool + +const ( + RequestMessageDeleteResponseEnvelopeSuccessTrue RequestMessageDeleteResponseEnvelopeSuccess = true +) + +func (r RequestMessageDeleteResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case RequestMessageDeleteResponseEnvelopeSuccessTrue: + return true + } + return false +} + type RequestMessageGetParams struct { // Page number of results Page param.Field[int64] `json:"page,required"` @@ -328,9 +363,9 @@ func (r RequestMessageGetParamsSortOrder) IsKnown() bool { type RequestMessageGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result []Message `json:"result,required"` // Whether the API call was successful Success RequestMessageGetResponseEnvelopeSuccess `json:"success,required"` - Result []Message `json:"result"` JSON requestMessageGetResponseEnvelopeJSON `json:"-"` } @@ -339,8 +374,8 @@ type RequestMessageGetResponseEnvelope struct { type requestMessageGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestpriority.go b/cloudforce_one/requestpriority.go index eef29460bf..702df8b577 100644 --- a/cloudforce_one/requestpriority.go +++ b/cloudforce_one/requestpriority.go @@ -6,6 +6,7 @@ import ( "context" "fmt" "net/http" + "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -13,6 +14,7 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" + "github.com/tidwall/gjson" ) // RequestPriorityService contains methods and other services that help with @@ -60,10 +62,15 @@ func (r *RequestPriorityService) Update(ctx context.Context, accountIdentifier s } // Delete a Priority Intelligence Report -func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponse, err error) { +func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) + var env RequestPriorityDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/priority/%s", accountIdentifier, priorityIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result return } @@ -189,45 +196,30 @@ func (r PriorityEditTlp) IsKnown() bool { return false } -type RequestPriorityDeleteResponse struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success RequestPriorityDeleteResponseSuccess `json:"success,required"` - JSON requestPriorityDeleteResponseJSON `json:"-"` +// Union satisfied by [cloudforce_one.RequestPriorityDeleteResponseUnknown], +// [cloudforce_one.RequestPriorityDeleteResponseArray] or [shared.UnionString]. +type RequestPriorityDeleteResponseUnion interface { + ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() } -// requestPriorityDeleteResponseJSON contains the JSON metadata for the struct -// [RequestPriorityDeleteResponse] -type requestPriorityDeleteResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*RequestPriorityDeleteResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(RequestPriorityDeleteResponseArray{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) } -func (r *RequestPriorityDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} +type RequestPriorityDeleteResponseArray []interface{} -func (r requestPriorityDeleteResponseJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestPriorityDeleteResponseSuccess bool - -const ( - RequestPriorityDeleteResponseSuccessTrue RequestPriorityDeleteResponseSuccess = true -) - -func (r RequestPriorityDeleteResponseSuccess) IsKnown() bool { - switch r { - case RequestPriorityDeleteResponseSuccessTrue: - return true - } - return false +func (r RequestPriorityDeleteResponseArray) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() { } type RequestPriorityNewParams struct { @@ -241,9 +233,9 @@ func (r RequestPriorityNewParams) MarshalJSON() (data []byte, err error) { type RequestPriorityNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Priority `json:"result,required"` // Whether the API call was successful Success RequestPriorityNewResponseEnvelopeSuccess `json:"success,required"` - Result Priority `json:"result"` JSON requestPriorityNewResponseEnvelopeJSON `json:"-"` } @@ -252,8 +244,8 @@ type RequestPriorityNewResponseEnvelope struct { type requestPriorityNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -292,9 +284,9 @@ func (r RequestPriorityUpdateParams) MarshalJSON() (data []byte, err error) { type RequestPriorityUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityUpdateResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestPriorityUpdateResponseEnvelopeJSON `json:"-"` } @@ -303,8 +295,8 @@ type RequestPriorityUpdateResponseEnvelope struct { type requestPriorityUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -332,12 +324,55 @@ func (r RequestPriorityUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } +type RequestPriorityDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestPriorityDeleteResponseUnion `json:"result,required"` + // Whether the API call was successful + Success RequestPriorityDeleteResponseEnvelopeSuccess `json:"success,required"` + JSON requestPriorityDeleteResponseEnvelopeJSON `json:"-"` +} + +// requestPriorityDeleteResponseEnvelopeJSON contains the JSON metadata for the +// struct [RequestPriorityDeleteResponseEnvelope] +type requestPriorityDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestPriorityDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r requestPriorityDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestPriorityDeleteResponseEnvelopeSuccess bool + +const ( + RequestPriorityDeleteResponseEnvelopeSuccessTrue RequestPriorityDeleteResponseEnvelopeSuccess = true +) + +func (r RequestPriorityDeleteResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case RequestPriorityDeleteResponseEnvelopeSuccessTrue: + return true + } + return false +} + type RequestPriorityGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityGetResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestPriorityGetResponseEnvelopeJSON `json:"-"` } @@ -346,8 +381,8 @@ type RequestPriorityGetResponseEnvelope struct { type requestPriorityGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -378,9 +413,9 @@ func (r RequestPriorityGetResponseEnvelopeSuccess) IsKnown() bool { type RequestPriorityQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Quota `json:"result,required"` // Whether the API call was successful Success RequestPriorityQuotaResponseEnvelopeSuccess `json:"success,required"` - Result Quota `json:"result"` JSON requestPriorityQuotaResponseEnvelopeJSON `json:"-"` } @@ -389,8 +424,8 @@ type RequestPriorityQuotaResponseEnvelope struct { type requestPriorityQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/intel/whois.go b/intel/whois.go index 5655c7c1a8..ece63a5b8f 100644 --- a/intel/whois.go +++ b/intel/whois.go @@ -259,9 +259,9 @@ func (r WhoisGetParams) URLQuery() (v url.Values) { type WhoisGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result WhoisGetResponse `json:"result,required"` // Whether the API call was successful Success WhoisGetResponseEnvelopeSuccess `json:"success,required"` - Result WhoisGetResponse `json:"result"` JSON whoisGetResponseEnvelopeJSON `json:"-"` } @@ -270,8 +270,8 @@ type WhoisGetResponseEnvelope struct { type whoisGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/shared/union.go b/shared/union.go index 212561aacd..7537786749 100644 --- a/shared/union.go +++ b/shared/union.go @@ -166,6 +166,9 @@ func (UnionString) ImplementsOriginPostQuantumEncryptionOriginPostQuantumEncrypt } func (UnionString) ImplementsHostnamesSettingValueUnionParam() {} func (UnionString) ImplementsHostnamesSettingValueUnion() {} +func (UnionString) ImplementsCloudforceOneRequestDeleteResponseUnion() {} +func (UnionString) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() {} +func (UnionString) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() {} func (UnionString) ImplementsEventNotificationsR2ConfigurationQueueDeleteResponseUnion() {} type UnionInt int64 From b911f69569446e0247a8d5fadabf0bbc63e5f9ac Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 3 May 2024 21:14:50 +0000 Subject: [PATCH 095/127] feat(api): OpenAPI spec update via Stainless API (#1941) --- .stats.yml | 2 +- api.md | 12 +-- cloudforce_one/request.go | 132 +++++++++++------------------- cloudforce_one/requestmessage.go | 119 ++++++++++----------------- cloudforce_one/requestpriority.go | 123 ++++++++++------------------ intel/whois.go | 4 +- shared/union.go | 3 - 7 files changed, 144 insertions(+), 251 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7b854f2863..ddc60046b3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1269 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4fc19263c4199ac7a9f52555bb93fb6873cdf2fd27956ca936d69a5f32a26204.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7e4466121f11208d2ed1c6901ce6d594bada55bff9d9e4ea7c5ccadaf133f748.yml diff --git a/api.md b/api.md index 3b02a20ab1..7f3a94dce4 100644 --- a/api.md +++ b/api.md @@ -6740,14 +6740,14 @@ Response Types: - cloudforce_one.Quota - cloudforce_one.RequestConstants - cloudforce_one.RequestTypes -- cloudforce_one.RequestDeleteResponseUnion +- cloudforce_one.RequestDeleteResponse Methods: - client.CloudforceOne.Requests.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestNewParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestUpdateParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.List(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestListParams) (pagination.V4PagePaginationArray[cloudforce_one.ListItem], error) -- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponse, error) - client.CloudforceOne.Requests.Constants(ctx context.Context, accountIdentifier string) (cloudforce_one.RequestConstants, error) - client.CloudforceOne.Requests.Get(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) @@ -6758,13 +6758,13 @@ Methods: Response Types: - cloudforce_one.Message -- cloudforce_one.RequestMessageDeleteResponseUnion +- cloudforce_one.RequestMessageDeleteResponse Methods: - client.CloudforceOne.Requests.Message.New(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageNewParams) (cloudforce_one.Message, error) - client.CloudforceOne.Requests.Message.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, body cloudforce_one.RequestMessageUpdateParams) (cloudforce_one.Message, error) -- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponse, error) - client.CloudforceOne.Requests.Message.Get(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageGetParams) ([]cloudforce_one.Message, error) ### Priority @@ -6778,13 +6778,13 @@ Response Types: - cloudforce_one.Label - cloudforce_one.Priority -- cloudforce_one.RequestPriorityDeleteResponseUnion +- cloudforce_one.RequestPriorityDeleteResponse Methods: - client.CloudforceOne.Requests.Priority.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestPriorityNewParams) (cloudforce_one.Priority, error) - client.CloudforceOne.Requests.Priority.Update(ctx context.Context, accountIdentifier string, priorityIdentifer string, body cloudforce_one.RequestPriorityUpdateParams) (cloudforce_one.Item, error) -- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponse, error) - client.CloudforceOne.Requests.Priority.Get(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Priority.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) diff --git a/cloudforce_one/request.go b/cloudforce_one/request.go index ce028e3612..a5865d5f35 100644 --- a/cloudforce_one/request.go +++ b/cloudforce_one/request.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -15,7 +14,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestService contains methods and other services that help with interacting @@ -93,15 +91,10 @@ func (r *RequestService) ListAutoPaging(ctx context.Context, accountIdentifier s } // Delete a Request -func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponseUnion, err error) { +func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s", accountIdentifier, requestIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -469,30 +462,46 @@ func (r RequestConstantsTlp) IsKnown() bool { type RequestTypes []string -// Union satisfied by [cloudforce_one.RequestDeleteResponseUnknown], -// [cloudforce_one.RequestDeleteResponseArray] or [shared.UnionString]. -type RequestDeleteResponseUnion interface { - ImplementsCloudforceOneRequestDeleteResponseUnion() +type RequestDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestDeleteResponseSuccess `json:"success,required"` + JSON requestDeleteResponseJSON `json:"-"` +} + +// requestDeleteResponseJSON contains the JSON metadata for the struct +// [RequestDeleteResponse] +type requestDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +func (r requestDeleteResponseJSON) RawJSON() string { + return r.raw } -type RequestDeleteResponseArray []interface{} +// Whether the API call was successful +type RequestDeleteResponseSuccess bool -func (r RequestDeleteResponseArray) ImplementsCloudforceOneRequestDeleteResponseUnion() {} +const ( + RequestDeleteResponseSuccessTrue RequestDeleteResponseSuccess = true +) + +func (r RequestDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestDeleteResponseSuccessTrue: + return true + } + return false +} type RequestNewParams struct { // Request content @@ -533,9 +542,9 @@ func (r RequestNewParamsTlp) IsKnown() bool { type RequestNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestNewResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestNewResponseEnvelopeJSON `json:"-"` } @@ -544,8 +553,8 @@ type RequestNewResponseEnvelope struct { type requestNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -612,9 +621,9 @@ func (r RequestUpdateParamsTlp) IsKnown() bool { type RequestUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestUpdateResponseEnvelopeJSON `json:"-"` } @@ -623,8 +632,8 @@ type RequestUpdateResponseEnvelope struct { type requestUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -715,55 +724,12 @@ func (r RequestListParamsStatus) IsKnown() bool { return false } -type RequestDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestDeleteResponseEnvelopeJSON contains the JSON metadata for the struct -// [RequestDeleteResponseEnvelope] -type requestDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestDeleteResponseEnvelopeSuccess bool - -const ( - RequestDeleteResponseEnvelopeSuccessTrue RequestDeleteResponseEnvelopeSuccess = true -) - -func (r RequestDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestConstantsResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestConstants `json:"result,required"` // Whether the API call was successful Success RequestConstantsResponseEnvelopeSuccess `json:"success,required"` + Result RequestConstants `json:"result"` JSON requestConstantsResponseEnvelopeJSON `json:"-"` } @@ -772,8 +738,8 @@ type RequestConstantsResponseEnvelope struct { type requestConstantsResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -804,9 +770,9 @@ func (r RequestConstantsResponseEnvelopeSuccess) IsKnown() bool { type RequestGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestGetResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestGetResponseEnvelopeJSON `json:"-"` } @@ -815,8 +781,8 @@ type RequestGetResponseEnvelope struct { type requestGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -847,9 +813,9 @@ func (r RequestGetResponseEnvelopeSuccess) IsKnown() bool { type RequestQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Quota `json:"result,required"` // Whether the API call was successful Success RequestQuotaResponseEnvelopeSuccess `json:"success,required"` + Result Quota `json:"result"` JSON requestQuotaResponseEnvelopeJSON `json:"-"` } @@ -858,8 +824,8 @@ type RequestQuotaResponseEnvelope struct { type requestQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -890,9 +856,9 @@ func (r RequestQuotaResponseEnvelopeSuccess) IsKnown() bool { type RequestTypesResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestTypes `json:"result,required"` // Whether the API call was successful Success RequestTypesResponseEnvelopeSuccess `json:"success,required"` + Result RequestTypes `json:"result"` JSON requestTypesResponseEnvelopeJSON `json:"-"` } @@ -901,8 +867,8 @@ type RequestTypesResponseEnvelope struct { type requestTypesResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestmessage.go b/cloudforce_one/requestmessage.go index b5a88e43b5..f3949be2ee 100644 --- a/cloudforce_one/requestmessage.go +++ b/cloudforce_one/requestmessage.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -14,7 +13,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestMessageService contains methods and other services that help with @@ -64,15 +62,10 @@ func (r *RequestMessageService) Update(ctx context.Context, accountIdentifier st } // Delete a Request Message -func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponseUnion, err error) { +func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestMessageDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s/message/%v", accountIdentifier, requestIdentifier, messageIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -125,30 +118,45 @@ func (r messageJSON) RawJSON() string { return r.raw } -// Union satisfied by [cloudforce_one.RequestMessageDeleteResponseUnknown], -// [cloudforce_one.RequestMessageDeleteResponseArray] or [shared.UnionString]. -type RequestMessageDeleteResponseUnion interface { - ImplementsCloudforceOneRequestMessageDeleteResponseUnion() +type RequestMessageDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestMessageDeleteResponseSuccess `json:"success,required"` + JSON requestMessageDeleteResponseJSON `json:"-"` +} + +// requestMessageDeleteResponseJSON contains the JSON metadata for the struct +// [RequestMessageDeleteResponse] +type requestMessageDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestMessageDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestMessageDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestMessageDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +func (r requestMessageDeleteResponseJSON) RawJSON() string { + return r.raw } -type RequestMessageDeleteResponseArray []interface{} +// Whether the API call was successful +type RequestMessageDeleteResponseSuccess bool + +const ( + RequestMessageDeleteResponseSuccessTrue RequestMessageDeleteResponseSuccess = true +) -func (r RequestMessageDeleteResponseArray) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() { +func (r RequestMessageDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestMessageDeleteResponseSuccessTrue: + return true + } + return false } type RequestMessageNewParams struct { @@ -163,9 +171,9 @@ func (r RequestMessageNewParams) MarshalJSON() (data []byte, err error) { type RequestMessageNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageNewResponseEnvelopeSuccess `json:"success,required"` + Result Message `json:"result"` JSON requestMessageNewResponseEnvelopeJSON `json:"-"` } @@ -174,8 +182,8 @@ type RequestMessageNewResponseEnvelope struct { type requestMessageNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -242,9 +250,9 @@ func (r RequestMessageUpdateParamsTlp) IsKnown() bool { type RequestMessageUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Message `json:"result"` JSON requestMessageUpdateResponseEnvelopeJSON `json:"-"` } @@ -253,8 +261,8 @@ type RequestMessageUpdateResponseEnvelope struct { type requestMessageUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -282,49 +290,6 @@ func (r RequestMessageUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } -type RequestMessageDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestMessageDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestMessageDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestMessageDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestMessageDeleteResponseEnvelopeJSON contains the JSON metadata for the -// struct [RequestMessageDeleteResponseEnvelope] -type requestMessageDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestMessageDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestMessageDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestMessageDeleteResponseEnvelopeSuccess bool - -const ( - RequestMessageDeleteResponseEnvelopeSuccessTrue RequestMessageDeleteResponseEnvelopeSuccess = true -) - -func (r RequestMessageDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestMessageDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestMessageGetParams struct { // Page number of results Page param.Field[int64] `json:"page,required"` @@ -363,9 +328,9 @@ func (r RequestMessageGetParamsSortOrder) IsKnown() bool { type RequestMessageGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result []Message `json:"result,required"` // Whether the API call was successful Success RequestMessageGetResponseEnvelopeSuccess `json:"success,required"` + Result []Message `json:"result"` JSON requestMessageGetResponseEnvelopeJSON `json:"-"` } @@ -374,8 +339,8 @@ type RequestMessageGetResponseEnvelope struct { type requestMessageGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestpriority.go b/cloudforce_one/requestpriority.go index 702df8b577..eef29460bf 100644 --- a/cloudforce_one/requestpriority.go +++ b/cloudforce_one/requestpriority.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -14,7 +13,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestPriorityService contains methods and other services that help with @@ -62,15 +60,10 @@ func (r *RequestPriorityService) Update(ctx context.Context, accountIdentifier s } // Delete a Priority Intelligence Report -func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponseUnion, err error) { +func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestPriorityDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/priority/%s", accountIdentifier, priorityIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -196,30 +189,45 @@ func (r PriorityEditTlp) IsKnown() bool { return false } -// Union satisfied by [cloudforce_one.RequestPriorityDeleteResponseUnknown], -// [cloudforce_one.RequestPriorityDeleteResponseArray] or [shared.UnionString]. -type RequestPriorityDeleteResponseUnion interface { - ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() +type RequestPriorityDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestPriorityDeleteResponseSuccess `json:"success,required"` + JSON requestPriorityDeleteResponseJSON `json:"-"` } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestPriorityDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestPriorityDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +// requestPriorityDeleteResponseJSON contains the JSON metadata for the struct +// [RequestPriorityDeleteResponse] +type requestPriorityDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field } -type RequestPriorityDeleteResponseArray []interface{} +func (r *RequestPriorityDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} -func (r RequestPriorityDeleteResponseArray) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() { +func (r requestPriorityDeleteResponseJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestPriorityDeleteResponseSuccess bool + +const ( + RequestPriorityDeleteResponseSuccessTrue RequestPriorityDeleteResponseSuccess = true +) + +func (r RequestPriorityDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestPriorityDeleteResponseSuccessTrue: + return true + } + return false } type RequestPriorityNewParams struct { @@ -233,9 +241,9 @@ func (r RequestPriorityNewParams) MarshalJSON() (data []byte, err error) { type RequestPriorityNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Priority `json:"result,required"` // Whether the API call was successful Success RequestPriorityNewResponseEnvelopeSuccess `json:"success,required"` + Result Priority `json:"result"` JSON requestPriorityNewResponseEnvelopeJSON `json:"-"` } @@ -244,8 +252,8 @@ type RequestPriorityNewResponseEnvelope struct { type requestPriorityNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -284,9 +292,9 @@ func (r RequestPriorityUpdateParams) MarshalJSON() (data []byte, err error) { type RequestPriorityUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestPriorityUpdateResponseEnvelopeJSON `json:"-"` } @@ -295,8 +303,8 @@ type RequestPriorityUpdateResponseEnvelope struct { type requestPriorityUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -324,55 +332,12 @@ func (r RequestPriorityUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } -type RequestPriorityDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestPriorityDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestPriorityDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestPriorityDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestPriorityDeleteResponseEnvelopeJSON contains the JSON metadata for the -// struct [RequestPriorityDeleteResponseEnvelope] -type requestPriorityDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestPriorityDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestPriorityDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestPriorityDeleteResponseEnvelopeSuccess bool - -const ( - RequestPriorityDeleteResponseEnvelopeSuccessTrue RequestPriorityDeleteResponseEnvelopeSuccess = true -) - -func (r RequestPriorityDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestPriorityDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestPriorityGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityGetResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestPriorityGetResponseEnvelopeJSON `json:"-"` } @@ -381,8 +346,8 @@ type RequestPriorityGetResponseEnvelope struct { type requestPriorityGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -413,9 +378,9 @@ func (r RequestPriorityGetResponseEnvelopeSuccess) IsKnown() bool { type RequestPriorityQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Quota `json:"result,required"` // Whether the API call was successful Success RequestPriorityQuotaResponseEnvelopeSuccess `json:"success,required"` + Result Quota `json:"result"` JSON requestPriorityQuotaResponseEnvelopeJSON `json:"-"` } @@ -424,8 +389,8 @@ type RequestPriorityQuotaResponseEnvelope struct { type requestPriorityQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/intel/whois.go b/intel/whois.go index ece63a5b8f..5655c7c1a8 100644 --- a/intel/whois.go +++ b/intel/whois.go @@ -259,9 +259,9 @@ func (r WhoisGetParams) URLQuery() (v url.Values) { type WhoisGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result WhoisGetResponse `json:"result,required"` // Whether the API call was successful Success WhoisGetResponseEnvelopeSuccess `json:"success,required"` + Result WhoisGetResponse `json:"result"` JSON whoisGetResponseEnvelopeJSON `json:"-"` } @@ -270,8 +270,8 @@ type WhoisGetResponseEnvelope struct { type whoisGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/shared/union.go b/shared/union.go index 7537786749..212561aacd 100644 --- a/shared/union.go +++ b/shared/union.go @@ -166,9 +166,6 @@ func (UnionString) ImplementsOriginPostQuantumEncryptionOriginPostQuantumEncrypt } func (UnionString) ImplementsHostnamesSettingValueUnionParam() {} func (UnionString) ImplementsHostnamesSettingValueUnion() {} -func (UnionString) ImplementsCloudforceOneRequestDeleteResponseUnion() {} -func (UnionString) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() {} -func (UnionString) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() {} func (UnionString) ImplementsEventNotificationsR2ConfigurationQueueDeleteResponseUnion() {} type UnionInt int64 From 24ed50dab5a21187b7894e5b2e2754d28591a8eb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 4 May 2024 03:24:32 +0000 Subject: [PATCH 096/127] feat(api): OpenAPI spec update via Stainless API (#1942) --- .stats.yml | 2 +- api.md | 12 +-- cloudforce_one/request.go | 132 +++++++++++++++++++----------- cloudforce_one/requestmessage.go | 119 +++++++++++++++++---------- cloudforce_one/requestpriority.go | 123 ++++++++++++++++++---------- intel/whois.go | 4 +- shared/union.go | 3 + 7 files changed, 251 insertions(+), 144 deletions(-) diff --git a/.stats.yml b/.stats.yml index ddc60046b3..c3aadbaead 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1269 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7e4466121f11208d2ed1c6901ce6d594bada55bff9d9e4ea7c5ccadaf133f748.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-64e34dab9f75ff332905c078b63a3d502c4a605db84849795773b6212941dd12.yml diff --git a/api.md b/api.md index 7f3a94dce4..3b02a20ab1 100644 --- a/api.md +++ b/api.md @@ -6740,14 +6740,14 @@ Response Types: - cloudforce_one.Quota - cloudforce_one.RequestConstants - cloudforce_one.RequestTypes -- cloudforce_one.RequestDeleteResponse +- cloudforce_one.RequestDeleteResponseUnion Methods: - client.CloudforceOne.Requests.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestNewParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestUpdateParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.List(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestListParams) (pagination.V4PagePaginationArray[cloudforce_one.ListItem], error) -- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponse, error) +- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponseUnion, error) - client.CloudforceOne.Requests.Constants(ctx context.Context, accountIdentifier string) (cloudforce_one.RequestConstants, error) - client.CloudforceOne.Requests.Get(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) @@ -6758,13 +6758,13 @@ Methods: Response Types: - cloudforce_one.Message -- cloudforce_one.RequestMessageDeleteResponse +- cloudforce_one.RequestMessageDeleteResponseUnion Methods: - client.CloudforceOne.Requests.Message.New(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageNewParams) (cloudforce_one.Message, error) - client.CloudforceOne.Requests.Message.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, body cloudforce_one.RequestMessageUpdateParams) (cloudforce_one.Message, error) -- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponse, error) +- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponseUnion, error) - client.CloudforceOne.Requests.Message.Get(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageGetParams) ([]cloudforce_one.Message, error) ### Priority @@ -6778,13 +6778,13 @@ Response Types: - cloudforce_one.Label - cloudforce_one.Priority -- cloudforce_one.RequestPriorityDeleteResponse +- cloudforce_one.RequestPriorityDeleteResponseUnion Methods: - client.CloudforceOne.Requests.Priority.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestPriorityNewParams) (cloudforce_one.Priority, error) - client.CloudforceOne.Requests.Priority.Update(ctx context.Context, accountIdentifier string, priorityIdentifer string, body cloudforce_one.RequestPriorityUpdateParams) (cloudforce_one.Item, error) -- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponse, error) +- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponseUnion, error) - client.CloudforceOne.Requests.Priority.Get(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Priority.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) diff --git a/cloudforce_one/request.go b/cloudforce_one/request.go index a5865d5f35..ce028e3612 100644 --- a/cloudforce_one/request.go +++ b/cloudforce_one/request.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/option" "github.com/cloudflare/cloudflare-go/v2/shared" + "github.com/tidwall/gjson" ) // RequestService contains methods and other services that help with interacting @@ -91,10 +93,15 @@ func (r *RequestService) ListAutoPaging(ctx context.Context, accountIdentifier s } // Delete a Request -func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponse, err error) { +func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) + var env RequestDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s", accountIdentifier, requestIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result return } @@ -462,46 +469,30 @@ func (r RequestConstantsTlp) IsKnown() bool { type RequestTypes []string -type RequestDeleteResponse struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success RequestDeleteResponseSuccess `json:"success,required"` - JSON requestDeleteResponseJSON `json:"-"` -} - -// requestDeleteResponseJSON contains the JSON metadata for the struct -// [RequestDeleteResponse] -type requestDeleteResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) +// Union satisfied by [cloudforce_one.RequestDeleteResponseUnknown], +// [cloudforce_one.RequestDeleteResponseArray] or [shared.UnionString]. +type RequestDeleteResponseUnion interface { + ImplementsCloudforceOneRequestDeleteResponseUnion() } -func (r requestDeleteResponseJSON) RawJSON() string { - return r.raw +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*RequestDeleteResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(RequestDeleteResponseArray{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) } -// Whether the API call was successful -type RequestDeleteResponseSuccess bool +type RequestDeleteResponseArray []interface{} -const ( - RequestDeleteResponseSuccessTrue RequestDeleteResponseSuccess = true -) - -func (r RequestDeleteResponseSuccess) IsKnown() bool { - switch r { - case RequestDeleteResponseSuccessTrue: - return true - } - return false -} +func (r RequestDeleteResponseArray) ImplementsCloudforceOneRequestDeleteResponseUnion() {} type RequestNewParams struct { // Request content @@ -542,9 +533,9 @@ func (r RequestNewParamsTlp) IsKnown() bool { type RequestNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestNewResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestNewResponseEnvelopeJSON `json:"-"` } @@ -553,8 +544,8 @@ type RequestNewResponseEnvelope struct { type requestNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -621,9 +612,9 @@ func (r RequestUpdateParamsTlp) IsKnown() bool { type RequestUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestUpdateResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestUpdateResponseEnvelopeJSON `json:"-"` } @@ -632,8 +623,8 @@ type RequestUpdateResponseEnvelope struct { type requestUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -724,12 +715,55 @@ func (r RequestListParamsStatus) IsKnown() bool { return false } +type RequestDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestDeleteResponseUnion `json:"result,required"` + // Whether the API call was successful + Success RequestDeleteResponseEnvelopeSuccess `json:"success,required"` + JSON requestDeleteResponseEnvelopeJSON `json:"-"` +} + +// requestDeleteResponseEnvelopeJSON contains the JSON metadata for the struct +// [RequestDeleteResponseEnvelope] +type requestDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r requestDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestDeleteResponseEnvelopeSuccess bool + +const ( + RequestDeleteResponseEnvelopeSuccessTrue RequestDeleteResponseEnvelopeSuccess = true +) + +func (r RequestDeleteResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case RequestDeleteResponseEnvelopeSuccessTrue: + return true + } + return false +} + type RequestConstantsResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestConstants `json:"result,required"` // Whether the API call was successful Success RequestConstantsResponseEnvelopeSuccess `json:"success,required"` - Result RequestConstants `json:"result"` JSON requestConstantsResponseEnvelopeJSON `json:"-"` } @@ -738,8 +772,8 @@ type RequestConstantsResponseEnvelope struct { type requestConstantsResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -770,9 +804,9 @@ func (r RequestConstantsResponseEnvelopeSuccess) IsKnown() bool { type RequestGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestGetResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestGetResponseEnvelopeJSON `json:"-"` } @@ -781,8 +815,8 @@ type RequestGetResponseEnvelope struct { type requestGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -813,9 +847,9 @@ func (r RequestGetResponseEnvelopeSuccess) IsKnown() bool { type RequestQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Quota `json:"result,required"` // Whether the API call was successful Success RequestQuotaResponseEnvelopeSuccess `json:"success,required"` - Result Quota `json:"result"` JSON requestQuotaResponseEnvelopeJSON `json:"-"` } @@ -824,8 +858,8 @@ type RequestQuotaResponseEnvelope struct { type requestQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -856,9 +890,9 @@ func (r RequestQuotaResponseEnvelopeSuccess) IsKnown() bool { type RequestTypesResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestTypes `json:"result,required"` // Whether the API call was successful Success RequestTypesResponseEnvelopeSuccess `json:"success,required"` - Result RequestTypes `json:"result"` JSON requestTypesResponseEnvelopeJSON `json:"-"` } @@ -867,8 +901,8 @@ type RequestTypesResponseEnvelope struct { type requestTypesResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestmessage.go b/cloudforce_one/requestmessage.go index f3949be2ee..b5a88e43b5 100644 --- a/cloudforce_one/requestmessage.go +++ b/cloudforce_one/requestmessage.go @@ -6,6 +6,7 @@ import ( "context" "fmt" "net/http" + "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -13,6 +14,7 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" + "github.com/tidwall/gjson" ) // RequestMessageService contains methods and other services that help with @@ -62,10 +64,15 @@ func (r *RequestMessageService) Update(ctx context.Context, accountIdentifier st } // Delete a Request Message -func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponse, err error) { +func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) + var env RequestMessageDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s/message/%v", accountIdentifier, requestIdentifier, messageIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result return } @@ -118,45 +125,30 @@ func (r messageJSON) RawJSON() string { return r.raw } -type RequestMessageDeleteResponse struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success RequestMessageDeleteResponseSuccess `json:"success,required"` - JSON requestMessageDeleteResponseJSON `json:"-"` -} - -// requestMessageDeleteResponseJSON contains the JSON metadata for the struct -// [RequestMessageDeleteResponse] -type requestMessageDeleteResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestMessageDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) +// Union satisfied by [cloudforce_one.RequestMessageDeleteResponseUnknown], +// [cloudforce_one.RequestMessageDeleteResponseArray] or [shared.UnionString]. +type RequestMessageDeleteResponseUnion interface { + ImplementsCloudforceOneRequestMessageDeleteResponseUnion() } -func (r requestMessageDeleteResponseJSON) RawJSON() string { - return r.raw +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*RequestMessageDeleteResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(RequestMessageDeleteResponseArray{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) } -// Whether the API call was successful -type RequestMessageDeleteResponseSuccess bool - -const ( - RequestMessageDeleteResponseSuccessTrue RequestMessageDeleteResponseSuccess = true -) +type RequestMessageDeleteResponseArray []interface{} -func (r RequestMessageDeleteResponseSuccess) IsKnown() bool { - switch r { - case RequestMessageDeleteResponseSuccessTrue: - return true - } - return false +func (r RequestMessageDeleteResponseArray) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() { } type RequestMessageNewParams struct { @@ -171,9 +163,9 @@ func (r RequestMessageNewParams) MarshalJSON() (data []byte, err error) { type RequestMessageNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageNewResponseEnvelopeSuccess `json:"success,required"` - Result Message `json:"result"` JSON requestMessageNewResponseEnvelopeJSON `json:"-"` } @@ -182,8 +174,8 @@ type RequestMessageNewResponseEnvelope struct { type requestMessageNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -250,9 +242,9 @@ func (r RequestMessageUpdateParamsTlp) IsKnown() bool { type RequestMessageUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageUpdateResponseEnvelopeSuccess `json:"success,required"` - Result Message `json:"result"` JSON requestMessageUpdateResponseEnvelopeJSON `json:"-"` } @@ -261,8 +253,8 @@ type RequestMessageUpdateResponseEnvelope struct { type requestMessageUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -290,6 +282,49 @@ func (r RequestMessageUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } +type RequestMessageDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestMessageDeleteResponseUnion `json:"result,required"` + // Whether the API call was successful + Success RequestMessageDeleteResponseEnvelopeSuccess `json:"success,required"` + JSON requestMessageDeleteResponseEnvelopeJSON `json:"-"` +} + +// requestMessageDeleteResponseEnvelopeJSON contains the JSON metadata for the +// struct [RequestMessageDeleteResponseEnvelope] +type requestMessageDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestMessageDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r requestMessageDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestMessageDeleteResponseEnvelopeSuccess bool + +const ( + RequestMessageDeleteResponseEnvelopeSuccessTrue RequestMessageDeleteResponseEnvelopeSuccess = true +) + +func (r RequestMessageDeleteResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case RequestMessageDeleteResponseEnvelopeSuccessTrue: + return true + } + return false +} + type RequestMessageGetParams struct { // Page number of results Page param.Field[int64] `json:"page,required"` @@ -328,9 +363,9 @@ func (r RequestMessageGetParamsSortOrder) IsKnown() bool { type RequestMessageGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result []Message `json:"result,required"` // Whether the API call was successful Success RequestMessageGetResponseEnvelopeSuccess `json:"success,required"` - Result []Message `json:"result"` JSON requestMessageGetResponseEnvelopeJSON `json:"-"` } @@ -339,8 +374,8 @@ type RequestMessageGetResponseEnvelope struct { type requestMessageGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestpriority.go b/cloudforce_one/requestpriority.go index eef29460bf..702df8b577 100644 --- a/cloudforce_one/requestpriority.go +++ b/cloudforce_one/requestpriority.go @@ -6,6 +6,7 @@ import ( "context" "fmt" "net/http" + "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -13,6 +14,7 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" + "github.com/tidwall/gjson" ) // RequestPriorityService contains methods and other services that help with @@ -60,10 +62,15 @@ func (r *RequestPriorityService) Update(ctx context.Context, accountIdentifier s } // Delete a Priority Intelligence Report -func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponse, err error) { +func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) + var env RequestPriorityDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/priority/%s", accountIdentifier, priorityIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result return } @@ -189,45 +196,30 @@ func (r PriorityEditTlp) IsKnown() bool { return false } -type RequestPriorityDeleteResponse struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success RequestPriorityDeleteResponseSuccess `json:"success,required"` - JSON requestPriorityDeleteResponseJSON `json:"-"` +// Union satisfied by [cloudforce_one.RequestPriorityDeleteResponseUnknown], +// [cloudforce_one.RequestPriorityDeleteResponseArray] or [shared.UnionString]. +type RequestPriorityDeleteResponseUnion interface { + ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() } -// requestPriorityDeleteResponseJSON contains the JSON metadata for the struct -// [RequestPriorityDeleteResponse] -type requestPriorityDeleteResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*RequestPriorityDeleteResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(RequestPriorityDeleteResponseArray{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) } -func (r *RequestPriorityDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} +type RequestPriorityDeleteResponseArray []interface{} -func (r requestPriorityDeleteResponseJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestPriorityDeleteResponseSuccess bool - -const ( - RequestPriorityDeleteResponseSuccessTrue RequestPriorityDeleteResponseSuccess = true -) - -func (r RequestPriorityDeleteResponseSuccess) IsKnown() bool { - switch r { - case RequestPriorityDeleteResponseSuccessTrue: - return true - } - return false +func (r RequestPriorityDeleteResponseArray) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() { } type RequestPriorityNewParams struct { @@ -241,9 +233,9 @@ func (r RequestPriorityNewParams) MarshalJSON() (data []byte, err error) { type RequestPriorityNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Priority `json:"result,required"` // Whether the API call was successful Success RequestPriorityNewResponseEnvelopeSuccess `json:"success,required"` - Result Priority `json:"result"` JSON requestPriorityNewResponseEnvelopeJSON `json:"-"` } @@ -252,8 +244,8 @@ type RequestPriorityNewResponseEnvelope struct { type requestPriorityNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -292,9 +284,9 @@ func (r RequestPriorityUpdateParams) MarshalJSON() (data []byte, err error) { type RequestPriorityUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityUpdateResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestPriorityUpdateResponseEnvelopeJSON `json:"-"` } @@ -303,8 +295,8 @@ type RequestPriorityUpdateResponseEnvelope struct { type requestPriorityUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -332,12 +324,55 @@ func (r RequestPriorityUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } +type RequestPriorityDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestPriorityDeleteResponseUnion `json:"result,required"` + // Whether the API call was successful + Success RequestPriorityDeleteResponseEnvelopeSuccess `json:"success,required"` + JSON requestPriorityDeleteResponseEnvelopeJSON `json:"-"` +} + +// requestPriorityDeleteResponseEnvelopeJSON contains the JSON metadata for the +// struct [RequestPriorityDeleteResponseEnvelope] +type requestPriorityDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestPriorityDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r requestPriorityDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestPriorityDeleteResponseEnvelopeSuccess bool + +const ( + RequestPriorityDeleteResponseEnvelopeSuccessTrue RequestPriorityDeleteResponseEnvelopeSuccess = true +) + +func (r RequestPriorityDeleteResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case RequestPriorityDeleteResponseEnvelopeSuccessTrue: + return true + } + return false +} + type RequestPriorityGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityGetResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestPriorityGetResponseEnvelopeJSON `json:"-"` } @@ -346,8 +381,8 @@ type RequestPriorityGetResponseEnvelope struct { type requestPriorityGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -378,9 +413,9 @@ func (r RequestPriorityGetResponseEnvelopeSuccess) IsKnown() bool { type RequestPriorityQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Quota `json:"result,required"` // Whether the API call was successful Success RequestPriorityQuotaResponseEnvelopeSuccess `json:"success,required"` - Result Quota `json:"result"` JSON requestPriorityQuotaResponseEnvelopeJSON `json:"-"` } @@ -389,8 +424,8 @@ type RequestPriorityQuotaResponseEnvelope struct { type requestPriorityQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/intel/whois.go b/intel/whois.go index 5655c7c1a8..ece63a5b8f 100644 --- a/intel/whois.go +++ b/intel/whois.go @@ -259,9 +259,9 @@ func (r WhoisGetParams) URLQuery() (v url.Values) { type WhoisGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result WhoisGetResponse `json:"result,required"` // Whether the API call was successful Success WhoisGetResponseEnvelopeSuccess `json:"success,required"` - Result WhoisGetResponse `json:"result"` JSON whoisGetResponseEnvelopeJSON `json:"-"` } @@ -270,8 +270,8 @@ type WhoisGetResponseEnvelope struct { type whoisGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/shared/union.go b/shared/union.go index 212561aacd..7537786749 100644 --- a/shared/union.go +++ b/shared/union.go @@ -166,6 +166,9 @@ func (UnionString) ImplementsOriginPostQuantumEncryptionOriginPostQuantumEncrypt } func (UnionString) ImplementsHostnamesSettingValueUnionParam() {} func (UnionString) ImplementsHostnamesSettingValueUnion() {} +func (UnionString) ImplementsCloudforceOneRequestDeleteResponseUnion() {} +func (UnionString) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() {} +func (UnionString) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() {} func (UnionString) ImplementsEventNotificationsR2ConfigurationQueueDeleteResponseUnion() {} type UnionInt int64 From dc821a682b9876d894220c9cc309a0d58ec86e70 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 4 May 2024 11:37:00 +0000 Subject: [PATCH 097/127] feat(api): OpenAPI spec update via Stainless API (#1943) --- .stats.yml | 2 +- api.md | 12 +-- cloudforce_one/request.go | 132 +++++++++++------------------- cloudforce_one/requestmessage.go | 119 ++++++++++----------------- cloudforce_one/requestpriority.go | 123 ++++++++++------------------ intel/whois.go | 4 +- shared/union.go | 3 - 7 files changed, 144 insertions(+), 251 deletions(-) diff --git a/.stats.yml b/.stats.yml index c3aadbaead..3f3b127470 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1269 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-64e34dab9f75ff332905c078b63a3d502c4a605db84849795773b6212941dd12.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ecba01cd225d19e1decd3caa323399e3f580a2abbdd4a756fa536063651facee.yml diff --git a/api.md b/api.md index 3b02a20ab1..7f3a94dce4 100644 --- a/api.md +++ b/api.md @@ -6740,14 +6740,14 @@ Response Types: - cloudforce_one.Quota - cloudforce_one.RequestConstants - cloudforce_one.RequestTypes -- cloudforce_one.RequestDeleteResponseUnion +- cloudforce_one.RequestDeleteResponse Methods: - client.CloudforceOne.Requests.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestNewParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestUpdateParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.List(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestListParams) (pagination.V4PagePaginationArray[cloudforce_one.ListItem], error) -- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponse, error) - client.CloudforceOne.Requests.Constants(ctx context.Context, accountIdentifier string) (cloudforce_one.RequestConstants, error) - client.CloudforceOne.Requests.Get(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) @@ -6758,13 +6758,13 @@ Methods: Response Types: - cloudforce_one.Message -- cloudforce_one.RequestMessageDeleteResponseUnion +- cloudforce_one.RequestMessageDeleteResponse Methods: - client.CloudforceOne.Requests.Message.New(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageNewParams) (cloudforce_one.Message, error) - client.CloudforceOne.Requests.Message.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, body cloudforce_one.RequestMessageUpdateParams) (cloudforce_one.Message, error) -- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponse, error) - client.CloudforceOne.Requests.Message.Get(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageGetParams) ([]cloudforce_one.Message, error) ### Priority @@ -6778,13 +6778,13 @@ Response Types: - cloudforce_one.Label - cloudforce_one.Priority -- cloudforce_one.RequestPriorityDeleteResponseUnion +- cloudforce_one.RequestPriorityDeleteResponse Methods: - client.CloudforceOne.Requests.Priority.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestPriorityNewParams) (cloudforce_one.Priority, error) - client.CloudforceOne.Requests.Priority.Update(ctx context.Context, accountIdentifier string, priorityIdentifer string, body cloudforce_one.RequestPriorityUpdateParams) (cloudforce_one.Item, error) -- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponse, error) - client.CloudforceOne.Requests.Priority.Get(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Priority.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) diff --git a/cloudforce_one/request.go b/cloudforce_one/request.go index ce028e3612..a5865d5f35 100644 --- a/cloudforce_one/request.go +++ b/cloudforce_one/request.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -15,7 +14,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestService contains methods and other services that help with interacting @@ -93,15 +91,10 @@ func (r *RequestService) ListAutoPaging(ctx context.Context, accountIdentifier s } // Delete a Request -func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponseUnion, err error) { +func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s", accountIdentifier, requestIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -469,30 +462,46 @@ func (r RequestConstantsTlp) IsKnown() bool { type RequestTypes []string -// Union satisfied by [cloudforce_one.RequestDeleteResponseUnknown], -// [cloudforce_one.RequestDeleteResponseArray] or [shared.UnionString]. -type RequestDeleteResponseUnion interface { - ImplementsCloudforceOneRequestDeleteResponseUnion() +type RequestDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestDeleteResponseSuccess `json:"success,required"` + JSON requestDeleteResponseJSON `json:"-"` +} + +// requestDeleteResponseJSON contains the JSON metadata for the struct +// [RequestDeleteResponse] +type requestDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +func (r requestDeleteResponseJSON) RawJSON() string { + return r.raw } -type RequestDeleteResponseArray []interface{} +// Whether the API call was successful +type RequestDeleteResponseSuccess bool -func (r RequestDeleteResponseArray) ImplementsCloudforceOneRequestDeleteResponseUnion() {} +const ( + RequestDeleteResponseSuccessTrue RequestDeleteResponseSuccess = true +) + +func (r RequestDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestDeleteResponseSuccessTrue: + return true + } + return false +} type RequestNewParams struct { // Request content @@ -533,9 +542,9 @@ func (r RequestNewParamsTlp) IsKnown() bool { type RequestNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestNewResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestNewResponseEnvelopeJSON `json:"-"` } @@ -544,8 +553,8 @@ type RequestNewResponseEnvelope struct { type requestNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -612,9 +621,9 @@ func (r RequestUpdateParamsTlp) IsKnown() bool { type RequestUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestUpdateResponseEnvelopeJSON `json:"-"` } @@ -623,8 +632,8 @@ type RequestUpdateResponseEnvelope struct { type requestUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -715,55 +724,12 @@ func (r RequestListParamsStatus) IsKnown() bool { return false } -type RequestDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestDeleteResponseEnvelopeJSON contains the JSON metadata for the struct -// [RequestDeleteResponseEnvelope] -type requestDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestDeleteResponseEnvelopeSuccess bool - -const ( - RequestDeleteResponseEnvelopeSuccessTrue RequestDeleteResponseEnvelopeSuccess = true -) - -func (r RequestDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestConstantsResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestConstants `json:"result,required"` // Whether the API call was successful Success RequestConstantsResponseEnvelopeSuccess `json:"success,required"` + Result RequestConstants `json:"result"` JSON requestConstantsResponseEnvelopeJSON `json:"-"` } @@ -772,8 +738,8 @@ type RequestConstantsResponseEnvelope struct { type requestConstantsResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -804,9 +770,9 @@ func (r RequestConstantsResponseEnvelopeSuccess) IsKnown() bool { type RequestGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestGetResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestGetResponseEnvelopeJSON `json:"-"` } @@ -815,8 +781,8 @@ type RequestGetResponseEnvelope struct { type requestGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -847,9 +813,9 @@ func (r RequestGetResponseEnvelopeSuccess) IsKnown() bool { type RequestQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Quota `json:"result,required"` // Whether the API call was successful Success RequestQuotaResponseEnvelopeSuccess `json:"success,required"` + Result Quota `json:"result"` JSON requestQuotaResponseEnvelopeJSON `json:"-"` } @@ -858,8 +824,8 @@ type RequestQuotaResponseEnvelope struct { type requestQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -890,9 +856,9 @@ func (r RequestQuotaResponseEnvelopeSuccess) IsKnown() bool { type RequestTypesResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestTypes `json:"result,required"` // Whether the API call was successful Success RequestTypesResponseEnvelopeSuccess `json:"success,required"` + Result RequestTypes `json:"result"` JSON requestTypesResponseEnvelopeJSON `json:"-"` } @@ -901,8 +867,8 @@ type RequestTypesResponseEnvelope struct { type requestTypesResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestmessage.go b/cloudforce_one/requestmessage.go index b5a88e43b5..f3949be2ee 100644 --- a/cloudforce_one/requestmessage.go +++ b/cloudforce_one/requestmessage.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -14,7 +13,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestMessageService contains methods and other services that help with @@ -64,15 +62,10 @@ func (r *RequestMessageService) Update(ctx context.Context, accountIdentifier st } // Delete a Request Message -func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponseUnion, err error) { +func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestMessageDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s/message/%v", accountIdentifier, requestIdentifier, messageIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -125,30 +118,45 @@ func (r messageJSON) RawJSON() string { return r.raw } -// Union satisfied by [cloudforce_one.RequestMessageDeleteResponseUnknown], -// [cloudforce_one.RequestMessageDeleteResponseArray] or [shared.UnionString]. -type RequestMessageDeleteResponseUnion interface { - ImplementsCloudforceOneRequestMessageDeleteResponseUnion() +type RequestMessageDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestMessageDeleteResponseSuccess `json:"success,required"` + JSON requestMessageDeleteResponseJSON `json:"-"` +} + +// requestMessageDeleteResponseJSON contains the JSON metadata for the struct +// [RequestMessageDeleteResponse] +type requestMessageDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestMessageDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestMessageDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestMessageDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +func (r requestMessageDeleteResponseJSON) RawJSON() string { + return r.raw } -type RequestMessageDeleteResponseArray []interface{} +// Whether the API call was successful +type RequestMessageDeleteResponseSuccess bool + +const ( + RequestMessageDeleteResponseSuccessTrue RequestMessageDeleteResponseSuccess = true +) -func (r RequestMessageDeleteResponseArray) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() { +func (r RequestMessageDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestMessageDeleteResponseSuccessTrue: + return true + } + return false } type RequestMessageNewParams struct { @@ -163,9 +171,9 @@ func (r RequestMessageNewParams) MarshalJSON() (data []byte, err error) { type RequestMessageNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageNewResponseEnvelopeSuccess `json:"success,required"` + Result Message `json:"result"` JSON requestMessageNewResponseEnvelopeJSON `json:"-"` } @@ -174,8 +182,8 @@ type RequestMessageNewResponseEnvelope struct { type requestMessageNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -242,9 +250,9 @@ func (r RequestMessageUpdateParamsTlp) IsKnown() bool { type RequestMessageUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Message `json:"result"` JSON requestMessageUpdateResponseEnvelopeJSON `json:"-"` } @@ -253,8 +261,8 @@ type RequestMessageUpdateResponseEnvelope struct { type requestMessageUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -282,49 +290,6 @@ func (r RequestMessageUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } -type RequestMessageDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestMessageDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestMessageDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestMessageDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestMessageDeleteResponseEnvelopeJSON contains the JSON metadata for the -// struct [RequestMessageDeleteResponseEnvelope] -type requestMessageDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestMessageDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestMessageDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestMessageDeleteResponseEnvelopeSuccess bool - -const ( - RequestMessageDeleteResponseEnvelopeSuccessTrue RequestMessageDeleteResponseEnvelopeSuccess = true -) - -func (r RequestMessageDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestMessageDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestMessageGetParams struct { // Page number of results Page param.Field[int64] `json:"page,required"` @@ -363,9 +328,9 @@ func (r RequestMessageGetParamsSortOrder) IsKnown() bool { type RequestMessageGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result []Message `json:"result,required"` // Whether the API call was successful Success RequestMessageGetResponseEnvelopeSuccess `json:"success,required"` + Result []Message `json:"result"` JSON requestMessageGetResponseEnvelopeJSON `json:"-"` } @@ -374,8 +339,8 @@ type RequestMessageGetResponseEnvelope struct { type requestMessageGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestpriority.go b/cloudforce_one/requestpriority.go index 702df8b577..eef29460bf 100644 --- a/cloudforce_one/requestpriority.go +++ b/cloudforce_one/requestpriority.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -14,7 +13,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestPriorityService contains methods and other services that help with @@ -62,15 +60,10 @@ func (r *RequestPriorityService) Update(ctx context.Context, accountIdentifier s } // Delete a Priority Intelligence Report -func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponseUnion, err error) { +func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestPriorityDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/priority/%s", accountIdentifier, priorityIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -196,30 +189,45 @@ func (r PriorityEditTlp) IsKnown() bool { return false } -// Union satisfied by [cloudforce_one.RequestPriorityDeleteResponseUnknown], -// [cloudforce_one.RequestPriorityDeleteResponseArray] or [shared.UnionString]. -type RequestPriorityDeleteResponseUnion interface { - ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() +type RequestPriorityDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestPriorityDeleteResponseSuccess `json:"success,required"` + JSON requestPriorityDeleteResponseJSON `json:"-"` } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestPriorityDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestPriorityDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +// requestPriorityDeleteResponseJSON contains the JSON metadata for the struct +// [RequestPriorityDeleteResponse] +type requestPriorityDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field } -type RequestPriorityDeleteResponseArray []interface{} +func (r *RequestPriorityDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} -func (r RequestPriorityDeleteResponseArray) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() { +func (r requestPriorityDeleteResponseJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestPriorityDeleteResponseSuccess bool + +const ( + RequestPriorityDeleteResponseSuccessTrue RequestPriorityDeleteResponseSuccess = true +) + +func (r RequestPriorityDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestPriorityDeleteResponseSuccessTrue: + return true + } + return false } type RequestPriorityNewParams struct { @@ -233,9 +241,9 @@ func (r RequestPriorityNewParams) MarshalJSON() (data []byte, err error) { type RequestPriorityNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Priority `json:"result,required"` // Whether the API call was successful Success RequestPriorityNewResponseEnvelopeSuccess `json:"success,required"` + Result Priority `json:"result"` JSON requestPriorityNewResponseEnvelopeJSON `json:"-"` } @@ -244,8 +252,8 @@ type RequestPriorityNewResponseEnvelope struct { type requestPriorityNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -284,9 +292,9 @@ func (r RequestPriorityUpdateParams) MarshalJSON() (data []byte, err error) { type RequestPriorityUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestPriorityUpdateResponseEnvelopeJSON `json:"-"` } @@ -295,8 +303,8 @@ type RequestPriorityUpdateResponseEnvelope struct { type requestPriorityUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -324,55 +332,12 @@ func (r RequestPriorityUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } -type RequestPriorityDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestPriorityDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestPriorityDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestPriorityDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestPriorityDeleteResponseEnvelopeJSON contains the JSON metadata for the -// struct [RequestPriorityDeleteResponseEnvelope] -type requestPriorityDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestPriorityDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestPriorityDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestPriorityDeleteResponseEnvelopeSuccess bool - -const ( - RequestPriorityDeleteResponseEnvelopeSuccessTrue RequestPriorityDeleteResponseEnvelopeSuccess = true -) - -func (r RequestPriorityDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestPriorityDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestPriorityGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityGetResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestPriorityGetResponseEnvelopeJSON `json:"-"` } @@ -381,8 +346,8 @@ type RequestPriorityGetResponseEnvelope struct { type requestPriorityGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -413,9 +378,9 @@ func (r RequestPriorityGetResponseEnvelopeSuccess) IsKnown() bool { type RequestPriorityQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Quota `json:"result,required"` // Whether the API call was successful Success RequestPriorityQuotaResponseEnvelopeSuccess `json:"success,required"` + Result Quota `json:"result"` JSON requestPriorityQuotaResponseEnvelopeJSON `json:"-"` } @@ -424,8 +389,8 @@ type RequestPriorityQuotaResponseEnvelope struct { type requestPriorityQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/intel/whois.go b/intel/whois.go index ece63a5b8f..5655c7c1a8 100644 --- a/intel/whois.go +++ b/intel/whois.go @@ -259,9 +259,9 @@ func (r WhoisGetParams) URLQuery() (v url.Values) { type WhoisGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result WhoisGetResponse `json:"result,required"` // Whether the API call was successful Success WhoisGetResponseEnvelopeSuccess `json:"success,required"` + Result WhoisGetResponse `json:"result"` JSON whoisGetResponseEnvelopeJSON `json:"-"` } @@ -270,8 +270,8 @@ type WhoisGetResponseEnvelope struct { type whoisGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/shared/union.go b/shared/union.go index 7537786749..212561aacd 100644 --- a/shared/union.go +++ b/shared/union.go @@ -166,9 +166,6 @@ func (UnionString) ImplementsOriginPostQuantumEncryptionOriginPostQuantumEncrypt } func (UnionString) ImplementsHostnamesSettingValueUnionParam() {} func (UnionString) ImplementsHostnamesSettingValueUnion() {} -func (UnionString) ImplementsCloudforceOneRequestDeleteResponseUnion() {} -func (UnionString) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() {} -func (UnionString) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() {} func (UnionString) ImplementsEventNotificationsR2ConfigurationQueueDeleteResponseUnion() {} type UnionInt int64 From 9f18a22274939cf453e908245f1bb7fe94dd5994 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 02:04:27 +0000 Subject: [PATCH 098/127] feat(api): update via SDK Studio (#1945) --- .stats.yml | 2 +- api.md | 28 +++ workers/ai.go | 4 +- workers/aigateway.go | 476 +++++++++++++++++++++++++++++++++++ workers/aigateway_test.go | 174 +++++++++++++ workers/aigatewaylog.go | 164 ++++++++++++ workers/aigatewaylog_test.go | 54 ++++ 7 files changed, 900 insertions(+), 2 deletions(-) create mode 100644 workers/aigateway.go create mode 100644 workers/aigateway_test.go create mode 100644 workers/aigatewaylog.go create mode 100644 workers/aigatewaylog_test.go diff --git a/.stats.yml b/.stats.yml index 3f3b127470..b07651d49a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1269 +configured_endpoints: 1275 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ecba01cd225d19e1decd3caa323399e3f580a2abbdd4a756fa536063651facee.yml diff --git a/api.md b/api.md index 7f3a94dce4..395e27a567 100644 --- a/api.md +++ b/api.md @@ -2439,6 +2439,34 @@ Methods: - client.Workers.AI.Run(ctx context.Context, modelName string, params workers.AIRunParams) (workers.AIRunResponseUnion, error) +### Gateways + +Response Types: + +- workers.AIGatewayNewResponse +- workers.AIGatewayUpdateResponse +- workers.AIGatewayListResponse +- workers.AIGatewayDeleteResponse +- workers.AIGatewayGetResponse + +Methods: + +- client.Workers.AI.Gateways.New(ctx context.Context, accountTag string, body workers.AIGatewayNewParams) (workers.AIGatewayNewResponse, error) +- client.Workers.AI.Gateways.Update(ctx context.Context, accountTag string, id string, body workers.AIGatewayUpdateParams) (workers.AIGatewayUpdateResponse, error) +- client.Workers.AI.Gateways.List(ctx context.Context, accountTag string, query workers.AIGatewayListParams) (pagination.V4PagePaginationArray[workers.AIGatewayListResponse], error) +- client.Workers.AI.Gateways.Delete(ctx context.Context, accountTag string, id string) (workers.AIGatewayDeleteResponse, error) +- client.Workers.AI.Gateways.Get(ctx context.Context, accountTag string, id string) (workers.AIGatewayGetResponse, error) + +#### Logs + +Response Types: + +- workers.AIGatewayLogGetResponse + +Methods: + +- client.Workers.AI.Gateways.Logs.Get(ctx context.Context, accountTag string, id string, query workers.AIGatewayLogGetParams) ([]workers.AIGatewayLogGetResponse, error) + ## Scripts Params Types: diff --git a/workers/ai.go b/workers/ai.go index 274b13f36f..8d4c4389ea 100644 --- a/workers/ai.go +++ b/workers/ai.go @@ -21,7 +21,8 @@ import ( // from the environment automatically. You should not instantiate this service // directly, and instead use the [NewAIService] method instead. type AIService struct { - Options []option.RequestOption + Options []option.RequestOption + Gateways *AIGatewayService } // NewAIService generates a new service that applies the given options to each @@ -30,6 +31,7 @@ type AIService struct { func NewAIService(opts ...option.RequestOption) (r *AIService) { r = &AIService{} r.Options = opts + r.Gateways = NewAIGatewayService(opts...) return } diff --git a/workers/aigateway.go b/workers/aigateway.go new file mode 100644 index 0000000000..ec5125b0c8 --- /dev/null +++ b/workers/aigateway.go @@ -0,0 +1,476 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package workers + +import ( + "context" + "fmt" + "net/http" + "net/url" + "time" + + "github.com/cloudflare/cloudflare-go/v2/internal/apijson" + "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" + "github.com/cloudflare/cloudflare-go/v2/internal/pagination" + "github.com/cloudflare/cloudflare-go/v2/internal/param" + "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" + "github.com/cloudflare/cloudflare-go/v2/option" +) + +// AIGatewayService contains methods and other services that help with interacting +// with the cloudflare API. Note, unlike clients, this service does not read +// variables from the environment automatically. You should not instantiate this +// service directly, and instead use the [NewAIGatewayService] method instead. +type AIGatewayService struct { + Options []option.RequestOption + Logs *AIGatewayLogService +} + +// NewAIGatewayService generates a new service that applies the given options to +// each request. These options are applied after the parent client's options (if +// there is one), and before any request-specific options. +func NewAIGatewayService(opts ...option.RequestOption) (r *AIGatewayService) { + r = &AIGatewayService{} + r.Options = opts + r.Logs = NewAIGatewayLogService(opts...) + return +} + +// Create a new Gateway +func (r *AIGatewayService) New(ctx context.Context, accountTag string, body AIGatewayNewParams, opts ...option.RequestOption) (res *AIGatewayNewResponse, err error) { + opts = append(r.Options[:], opts...) + var env AIGatewayNewResponseEnvelope + path := fmt.Sprintf("accounts/%s/ai-gateway/gateways", accountTag) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Update a Gateway +func (r *AIGatewayService) Update(ctx context.Context, accountTag string, id string, body AIGatewayUpdateParams, opts ...option.RequestOption) (res *AIGatewayUpdateResponse, err error) { + opts = append(r.Options[:], opts...) + var env AIGatewayUpdateResponseEnvelope + path := fmt.Sprintf("accounts/%s/ai-gateway/gateways/%s", accountTag, id) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// List Gateway's +func (r *AIGatewayService) List(ctx context.Context, accountTag string, query AIGatewayListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[AIGatewayListResponse], err error) { + var raw *http.Response + opts = append(r.Options, opts...) + opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) + path := fmt.Sprintf("accounts/%s/ai-gateway/gateways", accountTag) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) + if err != nil { + return nil, err + } + err = cfg.Execute() + if err != nil { + return nil, err + } + res.SetPageConfig(cfg, raw) + return res, nil +} + +// List Gateway's +func (r *AIGatewayService) ListAutoPaging(ctx context.Context, accountTag string, query AIGatewayListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[AIGatewayListResponse] { + return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, accountTag, query, opts...)) +} + +// Delete a Gateway +func (r *AIGatewayService) Delete(ctx context.Context, accountTag string, id string, opts ...option.RequestOption) (res *AIGatewayDeleteResponse, err error) { + opts = append(r.Options[:], opts...) + var env AIGatewayDeleteResponseEnvelope + path := fmt.Sprintf("accounts/%s/ai-gateway/gateways/%s", accountTag, id) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Fetch a Gateway +func (r *AIGatewayService) Get(ctx context.Context, accountTag string, id string, opts ...option.RequestOption) (res *AIGatewayGetResponse, err error) { + opts = append(r.Options[:], opts...) + var env AIGatewayGetResponseEnvelope + path := fmt.Sprintf("accounts/%s/ai-gateway/gateways/%s", accountTag, id) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +type AIGatewayNewResponse struct { + Task AIGatewayNewResponseTask `json:"task,required"` + JSON aiGatewayNewResponseJSON `json:"-"` +} + +// aiGatewayNewResponseJSON contains the JSON metadata for the struct +// [AIGatewayNewResponse] +type aiGatewayNewResponseJSON struct { + Task apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AIGatewayNewResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r aiGatewayNewResponseJSON) RawJSON() string { + return r.raw +} + +type AIGatewayNewResponseTask struct { + ID string `json:"id,required" format:"uuid"` + CacheInvalidateOnUpdate bool `json:"cache_invalidate_on_update,required"` + CacheTTL int64 `json:"cache_ttl,required"` + CollectLogs bool `json:"collect_logs,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + ModifiedAt time.Time `json:"modified_at,required" format:"date-time"` + Name string `json:"name,required"` + Slug string `json:"slug,required"` + RateLimitingInterval int64 `json:"rate_limiting_interval"` + RateLimitingLimit int64 `json:"rate_limiting_limit"` + RateLimitingTechnique string `json:"rate_limiting_technique"` + JSON aiGatewayNewResponseTaskJSON `json:"-"` +} + +// aiGatewayNewResponseTaskJSON contains the JSON metadata for the struct +// [AIGatewayNewResponseTask] +type aiGatewayNewResponseTaskJSON struct { + ID apijson.Field + CacheInvalidateOnUpdate apijson.Field + CacheTTL apijson.Field + CollectLogs apijson.Field + CreatedAt apijson.Field + ModifiedAt apijson.Field + Name apijson.Field + Slug apijson.Field + RateLimitingInterval apijson.Field + RateLimitingLimit apijson.Field + RateLimitingTechnique apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AIGatewayNewResponseTask) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r aiGatewayNewResponseTaskJSON) RawJSON() string { + return r.raw +} + +type AIGatewayUpdateResponse struct { + ID string `json:"id,required" format:"uuid"` + CacheInvalidateOnUpdate bool `json:"cache_invalidate_on_update,required"` + CacheTTL int64 `json:"cache_ttl,required"` + CollectLogs bool `json:"collect_logs,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + ModifiedAt time.Time `json:"modified_at,required" format:"date-time"` + Name string `json:"name,required"` + Slug string `json:"slug,required"` + RateLimitingInterval int64 `json:"rate_limiting_interval"` + RateLimitingLimit int64 `json:"rate_limiting_limit"` + RateLimitingTechnique string `json:"rate_limiting_technique"` + JSON aiGatewayUpdateResponseJSON `json:"-"` +} + +// aiGatewayUpdateResponseJSON contains the JSON metadata for the struct +// [AIGatewayUpdateResponse] +type aiGatewayUpdateResponseJSON struct { + ID apijson.Field + CacheInvalidateOnUpdate apijson.Field + CacheTTL apijson.Field + CollectLogs apijson.Field + CreatedAt apijson.Field + ModifiedAt apijson.Field + Name apijson.Field + Slug apijson.Field + RateLimitingInterval apijson.Field + RateLimitingLimit apijson.Field + RateLimitingTechnique apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AIGatewayUpdateResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r aiGatewayUpdateResponseJSON) RawJSON() string { + return r.raw +} + +type AIGatewayListResponse struct { + ID string `json:"id,required" format:"uuid"` + CacheInvalidateOnUpdate bool `json:"cache_invalidate_on_update,required"` + CacheTTL int64 `json:"cache_ttl,required"` + CollectLogs bool `json:"collect_logs,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + ModifiedAt time.Time `json:"modified_at,required" format:"date-time"` + Name string `json:"name,required"` + Slug string `json:"slug,required"` + RateLimitingInterval int64 `json:"rate_limiting_interval"` + RateLimitingLimit int64 `json:"rate_limiting_limit"` + RateLimitingTechnique string `json:"rate_limiting_technique"` + JSON aiGatewayListResponseJSON `json:"-"` +} + +// aiGatewayListResponseJSON contains the JSON metadata for the struct +// [AIGatewayListResponse] +type aiGatewayListResponseJSON struct { + ID apijson.Field + CacheInvalidateOnUpdate apijson.Field + CacheTTL apijson.Field + CollectLogs apijson.Field + CreatedAt apijson.Field + ModifiedAt apijson.Field + Name apijson.Field + Slug apijson.Field + RateLimitingInterval apijson.Field + RateLimitingLimit apijson.Field + RateLimitingTechnique apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AIGatewayListResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r aiGatewayListResponseJSON) RawJSON() string { + return r.raw +} + +type AIGatewayDeleteResponse struct { + ID string `json:"id,required" format:"uuid"` + CacheInvalidateOnUpdate bool `json:"cache_invalidate_on_update,required"` + CacheTTL int64 `json:"cache_ttl,required"` + CollectLogs bool `json:"collect_logs,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + ModifiedAt time.Time `json:"modified_at,required" format:"date-time"` + Name string `json:"name,required"` + Slug string `json:"slug,required"` + RateLimitingInterval int64 `json:"rate_limiting_interval"` + RateLimitingLimit int64 `json:"rate_limiting_limit"` + RateLimitingTechnique string `json:"rate_limiting_technique"` + JSON aiGatewayDeleteResponseJSON `json:"-"` +} + +// aiGatewayDeleteResponseJSON contains the JSON metadata for the struct +// [AIGatewayDeleteResponse] +type aiGatewayDeleteResponseJSON struct { + ID apijson.Field + CacheInvalidateOnUpdate apijson.Field + CacheTTL apijson.Field + CollectLogs apijson.Field + CreatedAt apijson.Field + ModifiedAt apijson.Field + Name apijson.Field + Slug apijson.Field + RateLimitingInterval apijson.Field + RateLimitingLimit apijson.Field + RateLimitingTechnique apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AIGatewayDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r aiGatewayDeleteResponseJSON) RawJSON() string { + return r.raw +} + +type AIGatewayGetResponse struct { + ID string `json:"id,required" format:"uuid"` + CacheInvalidateOnUpdate bool `json:"cache_invalidate_on_update,required"` + CacheTTL int64 `json:"cache_ttl,required"` + CollectLogs bool `json:"collect_logs,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + ModifiedAt time.Time `json:"modified_at,required" format:"date-time"` + Name string `json:"name,required"` + Slug string `json:"slug,required"` + RateLimitingInterval int64 `json:"rate_limiting_interval"` + RateLimitingLimit int64 `json:"rate_limiting_limit"` + RateLimitingTechnique string `json:"rate_limiting_technique"` + JSON aiGatewayGetResponseJSON `json:"-"` +} + +// aiGatewayGetResponseJSON contains the JSON metadata for the struct +// [AIGatewayGetResponse] +type aiGatewayGetResponseJSON struct { + ID apijson.Field + CacheInvalidateOnUpdate apijson.Field + CacheTTL apijson.Field + CollectLogs apijson.Field + CreatedAt apijson.Field + ModifiedAt apijson.Field + Name apijson.Field + Slug apijson.Field + RateLimitingInterval apijson.Field + RateLimitingLimit apijson.Field + RateLimitingTechnique apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AIGatewayGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r aiGatewayGetResponseJSON) RawJSON() string { + return r.raw +} + +type AIGatewayNewParams struct { + CacheInvalidateOnUpdate param.Field[bool] `json:"cache_invalidate_on_update,required"` + CacheTTL param.Field[int64] `json:"cache_ttl,required"` + CollectLogs param.Field[bool] `json:"collect_logs,required"` + Name param.Field[string] `json:"name,required"` + Slug param.Field[string] `json:"slug,required"` + RateLimitingInterval param.Field[int64] `json:"rate_limiting_interval"` + RateLimitingLimit param.Field[int64] `json:"rate_limiting_limit"` + RateLimitingTechnique param.Field[string] `json:"rate_limiting_technique"` +} + +func (r AIGatewayNewParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AIGatewayNewResponseEnvelope struct { + Result AIGatewayNewResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON aiGatewayNewResponseEnvelopeJSON `json:"-"` +} + +// aiGatewayNewResponseEnvelopeJSON contains the JSON metadata for the struct +// [AIGatewayNewResponseEnvelope] +type aiGatewayNewResponseEnvelopeJSON struct { + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AIGatewayNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r aiGatewayNewResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type AIGatewayUpdateParams struct { + CacheInvalidateOnUpdate param.Field[bool] `json:"cache_invalidate_on_update,required"` + CacheTTL param.Field[int64] `json:"cache_ttl,required"` + CollectLogs param.Field[bool] `json:"collect_logs,required"` + Name param.Field[string] `json:"name,required"` + Slug param.Field[string] `json:"slug,required"` + RateLimitingInterval param.Field[int64] `json:"rate_limiting_interval"` + RateLimitingLimit param.Field[int64] `json:"rate_limiting_limit"` + RateLimitingTechnique param.Field[string] `json:"rate_limiting_technique"` +} + +func (r AIGatewayUpdateParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AIGatewayUpdateResponseEnvelope struct { + Result AIGatewayUpdateResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON aiGatewayUpdateResponseEnvelopeJSON `json:"-"` +} + +// aiGatewayUpdateResponseEnvelopeJSON contains the JSON metadata for the struct +// [AIGatewayUpdateResponseEnvelope] +type aiGatewayUpdateResponseEnvelopeJSON struct { + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AIGatewayUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r aiGatewayUpdateResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type AIGatewayListParams struct { + ID param.Field[string] `query:"id" format:"uuid"` + // Order By Column Name + OrderBy param.Field[string] `query:"order_by"` + Page param.Field[int64] `query:"page"` + PerPage param.Field[int64] `query:"per_page"` +} + +// URLQuery serializes [AIGatewayListParams]'s query parameters as `url.Values`. +func (r AIGatewayListParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatRepeat, + NestedFormat: apiquery.NestedQueryFormatBrackets, + }) +} + +type AIGatewayDeleteResponseEnvelope struct { + Result AIGatewayDeleteResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON aiGatewayDeleteResponseEnvelopeJSON `json:"-"` +} + +// aiGatewayDeleteResponseEnvelopeJSON contains the JSON metadata for the struct +// [AIGatewayDeleteResponseEnvelope] +type aiGatewayDeleteResponseEnvelopeJSON struct { + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AIGatewayDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r aiGatewayDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type AIGatewayGetResponseEnvelope struct { + Result AIGatewayGetResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON aiGatewayGetResponseEnvelopeJSON `json:"-"` +} + +// aiGatewayGetResponseEnvelopeJSON contains the JSON metadata for the struct +// [AIGatewayGetResponseEnvelope] +type aiGatewayGetResponseEnvelopeJSON struct { + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AIGatewayGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r aiGatewayGetResponseEnvelopeJSON) RawJSON() string { + return r.raw +} diff --git a/workers/aigateway_test.go b/workers/aigateway_test.go new file mode 100644 index 0000000000..b6208ff952 --- /dev/null +++ b/workers/aigateway_test.go @@ -0,0 +1,174 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package workers_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go/v2" + "github.com/cloudflare/cloudflare-go/v2/internal/testutil" + "github.com/cloudflare/cloudflare-go/v2/option" + "github.com/cloudflare/cloudflare-go/v2/workers" +) + +func TestAIGatewayNewWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Workers.AI.Gateways.New( + context.TODO(), + "0d37909e38d3e99c29fa2cd343ac421a", + workers.AIGatewayNewParams{ + CacheInvalidateOnUpdate: cloudflare.F(true), + CacheTTL: cloudflare.F(int64(0)), + CollectLogs: cloudflare.F(true), + Name: cloudflare.F("string"), + Slug: cloudflare.F("string"), + RateLimitingInterval: cloudflare.F(int64(0)), + RateLimitingLimit: cloudflare.F(int64(0)), + RateLimitingTechnique: cloudflare.F("string"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAIGatewayUpdateWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Workers.AI.Gateways.Update( + context.TODO(), + "0d37909e38d3e99c29fa2cd343ac421a", + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + workers.AIGatewayUpdateParams{ + CacheInvalidateOnUpdate: cloudflare.F(true), + CacheTTL: cloudflare.F(int64(0)), + CollectLogs: cloudflare.F(true), + Name: cloudflare.F("string"), + Slug: cloudflare.F("string"), + RateLimitingInterval: cloudflare.F(int64(0)), + RateLimitingLimit: cloudflare.F(int64(0)), + RateLimitingTechnique: cloudflare.F("string"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAIGatewayListWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Workers.AI.Gateways.List( + context.TODO(), + "0d37909e38d3e99c29fa2cd343ac421a", + workers.AIGatewayListParams{ + ID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), + OrderBy: cloudflare.F("string"), + Page: cloudflare.F(int64(1)), + PerPage: cloudflare.F(int64(5)), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAIGatewayDelete(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Workers.AI.Gateways.Delete( + context.TODO(), + "0d37909e38d3e99c29fa2cd343ac421a", + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAIGatewayGet(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Workers.AI.Gateways.Get( + context.TODO(), + "0d37909e38d3e99c29fa2cd343ac421a", + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/workers/aigatewaylog.go b/workers/aigatewaylog.go new file mode 100644 index 0000000000..27a9bd9f04 --- /dev/null +++ b/workers/aigatewaylog.go @@ -0,0 +1,164 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package workers + +import ( + "context" + "fmt" + "net/http" + "net/url" + "time" + + "github.com/cloudflare/cloudflare-go/v2/internal/apijson" + "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" + "github.com/cloudflare/cloudflare-go/v2/internal/param" + "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" + "github.com/cloudflare/cloudflare-go/v2/option" +) + +// AIGatewayLogService contains methods and other services that help with +// interacting with the cloudflare API. Note, unlike clients, this service does not +// read variables from the environment automatically. You should not instantiate +// this service directly, and instead use the [NewAIGatewayLogService] method +// instead. +type AIGatewayLogService struct { + Options []option.RequestOption +} + +// NewAIGatewayLogService generates a new service that applies the given options to +// each request. These options are applied after the parent client's options (if +// there is one), and before any request-specific options. +func NewAIGatewayLogService(opts ...option.RequestOption) (r *AIGatewayLogService) { + r = &AIGatewayLogService{} + r.Options = opts + return +} + +// List Gateway Logs +func (r *AIGatewayLogService) Get(ctx context.Context, accountTag string, id string, query AIGatewayLogGetParams, opts ...option.RequestOption) (res *[]AIGatewayLogGetResponse, err error) { + opts = append(r.Options[:], opts...) + var env AIGatewayLogGetResponseEnvelope + path := fmt.Sprintf("accounts/%s/ai-gateway/gateways/%s/logs", accountTag, id) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +type AIGatewayLogGetResponse struct { + ID string `json:"id,required" format:"uuid"` + Cached bool `json:"cached,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Duration int64 `json:"duration,required"` + Model string `json:"model,required"` + Path string `json:"path,required"` + Provider string `json:"provider,required"` + Request string `json:"request,required"` + Response string `json:"response,required"` + Success bool `json:"success,required"` + TokensIn int64 `json:"tokens_in,required"` + TokensOut int64 `json:"tokens_out,required"` + JSON aiGatewayLogGetResponseJSON `json:"-"` +} + +// aiGatewayLogGetResponseJSON contains the JSON metadata for the struct +// [AIGatewayLogGetResponse] +type aiGatewayLogGetResponseJSON struct { + ID apijson.Field + Cached apijson.Field + CreatedAt apijson.Field + Duration apijson.Field + Model apijson.Field + Path apijson.Field + Provider apijson.Field + Request apijson.Field + Response apijson.Field + Success apijson.Field + TokensIn apijson.Field + TokensOut apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AIGatewayLogGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r aiGatewayLogGetResponseJSON) RawJSON() string { + return r.raw +} + +type AIGatewayLogGetParams struct { + Cached param.Field[bool] `query:"cached"` + Direction param.Field[AIGatewayLogGetParamsDirection] `query:"direction"` + EndDate param.Field[time.Time] `query:"end_date" format:"date-time"` + OrderBy param.Field[AIGatewayLogGetParamsOrderBy] `query:"order_by"` + Page param.Field[int64] `query:"page"` + PerPage param.Field[int64] `query:"per_page"` + Search param.Field[string] `query:"search"` + StartDate param.Field[time.Time] `query:"start_date" format:"date-time"` + Success param.Field[bool] `query:"success"` +} + +// URLQuery serializes [AIGatewayLogGetParams]'s query parameters as `url.Values`. +func (r AIGatewayLogGetParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatRepeat, + NestedFormat: apiquery.NestedQueryFormatBrackets, + }) +} + +type AIGatewayLogGetParamsDirection string + +const ( + AIGatewayLogGetParamsDirectionAsc AIGatewayLogGetParamsDirection = "asc" + AIGatewayLogGetParamsDirectionDesc AIGatewayLogGetParamsDirection = "desc" +) + +func (r AIGatewayLogGetParamsDirection) IsKnown() bool { + switch r { + case AIGatewayLogGetParamsDirectionAsc, AIGatewayLogGetParamsDirectionDesc: + return true + } + return false +} + +type AIGatewayLogGetParamsOrderBy string + +const ( + AIGatewayLogGetParamsOrderByCreatedAt AIGatewayLogGetParamsOrderBy = "created_at" + AIGatewayLogGetParamsOrderByProvider AIGatewayLogGetParamsOrderBy = "provider" +) + +func (r AIGatewayLogGetParamsOrderBy) IsKnown() bool { + switch r { + case AIGatewayLogGetParamsOrderByCreatedAt, AIGatewayLogGetParamsOrderByProvider: + return true + } + return false +} + +type AIGatewayLogGetResponseEnvelope struct { + Result []AIGatewayLogGetResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON aiGatewayLogGetResponseEnvelopeJSON `json:"-"` +} + +// aiGatewayLogGetResponseEnvelopeJSON contains the JSON metadata for the struct +// [AIGatewayLogGetResponseEnvelope] +type aiGatewayLogGetResponseEnvelopeJSON struct { + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AIGatewayLogGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r aiGatewayLogGetResponseEnvelopeJSON) RawJSON() string { + return r.raw +} diff --git a/workers/aigatewaylog_test.go b/workers/aigatewaylog_test.go new file mode 100644 index 0000000000..b4f0e482de --- /dev/null +++ b/workers/aigatewaylog_test.go @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package workers_test + +import ( + "context" + "errors" + "os" + "testing" + "time" + + "github.com/cloudflare/cloudflare-go/v2" + "github.com/cloudflare/cloudflare-go/v2/internal/testutil" + "github.com/cloudflare/cloudflare-go/v2/option" + "github.com/cloudflare/cloudflare-go/v2/workers" +) + +func TestAIGatewayLogGetWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Workers.AI.Gateways.Logs.Get( + context.TODO(), + "0d37909e38d3e99c29fa2cd343ac421a", + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + workers.AIGatewayLogGetParams{ + Cached: cloudflare.F(true), + Direction: cloudflare.F(workers.AIGatewayLogGetParamsDirectionAsc), + EndDate: cloudflare.F(time.Now()), + OrderBy: cloudflare.F(workers.AIGatewayLogGetParamsOrderByCreatedAt), + Page: cloudflare.F(int64(1)), + PerPage: cloudflare.F(int64(5)), + Search: cloudflare.F("string"), + StartDate: cloudflare.F(time.Now()), + Success: cloudflare.F(true), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} From 036568e03b1bebb9c5c3c0632010dcc8cc49d7c6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 02:07:29 +0000 Subject: [PATCH 099/127] feat(api): update via SDK Studio (#1946) --- {workers => ai_gateway}/aigateway.go | 6 +- {workers => ai_gateway}/aigateway_test.go | 20 +-- ai_gateway/aliases.go | 115 ++++++++++++ ai_gateway/log.go | 162 +++++++++++++++++ .../log_test.go | 14 +- api.md | 56 +++--- client.go | 3 + workers/ai.go | 4 +- workers/aigatewaylog.go | 164 ------------------ 9 files changed, 329 insertions(+), 215 deletions(-) rename {workers => ai_gateway}/aigateway.go (99%) rename {workers => ai_gateway}/aigateway_test.go (92%) create mode 100644 ai_gateway/aliases.go create mode 100644 ai_gateway/log.go rename workers/aigatewaylog_test.go => ai_gateway/log_test.go (76%) delete mode 100644 workers/aigatewaylog.go diff --git a/workers/aigateway.go b/ai_gateway/aigateway.go similarity index 99% rename from workers/aigateway.go rename to ai_gateway/aigateway.go index ec5125b0c8..77312b89cd 100644 --- a/workers/aigateway.go +++ b/ai_gateway/aigateway.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package workers +package ai_gateway import ( "context" @@ -23,7 +23,7 @@ import ( // service directly, and instead use the [NewAIGatewayService] method instead. type AIGatewayService struct { Options []option.RequestOption - Logs *AIGatewayLogService + Logs *LogService } // NewAIGatewayService generates a new service that applies the given options to @@ -32,7 +32,7 @@ type AIGatewayService struct { func NewAIGatewayService(opts ...option.RequestOption) (r *AIGatewayService) { r = &AIGatewayService{} r.Options = opts - r.Logs = NewAIGatewayLogService(opts...) + r.Logs = NewLogService(opts...) return } diff --git a/workers/aigateway_test.go b/ai_gateway/aigateway_test.go similarity index 92% rename from workers/aigateway_test.go rename to ai_gateway/aigateway_test.go index b6208ff952..72b322e803 100644 --- a/workers/aigateway_test.go +++ b/ai_gateway/aigateway_test.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package workers_test +package ai_gateway_test import ( "context" @@ -9,9 +9,9 @@ import ( "testing" "github.com/cloudflare/cloudflare-go/v2" + "github.com/cloudflare/cloudflare-go/v2/ai_gateway" "github.com/cloudflare/cloudflare-go/v2/internal/testutil" "github.com/cloudflare/cloudflare-go/v2/option" - "github.com/cloudflare/cloudflare-go/v2/workers" ) func TestAIGatewayNewWithOptionalParams(t *testing.T) { @@ -27,10 +27,10 @@ func TestAIGatewayNewWithOptionalParams(t *testing.T) { option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), option.WithAPIEmail("user@example.com"), ) - _, err := client.Workers.AI.Gateways.New( + _, err := client.AIGateway.New( context.TODO(), "0d37909e38d3e99c29fa2cd343ac421a", - workers.AIGatewayNewParams{ + ai_gateway.AIGatewayNewParams{ CacheInvalidateOnUpdate: cloudflare.F(true), CacheTTL: cloudflare.F(int64(0)), CollectLogs: cloudflare.F(true), @@ -63,11 +63,11 @@ func TestAIGatewayUpdateWithOptionalParams(t *testing.T) { option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), option.WithAPIEmail("user@example.com"), ) - _, err := client.Workers.AI.Gateways.Update( + _, err := client.AIGateway.Update( context.TODO(), "0d37909e38d3e99c29fa2cd343ac421a", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - workers.AIGatewayUpdateParams{ + ai_gateway.AIGatewayUpdateParams{ CacheInvalidateOnUpdate: cloudflare.F(true), CacheTTL: cloudflare.F(int64(0)), CollectLogs: cloudflare.F(true), @@ -100,10 +100,10 @@ func TestAIGatewayListWithOptionalParams(t *testing.T) { option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), option.WithAPIEmail("user@example.com"), ) - _, err := client.Workers.AI.Gateways.List( + _, err := client.AIGateway.List( context.TODO(), "0d37909e38d3e99c29fa2cd343ac421a", - workers.AIGatewayListParams{ + ai_gateway.AIGatewayListParams{ ID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), OrderBy: cloudflare.F("string"), Page: cloudflare.F(int64(1)), @@ -132,7 +132,7 @@ func TestAIGatewayDelete(t *testing.T) { option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), option.WithAPIEmail("user@example.com"), ) - _, err := client.Workers.AI.Gateways.Delete( + _, err := client.AIGateway.Delete( context.TODO(), "0d37909e38d3e99c29fa2cd343ac421a", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", @@ -159,7 +159,7 @@ func TestAIGatewayGet(t *testing.T) { option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), option.WithAPIEmail("user@example.com"), ) - _, err := client.Workers.AI.Gateways.Get( + _, err := client.AIGateway.Get( context.TODO(), "0d37909e38d3e99c29fa2cd343ac421a", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", diff --git a/ai_gateway/aliases.go b/ai_gateway/aliases.go new file mode 100644 index 0000000000..662911204f --- /dev/null +++ b/ai_gateway/aliases.go @@ -0,0 +1,115 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package ai_gateway + +import ( + "github.com/cloudflare/cloudflare-go/v2/internal/apierror" + "github.com/cloudflare/cloudflare-go/v2/shared" +) + +type Error = apierror.Error + +// This is an alias to an internal type. +type ASN = shared.ASN + +// This is an alias to an internal type. +type ASNParam = shared.ASNParam + +// This is an alias to an internal type. +type AuditLog = shared.AuditLog + +// This is an alias to an internal type. +type AuditLogAction = shared.AuditLogAction + +// This is an alias to an internal type. +type AuditLogActor = shared.AuditLogActor + +// The type of actor, whether a User, Cloudflare Admin, or an Automated System. +// +// This is an alias to an internal type. +type AuditLogActorType = shared.AuditLogActorType + +// This is an alias to an internal value. +const AuditLogActorTypeUser = shared.AuditLogActorTypeUser + +// This is an alias to an internal value. +const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin + +// This is an alias to an internal value. +const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare + +// This is an alias to an internal type. +type AuditLogOwner = shared.AuditLogOwner + +// This is an alias to an internal type. +type AuditLogResource = shared.AuditLogResource + +// A Cloudflare Tunnel that connects your origin to Cloudflare's edge. +// +// This is an alias to an internal type. +type CloudflareTunnel = shared.CloudflareTunnel + +// This is an alias to an internal type. +type CloudflareTunnelConnection = shared.CloudflareTunnelConnection + +// The type of tunnel. +// +// This is an alias to an internal type. +type CloudflareTunnelTunType = shared.CloudflareTunnelTunType + +// This is an alias to an internal value. +const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel + +// This is an alias to an internal value. +const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector + +// This is an alias to an internal value. +const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec + +// This is an alias to an internal value. +const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE + +// This is an alias to an internal value. +const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI + +// This is an alias to an internal type. +type ErrorData = shared.ErrorData + +// This is an alias to an internal type. +type Member = shared.Member + +// This is an alias to an internal type. +type MemberRole = shared.MemberRole + +// This is an alias to an internal type. +type MemberRolesPermissions = shared.MemberRolesPermissions + +// This is an alias to an internal type. +type MemberUser = shared.MemberUser + +// This is an alias to an internal type. +type MemberParam = shared.MemberParam + +// This is an alias to an internal type. +type MemberRoleParam = shared.MemberRoleParam + +// This is an alias to an internal type. +type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam + +// This is an alias to an internal type. +type MemberUserParam = shared.MemberUserParam + +// This is an alias to an internal type. +type Permission = shared.Permission + +// This is an alias to an internal type. +type PermissionGrant = shared.PermissionGrant + +// This is an alias to an internal type. +type PermissionGrantParam = shared.PermissionGrantParam + +// This is an alias to an internal type. +type ResponseInfo = shared.ResponseInfo + +// This is an alias to an internal type. +type Role = shared.Role diff --git a/ai_gateway/log.go b/ai_gateway/log.go new file mode 100644 index 0000000000..cbd2abbe3c --- /dev/null +++ b/ai_gateway/log.go @@ -0,0 +1,162 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package ai_gateway + +import ( + "context" + "fmt" + "net/http" + "net/url" + "time" + + "github.com/cloudflare/cloudflare-go/v2/internal/apijson" + "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" + "github.com/cloudflare/cloudflare-go/v2/internal/param" + "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" + "github.com/cloudflare/cloudflare-go/v2/option" +) + +// LogService contains methods and other services that help with interacting with +// the cloudflare API. Note, unlike clients, this service does not read variables +// from the environment automatically. You should not instantiate this service +// directly, and instead use the [NewLogService] method instead. +type LogService struct { + Options []option.RequestOption +} + +// NewLogService generates a new service that applies the given options to each +// request. These options are applied after the parent client's options (if there +// is one), and before any request-specific options. +func NewLogService(opts ...option.RequestOption) (r *LogService) { + r = &LogService{} + r.Options = opts + return +} + +// List Gateway Logs +func (r *LogService) Get(ctx context.Context, accountTag string, id string, query LogGetParams, opts ...option.RequestOption) (res *[]LogGetResponse, err error) { + opts = append(r.Options[:], opts...) + var env LogGetResponseEnvelope + path := fmt.Sprintf("accounts/%s/ai-gateway/gateways/%s/logs", accountTag, id) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +type LogGetResponse struct { + ID string `json:"id,required" format:"uuid"` + Cached bool `json:"cached,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Duration int64 `json:"duration,required"` + Model string `json:"model,required"` + Path string `json:"path,required"` + Provider string `json:"provider,required"` + Request string `json:"request,required"` + Response string `json:"response,required"` + Success bool `json:"success,required"` + TokensIn int64 `json:"tokens_in,required"` + TokensOut int64 `json:"tokens_out,required"` + JSON logGetResponseJSON `json:"-"` +} + +// logGetResponseJSON contains the JSON metadata for the struct [LogGetResponse] +type logGetResponseJSON struct { + ID apijson.Field + Cached apijson.Field + CreatedAt apijson.Field + Duration apijson.Field + Model apijson.Field + Path apijson.Field + Provider apijson.Field + Request apijson.Field + Response apijson.Field + Success apijson.Field + TokensIn apijson.Field + TokensOut apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LogGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r logGetResponseJSON) RawJSON() string { + return r.raw +} + +type LogGetParams struct { + Cached param.Field[bool] `query:"cached"` + Direction param.Field[LogGetParamsDirection] `query:"direction"` + EndDate param.Field[time.Time] `query:"end_date" format:"date-time"` + OrderBy param.Field[LogGetParamsOrderBy] `query:"order_by"` + Page param.Field[int64] `query:"page"` + PerPage param.Field[int64] `query:"per_page"` + Search param.Field[string] `query:"search"` + StartDate param.Field[time.Time] `query:"start_date" format:"date-time"` + Success param.Field[bool] `query:"success"` +} + +// URLQuery serializes [LogGetParams]'s query parameters as `url.Values`. +func (r LogGetParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatRepeat, + NestedFormat: apiquery.NestedQueryFormatBrackets, + }) +} + +type LogGetParamsDirection string + +const ( + LogGetParamsDirectionAsc LogGetParamsDirection = "asc" + LogGetParamsDirectionDesc LogGetParamsDirection = "desc" +) + +func (r LogGetParamsDirection) IsKnown() bool { + switch r { + case LogGetParamsDirectionAsc, LogGetParamsDirectionDesc: + return true + } + return false +} + +type LogGetParamsOrderBy string + +const ( + LogGetParamsOrderByCreatedAt LogGetParamsOrderBy = "created_at" + LogGetParamsOrderByProvider LogGetParamsOrderBy = "provider" +) + +func (r LogGetParamsOrderBy) IsKnown() bool { + switch r { + case LogGetParamsOrderByCreatedAt, LogGetParamsOrderByProvider: + return true + } + return false +} + +type LogGetResponseEnvelope struct { + Result []LogGetResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON logGetResponseEnvelopeJSON `json:"-"` +} + +// logGetResponseEnvelopeJSON contains the JSON metadata for the struct +// [LogGetResponseEnvelope] +type logGetResponseEnvelopeJSON struct { + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LogGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r logGetResponseEnvelopeJSON) RawJSON() string { + return r.raw +} diff --git a/workers/aigatewaylog_test.go b/ai_gateway/log_test.go similarity index 76% rename from workers/aigatewaylog_test.go rename to ai_gateway/log_test.go index b4f0e482de..7f6f0f5a7b 100644 --- a/workers/aigatewaylog_test.go +++ b/ai_gateway/log_test.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package workers_test +package ai_gateway_test import ( "context" @@ -10,12 +10,12 @@ import ( "time" "github.com/cloudflare/cloudflare-go/v2" + "github.com/cloudflare/cloudflare-go/v2/ai_gateway" "github.com/cloudflare/cloudflare-go/v2/internal/testutil" "github.com/cloudflare/cloudflare-go/v2/option" - "github.com/cloudflare/cloudflare-go/v2/workers" ) -func TestAIGatewayLogGetWithOptionalParams(t *testing.T) { +func TestLogGetWithOptionalParams(t *testing.T) { baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -28,15 +28,15 @@ func TestAIGatewayLogGetWithOptionalParams(t *testing.T) { option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), option.WithAPIEmail("user@example.com"), ) - _, err := client.Workers.AI.Gateways.Logs.Get( + _, err := client.AIGateway.Logs.Get( context.TODO(), "0d37909e38d3e99c29fa2cd343ac421a", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - workers.AIGatewayLogGetParams{ + ai_gateway.LogGetParams{ Cached: cloudflare.F(true), - Direction: cloudflare.F(workers.AIGatewayLogGetParamsDirectionAsc), + Direction: cloudflare.F(ai_gateway.LogGetParamsDirectionAsc), EndDate: cloudflare.F(time.Now()), - OrderBy: cloudflare.F(workers.AIGatewayLogGetParamsOrderByCreatedAt), + OrderBy: cloudflare.F(ai_gateway.LogGetParamsOrderByCreatedAt), Page: cloudflare.F(int64(1)), PerPage: cloudflare.F(int64(5)), Search: cloudflare.F("string"), diff --git a/api.md b/api.md index 395e27a567..fc2fbb34a2 100644 --- a/api.md +++ b/api.md @@ -2439,34 +2439,6 @@ Methods: - client.Workers.AI.Run(ctx context.Context, modelName string, params workers.AIRunParams) (workers.AIRunResponseUnion, error) -### Gateways - -Response Types: - -- workers.AIGatewayNewResponse -- workers.AIGatewayUpdateResponse -- workers.AIGatewayListResponse -- workers.AIGatewayDeleteResponse -- workers.AIGatewayGetResponse - -Methods: - -- client.Workers.AI.Gateways.New(ctx context.Context, accountTag string, body workers.AIGatewayNewParams) (workers.AIGatewayNewResponse, error) -- client.Workers.AI.Gateways.Update(ctx context.Context, accountTag string, id string, body workers.AIGatewayUpdateParams) (workers.AIGatewayUpdateResponse, error) -- client.Workers.AI.Gateways.List(ctx context.Context, accountTag string, query workers.AIGatewayListParams) (pagination.V4PagePaginationArray[workers.AIGatewayListResponse], error) -- client.Workers.AI.Gateways.Delete(ctx context.Context, accountTag string, id string) (workers.AIGatewayDeleteResponse, error) -- client.Workers.AI.Gateways.Get(ctx context.Context, accountTag string, id string) (workers.AIGatewayGetResponse, error) - -#### Logs - -Response Types: - -- workers.AIGatewayLogGetResponse - -Methods: - -- client.Workers.AI.Gateways.Logs.Get(ctx context.Context, accountTag string, id string, query workers.AIGatewayLogGetParams) ([]workers.AIGatewayLogGetResponse, error) - ## Scripts Params Types: @@ -6841,3 +6813,31 @@ Methods: - client.EventNotifications.R2.Configuration.Queues.Update(ctx context.Context, bucketName string, queueID string, params event_notifications.R2ConfigurationQueueUpdateParams) (event_notifications.R2ConfigurationQueueUpdateResponse, error) - client.EventNotifications.R2.Configuration.Queues.Delete(ctx context.Context, bucketName string, queueID string, body event_notifications.R2ConfigurationQueueDeleteParams) (event_notifications.R2ConfigurationQueueDeleteResponseUnion, error) + +# AIGateway + +Response Types: + +- ai_gateway.AIGatewayNewResponse +- ai_gateway.AIGatewayUpdateResponse +- ai_gateway.AIGatewayListResponse +- ai_gateway.AIGatewayDeleteResponse +- ai_gateway.AIGatewayGetResponse + +Methods: + +- client.AIGateway.New(ctx context.Context, accountTag string, body ai_gateway.AIGatewayNewParams) (ai_gateway.AIGatewayNewResponse, error) +- client.AIGateway.Update(ctx context.Context, accountTag string, id string, body ai_gateway.AIGatewayUpdateParams) (ai_gateway.AIGatewayUpdateResponse, error) +- client.AIGateway.List(ctx context.Context, accountTag string, query ai_gateway.AIGatewayListParams) (pagination.V4PagePaginationArray[ai_gateway.AIGatewayListResponse], error) +- client.AIGateway.Delete(ctx context.Context, accountTag string, id string) (ai_gateway.AIGatewayDeleteResponse, error) +- client.AIGateway.Get(ctx context.Context, accountTag string, id string) (ai_gateway.AIGatewayGetResponse, error) + +## Logs + +Response Types: + +- ai_gateway.LogGetResponse + +Methods: + +- client.AIGateway.Logs.Get(ctx context.Context, accountTag string, id string, query ai_gateway.LogGetParams) ([]ai_gateway.LogGetResponse, error) diff --git a/client.go b/client.go index 64360fdeda..7688d13343 100644 --- a/client.go +++ b/client.go @@ -10,6 +10,7 @@ import ( "github.com/cloudflare/cloudflare-go/v2/accounts" "github.com/cloudflare/cloudflare-go/v2/acm" "github.com/cloudflare/cloudflare-go/v2/addressing" + "github.com/cloudflare/cloudflare-go/v2/ai_gateway" "github.com/cloudflare/cloudflare-go/v2/alerting" "github.com/cloudflare/cloudflare-go/v2/argo" "github.com/cloudflare/cloudflare-go/v2/audit_logs" @@ -178,6 +179,7 @@ type Client struct { Calls *calls.CallService CloudforceOne *cloudforce_one.CloudforceOneService EventNotifications *event_notifications.EventNotificationService + AIGateway *ai_gateway.AIGatewayService } // NewClient generates a new client with the default option read from the @@ -284,6 +286,7 @@ func NewClient(opts ...option.RequestOption) (r *Client) { r.Calls = calls.NewCallService(opts...) r.CloudforceOne = cloudforce_one.NewCloudforceOneService(opts...) r.EventNotifications = event_notifications.NewEventNotificationService(opts...) + r.AIGateway = ai_gateway.NewAIGatewayService(opts...) return } diff --git a/workers/ai.go b/workers/ai.go index 8d4c4389ea..274b13f36f 100644 --- a/workers/ai.go +++ b/workers/ai.go @@ -21,8 +21,7 @@ import ( // from the environment automatically. You should not instantiate this service // directly, and instead use the [NewAIService] method instead. type AIService struct { - Options []option.RequestOption - Gateways *AIGatewayService + Options []option.RequestOption } // NewAIService generates a new service that applies the given options to each @@ -31,7 +30,6 @@ type AIService struct { func NewAIService(opts ...option.RequestOption) (r *AIService) { r = &AIService{} r.Options = opts - r.Gateways = NewAIGatewayService(opts...) return } diff --git a/workers/aigatewaylog.go b/workers/aigatewaylog.go deleted file mode 100644 index 27a9bd9f04..0000000000 --- a/workers/aigatewaylog.go +++ /dev/null @@ -1,164 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -package workers - -import ( - "context" - "fmt" - "net/http" - "net/url" - "time" - - "github.com/cloudflare/cloudflare-go/v2/internal/apijson" - "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" - "github.com/cloudflare/cloudflare-go/v2/internal/param" - "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" - "github.com/cloudflare/cloudflare-go/v2/option" -) - -// AIGatewayLogService contains methods and other services that help with -// interacting with the cloudflare API. Note, unlike clients, this service does not -// read variables from the environment automatically. You should not instantiate -// this service directly, and instead use the [NewAIGatewayLogService] method -// instead. -type AIGatewayLogService struct { - Options []option.RequestOption -} - -// NewAIGatewayLogService generates a new service that applies the given options to -// each request. These options are applied after the parent client's options (if -// there is one), and before any request-specific options. -func NewAIGatewayLogService(opts ...option.RequestOption) (r *AIGatewayLogService) { - r = &AIGatewayLogService{} - r.Options = opts - return -} - -// List Gateway Logs -func (r *AIGatewayLogService) Get(ctx context.Context, accountTag string, id string, query AIGatewayLogGetParams, opts ...option.RequestOption) (res *[]AIGatewayLogGetResponse, err error) { - opts = append(r.Options[:], opts...) - var env AIGatewayLogGetResponseEnvelope - path := fmt.Sprintf("accounts/%s/ai-gateway/gateways/%s/logs", accountTag, id) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -type AIGatewayLogGetResponse struct { - ID string `json:"id,required" format:"uuid"` - Cached bool `json:"cached,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Duration int64 `json:"duration,required"` - Model string `json:"model,required"` - Path string `json:"path,required"` - Provider string `json:"provider,required"` - Request string `json:"request,required"` - Response string `json:"response,required"` - Success bool `json:"success,required"` - TokensIn int64 `json:"tokens_in,required"` - TokensOut int64 `json:"tokens_out,required"` - JSON aiGatewayLogGetResponseJSON `json:"-"` -} - -// aiGatewayLogGetResponseJSON contains the JSON metadata for the struct -// [AIGatewayLogGetResponse] -type aiGatewayLogGetResponseJSON struct { - ID apijson.Field - Cached apijson.Field - CreatedAt apijson.Field - Duration apijson.Field - Model apijson.Field - Path apijson.Field - Provider apijson.Field - Request apijson.Field - Response apijson.Field - Success apijson.Field - TokensIn apijson.Field - TokensOut apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *AIGatewayLogGetResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r aiGatewayLogGetResponseJSON) RawJSON() string { - return r.raw -} - -type AIGatewayLogGetParams struct { - Cached param.Field[bool] `query:"cached"` - Direction param.Field[AIGatewayLogGetParamsDirection] `query:"direction"` - EndDate param.Field[time.Time] `query:"end_date" format:"date-time"` - OrderBy param.Field[AIGatewayLogGetParamsOrderBy] `query:"order_by"` - Page param.Field[int64] `query:"page"` - PerPage param.Field[int64] `query:"per_page"` - Search param.Field[string] `query:"search"` - StartDate param.Field[time.Time] `query:"start_date" format:"date-time"` - Success param.Field[bool] `query:"success"` -} - -// URLQuery serializes [AIGatewayLogGetParams]'s query parameters as `url.Values`. -func (r AIGatewayLogGetParams) URLQuery() (v url.Values) { - return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ - ArrayFormat: apiquery.ArrayQueryFormatRepeat, - NestedFormat: apiquery.NestedQueryFormatBrackets, - }) -} - -type AIGatewayLogGetParamsDirection string - -const ( - AIGatewayLogGetParamsDirectionAsc AIGatewayLogGetParamsDirection = "asc" - AIGatewayLogGetParamsDirectionDesc AIGatewayLogGetParamsDirection = "desc" -) - -func (r AIGatewayLogGetParamsDirection) IsKnown() bool { - switch r { - case AIGatewayLogGetParamsDirectionAsc, AIGatewayLogGetParamsDirectionDesc: - return true - } - return false -} - -type AIGatewayLogGetParamsOrderBy string - -const ( - AIGatewayLogGetParamsOrderByCreatedAt AIGatewayLogGetParamsOrderBy = "created_at" - AIGatewayLogGetParamsOrderByProvider AIGatewayLogGetParamsOrderBy = "provider" -) - -func (r AIGatewayLogGetParamsOrderBy) IsKnown() bool { - switch r { - case AIGatewayLogGetParamsOrderByCreatedAt, AIGatewayLogGetParamsOrderByProvider: - return true - } - return false -} - -type AIGatewayLogGetResponseEnvelope struct { - Result []AIGatewayLogGetResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON aiGatewayLogGetResponseEnvelopeJSON `json:"-"` -} - -// aiGatewayLogGetResponseEnvelopeJSON contains the JSON metadata for the struct -// [AIGatewayLogGetResponseEnvelope] -type aiGatewayLogGetResponseEnvelopeJSON struct { - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *AIGatewayLogGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r aiGatewayLogGetResponseEnvelopeJSON) RawJSON() string { - return r.raw -} From b96b046488283635fb880a7e7cafe0faa8a0379a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 08:19:04 +0000 Subject: [PATCH 100/127] feat(api): OpenAPI spec update via Stainless API (#1947) --- .stats.yml | 2 +- api.md | 12 +-- cloudforce_one/request.go | 132 +++++++++++++++++++----------- cloudforce_one/requestmessage.go | 119 +++++++++++++++++---------- cloudforce_one/requestpriority.go | 123 ++++++++++++++++++---------- intel/whois.go | 4 +- shared/union.go | 3 + 7 files changed, 251 insertions(+), 144 deletions(-) diff --git a/.stats.yml b/.stats.yml index b07651d49a..0a8ec994c1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1275 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ecba01cd225d19e1decd3caa323399e3f580a2abbdd4a756fa536063651facee.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e0f14b3972aa9a5ae69697fce41ee4de0f7c39ead64f2b6c27434037717a30e5.yml diff --git a/api.md b/api.md index fc2fbb34a2..6ed6760d83 100644 --- a/api.md +++ b/api.md @@ -6740,14 +6740,14 @@ Response Types: - cloudforce_one.Quota - cloudforce_one.RequestConstants - cloudforce_one.RequestTypes -- cloudforce_one.RequestDeleteResponse +- cloudforce_one.RequestDeleteResponseUnion Methods: - client.CloudforceOne.Requests.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestNewParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestUpdateParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.List(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestListParams) (pagination.V4PagePaginationArray[cloudforce_one.ListItem], error) -- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponse, error) +- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponseUnion, error) - client.CloudforceOne.Requests.Constants(ctx context.Context, accountIdentifier string) (cloudforce_one.RequestConstants, error) - client.CloudforceOne.Requests.Get(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) @@ -6758,13 +6758,13 @@ Methods: Response Types: - cloudforce_one.Message -- cloudforce_one.RequestMessageDeleteResponse +- cloudforce_one.RequestMessageDeleteResponseUnion Methods: - client.CloudforceOne.Requests.Message.New(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageNewParams) (cloudforce_one.Message, error) - client.CloudforceOne.Requests.Message.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, body cloudforce_one.RequestMessageUpdateParams) (cloudforce_one.Message, error) -- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponse, error) +- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponseUnion, error) - client.CloudforceOne.Requests.Message.Get(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageGetParams) ([]cloudforce_one.Message, error) ### Priority @@ -6778,13 +6778,13 @@ Response Types: - cloudforce_one.Label - cloudforce_one.Priority -- cloudforce_one.RequestPriorityDeleteResponse +- cloudforce_one.RequestPriorityDeleteResponseUnion Methods: - client.CloudforceOne.Requests.Priority.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestPriorityNewParams) (cloudforce_one.Priority, error) - client.CloudforceOne.Requests.Priority.Update(ctx context.Context, accountIdentifier string, priorityIdentifer string, body cloudforce_one.RequestPriorityUpdateParams) (cloudforce_one.Item, error) -- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponse, error) +- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponseUnion, error) - client.CloudforceOne.Requests.Priority.Get(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Priority.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) diff --git a/cloudforce_one/request.go b/cloudforce_one/request.go index a5865d5f35..ce028e3612 100644 --- a/cloudforce_one/request.go +++ b/cloudforce_one/request.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/option" "github.com/cloudflare/cloudflare-go/v2/shared" + "github.com/tidwall/gjson" ) // RequestService contains methods and other services that help with interacting @@ -91,10 +93,15 @@ func (r *RequestService) ListAutoPaging(ctx context.Context, accountIdentifier s } // Delete a Request -func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponse, err error) { +func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) + var env RequestDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s", accountIdentifier, requestIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result return } @@ -462,46 +469,30 @@ func (r RequestConstantsTlp) IsKnown() bool { type RequestTypes []string -type RequestDeleteResponse struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success RequestDeleteResponseSuccess `json:"success,required"` - JSON requestDeleteResponseJSON `json:"-"` -} - -// requestDeleteResponseJSON contains the JSON metadata for the struct -// [RequestDeleteResponse] -type requestDeleteResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) +// Union satisfied by [cloudforce_one.RequestDeleteResponseUnknown], +// [cloudforce_one.RequestDeleteResponseArray] or [shared.UnionString]. +type RequestDeleteResponseUnion interface { + ImplementsCloudforceOneRequestDeleteResponseUnion() } -func (r requestDeleteResponseJSON) RawJSON() string { - return r.raw +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*RequestDeleteResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(RequestDeleteResponseArray{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) } -// Whether the API call was successful -type RequestDeleteResponseSuccess bool +type RequestDeleteResponseArray []interface{} -const ( - RequestDeleteResponseSuccessTrue RequestDeleteResponseSuccess = true -) - -func (r RequestDeleteResponseSuccess) IsKnown() bool { - switch r { - case RequestDeleteResponseSuccessTrue: - return true - } - return false -} +func (r RequestDeleteResponseArray) ImplementsCloudforceOneRequestDeleteResponseUnion() {} type RequestNewParams struct { // Request content @@ -542,9 +533,9 @@ func (r RequestNewParamsTlp) IsKnown() bool { type RequestNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestNewResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestNewResponseEnvelopeJSON `json:"-"` } @@ -553,8 +544,8 @@ type RequestNewResponseEnvelope struct { type requestNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -621,9 +612,9 @@ func (r RequestUpdateParamsTlp) IsKnown() bool { type RequestUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestUpdateResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestUpdateResponseEnvelopeJSON `json:"-"` } @@ -632,8 +623,8 @@ type RequestUpdateResponseEnvelope struct { type requestUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -724,12 +715,55 @@ func (r RequestListParamsStatus) IsKnown() bool { return false } +type RequestDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestDeleteResponseUnion `json:"result,required"` + // Whether the API call was successful + Success RequestDeleteResponseEnvelopeSuccess `json:"success,required"` + JSON requestDeleteResponseEnvelopeJSON `json:"-"` +} + +// requestDeleteResponseEnvelopeJSON contains the JSON metadata for the struct +// [RequestDeleteResponseEnvelope] +type requestDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r requestDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestDeleteResponseEnvelopeSuccess bool + +const ( + RequestDeleteResponseEnvelopeSuccessTrue RequestDeleteResponseEnvelopeSuccess = true +) + +func (r RequestDeleteResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case RequestDeleteResponseEnvelopeSuccessTrue: + return true + } + return false +} + type RequestConstantsResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestConstants `json:"result,required"` // Whether the API call was successful Success RequestConstantsResponseEnvelopeSuccess `json:"success,required"` - Result RequestConstants `json:"result"` JSON requestConstantsResponseEnvelopeJSON `json:"-"` } @@ -738,8 +772,8 @@ type RequestConstantsResponseEnvelope struct { type requestConstantsResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -770,9 +804,9 @@ func (r RequestConstantsResponseEnvelopeSuccess) IsKnown() bool { type RequestGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestGetResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestGetResponseEnvelopeJSON `json:"-"` } @@ -781,8 +815,8 @@ type RequestGetResponseEnvelope struct { type requestGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -813,9 +847,9 @@ func (r RequestGetResponseEnvelopeSuccess) IsKnown() bool { type RequestQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Quota `json:"result,required"` // Whether the API call was successful Success RequestQuotaResponseEnvelopeSuccess `json:"success,required"` - Result Quota `json:"result"` JSON requestQuotaResponseEnvelopeJSON `json:"-"` } @@ -824,8 +858,8 @@ type RequestQuotaResponseEnvelope struct { type requestQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -856,9 +890,9 @@ func (r RequestQuotaResponseEnvelopeSuccess) IsKnown() bool { type RequestTypesResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestTypes `json:"result,required"` // Whether the API call was successful Success RequestTypesResponseEnvelopeSuccess `json:"success,required"` - Result RequestTypes `json:"result"` JSON requestTypesResponseEnvelopeJSON `json:"-"` } @@ -867,8 +901,8 @@ type RequestTypesResponseEnvelope struct { type requestTypesResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestmessage.go b/cloudforce_one/requestmessage.go index f3949be2ee..b5a88e43b5 100644 --- a/cloudforce_one/requestmessage.go +++ b/cloudforce_one/requestmessage.go @@ -6,6 +6,7 @@ import ( "context" "fmt" "net/http" + "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -13,6 +14,7 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" + "github.com/tidwall/gjson" ) // RequestMessageService contains methods and other services that help with @@ -62,10 +64,15 @@ func (r *RequestMessageService) Update(ctx context.Context, accountIdentifier st } // Delete a Request Message -func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponse, err error) { +func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) + var env RequestMessageDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s/message/%v", accountIdentifier, requestIdentifier, messageIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result return } @@ -118,45 +125,30 @@ func (r messageJSON) RawJSON() string { return r.raw } -type RequestMessageDeleteResponse struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success RequestMessageDeleteResponseSuccess `json:"success,required"` - JSON requestMessageDeleteResponseJSON `json:"-"` -} - -// requestMessageDeleteResponseJSON contains the JSON metadata for the struct -// [RequestMessageDeleteResponse] -type requestMessageDeleteResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestMessageDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) +// Union satisfied by [cloudforce_one.RequestMessageDeleteResponseUnknown], +// [cloudforce_one.RequestMessageDeleteResponseArray] or [shared.UnionString]. +type RequestMessageDeleteResponseUnion interface { + ImplementsCloudforceOneRequestMessageDeleteResponseUnion() } -func (r requestMessageDeleteResponseJSON) RawJSON() string { - return r.raw +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*RequestMessageDeleteResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(RequestMessageDeleteResponseArray{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) } -// Whether the API call was successful -type RequestMessageDeleteResponseSuccess bool - -const ( - RequestMessageDeleteResponseSuccessTrue RequestMessageDeleteResponseSuccess = true -) +type RequestMessageDeleteResponseArray []interface{} -func (r RequestMessageDeleteResponseSuccess) IsKnown() bool { - switch r { - case RequestMessageDeleteResponseSuccessTrue: - return true - } - return false +func (r RequestMessageDeleteResponseArray) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() { } type RequestMessageNewParams struct { @@ -171,9 +163,9 @@ func (r RequestMessageNewParams) MarshalJSON() (data []byte, err error) { type RequestMessageNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageNewResponseEnvelopeSuccess `json:"success,required"` - Result Message `json:"result"` JSON requestMessageNewResponseEnvelopeJSON `json:"-"` } @@ -182,8 +174,8 @@ type RequestMessageNewResponseEnvelope struct { type requestMessageNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -250,9 +242,9 @@ func (r RequestMessageUpdateParamsTlp) IsKnown() bool { type RequestMessageUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageUpdateResponseEnvelopeSuccess `json:"success,required"` - Result Message `json:"result"` JSON requestMessageUpdateResponseEnvelopeJSON `json:"-"` } @@ -261,8 +253,8 @@ type RequestMessageUpdateResponseEnvelope struct { type requestMessageUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -290,6 +282,49 @@ func (r RequestMessageUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } +type RequestMessageDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestMessageDeleteResponseUnion `json:"result,required"` + // Whether the API call was successful + Success RequestMessageDeleteResponseEnvelopeSuccess `json:"success,required"` + JSON requestMessageDeleteResponseEnvelopeJSON `json:"-"` +} + +// requestMessageDeleteResponseEnvelopeJSON contains the JSON metadata for the +// struct [RequestMessageDeleteResponseEnvelope] +type requestMessageDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestMessageDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r requestMessageDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestMessageDeleteResponseEnvelopeSuccess bool + +const ( + RequestMessageDeleteResponseEnvelopeSuccessTrue RequestMessageDeleteResponseEnvelopeSuccess = true +) + +func (r RequestMessageDeleteResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case RequestMessageDeleteResponseEnvelopeSuccessTrue: + return true + } + return false +} + type RequestMessageGetParams struct { // Page number of results Page param.Field[int64] `json:"page,required"` @@ -328,9 +363,9 @@ func (r RequestMessageGetParamsSortOrder) IsKnown() bool { type RequestMessageGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result []Message `json:"result,required"` // Whether the API call was successful Success RequestMessageGetResponseEnvelopeSuccess `json:"success,required"` - Result []Message `json:"result"` JSON requestMessageGetResponseEnvelopeJSON `json:"-"` } @@ -339,8 +374,8 @@ type RequestMessageGetResponseEnvelope struct { type requestMessageGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestpriority.go b/cloudforce_one/requestpriority.go index eef29460bf..702df8b577 100644 --- a/cloudforce_one/requestpriority.go +++ b/cloudforce_one/requestpriority.go @@ -6,6 +6,7 @@ import ( "context" "fmt" "net/http" + "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -13,6 +14,7 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" + "github.com/tidwall/gjson" ) // RequestPriorityService contains methods and other services that help with @@ -60,10 +62,15 @@ func (r *RequestPriorityService) Update(ctx context.Context, accountIdentifier s } // Delete a Priority Intelligence Report -func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponse, err error) { +func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) + var env RequestPriorityDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/priority/%s", accountIdentifier, priorityIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result return } @@ -189,45 +196,30 @@ func (r PriorityEditTlp) IsKnown() bool { return false } -type RequestPriorityDeleteResponse struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success RequestPriorityDeleteResponseSuccess `json:"success,required"` - JSON requestPriorityDeleteResponseJSON `json:"-"` +// Union satisfied by [cloudforce_one.RequestPriorityDeleteResponseUnknown], +// [cloudforce_one.RequestPriorityDeleteResponseArray] or [shared.UnionString]. +type RequestPriorityDeleteResponseUnion interface { + ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() } -// requestPriorityDeleteResponseJSON contains the JSON metadata for the struct -// [RequestPriorityDeleteResponse] -type requestPriorityDeleteResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*RequestPriorityDeleteResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(RequestPriorityDeleteResponseArray{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) } -func (r *RequestPriorityDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} +type RequestPriorityDeleteResponseArray []interface{} -func (r requestPriorityDeleteResponseJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestPriorityDeleteResponseSuccess bool - -const ( - RequestPriorityDeleteResponseSuccessTrue RequestPriorityDeleteResponseSuccess = true -) - -func (r RequestPriorityDeleteResponseSuccess) IsKnown() bool { - switch r { - case RequestPriorityDeleteResponseSuccessTrue: - return true - } - return false +func (r RequestPriorityDeleteResponseArray) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() { } type RequestPriorityNewParams struct { @@ -241,9 +233,9 @@ func (r RequestPriorityNewParams) MarshalJSON() (data []byte, err error) { type RequestPriorityNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Priority `json:"result,required"` // Whether the API call was successful Success RequestPriorityNewResponseEnvelopeSuccess `json:"success,required"` - Result Priority `json:"result"` JSON requestPriorityNewResponseEnvelopeJSON `json:"-"` } @@ -252,8 +244,8 @@ type RequestPriorityNewResponseEnvelope struct { type requestPriorityNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -292,9 +284,9 @@ func (r RequestPriorityUpdateParams) MarshalJSON() (data []byte, err error) { type RequestPriorityUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityUpdateResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestPriorityUpdateResponseEnvelopeJSON `json:"-"` } @@ -303,8 +295,8 @@ type RequestPriorityUpdateResponseEnvelope struct { type requestPriorityUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -332,12 +324,55 @@ func (r RequestPriorityUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } +type RequestPriorityDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestPriorityDeleteResponseUnion `json:"result,required"` + // Whether the API call was successful + Success RequestPriorityDeleteResponseEnvelopeSuccess `json:"success,required"` + JSON requestPriorityDeleteResponseEnvelopeJSON `json:"-"` +} + +// requestPriorityDeleteResponseEnvelopeJSON contains the JSON metadata for the +// struct [RequestPriorityDeleteResponseEnvelope] +type requestPriorityDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestPriorityDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r requestPriorityDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestPriorityDeleteResponseEnvelopeSuccess bool + +const ( + RequestPriorityDeleteResponseEnvelopeSuccessTrue RequestPriorityDeleteResponseEnvelopeSuccess = true +) + +func (r RequestPriorityDeleteResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case RequestPriorityDeleteResponseEnvelopeSuccessTrue: + return true + } + return false +} + type RequestPriorityGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityGetResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestPriorityGetResponseEnvelopeJSON `json:"-"` } @@ -346,8 +381,8 @@ type RequestPriorityGetResponseEnvelope struct { type requestPriorityGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -378,9 +413,9 @@ func (r RequestPriorityGetResponseEnvelopeSuccess) IsKnown() bool { type RequestPriorityQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Quota `json:"result,required"` // Whether the API call was successful Success RequestPriorityQuotaResponseEnvelopeSuccess `json:"success,required"` - Result Quota `json:"result"` JSON requestPriorityQuotaResponseEnvelopeJSON `json:"-"` } @@ -389,8 +424,8 @@ type RequestPriorityQuotaResponseEnvelope struct { type requestPriorityQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/intel/whois.go b/intel/whois.go index 5655c7c1a8..ece63a5b8f 100644 --- a/intel/whois.go +++ b/intel/whois.go @@ -259,9 +259,9 @@ func (r WhoisGetParams) URLQuery() (v url.Values) { type WhoisGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result WhoisGetResponse `json:"result,required"` // Whether the API call was successful Success WhoisGetResponseEnvelopeSuccess `json:"success,required"` - Result WhoisGetResponse `json:"result"` JSON whoisGetResponseEnvelopeJSON `json:"-"` } @@ -270,8 +270,8 @@ type WhoisGetResponseEnvelope struct { type whoisGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/shared/union.go b/shared/union.go index 212561aacd..7537786749 100644 --- a/shared/union.go +++ b/shared/union.go @@ -166,6 +166,9 @@ func (UnionString) ImplementsOriginPostQuantumEncryptionOriginPostQuantumEncrypt } func (UnionString) ImplementsHostnamesSettingValueUnionParam() {} func (UnionString) ImplementsHostnamesSettingValueUnion() {} +func (UnionString) ImplementsCloudforceOneRequestDeleteResponseUnion() {} +func (UnionString) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() {} +func (UnionString) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() {} func (UnionString) ImplementsEventNotificationsR2ConfigurationQueueDeleteResponseUnion() {} type UnionInt int64 From cda1d9890aa6f5a1bc8857cf859b94231cc67e06 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 10:34:20 +0000 Subject: [PATCH 101/127] feat(api): OpenAPI spec update via Stainless API (#1948) --- .stats.yml | 4 +- ai_gateway/aigateway.go | 450 ------------------------------ ai_gateway/aigateway_test.go | 174 ------------ ai_gateway/log.go | 138 --------- ai_gateway/log_test.go | 54 ---- api.md | 36 +-- cloudforce_one/request.go | 132 ++++----- cloudforce_one/requestmessage.go | 119 +++----- cloudforce_one/requestpriority.go | 123 +++----- intel/whois.go | 4 +- shared/union.go | 3 - 11 files changed, 145 insertions(+), 1092 deletions(-) delete mode 100644 ai_gateway/aigateway_test.go delete mode 100644 ai_gateway/log_test.go diff --git a/.stats.yml b/.stats.yml index 0a8ec994c1..48dcd91750 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1275 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e0f14b3972aa9a5ae69697fce41ee4de0f7c39ead64f2b6c27434037717a30e5.yml +configured_endpoints: 1269 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-66b404214530cc73c44f34f297dad6bc8da0645b63e61d9d4fcbeb301e127e65.yml diff --git a/ai_gateway/aigateway.go b/ai_gateway/aigateway.go index 77312b89cd..57bebfc4f7 100644 --- a/ai_gateway/aigateway.go +++ b/ai_gateway/aigateway.go @@ -3,17 +3,6 @@ package ai_gateway import ( - "context" - "fmt" - "net/http" - "net/url" - "time" - - "github.com/cloudflare/cloudflare-go/v2/internal/apijson" - "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" - "github.com/cloudflare/cloudflare-go/v2/internal/pagination" - "github.com/cloudflare/cloudflare-go/v2/internal/param" - "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" ) @@ -35,442 +24,3 @@ func NewAIGatewayService(opts ...option.RequestOption) (r *AIGatewayService) { r.Logs = NewLogService(opts...) return } - -// Create a new Gateway -func (r *AIGatewayService) New(ctx context.Context, accountTag string, body AIGatewayNewParams, opts ...option.RequestOption) (res *AIGatewayNewResponse, err error) { - opts = append(r.Options[:], opts...) - var env AIGatewayNewResponseEnvelope - path := fmt.Sprintf("accounts/%s/ai-gateway/gateways", accountTag) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// Update a Gateway -func (r *AIGatewayService) Update(ctx context.Context, accountTag string, id string, body AIGatewayUpdateParams, opts ...option.RequestOption) (res *AIGatewayUpdateResponse, err error) { - opts = append(r.Options[:], opts...) - var env AIGatewayUpdateResponseEnvelope - path := fmt.Sprintf("accounts/%s/ai-gateway/gateways/%s", accountTag, id) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// List Gateway's -func (r *AIGatewayService) List(ctx context.Context, accountTag string, query AIGatewayListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[AIGatewayListResponse], err error) { - var raw *http.Response - opts = append(r.Options, opts...) - opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) - path := fmt.Sprintf("accounts/%s/ai-gateway/gateways", accountTag) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...) - if err != nil { - return nil, err - } - err = cfg.Execute() - if err != nil { - return nil, err - } - res.SetPageConfig(cfg, raw) - return res, nil -} - -// List Gateway's -func (r *AIGatewayService) ListAutoPaging(ctx context.Context, accountTag string, query AIGatewayListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[AIGatewayListResponse] { - return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, accountTag, query, opts...)) -} - -// Delete a Gateway -func (r *AIGatewayService) Delete(ctx context.Context, accountTag string, id string, opts ...option.RequestOption) (res *AIGatewayDeleteResponse, err error) { - opts = append(r.Options[:], opts...) - var env AIGatewayDeleteResponseEnvelope - path := fmt.Sprintf("accounts/%s/ai-gateway/gateways/%s", accountTag, id) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// Fetch a Gateway -func (r *AIGatewayService) Get(ctx context.Context, accountTag string, id string, opts ...option.RequestOption) (res *AIGatewayGetResponse, err error) { - opts = append(r.Options[:], opts...) - var env AIGatewayGetResponseEnvelope - path := fmt.Sprintf("accounts/%s/ai-gateway/gateways/%s", accountTag, id) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -type AIGatewayNewResponse struct { - Task AIGatewayNewResponseTask `json:"task,required"` - JSON aiGatewayNewResponseJSON `json:"-"` -} - -// aiGatewayNewResponseJSON contains the JSON metadata for the struct -// [AIGatewayNewResponse] -type aiGatewayNewResponseJSON struct { - Task apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *AIGatewayNewResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r aiGatewayNewResponseJSON) RawJSON() string { - return r.raw -} - -type AIGatewayNewResponseTask struct { - ID string `json:"id,required" format:"uuid"` - CacheInvalidateOnUpdate bool `json:"cache_invalidate_on_update,required"` - CacheTTL int64 `json:"cache_ttl,required"` - CollectLogs bool `json:"collect_logs,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - ModifiedAt time.Time `json:"modified_at,required" format:"date-time"` - Name string `json:"name,required"` - Slug string `json:"slug,required"` - RateLimitingInterval int64 `json:"rate_limiting_interval"` - RateLimitingLimit int64 `json:"rate_limiting_limit"` - RateLimitingTechnique string `json:"rate_limiting_technique"` - JSON aiGatewayNewResponseTaskJSON `json:"-"` -} - -// aiGatewayNewResponseTaskJSON contains the JSON metadata for the struct -// [AIGatewayNewResponseTask] -type aiGatewayNewResponseTaskJSON struct { - ID apijson.Field - CacheInvalidateOnUpdate apijson.Field - CacheTTL apijson.Field - CollectLogs apijson.Field - CreatedAt apijson.Field - ModifiedAt apijson.Field - Name apijson.Field - Slug apijson.Field - RateLimitingInterval apijson.Field - RateLimitingLimit apijson.Field - RateLimitingTechnique apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *AIGatewayNewResponseTask) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r aiGatewayNewResponseTaskJSON) RawJSON() string { - return r.raw -} - -type AIGatewayUpdateResponse struct { - ID string `json:"id,required" format:"uuid"` - CacheInvalidateOnUpdate bool `json:"cache_invalidate_on_update,required"` - CacheTTL int64 `json:"cache_ttl,required"` - CollectLogs bool `json:"collect_logs,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - ModifiedAt time.Time `json:"modified_at,required" format:"date-time"` - Name string `json:"name,required"` - Slug string `json:"slug,required"` - RateLimitingInterval int64 `json:"rate_limiting_interval"` - RateLimitingLimit int64 `json:"rate_limiting_limit"` - RateLimitingTechnique string `json:"rate_limiting_technique"` - JSON aiGatewayUpdateResponseJSON `json:"-"` -} - -// aiGatewayUpdateResponseJSON contains the JSON metadata for the struct -// [AIGatewayUpdateResponse] -type aiGatewayUpdateResponseJSON struct { - ID apijson.Field - CacheInvalidateOnUpdate apijson.Field - CacheTTL apijson.Field - CollectLogs apijson.Field - CreatedAt apijson.Field - ModifiedAt apijson.Field - Name apijson.Field - Slug apijson.Field - RateLimitingInterval apijson.Field - RateLimitingLimit apijson.Field - RateLimitingTechnique apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *AIGatewayUpdateResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r aiGatewayUpdateResponseJSON) RawJSON() string { - return r.raw -} - -type AIGatewayListResponse struct { - ID string `json:"id,required" format:"uuid"` - CacheInvalidateOnUpdate bool `json:"cache_invalidate_on_update,required"` - CacheTTL int64 `json:"cache_ttl,required"` - CollectLogs bool `json:"collect_logs,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - ModifiedAt time.Time `json:"modified_at,required" format:"date-time"` - Name string `json:"name,required"` - Slug string `json:"slug,required"` - RateLimitingInterval int64 `json:"rate_limiting_interval"` - RateLimitingLimit int64 `json:"rate_limiting_limit"` - RateLimitingTechnique string `json:"rate_limiting_technique"` - JSON aiGatewayListResponseJSON `json:"-"` -} - -// aiGatewayListResponseJSON contains the JSON metadata for the struct -// [AIGatewayListResponse] -type aiGatewayListResponseJSON struct { - ID apijson.Field - CacheInvalidateOnUpdate apijson.Field - CacheTTL apijson.Field - CollectLogs apijson.Field - CreatedAt apijson.Field - ModifiedAt apijson.Field - Name apijson.Field - Slug apijson.Field - RateLimitingInterval apijson.Field - RateLimitingLimit apijson.Field - RateLimitingTechnique apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *AIGatewayListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r aiGatewayListResponseJSON) RawJSON() string { - return r.raw -} - -type AIGatewayDeleteResponse struct { - ID string `json:"id,required" format:"uuid"` - CacheInvalidateOnUpdate bool `json:"cache_invalidate_on_update,required"` - CacheTTL int64 `json:"cache_ttl,required"` - CollectLogs bool `json:"collect_logs,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - ModifiedAt time.Time `json:"modified_at,required" format:"date-time"` - Name string `json:"name,required"` - Slug string `json:"slug,required"` - RateLimitingInterval int64 `json:"rate_limiting_interval"` - RateLimitingLimit int64 `json:"rate_limiting_limit"` - RateLimitingTechnique string `json:"rate_limiting_technique"` - JSON aiGatewayDeleteResponseJSON `json:"-"` -} - -// aiGatewayDeleteResponseJSON contains the JSON metadata for the struct -// [AIGatewayDeleteResponse] -type aiGatewayDeleteResponseJSON struct { - ID apijson.Field - CacheInvalidateOnUpdate apijson.Field - CacheTTL apijson.Field - CollectLogs apijson.Field - CreatedAt apijson.Field - ModifiedAt apijson.Field - Name apijson.Field - Slug apijson.Field - RateLimitingInterval apijson.Field - RateLimitingLimit apijson.Field - RateLimitingTechnique apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *AIGatewayDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r aiGatewayDeleteResponseJSON) RawJSON() string { - return r.raw -} - -type AIGatewayGetResponse struct { - ID string `json:"id,required" format:"uuid"` - CacheInvalidateOnUpdate bool `json:"cache_invalidate_on_update,required"` - CacheTTL int64 `json:"cache_ttl,required"` - CollectLogs bool `json:"collect_logs,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - ModifiedAt time.Time `json:"modified_at,required" format:"date-time"` - Name string `json:"name,required"` - Slug string `json:"slug,required"` - RateLimitingInterval int64 `json:"rate_limiting_interval"` - RateLimitingLimit int64 `json:"rate_limiting_limit"` - RateLimitingTechnique string `json:"rate_limiting_technique"` - JSON aiGatewayGetResponseJSON `json:"-"` -} - -// aiGatewayGetResponseJSON contains the JSON metadata for the struct -// [AIGatewayGetResponse] -type aiGatewayGetResponseJSON struct { - ID apijson.Field - CacheInvalidateOnUpdate apijson.Field - CacheTTL apijson.Field - CollectLogs apijson.Field - CreatedAt apijson.Field - ModifiedAt apijson.Field - Name apijson.Field - Slug apijson.Field - RateLimitingInterval apijson.Field - RateLimitingLimit apijson.Field - RateLimitingTechnique apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *AIGatewayGetResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r aiGatewayGetResponseJSON) RawJSON() string { - return r.raw -} - -type AIGatewayNewParams struct { - CacheInvalidateOnUpdate param.Field[bool] `json:"cache_invalidate_on_update,required"` - CacheTTL param.Field[int64] `json:"cache_ttl,required"` - CollectLogs param.Field[bool] `json:"collect_logs,required"` - Name param.Field[string] `json:"name,required"` - Slug param.Field[string] `json:"slug,required"` - RateLimitingInterval param.Field[int64] `json:"rate_limiting_interval"` - RateLimitingLimit param.Field[int64] `json:"rate_limiting_limit"` - RateLimitingTechnique param.Field[string] `json:"rate_limiting_technique"` -} - -func (r AIGatewayNewParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type AIGatewayNewResponseEnvelope struct { - Result AIGatewayNewResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON aiGatewayNewResponseEnvelopeJSON `json:"-"` -} - -// aiGatewayNewResponseEnvelopeJSON contains the JSON metadata for the struct -// [AIGatewayNewResponseEnvelope] -type aiGatewayNewResponseEnvelopeJSON struct { - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *AIGatewayNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r aiGatewayNewResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -type AIGatewayUpdateParams struct { - CacheInvalidateOnUpdate param.Field[bool] `json:"cache_invalidate_on_update,required"` - CacheTTL param.Field[int64] `json:"cache_ttl,required"` - CollectLogs param.Field[bool] `json:"collect_logs,required"` - Name param.Field[string] `json:"name,required"` - Slug param.Field[string] `json:"slug,required"` - RateLimitingInterval param.Field[int64] `json:"rate_limiting_interval"` - RateLimitingLimit param.Field[int64] `json:"rate_limiting_limit"` - RateLimitingTechnique param.Field[string] `json:"rate_limiting_technique"` -} - -func (r AIGatewayUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type AIGatewayUpdateResponseEnvelope struct { - Result AIGatewayUpdateResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON aiGatewayUpdateResponseEnvelopeJSON `json:"-"` -} - -// aiGatewayUpdateResponseEnvelopeJSON contains the JSON metadata for the struct -// [AIGatewayUpdateResponseEnvelope] -type aiGatewayUpdateResponseEnvelopeJSON struct { - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *AIGatewayUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r aiGatewayUpdateResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -type AIGatewayListParams struct { - ID param.Field[string] `query:"id" format:"uuid"` - // Order By Column Name - OrderBy param.Field[string] `query:"order_by"` - Page param.Field[int64] `query:"page"` - PerPage param.Field[int64] `query:"per_page"` -} - -// URLQuery serializes [AIGatewayListParams]'s query parameters as `url.Values`. -func (r AIGatewayListParams) URLQuery() (v url.Values) { - return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ - ArrayFormat: apiquery.ArrayQueryFormatRepeat, - NestedFormat: apiquery.NestedQueryFormatBrackets, - }) -} - -type AIGatewayDeleteResponseEnvelope struct { - Result AIGatewayDeleteResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON aiGatewayDeleteResponseEnvelopeJSON `json:"-"` -} - -// aiGatewayDeleteResponseEnvelopeJSON contains the JSON metadata for the struct -// [AIGatewayDeleteResponseEnvelope] -type aiGatewayDeleteResponseEnvelopeJSON struct { - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *AIGatewayDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r aiGatewayDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -type AIGatewayGetResponseEnvelope struct { - Result AIGatewayGetResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON aiGatewayGetResponseEnvelopeJSON `json:"-"` -} - -// aiGatewayGetResponseEnvelopeJSON contains the JSON metadata for the struct -// [AIGatewayGetResponseEnvelope] -type aiGatewayGetResponseEnvelopeJSON struct { - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *AIGatewayGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r aiGatewayGetResponseEnvelopeJSON) RawJSON() string { - return r.raw -} diff --git a/ai_gateway/aigateway_test.go b/ai_gateway/aigateway_test.go deleted file mode 100644 index 72b322e803..0000000000 --- a/ai_gateway/aigateway_test.go +++ /dev/null @@ -1,174 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -package ai_gateway_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-go/v2" - "github.com/cloudflare/cloudflare-go/v2/ai_gateway" - "github.com/cloudflare/cloudflare-go/v2/internal/testutil" - "github.com/cloudflare/cloudflare-go/v2/option" -) - -func TestAIGatewayNewWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.AIGateway.New( - context.TODO(), - "0d37909e38d3e99c29fa2cd343ac421a", - ai_gateway.AIGatewayNewParams{ - CacheInvalidateOnUpdate: cloudflare.F(true), - CacheTTL: cloudflare.F(int64(0)), - CollectLogs: cloudflare.F(true), - Name: cloudflare.F("string"), - Slug: cloudflare.F("string"), - RateLimitingInterval: cloudflare.F(int64(0)), - RateLimitingLimit: cloudflare.F(int64(0)), - RateLimitingTechnique: cloudflare.F("string"), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestAIGatewayUpdateWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.AIGateway.Update( - context.TODO(), - "0d37909e38d3e99c29fa2cd343ac421a", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ai_gateway.AIGatewayUpdateParams{ - CacheInvalidateOnUpdate: cloudflare.F(true), - CacheTTL: cloudflare.F(int64(0)), - CollectLogs: cloudflare.F(true), - Name: cloudflare.F("string"), - Slug: cloudflare.F("string"), - RateLimitingInterval: cloudflare.F(int64(0)), - RateLimitingLimit: cloudflare.F(int64(0)), - RateLimitingTechnique: cloudflare.F("string"), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestAIGatewayListWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.AIGateway.List( - context.TODO(), - "0d37909e38d3e99c29fa2cd343ac421a", - ai_gateway.AIGatewayListParams{ - ID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), - OrderBy: cloudflare.F("string"), - Page: cloudflare.F(int64(1)), - PerPage: cloudflare.F(int64(5)), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestAIGatewayDelete(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.AIGateway.Delete( - context.TODO(), - "0d37909e38d3e99c29fa2cd343ac421a", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestAIGatewayGet(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.AIGateway.Get( - context.TODO(), - "0d37909e38d3e99c29fa2cd343ac421a", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/ai_gateway/log.go b/ai_gateway/log.go index cbd2abbe3c..a836bfca91 100644 --- a/ai_gateway/log.go +++ b/ai_gateway/log.go @@ -3,16 +3,6 @@ package ai_gateway import ( - "context" - "fmt" - "net/http" - "net/url" - "time" - - "github.com/cloudflare/cloudflare-go/v2/internal/apijson" - "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" - "github.com/cloudflare/cloudflare-go/v2/internal/param" - "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" ) @@ -32,131 +22,3 @@ func NewLogService(opts ...option.RequestOption) (r *LogService) { r.Options = opts return } - -// List Gateway Logs -func (r *LogService) Get(ctx context.Context, accountTag string, id string, query LogGetParams, opts ...option.RequestOption) (res *[]LogGetResponse, err error) { - opts = append(r.Options[:], opts...) - var env LogGetResponseEnvelope - path := fmt.Sprintf("accounts/%s/ai-gateway/gateways/%s/logs", accountTag, id) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -type LogGetResponse struct { - ID string `json:"id,required" format:"uuid"` - Cached bool `json:"cached,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Duration int64 `json:"duration,required"` - Model string `json:"model,required"` - Path string `json:"path,required"` - Provider string `json:"provider,required"` - Request string `json:"request,required"` - Response string `json:"response,required"` - Success bool `json:"success,required"` - TokensIn int64 `json:"tokens_in,required"` - TokensOut int64 `json:"tokens_out,required"` - JSON logGetResponseJSON `json:"-"` -} - -// logGetResponseJSON contains the JSON metadata for the struct [LogGetResponse] -type logGetResponseJSON struct { - ID apijson.Field - Cached apijson.Field - CreatedAt apijson.Field - Duration apijson.Field - Model apijson.Field - Path apijson.Field - Provider apijson.Field - Request apijson.Field - Response apijson.Field - Success apijson.Field - TokensIn apijson.Field - TokensOut apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *LogGetResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r logGetResponseJSON) RawJSON() string { - return r.raw -} - -type LogGetParams struct { - Cached param.Field[bool] `query:"cached"` - Direction param.Field[LogGetParamsDirection] `query:"direction"` - EndDate param.Field[time.Time] `query:"end_date" format:"date-time"` - OrderBy param.Field[LogGetParamsOrderBy] `query:"order_by"` - Page param.Field[int64] `query:"page"` - PerPage param.Field[int64] `query:"per_page"` - Search param.Field[string] `query:"search"` - StartDate param.Field[time.Time] `query:"start_date" format:"date-time"` - Success param.Field[bool] `query:"success"` -} - -// URLQuery serializes [LogGetParams]'s query parameters as `url.Values`. -func (r LogGetParams) URLQuery() (v url.Values) { - return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ - ArrayFormat: apiquery.ArrayQueryFormatRepeat, - NestedFormat: apiquery.NestedQueryFormatBrackets, - }) -} - -type LogGetParamsDirection string - -const ( - LogGetParamsDirectionAsc LogGetParamsDirection = "asc" - LogGetParamsDirectionDesc LogGetParamsDirection = "desc" -) - -func (r LogGetParamsDirection) IsKnown() bool { - switch r { - case LogGetParamsDirectionAsc, LogGetParamsDirectionDesc: - return true - } - return false -} - -type LogGetParamsOrderBy string - -const ( - LogGetParamsOrderByCreatedAt LogGetParamsOrderBy = "created_at" - LogGetParamsOrderByProvider LogGetParamsOrderBy = "provider" -) - -func (r LogGetParamsOrderBy) IsKnown() bool { - switch r { - case LogGetParamsOrderByCreatedAt, LogGetParamsOrderByProvider: - return true - } - return false -} - -type LogGetResponseEnvelope struct { - Result []LogGetResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON logGetResponseEnvelopeJSON `json:"-"` -} - -// logGetResponseEnvelopeJSON contains the JSON metadata for the struct -// [LogGetResponseEnvelope] -type logGetResponseEnvelopeJSON struct { - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *LogGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r logGetResponseEnvelopeJSON) RawJSON() string { - return r.raw -} diff --git a/ai_gateway/log_test.go b/ai_gateway/log_test.go deleted file mode 100644 index 7f6f0f5a7b..0000000000 --- a/ai_gateway/log_test.go +++ /dev/null @@ -1,54 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -package ai_gateway_test - -import ( - "context" - "errors" - "os" - "testing" - "time" - - "github.com/cloudflare/cloudflare-go/v2" - "github.com/cloudflare/cloudflare-go/v2/ai_gateway" - "github.com/cloudflare/cloudflare-go/v2/internal/testutil" - "github.com/cloudflare/cloudflare-go/v2/option" -) - -func TestLogGetWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.AIGateway.Logs.Get( - context.TODO(), - "0d37909e38d3e99c29fa2cd343ac421a", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ai_gateway.LogGetParams{ - Cached: cloudflare.F(true), - Direction: cloudflare.F(ai_gateway.LogGetParamsDirectionAsc), - EndDate: cloudflare.F(time.Now()), - OrderBy: cloudflare.F(ai_gateway.LogGetParamsOrderByCreatedAt), - Page: cloudflare.F(int64(1)), - PerPage: cloudflare.F(int64(5)), - Search: cloudflare.F("string"), - StartDate: cloudflare.F(time.Now()), - Success: cloudflare.F(true), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/api.md b/api.md index 6ed6760d83..ab7cbee6a1 100644 --- a/api.md +++ b/api.md @@ -6740,14 +6740,14 @@ Response Types: - cloudforce_one.Quota - cloudforce_one.RequestConstants - cloudforce_one.RequestTypes -- cloudforce_one.RequestDeleteResponseUnion +- cloudforce_one.RequestDeleteResponse Methods: - client.CloudforceOne.Requests.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestNewParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestUpdateParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.List(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestListParams) (pagination.V4PagePaginationArray[cloudforce_one.ListItem], error) -- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponse, error) - client.CloudforceOne.Requests.Constants(ctx context.Context, accountIdentifier string) (cloudforce_one.RequestConstants, error) - client.CloudforceOne.Requests.Get(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) @@ -6758,13 +6758,13 @@ Methods: Response Types: - cloudforce_one.Message -- cloudforce_one.RequestMessageDeleteResponseUnion +- cloudforce_one.RequestMessageDeleteResponse Methods: - client.CloudforceOne.Requests.Message.New(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageNewParams) (cloudforce_one.Message, error) - client.CloudforceOne.Requests.Message.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, body cloudforce_one.RequestMessageUpdateParams) (cloudforce_one.Message, error) -- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponse, error) - client.CloudforceOne.Requests.Message.Get(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageGetParams) ([]cloudforce_one.Message, error) ### Priority @@ -6778,13 +6778,13 @@ Response Types: - cloudforce_one.Label - cloudforce_one.Priority -- cloudforce_one.RequestPriorityDeleteResponseUnion +- cloudforce_one.RequestPriorityDeleteResponse Methods: - client.CloudforceOne.Requests.Priority.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestPriorityNewParams) (cloudforce_one.Priority, error) - client.CloudforceOne.Requests.Priority.Update(ctx context.Context, accountIdentifier string, priorityIdentifer string, body cloudforce_one.RequestPriorityUpdateParams) (cloudforce_one.Item, error) -- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponse, error) - client.CloudforceOne.Requests.Priority.Get(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Priority.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) @@ -6816,28 +6816,4 @@ Methods: # AIGateway -Response Types: - -- ai_gateway.AIGatewayNewResponse -- ai_gateway.AIGatewayUpdateResponse -- ai_gateway.AIGatewayListResponse -- ai_gateway.AIGatewayDeleteResponse -- ai_gateway.AIGatewayGetResponse - -Methods: - -- client.AIGateway.New(ctx context.Context, accountTag string, body ai_gateway.AIGatewayNewParams) (ai_gateway.AIGatewayNewResponse, error) -- client.AIGateway.Update(ctx context.Context, accountTag string, id string, body ai_gateway.AIGatewayUpdateParams) (ai_gateway.AIGatewayUpdateResponse, error) -- client.AIGateway.List(ctx context.Context, accountTag string, query ai_gateway.AIGatewayListParams) (pagination.V4PagePaginationArray[ai_gateway.AIGatewayListResponse], error) -- client.AIGateway.Delete(ctx context.Context, accountTag string, id string) (ai_gateway.AIGatewayDeleteResponse, error) -- client.AIGateway.Get(ctx context.Context, accountTag string, id string) (ai_gateway.AIGatewayGetResponse, error) - ## Logs - -Response Types: - -- ai_gateway.LogGetResponse - -Methods: - -- client.AIGateway.Logs.Get(ctx context.Context, accountTag string, id string, query ai_gateway.LogGetParams) ([]ai_gateway.LogGetResponse, error) diff --git a/cloudforce_one/request.go b/cloudforce_one/request.go index ce028e3612..a5865d5f35 100644 --- a/cloudforce_one/request.go +++ b/cloudforce_one/request.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -15,7 +14,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestService contains methods and other services that help with interacting @@ -93,15 +91,10 @@ func (r *RequestService) ListAutoPaging(ctx context.Context, accountIdentifier s } // Delete a Request -func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponseUnion, err error) { +func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s", accountIdentifier, requestIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -469,30 +462,46 @@ func (r RequestConstantsTlp) IsKnown() bool { type RequestTypes []string -// Union satisfied by [cloudforce_one.RequestDeleteResponseUnknown], -// [cloudforce_one.RequestDeleteResponseArray] or [shared.UnionString]. -type RequestDeleteResponseUnion interface { - ImplementsCloudforceOneRequestDeleteResponseUnion() +type RequestDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestDeleteResponseSuccess `json:"success,required"` + JSON requestDeleteResponseJSON `json:"-"` +} + +// requestDeleteResponseJSON contains the JSON metadata for the struct +// [RequestDeleteResponse] +type requestDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +func (r requestDeleteResponseJSON) RawJSON() string { + return r.raw } -type RequestDeleteResponseArray []interface{} +// Whether the API call was successful +type RequestDeleteResponseSuccess bool -func (r RequestDeleteResponseArray) ImplementsCloudforceOneRequestDeleteResponseUnion() {} +const ( + RequestDeleteResponseSuccessTrue RequestDeleteResponseSuccess = true +) + +func (r RequestDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestDeleteResponseSuccessTrue: + return true + } + return false +} type RequestNewParams struct { // Request content @@ -533,9 +542,9 @@ func (r RequestNewParamsTlp) IsKnown() bool { type RequestNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestNewResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestNewResponseEnvelopeJSON `json:"-"` } @@ -544,8 +553,8 @@ type RequestNewResponseEnvelope struct { type requestNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -612,9 +621,9 @@ func (r RequestUpdateParamsTlp) IsKnown() bool { type RequestUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestUpdateResponseEnvelopeJSON `json:"-"` } @@ -623,8 +632,8 @@ type RequestUpdateResponseEnvelope struct { type requestUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -715,55 +724,12 @@ func (r RequestListParamsStatus) IsKnown() bool { return false } -type RequestDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestDeleteResponseEnvelopeJSON contains the JSON metadata for the struct -// [RequestDeleteResponseEnvelope] -type requestDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestDeleteResponseEnvelopeSuccess bool - -const ( - RequestDeleteResponseEnvelopeSuccessTrue RequestDeleteResponseEnvelopeSuccess = true -) - -func (r RequestDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestConstantsResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestConstants `json:"result,required"` // Whether the API call was successful Success RequestConstantsResponseEnvelopeSuccess `json:"success,required"` + Result RequestConstants `json:"result"` JSON requestConstantsResponseEnvelopeJSON `json:"-"` } @@ -772,8 +738,8 @@ type RequestConstantsResponseEnvelope struct { type requestConstantsResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -804,9 +770,9 @@ func (r RequestConstantsResponseEnvelopeSuccess) IsKnown() bool { type RequestGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestGetResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestGetResponseEnvelopeJSON `json:"-"` } @@ -815,8 +781,8 @@ type RequestGetResponseEnvelope struct { type requestGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -847,9 +813,9 @@ func (r RequestGetResponseEnvelopeSuccess) IsKnown() bool { type RequestQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Quota `json:"result,required"` // Whether the API call was successful Success RequestQuotaResponseEnvelopeSuccess `json:"success,required"` + Result Quota `json:"result"` JSON requestQuotaResponseEnvelopeJSON `json:"-"` } @@ -858,8 +824,8 @@ type RequestQuotaResponseEnvelope struct { type requestQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -890,9 +856,9 @@ func (r RequestQuotaResponseEnvelopeSuccess) IsKnown() bool { type RequestTypesResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestTypes `json:"result,required"` // Whether the API call was successful Success RequestTypesResponseEnvelopeSuccess `json:"success,required"` + Result RequestTypes `json:"result"` JSON requestTypesResponseEnvelopeJSON `json:"-"` } @@ -901,8 +867,8 @@ type RequestTypesResponseEnvelope struct { type requestTypesResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestmessage.go b/cloudforce_one/requestmessage.go index b5a88e43b5..f3949be2ee 100644 --- a/cloudforce_one/requestmessage.go +++ b/cloudforce_one/requestmessage.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -14,7 +13,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestMessageService contains methods and other services that help with @@ -64,15 +62,10 @@ func (r *RequestMessageService) Update(ctx context.Context, accountIdentifier st } // Delete a Request Message -func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponseUnion, err error) { +func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestMessageDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s/message/%v", accountIdentifier, requestIdentifier, messageIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -125,30 +118,45 @@ func (r messageJSON) RawJSON() string { return r.raw } -// Union satisfied by [cloudforce_one.RequestMessageDeleteResponseUnknown], -// [cloudforce_one.RequestMessageDeleteResponseArray] or [shared.UnionString]. -type RequestMessageDeleteResponseUnion interface { - ImplementsCloudforceOneRequestMessageDeleteResponseUnion() +type RequestMessageDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestMessageDeleteResponseSuccess `json:"success,required"` + JSON requestMessageDeleteResponseJSON `json:"-"` +} + +// requestMessageDeleteResponseJSON contains the JSON metadata for the struct +// [RequestMessageDeleteResponse] +type requestMessageDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestMessageDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestMessageDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestMessageDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +func (r requestMessageDeleteResponseJSON) RawJSON() string { + return r.raw } -type RequestMessageDeleteResponseArray []interface{} +// Whether the API call was successful +type RequestMessageDeleteResponseSuccess bool + +const ( + RequestMessageDeleteResponseSuccessTrue RequestMessageDeleteResponseSuccess = true +) -func (r RequestMessageDeleteResponseArray) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() { +func (r RequestMessageDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestMessageDeleteResponseSuccessTrue: + return true + } + return false } type RequestMessageNewParams struct { @@ -163,9 +171,9 @@ func (r RequestMessageNewParams) MarshalJSON() (data []byte, err error) { type RequestMessageNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageNewResponseEnvelopeSuccess `json:"success,required"` + Result Message `json:"result"` JSON requestMessageNewResponseEnvelopeJSON `json:"-"` } @@ -174,8 +182,8 @@ type RequestMessageNewResponseEnvelope struct { type requestMessageNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -242,9 +250,9 @@ func (r RequestMessageUpdateParamsTlp) IsKnown() bool { type RequestMessageUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Message `json:"result"` JSON requestMessageUpdateResponseEnvelopeJSON `json:"-"` } @@ -253,8 +261,8 @@ type RequestMessageUpdateResponseEnvelope struct { type requestMessageUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -282,49 +290,6 @@ func (r RequestMessageUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } -type RequestMessageDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestMessageDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestMessageDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestMessageDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestMessageDeleteResponseEnvelopeJSON contains the JSON metadata for the -// struct [RequestMessageDeleteResponseEnvelope] -type requestMessageDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestMessageDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestMessageDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestMessageDeleteResponseEnvelopeSuccess bool - -const ( - RequestMessageDeleteResponseEnvelopeSuccessTrue RequestMessageDeleteResponseEnvelopeSuccess = true -) - -func (r RequestMessageDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestMessageDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestMessageGetParams struct { // Page number of results Page param.Field[int64] `json:"page,required"` @@ -363,9 +328,9 @@ func (r RequestMessageGetParamsSortOrder) IsKnown() bool { type RequestMessageGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result []Message `json:"result,required"` // Whether the API call was successful Success RequestMessageGetResponseEnvelopeSuccess `json:"success,required"` + Result []Message `json:"result"` JSON requestMessageGetResponseEnvelopeJSON `json:"-"` } @@ -374,8 +339,8 @@ type RequestMessageGetResponseEnvelope struct { type requestMessageGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestpriority.go b/cloudforce_one/requestpriority.go index 702df8b577..eef29460bf 100644 --- a/cloudforce_one/requestpriority.go +++ b/cloudforce_one/requestpriority.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -14,7 +13,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestPriorityService contains methods and other services that help with @@ -62,15 +60,10 @@ func (r *RequestPriorityService) Update(ctx context.Context, accountIdentifier s } // Delete a Priority Intelligence Report -func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponseUnion, err error) { +func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestPriorityDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/priority/%s", accountIdentifier, priorityIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -196,30 +189,45 @@ func (r PriorityEditTlp) IsKnown() bool { return false } -// Union satisfied by [cloudforce_one.RequestPriorityDeleteResponseUnknown], -// [cloudforce_one.RequestPriorityDeleteResponseArray] or [shared.UnionString]. -type RequestPriorityDeleteResponseUnion interface { - ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() +type RequestPriorityDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestPriorityDeleteResponseSuccess `json:"success,required"` + JSON requestPriorityDeleteResponseJSON `json:"-"` } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestPriorityDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestPriorityDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +// requestPriorityDeleteResponseJSON contains the JSON metadata for the struct +// [RequestPriorityDeleteResponse] +type requestPriorityDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field } -type RequestPriorityDeleteResponseArray []interface{} +func (r *RequestPriorityDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} -func (r RequestPriorityDeleteResponseArray) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() { +func (r requestPriorityDeleteResponseJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestPriorityDeleteResponseSuccess bool + +const ( + RequestPriorityDeleteResponseSuccessTrue RequestPriorityDeleteResponseSuccess = true +) + +func (r RequestPriorityDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestPriorityDeleteResponseSuccessTrue: + return true + } + return false } type RequestPriorityNewParams struct { @@ -233,9 +241,9 @@ func (r RequestPriorityNewParams) MarshalJSON() (data []byte, err error) { type RequestPriorityNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Priority `json:"result,required"` // Whether the API call was successful Success RequestPriorityNewResponseEnvelopeSuccess `json:"success,required"` + Result Priority `json:"result"` JSON requestPriorityNewResponseEnvelopeJSON `json:"-"` } @@ -244,8 +252,8 @@ type RequestPriorityNewResponseEnvelope struct { type requestPriorityNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -284,9 +292,9 @@ func (r RequestPriorityUpdateParams) MarshalJSON() (data []byte, err error) { type RequestPriorityUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestPriorityUpdateResponseEnvelopeJSON `json:"-"` } @@ -295,8 +303,8 @@ type RequestPriorityUpdateResponseEnvelope struct { type requestPriorityUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -324,55 +332,12 @@ func (r RequestPriorityUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } -type RequestPriorityDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestPriorityDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestPriorityDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestPriorityDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestPriorityDeleteResponseEnvelopeJSON contains the JSON metadata for the -// struct [RequestPriorityDeleteResponseEnvelope] -type requestPriorityDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestPriorityDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestPriorityDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestPriorityDeleteResponseEnvelopeSuccess bool - -const ( - RequestPriorityDeleteResponseEnvelopeSuccessTrue RequestPriorityDeleteResponseEnvelopeSuccess = true -) - -func (r RequestPriorityDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestPriorityDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestPriorityGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityGetResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestPriorityGetResponseEnvelopeJSON `json:"-"` } @@ -381,8 +346,8 @@ type RequestPriorityGetResponseEnvelope struct { type requestPriorityGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -413,9 +378,9 @@ func (r RequestPriorityGetResponseEnvelopeSuccess) IsKnown() bool { type RequestPriorityQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Quota `json:"result,required"` // Whether the API call was successful Success RequestPriorityQuotaResponseEnvelopeSuccess `json:"success,required"` + Result Quota `json:"result"` JSON requestPriorityQuotaResponseEnvelopeJSON `json:"-"` } @@ -424,8 +389,8 @@ type RequestPriorityQuotaResponseEnvelope struct { type requestPriorityQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/intel/whois.go b/intel/whois.go index ece63a5b8f..5655c7c1a8 100644 --- a/intel/whois.go +++ b/intel/whois.go @@ -259,9 +259,9 @@ func (r WhoisGetParams) URLQuery() (v url.Values) { type WhoisGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result WhoisGetResponse `json:"result,required"` // Whether the API call was successful Success WhoisGetResponseEnvelopeSuccess `json:"success,required"` + Result WhoisGetResponse `json:"result"` JSON whoisGetResponseEnvelopeJSON `json:"-"` } @@ -270,8 +270,8 @@ type WhoisGetResponseEnvelope struct { type whoisGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/shared/union.go b/shared/union.go index 7537786749..212561aacd 100644 --- a/shared/union.go +++ b/shared/union.go @@ -166,9 +166,6 @@ func (UnionString) ImplementsOriginPostQuantumEncryptionOriginPostQuantumEncrypt } func (UnionString) ImplementsHostnamesSettingValueUnionParam() {} func (UnionString) ImplementsHostnamesSettingValueUnion() {} -func (UnionString) ImplementsCloudforceOneRequestDeleteResponseUnion() {} -func (UnionString) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() {} -func (UnionString) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() {} func (UnionString) ImplementsEventNotificationsR2ConfigurationQueueDeleteResponseUnion() {} type UnionInt int64 From 08c17df90d716163b7dea414815f6b466cdbc622 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 11:22:31 +0000 Subject: [PATCH 102/127] feat(api): update via SDK Studio (#1949) --- .stats.yml | 2 +- ai_gateway/aigateway.go | 461 +++++++++++++++++++++++++++++++++++ ai_gateway/aigateway_test.go | 172 +++++++++++++ ai_gateway/log.go | 139 +++++++++++ ai_gateway/log_test.go | 54 ++++ api.md | 24 ++ 6 files changed, 851 insertions(+), 1 deletion(-) create mode 100644 ai_gateway/aigateway_test.go create mode 100644 ai_gateway/log_test.go diff --git a/.stats.yml b/.stats.yml index 48dcd91750..455fd99129 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1269 +configured_endpoints: 1275 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-66b404214530cc73c44f34f297dad6bc8da0645b63e61d9d4fcbeb301e127e65.yml diff --git a/ai_gateway/aigateway.go b/ai_gateway/aigateway.go index 57bebfc4f7..ea3a649b37 100644 --- a/ai_gateway/aigateway.go +++ b/ai_gateway/aigateway.go @@ -3,6 +3,17 @@ package ai_gateway import ( + "context" + "fmt" + "net/http" + "net/url" + "time" + + "github.com/cloudflare/cloudflare-go/v2/internal/apijson" + "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" + "github.com/cloudflare/cloudflare-go/v2/internal/pagination" + "github.com/cloudflare/cloudflare-go/v2/internal/param" + "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" ) @@ -24,3 +35,453 @@ func NewAIGatewayService(opts ...option.RequestOption) (r *AIGatewayService) { r.Logs = NewLogService(opts...) return } + +// Create a new Gateway +func (r *AIGatewayService) New(ctx context.Context, params AIGatewayNewParams, opts ...option.RequestOption) (res *AIGatewayNewResponse, err error) { + opts = append(r.Options[:], opts...) + var env AIGatewayNewResponseEnvelope + path := fmt.Sprintf("accounts/%s/ai-gateway/gateways", params.AccountID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Update a Gateway +func (r *AIGatewayService) Update(ctx context.Context, id string, params AIGatewayUpdateParams, opts ...option.RequestOption) (res *AIGatewayUpdateResponse, err error) { + opts = append(r.Options[:], opts...) + var env AIGatewayUpdateResponseEnvelope + path := fmt.Sprintf("accounts/%s/ai-gateway/gateways/%s", params.AccountID, id) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// List Gateway's +func (r *AIGatewayService) List(ctx context.Context, params AIGatewayListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[AIGatewayListResponse], err error) { + var raw *http.Response + opts = append(r.Options, opts...) + opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) + path := fmt.Sprintf("accounts/%s/ai-gateway/gateways", params.AccountID) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, params, &res, opts...) + if err != nil { + return nil, err + } + err = cfg.Execute() + if err != nil { + return nil, err + } + res.SetPageConfig(cfg, raw) + return res, nil +} + +// List Gateway's +func (r *AIGatewayService) ListAutoPaging(ctx context.Context, params AIGatewayListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[AIGatewayListResponse] { + return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...)) +} + +// Delete a Gateway +func (r *AIGatewayService) Delete(ctx context.Context, id string, body AIGatewayDeleteParams, opts ...option.RequestOption) (res *AIGatewayDeleteResponse, err error) { + opts = append(r.Options[:], opts...) + var env AIGatewayDeleteResponseEnvelope + path := fmt.Sprintf("accounts/%s/ai-gateway/gateways/%s", body.AccountID, id) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Fetch a Gateway +func (r *AIGatewayService) Get(ctx context.Context, id string, query AIGatewayGetParams, opts ...option.RequestOption) (res *AIGatewayGetResponse, err error) { + opts = append(r.Options[:], opts...) + var env AIGatewayGetResponseEnvelope + path := fmt.Sprintf("accounts/%s/ai-gateway/gateways/%s", query.AccountID, id) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +type AIGatewayNewResponse struct { + Task AIGatewayNewResponseTask `json:"task,required"` + JSON aiGatewayNewResponseJSON `json:"-"` +} + +// aiGatewayNewResponseJSON contains the JSON metadata for the struct +// [AIGatewayNewResponse] +type aiGatewayNewResponseJSON struct { + Task apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AIGatewayNewResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r aiGatewayNewResponseJSON) RawJSON() string { + return r.raw +} + +type AIGatewayNewResponseTask struct { + ID string `json:"id,required" format:"uuid"` + CacheInvalidateOnUpdate bool `json:"cache_invalidate_on_update,required"` + CacheTTL int64 `json:"cache_ttl,required"` + CollectLogs bool `json:"collect_logs,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + ModifiedAt time.Time `json:"modified_at,required" format:"date-time"` + Name string `json:"name,required"` + Slug string `json:"slug,required"` + RateLimitingInterval int64 `json:"rate_limiting_interval"` + RateLimitingLimit int64 `json:"rate_limiting_limit"` + RateLimitingTechnique string `json:"rate_limiting_technique"` + JSON aiGatewayNewResponseTaskJSON `json:"-"` +} + +// aiGatewayNewResponseTaskJSON contains the JSON metadata for the struct +// [AIGatewayNewResponseTask] +type aiGatewayNewResponseTaskJSON struct { + ID apijson.Field + CacheInvalidateOnUpdate apijson.Field + CacheTTL apijson.Field + CollectLogs apijson.Field + CreatedAt apijson.Field + ModifiedAt apijson.Field + Name apijson.Field + Slug apijson.Field + RateLimitingInterval apijson.Field + RateLimitingLimit apijson.Field + RateLimitingTechnique apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AIGatewayNewResponseTask) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r aiGatewayNewResponseTaskJSON) RawJSON() string { + return r.raw +} + +type AIGatewayUpdateResponse struct { + ID string `json:"id,required" format:"uuid"` + CacheInvalidateOnUpdate bool `json:"cache_invalidate_on_update,required"` + CacheTTL int64 `json:"cache_ttl,required"` + CollectLogs bool `json:"collect_logs,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + ModifiedAt time.Time `json:"modified_at,required" format:"date-time"` + Name string `json:"name,required"` + Slug string `json:"slug,required"` + RateLimitingInterval int64 `json:"rate_limiting_interval"` + RateLimitingLimit int64 `json:"rate_limiting_limit"` + RateLimitingTechnique string `json:"rate_limiting_technique"` + JSON aiGatewayUpdateResponseJSON `json:"-"` +} + +// aiGatewayUpdateResponseJSON contains the JSON metadata for the struct +// [AIGatewayUpdateResponse] +type aiGatewayUpdateResponseJSON struct { + ID apijson.Field + CacheInvalidateOnUpdate apijson.Field + CacheTTL apijson.Field + CollectLogs apijson.Field + CreatedAt apijson.Field + ModifiedAt apijson.Field + Name apijson.Field + Slug apijson.Field + RateLimitingInterval apijson.Field + RateLimitingLimit apijson.Field + RateLimitingTechnique apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AIGatewayUpdateResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r aiGatewayUpdateResponseJSON) RawJSON() string { + return r.raw +} + +type AIGatewayListResponse struct { + ID string `json:"id,required" format:"uuid"` + CacheInvalidateOnUpdate bool `json:"cache_invalidate_on_update,required"` + CacheTTL int64 `json:"cache_ttl,required"` + CollectLogs bool `json:"collect_logs,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + ModifiedAt time.Time `json:"modified_at,required" format:"date-time"` + Name string `json:"name,required"` + Slug string `json:"slug,required"` + RateLimitingInterval int64 `json:"rate_limiting_interval"` + RateLimitingLimit int64 `json:"rate_limiting_limit"` + RateLimitingTechnique string `json:"rate_limiting_technique"` + JSON aiGatewayListResponseJSON `json:"-"` +} + +// aiGatewayListResponseJSON contains the JSON metadata for the struct +// [AIGatewayListResponse] +type aiGatewayListResponseJSON struct { + ID apijson.Field + CacheInvalidateOnUpdate apijson.Field + CacheTTL apijson.Field + CollectLogs apijson.Field + CreatedAt apijson.Field + ModifiedAt apijson.Field + Name apijson.Field + Slug apijson.Field + RateLimitingInterval apijson.Field + RateLimitingLimit apijson.Field + RateLimitingTechnique apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AIGatewayListResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r aiGatewayListResponseJSON) RawJSON() string { + return r.raw +} + +type AIGatewayDeleteResponse struct { + ID string `json:"id,required" format:"uuid"` + CacheInvalidateOnUpdate bool `json:"cache_invalidate_on_update,required"` + CacheTTL int64 `json:"cache_ttl,required"` + CollectLogs bool `json:"collect_logs,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + ModifiedAt time.Time `json:"modified_at,required" format:"date-time"` + Name string `json:"name,required"` + Slug string `json:"slug,required"` + RateLimitingInterval int64 `json:"rate_limiting_interval"` + RateLimitingLimit int64 `json:"rate_limiting_limit"` + RateLimitingTechnique string `json:"rate_limiting_technique"` + JSON aiGatewayDeleteResponseJSON `json:"-"` +} + +// aiGatewayDeleteResponseJSON contains the JSON metadata for the struct +// [AIGatewayDeleteResponse] +type aiGatewayDeleteResponseJSON struct { + ID apijson.Field + CacheInvalidateOnUpdate apijson.Field + CacheTTL apijson.Field + CollectLogs apijson.Field + CreatedAt apijson.Field + ModifiedAt apijson.Field + Name apijson.Field + Slug apijson.Field + RateLimitingInterval apijson.Field + RateLimitingLimit apijson.Field + RateLimitingTechnique apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AIGatewayDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r aiGatewayDeleteResponseJSON) RawJSON() string { + return r.raw +} + +type AIGatewayGetResponse struct { + ID string `json:"id,required" format:"uuid"` + CacheInvalidateOnUpdate bool `json:"cache_invalidate_on_update,required"` + CacheTTL int64 `json:"cache_ttl,required"` + CollectLogs bool `json:"collect_logs,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + ModifiedAt time.Time `json:"modified_at,required" format:"date-time"` + Name string `json:"name,required"` + Slug string `json:"slug,required"` + RateLimitingInterval int64 `json:"rate_limiting_interval"` + RateLimitingLimit int64 `json:"rate_limiting_limit"` + RateLimitingTechnique string `json:"rate_limiting_technique"` + JSON aiGatewayGetResponseJSON `json:"-"` +} + +// aiGatewayGetResponseJSON contains the JSON metadata for the struct +// [AIGatewayGetResponse] +type aiGatewayGetResponseJSON struct { + ID apijson.Field + CacheInvalidateOnUpdate apijson.Field + CacheTTL apijson.Field + CollectLogs apijson.Field + CreatedAt apijson.Field + ModifiedAt apijson.Field + Name apijson.Field + Slug apijson.Field + RateLimitingInterval apijson.Field + RateLimitingLimit apijson.Field + RateLimitingTechnique apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AIGatewayGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r aiGatewayGetResponseJSON) RawJSON() string { + return r.raw +} + +type AIGatewayNewParams struct { + AccountID param.Field[string] `path:"account_id,required"` + CacheInvalidateOnUpdate param.Field[bool] `json:"cache_invalidate_on_update,required"` + CacheTTL param.Field[int64] `json:"cache_ttl,required"` + CollectLogs param.Field[bool] `json:"collect_logs,required"` + Name param.Field[string] `json:"name,required"` + Slug param.Field[string] `json:"slug,required"` + RateLimitingInterval param.Field[int64] `json:"rate_limiting_interval"` + RateLimitingLimit param.Field[int64] `json:"rate_limiting_limit"` + RateLimitingTechnique param.Field[string] `json:"rate_limiting_technique"` +} + +func (r AIGatewayNewParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AIGatewayNewResponseEnvelope struct { + Result AIGatewayNewResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON aiGatewayNewResponseEnvelopeJSON `json:"-"` +} + +// aiGatewayNewResponseEnvelopeJSON contains the JSON metadata for the struct +// [AIGatewayNewResponseEnvelope] +type aiGatewayNewResponseEnvelopeJSON struct { + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AIGatewayNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r aiGatewayNewResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type AIGatewayUpdateParams struct { + AccountID param.Field[string] `path:"account_id,required"` + CacheInvalidateOnUpdate param.Field[bool] `json:"cache_invalidate_on_update,required"` + CacheTTL param.Field[int64] `json:"cache_ttl,required"` + CollectLogs param.Field[bool] `json:"collect_logs,required"` + Name param.Field[string] `json:"name,required"` + Slug param.Field[string] `json:"slug,required"` + RateLimitingInterval param.Field[int64] `json:"rate_limiting_interval"` + RateLimitingLimit param.Field[int64] `json:"rate_limiting_limit"` + RateLimitingTechnique param.Field[string] `json:"rate_limiting_technique"` +} + +func (r AIGatewayUpdateParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type AIGatewayUpdateResponseEnvelope struct { + Result AIGatewayUpdateResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON aiGatewayUpdateResponseEnvelopeJSON `json:"-"` +} + +// aiGatewayUpdateResponseEnvelopeJSON contains the JSON metadata for the struct +// [AIGatewayUpdateResponseEnvelope] +type aiGatewayUpdateResponseEnvelopeJSON struct { + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AIGatewayUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r aiGatewayUpdateResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type AIGatewayListParams struct { + AccountID param.Field[string] `path:"account_id,required"` + ID param.Field[string] `query:"id" format:"uuid"` + // Order By Column Name + OrderBy param.Field[string] `query:"order_by"` + Page param.Field[int64] `query:"page"` + PerPage param.Field[int64] `query:"per_page"` +} + +// URLQuery serializes [AIGatewayListParams]'s query parameters as `url.Values`. +func (r AIGatewayListParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatRepeat, + NestedFormat: apiquery.NestedQueryFormatBrackets, + }) +} + +type AIGatewayDeleteParams struct { + AccountID param.Field[string] `path:"account_id,required"` +} + +type AIGatewayDeleteResponseEnvelope struct { + Result AIGatewayDeleteResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON aiGatewayDeleteResponseEnvelopeJSON `json:"-"` +} + +// aiGatewayDeleteResponseEnvelopeJSON contains the JSON metadata for the struct +// [AIGatewayDeleteResponseEnvelope] +type aiGatewayDeleteResponseEnvelopeJSON struct { + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AIGatewayDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r aiGatewayDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type AIGatewayGetParams struct { + AccountID param.Field[string] `path:"account_id,required"` +} + +type AIGatewayGetResponseEnvelope struct { + Result AIGatewayGetResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON aiGatewayGetResponseEnvelopeJSON `json:"-"` +} + +// aiGatewayGetResponseEnvelopeJSON contains the JSON metadata for the struct +// [AIGatewayGetResponseEnvelope] +type aiGatewayGetResponseEnvelopeJSON struct { + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AIGatewayGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r aiGatewayGetResponseEnvelopeJSON) RawJSON() string { + return r.raw +} diff --git a/ai_gateway/aigateway_test.go b/ai_gateway/aigateway_test.go new file mode 100644 index 0000000000..92eefac751 --- /dev/null +++ b/ai_gateway/aigateway_test.go @@ -0,0 +1,172 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package ai_gateway_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go/v2" + "github.com/cloudflare/cloudflare-go/v2/ai_gateway" + "github.com/cloudflare/cloudflare-go/v2/internal/testutil" + "github.com/cloudflare/cloudflare-go/v2/option" +) + +func TestAIGatewayNewWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.AIGateway.New(context.TODO(), ai_gateway.AIGatewayNewParams{ + AccountID: cloudflare.F("0d37909e38d3e99c29fa2cd343ac421a"), + CacheInvalidateOnUpdate: cloudflare.F(true), + CacheTTL: cloudflare.F(int64(0)), + CollectLogs: cloudflare.F(true), + Name: cloudflare.F("string"), + Slug: cloudflare.F("string"), + RateLimitingInterval: cloudflare.F(int64(0)), + RateLimitingLimit: cloudflare.F(int64(0)), + RateLimitingTechnique: cloudflare.F("string"), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAIGatewayUpdateWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.AIGateway.Update( + context.TODO(), + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ai_gateway.AIGatewayUpdateParams{ + AccountID: cloudflare.F("0d37909e38d3e99c29fa2cd343ac421a"), + CacheInvalidateOnUpdate: cloudflare.F(true), + CacheTTL: cloudflare.F(int64(0)), + CollectLogs: cloudflare.F(true), + Name: cloudflare.F("string"), + Slug: cloudflare.F("string"), + RateLimitingInterval: cloudflare.F(int64(0)), + RateLimitingLimit: cloudflare.F(int64(0)), + RateLimitingTechnique: cloudflare.F("string"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAIGatewayListWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.AIGateway.List(context.TODO(), ai_gateway.AIGatewayListParams{ + AccountID: cloudflare.F("0d37909e38d3e99c29fa2cd343ac421a"), + ID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), + OrderBy: cloudflare.F("string"), + Page: cloudflare.F(int64(1)), + PerPage: cloudflare.F(int64(5)), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAIGatewayDelete(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.AIGateway.Delete( + context.TODO(), + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ai_gateway.AIGatewayDeleteParams{ + AccountID: cloudflare.F("0d37909e38d3e99c29fa2cd343ac421a"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestAIGatewayGet(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.AIGateway.Get( + context.TODO(), + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ai_gateway.AIGatewayGetParams{ + AccountID: cloudflare.F("0d37909e38d3e99c29fa2cd343ac421a"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/ai_gateway/log.go b/ai_gateway/log.go index a836bfca91..861b54e67e 100644 --- a/ai_gateway/log.go +++ b/ai_gateway/log.go @@ -3,6 +3,16 @@ package ai_gateway import ( + "context" + "fmt" + "net/http" + "net/url" + "time" + + "github.com/cloudflare/cloudflare-go/v2/internal/apijson" + "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" + "github.com/cloudflare/cloudflare-go/v2/internal/param" + "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" ) @@ -22,3 +32,132 @@ func NewLogService(opts ...option.RequestOption) (r *LogService) { r.Options = opts return } + +// List Gateway Logs +func (r *LogService) Get(ctx context.Context, id string, params LogGetParams, opts ...option.RequestOption) (res *[]LogGetResponse, err error) { + opts = append(r.Options[:], opts...) + var env LogGetResponseEnvelope + path := fmt.Sprintf("accounts/%s/ai-gateway/gateways/%s/logs", params.AccountID, id) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +type LogGetResponse struct { + ID string `json:"id,required" format:"uuid"` + Cached bool `json:"cached,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Duration int64 `json:"duration,required"` + Model string `json:"model,required"` + Path string `json:"path,required"` + Provider string `json:"provider,required"` + Request string `json:"request,required"` + Response string `json:"response,required"` + Success bool `json:"success,required"` + TokensIn int64 `json:"tokens_in,required"` + TokensOut int64 `json:"tokens_out,required"` + JSON logGetResponseJSON `json:"-"` +} + +// logGetResponseJSON contains the JSON metadata for the struct [LogGetResponse] +type logGetResponseJSON struct { + ID apijson.Field + Cached apijson.Field + CreatedAt apijson.Field + Duration apijson.Field + Model apijson.Field + Path apijson.Field + Provider apijson.Field + Request apijson.Field + Response apijson.Field + Success apijson.Field + TokensIn apijson.Field + TokensOut apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LogGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r logGetResponseJSON) RawJSON() string { + return r.raw +} + +type LogGetParams struct { + AccountID param.Field[string] `path:"account_id,required"` + Cached param.Field[bool] `query:"cached"` + Direction param.Field[LogGetParamsDirection] `query:"direction"` + EndDate param.Field[time.Time] `query:"end_date" format:"date-time"` + OrderBy param.Field[LogGetParamsOrderBy] `query:"order_by"` + Page param.Field[int64] `query:"page"` + PerPage param.Field[int64] `query:"per_page"` + Search param.Field[string] `query:"search"` + StartDate param.Field[time.Time] `query:"start_date" format:"date-time"` + Success param.Field[bool] `query:"success"` +} + +// URLQuery serializes [LogGetParams]'s query parameters as `url.Values`. +func (r LogGetParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatRepeat, + NestedFormat: apiquery.NestedQueryFormatBrackets, + }) +} + +type LogGetParamsDirection string + +const ( + LogGetParamsDirectionAsc LogGetParamsDirection = "asc" + LogGetParamsDirectionDesc LogGetParamsDirection = "desc" +) + +func (r LogGetParamsDirection) IsKnown() bool { + switch r { + case LogGetParamsDirectionAsc, LogGetParamsDirectionDesc: + return true + } + return false +} + +type LogGetParamsOrderBy string + +const ( + LogGetParamsOrderByCreatedAt LogGetParamsOrderBy = "created_at" + LogGetParamsOrderByProvider LogGetParamsOrderBy = "provider" +) + +func (r LogGetParamsOrderBy) IsKnown() bool { + switch r { + case LogGetParamsOrderByCreatedAt, LogGetParamsOrderByProvider: + return true + } + return false +} + +type LogGetResponseEnvelope struct { + Result []LogGetResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON logGetResponseEnvelopeJSON `json:"-"` +} + +// logGetResponseEnvelopeJSON contains the JSON metadata for the struct +// [LogGetResponseEnvelope] +type logGetResponseEnvelopeJSON struct { + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *LogGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r logGetResponseEnvelopeJSON) RawJSON() string { + return r.raw +} diff --git a/ai_gateway/log_test.go b/ai_gateway/log_test.go new file mode 100644 index 0000000000..8620ea1d39 --- /dev/null +++ b/ai_gateway/log_test.go @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package ai_gateway_test + +import ( + "context" + "errors" + "os" + "testing" + "time" + + "github.com/cloudflare/cloudflare-go/v2" + "github.com/cloudflare/cloudflare-go/v2/ai_gateway" + "github.com/cloudflare/cloudflare-go/v2/internal/testutil" + "github.com/cloudflare/cloudflare-go/v2/option" +) + +func TestLogGetWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.AIGateway.Logs.Get( + context.TODO(), + "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ai_gateway.LogGetParams{ + AccountID: cloudflare.F("0d37909e38d3e99c29fa2cd343ac421a"), + Cached: cloudflare.F(true), + Direction: cloudflare.F(ai_gateway.LogGetParamsDirectionAsc), + EndDate: cloudflare.F(time.Now()), + OrderBy: cloudflare.F(ai_gateway.LogGetParamsOrderByCreatedAt), + Page: cloudflare.F(int64(1)), + PerPage: cloudflare.F(int64(5)), + Search: cloudflare.F("string"), + StartDate: cloudflare.F(time.Now()), + Success: cloudflare.F(true), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/api.md b/api.md index ab7cbee6a1..30995574a5 100644 --- a/api.md +++ b/api.md @@ -6816,4 +6816,28 @@ Methods: # AIGateway +Response Types: + +- ai_gateway.AIGatewayNewResponse +- ai_gateway.AIGatewayUpdateResponse +- ai_gateway.AIGatewayListResponse +- ai_gateway.AIGatewayDeleteResponse +- ai_gateway.AIGatewayGetResponse + +Methods: + +- client.AIGateway.New(ctx context.Context, params ai_gateway.AIGatewayNewParams) (ai_gateway.AIGatewayNewResponse, error) +- client.AIGateway.Update(ctx context.Context, id string, params ai_gateway.AIGatewayUpdateParams) (ai_gateway.AIGatewayUpdateResponse, error) +- client.AIGateway.List(ctx context.Context, params ai_gateway.AIGatewayListParams) (pagination.V4PagePaginationArray[ai_gateway.AIGatewayListResponse], error) +- client.AIGateway.Delete(ctx context.Context, id string, body ai_gateway.AIGatewayDeleteParams) (ai_gateway.AIGatewayDeleteResponse, error) +- client.AIGateway.Get(ctx context.Context, id string, query ai_gateway.AIGatewayGetParams) (ai_gateway.AIGatewayGetResponse, error) + ## Logs + +Response Types: + +- ai_gateway.LogGetResponse + +Methods: + +- client.AIGateway.Logs.Get(ctx context.Context, id string, params ai_gateway.LogGetParams) ([]ai_gateway.LogGetResponse, error) From fb2ff25aeb8cca13bcc444b33fccb5875e340b7f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 14:26:37 +0000 Subject: [PATCH 103/127] feat(api): OpenAPI spec update via Stainless API (#1950) --- .stats.yml | 4 +- api.md | 13 +- custom_nameservers/customnameserver.go | 154 ++------------------ custom_nameservers/customnameserver_test.go | 26 ---- shared/union.go | 3 - zones/customnameserver.go | 72 ++------- 6 files changed, 34 insertions(+), 238 deletions(-) diff --git a/.stats.yml b/.stats.yml index 455fd99129..54834395b2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1275 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-66b404214530cc73c44f34f297dad6bc8da0645b63e61d9d4fcbeb301e127e65.yml +configured_endpoints: 1274 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6ad087215145bdd87a8fb698a148f42cf8f61d66010b60edb5e4842345953810.yml diff --git a/api.md b/api.md index 30995574a5..4ad576f165 100644 --- a/api.md +++ b/api.md @@ -892,13 +892,13 @@ Methods: Response Types: -- zones.CustomNameserverUpdateResponseUnion -- zones.CustomNameserverGetResponseUnion +- zones.CustomNameserverUpdateResponse +- zones.CustomNameserverGetResponse Methods: -- client.Zones.CustomNameservers.Update(ctx context.Context, params zones.CustomNameserverUpdateParams) (zones.CustomNameserverUpdateResponseUnion, error) -- client.Zones.CustomNameservers.Get(ctx context.Context, query zones.CustomNameserverGetParams) (zones.CustomNameserverGetResponseUnion, error) +- client.Zones.CustomNameservers.Update(ctx context.Context, params zones.CustomNameserverUpdateParams) ([]zones.CustomNameserverUpdateResponse, error) +- client.Zones.CustomNameservers.Get(ctx context.Context, query zones.CustomNameserverGetParams) ([]zones.CustomNameserverGetResponse, error) ## Holds @@ -1427,15 +1427,14 @@ Methods: Response Types: - custom_nameservers.CustomNameserver -- custom_nameservers.CustomNameserverDeleteResponseUnion +- custom_nameservers.CustomNameserverDeleteResponse Methods: - client.CustomNameservers.New(ctx context.Context, params custom_nameservers.CustomNameserverNewParams) (custom_nameservers.CustomNameserver, error) -- client.CustomNameservers.Delete(ctx context.Context, customNSID string, body custom_nameservers.CustomNameserverDeleteParams) (custom_nameservers.CustomNameserverDeleteResponseUnion, error) +- client.CustomNameservers.Delete(ctx context.Context, customNSID string, body custom_nameservers.CustomNameserverDeleteParams) ([]custom_nameservers.CustomNameserverDeleteResponse, error) - client.CustomNameservers.Availabilty(ctx context.Context, query custom_nameservers.CustomNameserverAvailabiltyParams) ([]string, error) - client.CustomNameservers.Get(ctx context.Context, query custom_nameservers.CustomNameserverGetParams) ([]custom_nameservers.CustomNameserver, error) -- client.CustomNameservers.Verify(ctx context.Context, params custom_nameservers.CustomNameserverVerifyParams) ([]custom_nameservers.CustomNameserver, error) # DNS diff --git a/custom_nameservers/customnameserver.go b/custom_nameservers/customnameserver.go index 13c4b21f5d..dc9972e568 100644 --- a/custom_nameservers/customnameserver.go +++ b/custom_nameservers/customnameserver.go @@ -6,14 +6,12 @@ import ( "context" "fmt" "net/http" - "reflect" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // CustomNameserverService contains methods and other services that help with @@ -48,7 +46,7 @@ func (r *CustomNameserverService) New(ctx context.Context, params CustomNameserv } // Delete Account Custom Nameserver -func (r *CustomNameserverService) Delete(ctx context.Context, customNSID string, body CustomNameserverDeleteParams, opts ...option.RequestOption) (res *CustomNameserverDeleteResponseUnion, err error) { +func (r *CustomNameserverService) Delete(ctx context.Context, customNSID string, body CustomNameserverDeleteParams, opts ...option.RequestOption) (res *[]CustomNameserverDeleteResponse, err error) { opts = append(r.Options[:], opts...) var env CustomNameserverDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/custom_ns/%s", body.AccountID, customNSID) @@ -86,19 +84,6 @@ func (r *CustomNameserverService) Get(ctx context.Context, query CustomNameserve return } -// Verify Account Custom Nameserver Glue Records -func (r *CustomNameserverService) Verify(ctx context.Context, params CustomNameserverVerifyParams, opts ...option.RequestOption) (res *[]CustomNameserver, err error) { - opts = append(r.Options[:], opts...) - var env CustomNameserverVerifyResponseEnvelope - path := fmt.Sprintf("accounts/%s/custom_ns/verify", params.AccountID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - // A single account custom nameserver. type CustomNameserver struct { // A and AAAA records associated with the nameserver. @@ -192,32 +177,7 @@ func (r CustomNameserverStatus) IsKnown() bool { return false } -// Union satisfied by [custom_nameservers.CustomNameserverDeleteResponseUnknown], -// [custom_nameservers.CustomNameserverDeleteResponseArray] or -// [shared.UnionString]. -type CustomNameserverDeleteResponseUnion interface { - ImplementsCustomNameserversCustomNameserverDeleteResponseUnion() -} - -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*CustomNameserverDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(CustomNameserverDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) -} - -type CustomNameserverDeleteResponseArray []interface{} - -func (r CustomNameserverDeleteResponseArray) ImplementsCustomNameserversCustomNameserverDeleteResponseUnion() { -} +type CustomNameserverDeleteResponse = interface{} type CustomNameserverNewParams struct { // Account identifier tag. @@ -235,11 +195,11 @@ func (r CustomNameserverNewParams) MarshalJSON() (data []byte, err error) { type CustomNameserverNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - // A single account custom nameserver. - Result CustomNameserver `json:"result,required"` // Whether the API call was successful Success CustomNameserverNewResponseEnvelopeSuccess `json:"success,required"` - JSON customNameserverNewResponseEnvelopeJSON `json:"-"` + // A single account custom nameserver. + Result CustomNameserver `json:"result"` + JSON customNameserverNewResponseEnvelopeJSON `json:"-"` } // customNameserverNewResponseEnvelopeJSON contains the JSON metadata for the @@ -247,8 +207,8 @@ type CustomNameserverNewResponseEnvelope struct { type customNameserverNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -282,11 +242,11 @@ type CustomNameserverDeleteParams struct { } type CustomNameserverDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result CustomNameserverDeleteResponseUnion `json:"result,required,nullable"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success CustomNameserverDeleteResponseEnvelopeSuccess `json:"success,required"` + Result []CustomNameserverDeleteResponse `json:"result,nullable"` ResultInfo CustomNameserverDeleteResponseEnvelopeResultInfo `json:"result_info"` JSON customNameserverDeleteResponseEnvelopeJSON `json:"-"` } @@ -296,8 +256,8 @@ type CustomNameserverDeleteResponseEnvelope struct { type customNameserverDeleteResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field ResultInfo apijson.Field raw string ExtraFields map[string]apijson.Field @@ -365,9 +325,9 @@ type CustomNameserverAvailabiltyParams struct { type CustomNameserverAvailabiltyResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result []string `json:"result,required,nullable" format:"hostname"` // Whether the API call was successful Success CustomNameserverAvailabiltyResponseEnvelopeSuccess `json:"success,required"` + Result []string `json:"result,nullable" format:"hostname"` ResultInfo CustomNameserverAvailabiltyResponseEnvelopeResultInfo `json:"result_info"` JSON customNameserverAvailabiltyResponseEnvelopeJSON `json:"-"` } @@ -377,8 +337,8 @@ type CustomNameserverAvailabiltyResponseEnvelope struct { type customNameserverAvailabiltyResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field ResultInfo apijson.Field raw string ExtraFields map[string]apijson.Field @@ -446,9 +406,9 @@ type CustomNameserverGetParams struct { type CustomNameserverGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result []CustomNameserver `json:"result,required,nullable"` // Whether the API call was successful Success CustomNameserverGetResponseEnvelopeSuccess `json:"success,required"` + Result []CustomNameserver `json:"result,nullable"` ResultInfo CustomNameserverGetResponseEnvelopeResultInfo `json:"result_info"` JSON customNameserverGetResponseEnvelopeJSON `json:"-"` } @@ -458,8 +418,8 @@ type CustomNameserverGetResponseEnvelope struct { type customNameserverGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field ResultInfo apijson.Field raw string ExtraFields map[string]apijson.Field @@ -518,89 +478,3 @@ func (r *CustomNameserverGetResponseEnvelopeResultInfo) UnmarshalJSON(data []byt func (r customNameserverGetResponseEnvelopeResultInfoJSON) RawJSON() string { return r.raw } - -type CustomNameserverVerifyParams struct { - // Account identifier tag. - AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r CustomNameserverVerifyParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) -} - -type CustomNameserverVerifyResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result []CustomNameserver `json:"result,required,nullable"` - // Whether the API call was successful - Success CustomNameserverVerifyResponseEnvelopeSuccess `json:"success,required"` - ResultInfo CustomNameserverVerifyResponseEnvelopeResultInfo `json:"result_info"` - JSON customNameserverVerifyResponseEnvelopeJSON `json:"-"` -} - -// customNameserverVerifyResponseEnvelopeJSON contains the JSON metadata for the -// struct [CustomNameserverVerifyResponseEnvelope] -type customNameserverVerifyResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - ResultInfo apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *CustomNameserverVerifyResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r customNameserverVerifyResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type CustomNameserverVerifyResponseEnvelopeSuccess bool - -const ( - CustomNameserverVerifyResponseEnvelopeSuccessTrue CustomNameserverVerifyResponseEnvelopeSuccess = true -) - -func (r CustomNameserverVerifyResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case CustomNameserverVerifyResponseEnvelopeSuccessTrue: - return true - } - return false -} - -type CustomNameserverVerifyResponseEnvelopeResultInfo struct { - // Total number of results for the requested service - Count float64 `json:"count"` - // Current page within paginated list of results - Page float64 `json:"page"` - // Number of results per page of results - PerPage float64 `json:"per_page"` - // Total results available without any search parameters - TotalCount float64 `json:"total_count"` - JSON customNameserverVerifyResponseEnvelopeResultInfoJSON `json:"-"` -} - -// customNameserverVerifyResponseEnvelopeResultInfoJSON contains the JSON metadata -// for the struct [CustomNameserverVerifyResponseEnvelopeResultInfo] -type customNameserverVerifyResponseEnvelopeResultInfoJSON struct { - Count apijson.Field - Page apijson.Field - PerPage apijson.Field - TotalCount apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *CustomNameserverVerifyResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r customNameserverVerifyResponseEnvelopeResultInfoJSON) RawJSON() string { - return r.raw -} diff --git a/custom_nameservers/customnameserver_test.go b/custom_nameservers/customnameserver_test.go index 4acb2631cd..8a9fb12a04 100644 --- a/custom_nameservers/customnameserver_test.go +++ b/custom_nameservers/customnameserver_test.go @@ -119,29 +119,3 @@ func TestCustomNameserverGet(t *testing.T) { t.Fatalf("err should be nil: %s", err.Error()) } } - -func TestCustomNameserverVerify(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.CustomNameservers.Verify(context.TODO(), custom_nameservers.CustomNameserverVerifyParams{ - AccountID: cloudflare.F("372e67954025e0ba6aaa6d586b9e0b59"), - Body: map[string]interface{}{}, - }) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/shared/union.go b/shared/union.go index 212561aacd..a7e14ce40b 100644 --- a/shared/union.go +++ b/shared/union.go @@ -22,8 +22,6 @@ func (UnionString) ImplementsUserSubscriptionUpdateResponseUnion() func (UnionString) ImplementsUserSubscriptionEditResponseUnion() {} func (UnionString) ImplementsUserTokenUpdateResponseUnion() {} func (UnionString) ImplementsUserTokenGetResponseUnion() {} -func (UnionString) ImplementsZonesCustomNameserverUpdateResponseUnion() {} -func (UnionString) ImplementsZonesCustomNameserverGetResponseUnion() {} func (UnionString) ImplementsZonesSubscriptionNewResponseUnion() {} func (UnionString) ImplementsZonesSubscriptionGetResponseUnion() {} func (UnionString) ImplementsLoadBalancersPoolHealthGetResponseUnion() {} @@ -48,7 +46,6 @@ func (UnionString) ImplementsCustomCertificatesCustomCertificateGetResponseUnion func (UnionString) ImplementsCustomHostnamesFallbackOriginUpdateResponseUnion() {} func (UnionString) ImplementsCustomHostnamesFallbackOriginDeleteResponseUnion() {} func (UnionString) ImplementsCustomHostnamesFallbackOriginGetResponseUnion() {} -func (UnionString) ImplementsCustomNameserversCustomNameserverDeleteResponseUnion() {} func (UnionString) ImplementsDNSFirewallIPsUnionParam() {} func (UnionString) ImplementsDNSFirewallIPsUnion() {} func (UnionString) ImplementsDNSUpstreamIPsUnionParam() {} diff --git a/zones/customnameserver.go b/zones/customnameserver.go index 5154e6ae28..cc1744ec15 100644 --- a/zones/customnameserver.go +++ b/zones/customnameserver.go @@ -6,14 +6,12 @@ import ( "context" "fmt" "net/http" - "reflect" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/param" "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // CustomNameserverService contains methods and other services that help with @@ -39,7 +37,7 @@ func NewCustomNameserverService(opts ...option.RequestOption) (r *CustomNameserv // If you would like new zones in the account to use account custom nameservers by // default, use PUT /accounts/:identifier to set the account setting // use_account_custom_ns_by_default to true. -func (r *CustomNameserverService) Update(ctx context.Context, params CustomNameserverUpdateParams, opts ...option.RequestOption) (res *CustomNameserverUpdateResponseUnion, err error) { +func (r *CustomNameserverService) Update(ctx context.Context, params CustomNameserverUpdateParams, opts ...option.RequestOption) (res *[]CustomNameserverUpdateResponse, err error) { opts = append(r.Options[:], opts...) var env CustomNameserverUpdateResponseEnvelope path := fmt.Sprintf("zones/%s/custom_ns", params.ZoneID) @@ -52,7 +50,7 @@ func (r *CustomNameserverService) Update(ctx context.Context, params CustomNames } // Get metadata for account-level custom nameservers on a zone. -func (r *CustomNameserverService) Get(ctx context.Context, query CustomNameserverGetParams, opts ...option.RequestOption) (res *CustomNameserverGetResponseUnion, err error) { +func (r *CustomNameserverService) Get(ctx context.Context, query CustomNameserverGetParams, opts ...option.RequestOption) (res *[]CustomNameserverGetResponse, err error) { opts = append(r.Options[:], opts...) var env CustomNameserverGetResponseEnvelope path := fmt.Sprintf("zones/%s/custom_ns", query.ZoneID) @@ -64,55 +62,9 @@ func (r *CustomNameserverService) Get(ctx context.Context, query CustomNameserve return } -// Union satisfied by [zones.CustomNameserverUpdateResponseUnknown], -// [zones.CustomNameserverUpdateResponseArray] or [shared.UnionString]. -type CustomNameserverUpdateResponseUnion interface { - ImplementsZonesCustomNameserverUpdateResponseUnion() -} - -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*CustomNameserverUpdateResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(CustomNameserverUpdateResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) -} - -type CustomNameserverUpdateResponseArray []interface{} - -func (r CustomNameserverUpdateResponseArray) ImplementsZonesCustomNameserverUpdateResponseUnion() {} - -// Union satisfied by [zones.CustomNameserverGetResponseUnknown], -// [zones.CustomNameserverGetResponseArray] or [shared.UnionString]. -type CustomNameserverGetResponseUnion interface { - ImplementsZonesCustomNameserverGetResponseUnion() -} +type CustomNameserverUpdateResponse = interface{} -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*CustomNameserverGetResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(CustomNameserverGetResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) -} - -type CustomNameserverGetResponseArray []interface{} - -func (r CustomNameserverGetResponseArray) ImplementsZonesCustomNameserverGetResponseUnion() {} +type CustomNameserverGetResponse = interface{} type CustomNameserverUpdateParams struct { // Identifier @@ -128,11 +80,11 @@ func (r CustomNameserverUpdateParams) MarshalJSON() (data []byte, err error) { } type CustomNameserverUpdateResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result CustomNameserverUpdateResponseUnion `json:"result,required,nullable"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success CustomNameserverUpdateResponseEnvelopeSuccess `json:"success,required"` + Result []CustomNameserverUpdateResponse `json:"result,nullable"` ResultInfo CustomNameserverUpdateResponseEnvelopeResultInfo `json:"result_info"` JSON customNameserverUpdateResponseEnvelopeJSON `json:"-"` } @@ -142,8 +94,8 @@ type CustomNameserverUpdateResponseEnvelope struct { type customNameserverUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field ResultInfo apijson.Field raw string ExtraFields map[string]apijson.Field @@ -209,15 +161,15 @@ type CustomNameserverGetParams struct { } type CustomNameserverGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result CustomNameserverGetResponseUnion `json:"result,required,nullable"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success CustomNameserverGetResponseEnvelopeSuccess `json:"success,required"` // Whether zone uses account-level custom nameservers. Enabled bool `json:"enabled"` // The number of the name server set to assign to the zone. NSSet float64 `json:"ns_set"` + Result []CustomNameserverGetResponse `json:"result,nullable"` ResultInfo CustomNameserverGetResponseEnvelopeResultInfo `json:"result_info"` JSON customNameserverGetResponseEnvelopeJSON `json:"-"` } @@ -227,10 +179,10 @@ type CustomNameserverGetResponseEnvelope struct { type customNameserverGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field Enabled apijson.Field NSSet apijson.Field + Result apijson.Field ResultInfo apijson.Field raw string ExtraFields map[string]apijson.Field From 6a198dedd36c9b8e13e8175f134e88a5e3308ace Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 16:06:29 +0000 Subject: [PATCH 104/127] feat(api): OpenAPI spec update via Stainless API (#1951) --- .stats.yml | 2 +- api.md | 12 +-- cloudforce_one/request.go | 132 +++++++++++++++++++----------- cloudforce_one/requestmessage.go | 119 +++++++++++++++++---------- cloudforce_one/requestpriority.go | 123 ++++++++++++++++++---------- intel/whois.go | 4 +- shared/union.go | 3 + 7 files changed, 251 insertions(+), 144 deletions(-) diff --git a/.stats.yml b/.stats.yml index 54834395b2..962272c1e3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1274 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6ad087215145bdd87a8fb698a148f42cf8f61d66010b60edb5e4842345953810.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9bc8c7349e1faaedaba66ec467cb51af588573ea2e3fb8e107a7f91904ef1f11.yml diff --git a/api.md b/api.md index 4ad576f165..61db0ef41f 100644 --- a/api.md +++ b/api.md @@ -6739,14 +6739,14 @@ Response Types: - cloudforce_one.Quota - cloudforce_one.RequestConstants - cloudforce_one.RequestTypes -- cloudforce_one.RequestDeleteResponse +- cloudforce_one.RequestDeleteResponseUnion Methods: - client.CloudforceOne.Requests.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestNewParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestUpdateParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.List(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestListParams) (pagination.V4PagePaginationArray[cloudforce_one.ListItem], error) -- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponse, error) +- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponseUnion, error) - client.CloudforceOne.Requests.Constants(ctx context.Context, accountIdentifier string) (cloudforce_one.RequestConstants, error) - client.CloudforceOne.Requests.Get(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) @@ -6757,13 +6757,13 @@ Methods: Response Types: - cloudforce_one.Message -- cloudforce_one.RequestMessageDeleteResponse +- cloudforce_one.RequestMessageDeleteResponseUnion Methods: - client.CloudforceOne.Requests.Message.New(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageNewParams) (cloudforce_one.Message, error) - client.CloudforceOne.Requests.Message.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, body cloudforce_one.RequestMessageUpdateParams) (cloudforce_one.Message, error) -- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponse, error) +- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponseUnion, error) - client.CloudforceOne.Requests.Message.Get(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageGetParams) ([]cloudforce_one.Message, error) ### Priority @@ -6777,13 +6777,13 @@ Response Types: - cloudforce_one.Label - cloudforce_one.Priority -- cloudforce_one.RequestPriorityDeleteResponse +- cloudforce_one.RequestPriorityDeleteResponseUnion Methods: - client.CloudforceOne.Requests.Priority.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestPriorityNewParams) (cloudforce_one.Priority, error) - client.CloudforceOne.Requests.Priority.Update(ctx context.Context, accountIdentifier string, priorityIdentifer string, body cloudforce_one.RequestPriorityUpdateParams) (cloudforce_one.Item, error) -- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponse, error) +- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponseUnion, error) - client.CloudforceOne.Requests.Priority.Get(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Priority.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) diff --git a/cloudforce_one/request.go b/cloudforce_one/request.go index a5865d5f35..ce028e3612 100644 --- a/cloudforce_one/request.go +++ b/cloudforce_one/request.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/option" "github.com/cloudflare/cloudflare-go/v2/shared" + "github.com/tidwall/gjson" ) // RequestService contains methods and other services that help with interacting @@ -91,10 +93,15 @@ func (r *RequestService) ListAutoPaging(ctx context.Context, accountIdentifier s } // Delete a Request -func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponse, err error) { +func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) + var env RequestDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s", accountIdentifier, requestIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result return } @@ -462,46 +469,30 @@ func (r RequestConstantsTlp) IsKnown() bool { type RequestTypes []string -type RequestDeleteResponse struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success RequestDeleteResponseSuccess `json:"success,required"` - JSON requestDeleteResponseJSON `json:"-"` -} - -// requestDeleteResponseJSON contains the JSON metadata for the struct -// [RequestDeleteResponse] -type requestDeleteResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) +// Union satisfied by [cloudforce_one.RequestDeleteResponseUnknown], +// [cloudforce_one.RequestDeleteResponseArray] or [shared.UnionString]. +type RequestDeleteResponseUnion interface { + ImplementsCloudforceOneRequestDeleteResponseUnion() } -func (r requestDeleteResponseJSON) RawJSON() string { - return r.raw +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*RequestDeleteResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(RequestDeleteResponseArray{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) } -// Whether the API call was successful -type RequestDeleteResponseSuccess bool +type RequestDeleteResponseArray []interface{} -const ( - RequestDeleteResponseSuccessTrue RequestDeleteResponseSuccess = true -) - -func (r RequestDeleteResponseSuccess) IsKnown() bool { - switch r { - case RequestDeleteResponseSuccessTrue: - return true - } - return false -} +func (r RequestDeleteResponseArray) ImplementsCloudforceOneRequestDeleteResponseUnion() {} type RequestNewParams struct { // Request content @@ -542,9 +533,9 @@ func (r RequestNewParamsTlp) IsKnown() bool { type RequestNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestNewResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestNewResponseEnvelopeJSON `json:"-"` } @@ -553,8 +544,8 @@ type RequestNewResponseEnvelope struct { type requestNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -621,9 +612,9 @@ func (r RequestUpdateParamsTlp) IsKnown() bool { type RequestUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestUpdateResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestUpdateResponseEnvelopeJSON `json:"-"` } @@ -632,8 +623,8 @@ type RequestUpdateResponseEnvelope struct { type requestUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -724,12 +715,55 @@ func (r RequestListParamsStatus) IsKnown() bool { return false } +type RequestDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestDeleteResponseUnion `json:"result,required"` + // Whether the API call was successful + Success RequestDeleteResponseEnvelopeSuccess `json:"success,required"` + JSON requestDeleteResponseEnvelopeJSON `json:"-"` +} + +// requestDeleteResponseEnvelopeJSON contains the JSON metadata for the struct +// [RequestDeleteResponseEnvelope] +type requestDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r requestDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestDeleteResponseEnvelopeSuccess bool + +const ( + RequestDeleteResponseEnvelopeSuccessTrue RequestDeleteResponseEnvelopeSuccess = true +) + +func (r RequestDeleteResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case RequestDeleteResponseEnvelopeSuccessTrue: + return true + } + return false +} + type RequestConstantsResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestConstants `json:"result,required"` // Whether the API call was successful Success RequestConstantsResponseEnvelopeSuccess `json:"success,required"` - Result RequestConstants `json:"result"` JSON requestConstantsResponseEnvelopeJSON `json:"-"` } @@ -738,8 +772,8 @@ type RequestConstantsResponseEnvelope struct { type requestConstantsResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -770,9 +804,9 @@ func (r RequestConstantsResponseEnvelopeSuccess) IsKnown() bool { type RequestGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestGetResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestGetResponseEnvelopeJSON `json:"-"` } @@ -781,8 +815,8 @@ type RequestGetResponseEnvelope struct { type requestGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -813,9 +847,9 @@ func (r RequestGetResponseEnvelopeSuccess) IsKnown() bool { type RequestQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Quota `json:"result,required"` // Whether the API call was successful Success RequestQuotaResponseEnvelopeSuccess `json:"success,required"` - Result Quota `json:"result"` JSON requestQuotaResponseEnvelopeJSON `json:"-"` } @@ -824,8 +858,8 @@ type RequestQuotaResponseEnvelope struct { type requestQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -856,9 +890,9 @@ func (r RequestQuotaResponseEnvelopeSuccess) IsKnown() bool { type RequestTypesResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestTypes `json:"result,required"` // Whether the API call was successful Success RequestTypesResponseEnvelopeSuccess `json:"success,required"` - Result RequestTypes `json:"result"` JSON requestTypesResponseEnvelopeJSON `json:"-"` } @@ -867,8 +901,8 @@ type RequestTypesResponseEnvelope struct { type requestTypesResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestmessage.go b/cloudforce_one/requestmessage.go index f3949be2ee..b5a88e43b5 100644 --- a/cloudforce_one/requestmessage.go +++ b/cloudforce_one/requestmessage.go @@ -6,6 +6,7 @@ import ( "context" "fmt" "net/http" + "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -13,6 +14,7 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" + "github.com/tidwall/gjson" ) // RequestMessageService contains methods and other services that help with @@ -62,10 +64,15 @@ func (r *RequestMessageService) Update(ctx context.Context, accountIdentifier st } // Delete a Request Message -func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponse, err error) { +func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) + var env RequestMessageDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s/message/%v", accountIdentifier, requestIdentifier, messageIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result return } @@ -118,45 +125,30 @@ func (r messageJSON) RawJSON() string { return r.raw } -type RequestMessageDeleteResponse struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success RequestMessageDeleteResponseSuccess `json:"success,required"` - JSON requestMessageDeleteResponseJSON `json:"-"` -} - -// requestMessageDeleteResponseJSON contains the JSON metadata for the struct -// [RequestMessageDeleteResponse] -type requestMessageDeleteResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestMessageDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) +// Union satisfied by [cloudforce_one.RequestMessageDeleteResponseUnknown], +// [cloudforce_one.RequestMessageDeleteResponseArray] or [shared.UnionString]. +type RequestMessageDeleteResponseUnion interface { + ImplementsCloudforceOneRequestMessageDeleteResponseUnion() } -func (r requestMessageDeleteResponseJSON) RawJSON() string { - return r.raw +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*RequestMessageDeleteResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(RequestMessageDeleteResponseArray{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) } -// Whether the API call was successful -type RequestMessageDeleteResponseSuccess bool - -const ( - RequestMessageDeleteResponseSuccessTrue RequestMessageDeleteResponseSuccess = true -) +type RequestMessageDeleteResponseArray []interface{} -func (r RequestMessageDeleteResponseSuccess) IsKnown() bool { - switch r { - case RequestMessageDeleteResponseSuccessTrue: - return true - } - return false +func (r RequestMessageDeleteResponseArray) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() { } type RequestMessageNewParams struct { @@ -171,9 +163,9 @@ func (r RequestMessageNewParams) MarshalJSON() (data []byte, err error) { type RequestMessageNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageNewResponseEnvelopeSuccess `json:"success,required"` - Result Message `json:"result"` JSON requestMessageNewResponseEnvelopeJSON `json:"-"` } @@ -182,8 +174,8 @@ type RequestMessageNewResponseEnvelope struct { type requestMessageNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -250,9 +242,9 @@ func (r RequestMessageUpdateParamsTlp) IsKnown() bool { type RequestMessageUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageUpdateResponseEnvelopeSuccess `json:"success,required"` - Result Message `json:"result"` JSON requestMessageUpdateResponseEnvelopeJSON `json:"-"` } @@ -261,8 +253,8 @@ type RequestMessageUpdateResponseEnvelope struct { type requestMessageUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -290,6 +282,49 @@ func (r RequestMessageUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } +type RequestMessageDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestMessageDeleteResponseUnion `json:"result,required"` + // Whether the API call was successful + Success RequestMessageDeleteResponseEnvelopeSuccess `json:"success,required"` + JSON requestMessageDeleteResponseEnvelopeJSON `json:"-"` +} + +// requestMessageDeleteResponseEnvelopeJSON contains the JSON metadata for the +// struct [RequestMessageDeleteResponseEnvelope] +type requestMessageDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestMessageDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r requestMessageDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestMessageDeleteResponseEnvelopeSuccess bool + +const ( + RequestMessageDeleteResponseEnvelopeSuccessTrue RequestMessageDeleteResponseEnvelopeSuccess = true +) + +func (r RequestMessageDeleteResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case RequestMessageDeleteResponseEnvelopeSuccessTrue: + return true + } + return false +} + type RequestMessageGetParams struct { // Page number of results Page param.Field[int64] `json:"page,required"` @@ -328,9 +363,9 @@ func (r RequestMessageGetParamsSortOrder) IsKnown() bool { type RequestMessageGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result []Message `json:"result,required"` // Whether the API call was successful Success RequestMessageGetResponseEnvelopeSuccess `json:"success,required"` - Result []Message `json:"result"` JSON requestMessageGetResponseEnvelopeJSON `json:"-"` } @@ -339,8 +374,8 @@ type RequestMessageGetResponseEnvelope struct { type requestMessageGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestpriority.go b/cloudforce_one/requestpriority.go index eef29460bf..702df8b577 100644 --- a/cloudforce_one/requestpriority.go +++ b/cloudforce_one/requestpriority.go @@ -6,6 +6,7 @@ import ( "context" "fmt" "net/http" + "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -13,6 +14,7 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" + "github.com/tidwall/gjson" ) // RequestPriorityService contains methods and other services that help with @@ -60,10 +62,15 @@ func (r *RequestPriorityService) Update(ctx context.Context, accountIdentifier s } // Delete a Priority Intelligence Report -func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponse, err error) { +func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) + var env RequestPriorityDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/priority/%s", accountIdentifier, priorityIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result return } @@ -189,45 +196,30 @@ func (r PriorityEditTlp) IsKnown() bool { return false } -type RequestPriorityDeleteResponse struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success RequestPriorityDeleteResponseSuccess `json:"success,required"` - JSON requestPriorityDeleteResponseJSON `json:"-"` +// Union satisfied by [cloudforce_one.RequestPriorityDeleteResponseUnknown], +// [cloudforce_one.RequestPriorityDeleteResponseArray] or [shared.UnionString]. +type RequestPriorityDeleteResponseUnion interface { + ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() } -// requestPriorityDeleteResponseJSON contains the JSON metadata for the struct -// [RequestPriorityDeleteResponse] -type requestPriorityDeleteResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*RequestPriorityDeleteResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(RequestPriorityDeleteResponseArray{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) } -func (r *RequestPriorityDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} +type RequestPriorityDeleteResponseArray []interface{} -func (r requestPriorityDeleteResponseJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestPriorityDeleteResponseSuccess bool - -const ( - RequestPriorityDeleteResponseSuccessTrue RequestPriorityDeleteResponseSuccess = true -) - -func (r RequestPriorityDeleteResponseSuccess) IsKnown() bool { - switch r { - case RequestPriorityDeleteResponseSuccessTrue: - return true - } - return false +func (r RequestPriorityDeleteResponseArray) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() { } type RequestPriorityNewParams struct { @@ -241,9 +233,9 @@ func (r RequestPriorityNewParams) MarshalJSON() (data []byte, err error) { type RequestPriorityNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Priority `json:"result,required"` // Whether the API call was successful Success RequestPriorityNewResponseEnvelopeSuccess `json:"success,required"` - Result Priority `json:"result"` JSON requestPriorityNewResponseEnvelopeJSON `json:"-"` } @@ -252,8 +244,8 @@ type RequestPriorityNewResponseEnvelope struct { type requestPriorityNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -292,9 +284,9 @@ func (r RequestPriorityUpdateParams) MarshalJSON() (data []byte, err error) { type RequestPriorityUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityUpdateResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestPriorityUpdateResponseEnvelopeJSON `json:"-"` } @@ -303,8 +295,8 @@ type RequestPriorityUpdateResponseEnvelope struct { type requestPriorityUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -332,12 +324,55 @@ func (r RequestPriorityUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } +type RequestPriorityDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestPriorityDeleteResponseUnion `json:"result,required"` + // Whether the API call was successful + Success RequestPriorityDeleteResponseEnvelopeSuccess `json:"success,required"` + JSON requestPriorityDeleteResponseEnvelopeJSON `json:"-"` +} + +// requestPriorityDeleteResponseEnvelopeJSON contains the JSON metadata for the +// struct [RequestPriorityDeleteResponseEnvelope] +type requestPriorityDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestPriorityDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r requestPriorityDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestPriorityDeleteResponseEnvelopeSuccess bool + +const ( + RequestPriorityDeleteResponseEnvelopeSuccessTrue RequestPriorityDeleteResponseEnvelopeSuccess = true +) + +func (r RequestPriorityDeleteResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case RequestPriorityDeleteResponseEnvelopeSuccessTrue: + return true + } + return false +} + type RequestPriorityGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityGetResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestPriorityGetResponseEnvelopeJSON `json:"-"` } @@ -346,8 +381,8 @@ type RequestPriorityGetResponseEnvelope struct { type requestPriorityGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -378,9 +413,9 @@ func (r RequestPriorityGetResponseEnvelopeSuccess) IsKnown() bool { type RequestPriorityQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Quota `json:"result,required"` // Whether the API call was successful Success RequestPriorityQuotaResponseEnvelopeSuccess `json:"success,required"` - Result Quota `json:"result"` JSON requestPriorityQuotaResponseEnvelopeJSON `json:"-"` } @@ -389,8 +424,8 @@ type RequestPriorityQuotaResponseEnvelope struct { type requestPriorityQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/intel/whois.go b/intel/whois.go index 5655c7c1a8..ece63a5b8f 100644 --- a/intel/whois.go +++ b/intel/whois.go @@ -259,9 +259,9 @@ func (r WhoisGetParams) URLQuery() (v url.Values) { type WhoisGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result WhoisGetResponse `json:"result,required"` // Whether the API call was successful Success WhoisGetResponseEnvelopeSuccess `json:"success,required"` - Result WhoisGetResponse `json:"result"` JSON whoisGetResponseEnvelopeJSON `json:"-"` } @@ -270,8 +270,8 @@ type WhoisGetResponseEnvelope struct { type whoisGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/shared/union.go b/shared/union.go index a7e14ce40b..6ee8fd1516 100644 --- a/shared/union.go +++ b/shared/union.go @@ -163,6 +163,9 @@ func (UnionString) ImplementsOriginPostQuantumEncryptionOriginPostQuantumEncrypt } func (UnionString) ImplementsHostnamesSettingValueUnionParam() {} func (UnionString) ImplementsHostnamesSettingValueUnion() {} +func (UnionString) ImplementsCloudforceOneRequestDeleteResponseUnion() {} +func (UnionString) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() {} +func (UnionString) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() {} func (UnionString) ImplementsEventNotificationsR2ConfigurationQueueDeleteResponseUnion() {} type UnionInt int64 From 77ff8dc903f942c194f34424bc053e0a2e1d2fdf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 16:22:50 +0000 Subject: [PATCH 105/127] feat(api): OpenAPI spec update via Stainless API (#1952) --- .stats.yml | 2 +- api.md | 12 +-- cloudforce_one/request.go | 132 +++++++++++------------------- cloudforce_one/requestmessage.go | 119 ++++++++++----------------- cloudforce_one/requestpriority.go | 123 ++++++++++------------------ intel/whois.go | 4 +- shared/union.go | 3 - 7 files changed, 144 insertions(+), 251 deletions(-) diff --git a/.stats.yml b/.stats.yml index 962272c1e3..54834395b2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1274 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9bc8c7349e1faaedaba66ec467cb51af588573ea2e3fb8e107a7f91904ef1f11.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6ad087215145bdd87a8fb698a148f42cf8f61d66010b60edb5e4842345953810.yml diff --git a/api.md b/api.md index 61db0ef41f..4ad576f165 100644 --- a/api.md +++ b/api.md @@ -6739,14 +6739,14 @@ Response Types: - cloudforce_one.Quota - cloudforce_one.RequestConstants - cloudforce_one.RequestTypes -- cloudforce_one.RequestDeleteResponseUnion +- cloudforce_one.RequestDeleteResponse Methods: - client.CloudforceOne.Requests.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestNewParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestUpdateParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.List(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestListParams) (pagination.V4PagePaginationArray[cloudforce_one.ListItem], error) -- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponse, error) - client.CloudforceOne.Requests.Constants(ctx context.Context, accountIdentifier string) (cloudforce_one.RequestConstants, error) - client.CloudforceOne.Requests.Get(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) @@ -6757,13 +6757,13 @@ Methods: Response Types: - cloudforce_one.Message -- cloudforce_one.RequestMessageDeleteResponseUnion +- cloudforce_one.RequestMessageDeleteResponse Methods: - client.CloudforceOne.Requests.Message.New(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageNewParams) (cloudforce_one.Message, error) - client.CloudforceOne.Requests.Message.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, body cloudforce_one.RequestMessageUpdateParams) (cloudforce_one.Message, error) -- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponse, error) - client.CloudforceOne.Requests.Message.Get(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageGetParams) ([]cloudforce_one.Message, error) ### Priority @@ -6777,13 +6777,13 @@ Response Types: - cloudforce_one.Label - cloudforce_one.Priority -- cloudforce_one.RequestPriorityDeleteResponseUnion +- cloudforce_one.RequestPriorityDeleteResponse Methods: - client.CloudforceOne.Requests.Priority.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestPriorityNewParams) (cloudforce_one.Priority, error) - client.CloudforceOne.Requests.Priority.Update(ctx context.Context, accountIdentifier string, priorityIdentifer string, body cloudforce_one.RequestPriorityUpdateParams) (cloudforce_one.Item, error) -- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponse, error) - client.CloudforceOne.Requests.Priority.Get(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Priority.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) diff --git a/cloudforce_one/request.go b/cloudforce_one/request.go index ce028e3612..a5865d5f35 100644 --- a/cloudforce_one/request.go +++ b/cloudforce_one/request.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -15,7 +14,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestService contains methods and other services that help with interacting @@ -93,15 +91,10 @@ func (r *RequestService) ListAutoPaging(ctx context.Context, accountIdentifier s } // Delete a Request -func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponseUnion, err error) { +func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s", accountIdentifier, requestIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -469,30 +462,46 @@ func (r RequestConstantsTlp) IsKnown() bool { type RequestTypes []string -// Union satisfied by [cloudforce_one.RequestDeleteResponseUnknown], -// [cloudforce_one.RequestDeleteResponseArray] or [shared.UnionString]. -type RequestDeleteResponseUnion interface { - ImplementsCloudforceOneRequestDeleteResponseUnion() +type RequestDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestDeleteResponseSuccess `json:"success,required"` + JSON requestDeleteResponseJSON `json:"-"` +} + +// requestDeleteResponseJSON contains the JSON metadata for the struct +// [RequestDeleteResponse] +type requestDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +func (r requestDeleteResponseJSON) RawJSON() string { + return r.raw } -type RequestDeleteResponseArray []interface{} +// Whether the API call was successful +type RequestDeleteResponseSuccess bool -func (r RequestDeleteResponseArray) ImplementsCloudforceOneRequestDeleteResponseUnion() {} +const ( + RequestDeleteResponseSuccessTrue RequestDeleteResponseSuccess = true +) + +func (r RequestDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestDeleteResponseSuccessTrue: + return true + } + return false +} type RequestNewParams struct { // Request content @@ -533,9 +542,9 @@ func (r RequestNewParamsTlp) IsKnown() bool { type RequestNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestNewResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestNewResponseEnvelopeJSON `json:"-"` } @@ -544,8 +553,8 @@ type RequestNewResponseEnvelope struct { type requestNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -612,9 +621,9 @@ func (r RequestUpdateParamsTlp) IsKnown() bool { type RequestUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestUpdateResponseEnvelopeJSON `json:"-"` } @@ -623,8 +632,8 @@ type RequestUpdateResponseEnvelope struct { type requestUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -715,55 +724,12 @@ func (r RequestListParamsStatus) IsKnown() bool { return false } -type RequestDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestDeleteResponseEnvelopeJSON contains the JSON metadata for the struct -// [RequestDeleteResponseEnvelope] -type requestDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestDeleteResponseEnvelopeSuccess bool - -const ( - RequestDeleteResponseEnvelopeSuccessTrue RequestDeleteResponseEnvelopeSuccess = true -) - -func (r RequestDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestConstantsResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestConstants `json:"result,required"` // Whether the API call was successful Success RequestConstantsResponseEnvelopeSuccess `json:"success,required"` + Result RequestConstants `json:"result"` JSON requestConstantsResponseEnvelopeJSON `json:"-"` } @@ -772,8 +738,8 @@ type RequestConstantsResponseEnvelope struct { type requestConstantsResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -804,9 +770,9 @@ func (r RequestConstantsResponseEnvelopeSuccess) IsKnown() bool { type RequestGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestGetResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestGetResponseEnvelopeJSON `json:"-"` } @@ -815,8 +781,8 @@ type RequestGetResponseEnvelope struct { type requestGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -847,9 +813,9 @@ func (r RequestGetResponseEnvelopeSuccess) IsKnown() bool { type RequestQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Quota `json:"result,required"` // Whether the API call was successful Success RequestQuotaResponseEnvelopeSuccess `json:"success,required"` + Result Quota `json:"result"` JSON requestQuotaResponseEnvelopeJSON `json:"-"` } @@ -858,8 +824,8 @@ type RequestQuotaResponseEnvelope struct { type requestQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -890,9 +856,9 @@ func (r RequestQuotaResponseEnvelopeSuccess) IsKnown() bool { type RequestTypesResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestTypes `json:"result,required"` // Whether the API call was successful Success RequestTypesResponseEnvelopeSuccess `json:"success,required"` + Result RequestTypes `json:"result"` JSON requestTypesResponseEnvelopeJSON `json:"-"` } @@ -901,8 +867,8 @@ type RequestTypesResponseEnvelope struct { type requestTypesResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestmessage.go b/cloudforce_one/requestmessage.go index b5a88e43b5..f3949be2ee 100644 --- a/cloudforce_one/requestmessage.go +++ b/cloudforce_one/requestmessage.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -14,7 +13,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestMessageService contains methods and other services that help with @@ -64,15 +62,10 @@ func (r *RequestMessageService) Update(ctx context.Context, accountIdentifier st } // Delete a Request Message -func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponseUnion, err error) { +func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestMessageDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s/message/%v", accountIdentifier, requestIdentifier, messageIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -125,30 +118,45 @@ func (r messageJSON) RawJSON() string { return r.raw } -// Union satisfied by [cloudforce_one.RequestMessageDeleteResponseUnknown], -// [cloudforce_one.RequestMessageDeleteResponseArray] or [shared.UnionString]. -type RequestMessageDeleteResponseUnion interface { - ImplementsCloudforceOneRequestMessageDeleteResponseUnion() +type RequestMessageDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestMessageDeleteResponseSuccess `json:"success,required"` + JSON requestMessageDeleteResponseJSON `json:"-"` +} + +// requestMessageDeleteResponseJSON contains the JSON metadata for the struct +// [RequestMessageDeleteResponse] +type requestMessageDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestMessageDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestMessageDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestMessageDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +func (r requestMessageDeleteResponseJSON) RawJSON() string { + return r.raw } -type RequestMessageDeleteResponseArray []interface{} +// Whether the API call was successful +type RequestMessageDeleteResponseSuccess bool + +const ( + RequestMessageDeleteResponseSuccessTrue RequestMessageDeleteResponseSuccess = true +) -func (r RequestMessageDeleteResponseArray) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() { +func (r RequestMessageDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestMessageDeleteResponseSuccessTrue: + return true + } + return false } type RequestMessageNewParams struct { @@ -163,9 +171,9 @@ func (r RequestMessageNewParams) MarshalJSON() (data []byte, err error) { type RequestMessageNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageNewResponseEnvelopeSuccess `json:"success,required"` + Result Message `json:"result"` JSON requestMessageNewResponseEnvelopeJSON `json:"-"` } @@ -174,8 +182,8 @@ type RequestMessageNewResponseEnvelope struct { type requestMessageNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -242,9 +250,9 @@ func (r RequestMessageUpdateParamsTlp) IsKnown() bool { type RequestMessageUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Message `json:"result"` JSON requestMessageUpdateResponseEnvelopeJSON `json:"-"` } @@ -253,8 +261,8 @@ type RequestMessageUpdateResponseEnvelope struct { type requestMessageUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -282,49 +290,6 @@ func (r RequestMessageUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } -type RequestMessageDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestMessageDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestMessageDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestMessageDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestMessageDeleteResponseEnvelopeJSON contains the JSON metadata for the -// struct [RequestMessageDeleteResponseEnvelope] -type requestMessageDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestMessageDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestMessageDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestMessageDeleteResponseEnvelopeSuccess bool - -const ( - RequestMessageDeleteResponseEnvelopeSuccessTrue RequestMessageDeleteResponseEnvelopeSuccess = true -) - -func (r RequestMessageDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestMessageDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestMessageGetParams struct { // Page number of results Page param.Field[int64] `json:"page,required"` @@ -363,9 +328,9 @@ func (r RequestMessageGetParamsSortOrder) IsKnown() bool { type RequestMessageGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result []Message `json:"result,required"` // Whether the API call was successful Success RequestMessageGetResponseEnvelopeSuccess `json:"success,required"` + Result []Message `json:"result"` JSON requestMessageGetResponseEnvelopeJSON `json:"-"` } @@ -374,8 +339,8 @@ type RequestMessageGetResponseEnvelope struct { type requestMessageGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestpriority.go b/cloudforce_one/requestpriority.go index 702df8b577..eef29460bf 100644 --- a/cloudforce_one/requestpriority.go +++ b/cloudforce_one/requestpriority.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -14,7 +13,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestPriorityService contains methods and other services that help with @@ -62,15 +60,10 @@ func (r *RequestPriorityService) Update(ctx context.Context, accountIdentifier s } // Delete a Priority Intelligence Report -func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponseUnion, err error) { +func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestPriorityDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/priority/%s", accountIdentifier, priorityIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -196,30 +189,45 @@ func (r PriorityEditTlp) IsKnown() bool { return false } -// Union satisfied by [cloudforce_one.RequestPriorityDeleteResponseUnknown], -// [cloudforce_one.RequestPriorityDeleteResponseArray] or [shared.UnionString]. -type RequestPriorityDeleteResponseUnion interface { - ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() +type RequestPriorityDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestPriorityDeleteResponseSuccess `json:"success,required"` + JSON requestPriorityDeleteResponseJSON `json:"-"` } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestPriorityDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestPriorityDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +// requestPriorityDeleteResponseJSON contains the JSON metadata for the struct +// [RequestPriorityDeleteResponse] +type requestPriorityDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field } -type RequestPriorityDeleteResponseArray []interface{} +func (r *RequestPriorityDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} -func (r RequestPriorityDeleteResponseArray) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() { +func (r requestPriorityDeleteResponseJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestPriorityDeleteResponseSuccess bool + +const ( + RequestPriorityDeleteResponseSuccessTrue RequestPriorityDeleteResponseSuccess = true +) + +func (r RequestPriorityDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestPriorityDeleteResponseSuccessTrue: + return true + } + return false } type RequestPriorityNewParams struct { @@ -233,9 +241,9 @@ func (r RequestPriorityNewParams) MarshalJSON() (data []byte, err error) { type RequestPriorityNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Priority `json:"result,required"` // Whether the API call was successful Success RequestPriorityNewResponseEnvelopeSuccess `json:"success,required"` + Result Priority `json:"result"` JSON requestPriorityNewResponseEnvelopeJSON `json:"-"` } @@ -244,8 +252,8 @@ type RequestPriorityNewResponseEnvelope struct { type requestPriorityNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -284,9 +292,9 @@ func (r RequestPriorityUpdateParams) MarshalJSON() (data []byte, err error) { type RequestPriorityUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestPriorityUpdateResponseEnvelopeJSON `json:"-"` } @@ -295,8 +303,8 @@ type RequestPriorityUpdateResponseEnvelope struct { type requestPriorityUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -324,55 +332,12 @@ func (r RequestPriorityUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } -type RequestPriorityDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestPriorityDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestPriorityDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestPriorityDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestPriorityDeleteResponseEnvelopeJSON contains the JSON metadata for the -// struct [RequestPriorityDeleteResponseEnvelope] -type requestPriorityDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestPriorityDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestPriorityDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestPriorityDeleteResponseEnvelopeSuccess bool - -const ( - RequestPriorityDeleteResponseEnvelopeSuccessTrue RequestPriorityDeleteResponseEnvelopeSuccess = true -) - -func (r RequestPriorityDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestPriorityDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestPriorityGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityGetResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestPriorityGetResponseEnvelopeJSON `json:"-"` } @@ -381,8 +346,8 @@ type RequestPriorityGetResponseEnvelope struct { type requestPriorityGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -413,9 +378,9 @@ func (r RequestPriorityGetResponseEnvelopeSuccess) IsKnown() bool { type RequestPriorityQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Quota `json:"result,required"` // Whether the API call was successful Success RequestPriorityQuotaResponseEnvelopeSuccess `json:"success,required"` + Result Quota `json:"result"` JSON requestPriorityQuotaResponseEnvelopeJSON `json:"-"` } @@ -424,8 +389,8 @@ type RequestPriorityQuotaResponseEnvelope struct { type requestPriorityQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/intel/whois.go b/intel/whois.go index ece63a5b8f..5655c7c1a8 100644 --- a/intel/whois.go +++ b/intel/whois.go @@ -259,9 +259,9 @@ func (r WhoisGetParams) URLQuery() (v url.Values) { type WhoisGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result WhoisGetResponse `json:"result,required"` // Whether the API call was successful Success WhoisGetResponseEnvelopeSuccess `json:"success,required"` + Result WhoisGetResponse `json:"result"` JSON whoisGetResponseEnvelopeJSON `json:"-"` } @@ -270,8 +270,8 @@ type WhoisGetResponseEnvelope struct { type whoisGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/shared/union.go b/shared/union.go index 6ee8fd1516..a7e14ce40b 100644 --- a/shared/union.go +++ b/shared/union.go @@ -163,9 +163,6 @@ func (UnionString) ImplementsOriginPostQuantumEncryptionOriginPostQuantumEncrypt } func (UnionString) ImplementsHostnamesSettingValueUnionParam() {} func (UnionString) ImplementsHostnamesSettingValueUnion() {} -func (UnionString) ImplementsCloudforceOneRequestDeleteResponseUnion() {} -func (UnionString) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() {} -func (UnionString) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() {} func (UnionString) ImplementsEventNotificationsR2ConfigurationQueueDeleteResponseUnion() {} type UnionInt int64 From 9bbf92c162395a833ab59264b890301e9ebd5d6d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 16:25:40 +0000 Subject: [PATCH 106/127] feat(api): OpenAPI spec update via Stainless API (#1953) --- .stats.yml | 2 +- api.md | 12 +-- cloudforce_one/request.go | 132 +++++++++++++++++++----------- cloudforce_one/requestmessage.go | 119 +++++++++++++++++---------- cloudforce_one/requestpriority.go | 123 ++++++++++++++++++---------- intel/whois.go | 4 +- shared/union.go | 3 + 7 files changed, 251 insertions(+), 144 deletions(-) diff --git a/.stats.yml b/.stats.yml index 54834395b2..962272c1e3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1274 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6ad087215145bdd87a8fb698a148f42cf8f61d66010b60edb5e4842345953810.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9bc8c7349e1faaedaba66ec467cb51af588573ea2e3fb8e107a7f91904ef1f11.yml diff --git a/api.md b/api.md index 4ad576f165..61db0ef41f 100644 --- a/api.md +++ b/api.md @@ -6739,14 +6739,14 @@ Response Types: - cloudforce_one.Quota - cloudforce_one.RequestConstants - cloudforce_one.RequestTypes -- cloudforce_one.RequestDeleteResponse +- cloudforce_one.RequestDeleteResponseUnion Methods: - client.CloudforceOne.Requests.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestNewParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestUpdateParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.List(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestListParams) (pagination.V4PagePaginationArray[cloudforce_one.ListItem], error) -- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponse, error) +- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponseUnion, error) - client.CloudforceOne.Requests.Constants(ctx context.Context, accountIdentifier string) (cloudforce_one.RequestConstants, error) - client.CloudforceOne.Requests.Get(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) @@ -6757,13 +6757,13 @@ Methods: Response Types: - cloudforce_one.Message -- cloudforce_one.RequestMessageDeleteResponse +- cloudforce_one.RequestMessageDeleteResponseUnion Methods: - client.CloudforceOne.Requests.Message.New(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageNewParams) (cloudforce_one.Message, error) - client.CloudforceOne.Requests.Message.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, body cloudforce_one.RequestMessageUpdateParams) (cloudforce_one.Message, error) -- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponse, error) +- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponseUnion, error) - client.CloudforceOne.Requests.Message.Get(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageGetParams) ([]cloudforce_one.Message, error) ### Priority @@ -6777,13 +6777,13 @@ Response Types: - cloudforce_one.Label - cloudforce_one.Priority -- cloudforce_one.RequestPriorityDeleteResponse +- cloudforce_one.RequestPriorityDeleteResponseUnion Methods: - client.CloudforceOne.Requests.Priority.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestPriorityNewParams) (cloudforce_one.Priority, error) - client.CloudforceOne.Requests.Priority.Update(ctx context.Context, accountIdentifier string, priorityIdentifer string, body cloudforce_one.RequestPriorityUpdateParams) (cloudforce_one.Item, error) -- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponse, error) +- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponseUnion, error) - client.CloudforceOne.Requests.Priority.Get(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Priority.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) diff --git a/cloudforce_one/request.go b/cloudforce_one/request.go index a5865d5f35..ce028e3612 100644 --- a/cloudforce_one/request.go +++ b/cloudforce_one/request.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/option" "github.com/cloudflare/cloudflare-go/v2/shared" + "github.com/tidwall/gjson" ) // RequestService contains methods and other services that help with interacting @@ -91,10 +93,15 @@ func (r *RequestService) ListAutoPaging(ctx context.Context, accountIdentifier s } // Delete a Request -func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponse, err error) { +func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) + var env RequestDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s", accountIdentifier, requestIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result return } @@ -462,46 +469,30 @@ func (r RequestConstantsTlp) IsKnown() bool { type RequestTypes []string -type RequestDeleteResponse struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success RequestDeleteResponseSuccess `json:"success,required"` - JSON requestDeleteResponseJSON `json:"-"` -} - -// requestDeleteResponseJSON contains the JSON metadata for the struct -// [RequestDeleteResponse] -type requestDeleteResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) +// Union satisfied by [cloudforce_one.RequestDeleteResponseUnknown], +// [cloudforce_one.RequestDeleteResponseArray] or [shared.UnionString]. +type RequestDeleteResponseUnion interface { + ImplementsCloudforceOneRequestDeleteResponseUnion() } -func (r requestDeleteResponseJSON) RawJSON() string { - return r.raw +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*RequestDeleteResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(RequestDeleteResponseArray{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) } -// Whether the API call was successful -type RequestDeleteResponseSuccess bool +type RequestDeleteResponseArray []interface{} -const ( - RequestDeleteResponseSuccessTrue RequestDeleteResponseSuccess = true -) - -func (r RequestDeleteResponseSuccess) IsKnown() bool { - switch r { - case RequestDeleteResponseSuccessTrue: - return true - } - return false -} +func (r RequestDeleteResponseArray) ImplementsCloudforceOneRequestDeleteResponseUnion() {} type RequestNewParams struct { // Request content @@ -542,9 +533,9 @@ func (r RequestNewParamsTlp) IsKnown() bool { type RequestNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestNewResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestNewResponseEnvelopeJSON `json:"-"` } @@ -553,8 +544,8 @@ type RequestNewResponseEnvelope struct { type requestNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -621,9 +612,9 @@ func (r RequestUpdateParamsTlp) IsKnown() bool { type RequestUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestUpdateResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestUpdateResponseEnvelopeJSON `json:"-"` } @@ -632,8 +623,8 @@ type RequestUpdateResponseEnvelope struct { type requestUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -724,12 +715,55 @@ func (r RequestListParamsStatus) IsKnown() bool { return false } +type RequestDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestDeleteResponseUnion `json:"result,required"` + // Whether the API call was successful + Success RequestDeleteResponseEnvelopeSuccess `json:"success,required"` + JSON requestDeleteResponseEnvelopeJSON `json:"-"` +} + +// requestDeleteResponseEnvelopeJSON contains the JSON metadata for the struct +// [RequestDeleteResponseEnvelope] +type requestDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r requestDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestDeleteResponseEnvelopeSuccess bool + +const ( + RequestDeleteResponseEnvelopeSuccessTrue RequestDeleteResponseEnvelopeSuccess = true +) + +func (r RequestDeleteResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case RequestDeleteResponseEnvelopeSuccessTrue: + return true + } + return false +} + type RequestConstantsResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestConstants `json:"result,required"` // Whether the API call was successful Success RequestConstantsResponseEnvelopeSuccess `json:"success,required"` - Result RequestConstants `json:"result"` JSON requestConstantsResponseEnvelopeJSON `json:"-"` } @@ -738,8 +772,8 @@ type RequestConstantsResponseEnvelope struct { type requestConstantsResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -770,9 +804,9 @@ func (r RequestConstantsResponseEnvelopeSuccess) IsKnown() bool { type RequestGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestGetResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestGetResponseEnvelopeJSON `json:"-"` } @@ -781,8 +815,8 @@ type RequestGetResponseEnvelope struct { type requestGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -813,9 +847,9 @@ func (r RequestGetResponseEnvelopeSuccess) IsKnown() bool { type RequestQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Quota `json:"result,required"` // Whether the API call was successful Success RequestQuotaResponseEnvelopeSuccess `json:"success,required"` - Result Quota `json:"result"` JSON requestQuotaResponseEnvelopeJSON `json:"-"` } @@ -824,8 +858,8 @@ type RequestQuotaResponseEnvelope struct { type requestQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -856,9 +890,9 @@ func (r RequestQuotaResponseEnvelopeSuccess) IsKnown() bool { type RequestTypesResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestTypes `json:"result,required"` // Whether the API call was successful Success RequestTypesResponseEnvelopeSuccess `json:"success,required"` - Result RequestTypes `json:"result"` JSON requestTypesResponseEnvelopeJSON `json:"-"` } @@ -867,8 +901,8 @@ type RequestTypesResponseEnvelope struct { type requestTypesResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestmessage.go b/cloudforce_one/requestmessage.go index f3949be2ee..b5a88e43b5 100644 --- a/cloudforce_one/requestmessage.go +++ b/cloudforce_one/requestmessage.go @@ -6,6 +6,7 @@ import ( "context" "fmt" "net/http" + "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -13,6 +14,7 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" + "github.com/tidwall/gjson" ) // RequestMessageService contains methods and other services that help with @@ -62,10 +64,15 @@ func (r *RequestMessageService) Update(ctx context.Context, accountIdentifier st } // Delete a Request Message -func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponse, err error) { +func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) + var env RequestMessageDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s/message/%v", accountIdentifier, requestIdentifier, messageIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result return } @@ -118,45 +125,30 @@ func (r messageJSON) RawJSON() string { return r.raw } -type RequestMessageDeleteResponse struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success RequestMessageDeleteResponseSuccess `json:"success,required"` - JSON requestMessageDeleteResponseJSON `json:"-"` -} - -// requestMessageDeleteResponseJSON contains the JSON metadata for the struct -// [RequestMessageDeleteResponse] -type requestMessageDeleteResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestMessageDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) +// Union satisfied by [cloudforce_one.RequestMessageDeleteResponseUnknown], +// [cloudforce_one.RequestMessageDeleteResponseArray] or [shared.UnionString]. +type RequestMessageDeleteResponseUnion interface { + ImplementsCloudforceOneRequestMessageDeleteResponseUnion() } -func (r requestMessageDeleteResponseJSON) RawJSON() string { - return r.raw +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*RequestMessageDeleteResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(RequestMessageDeleteResponseArray{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) } -// Whether the API call was successful -type RequestMessageDeleteResponseSuccess bool - -const ( - RequestMessageDeleteResponseSuccessTrue RequestMessageDeleteResponseSuccess = true -) +type RequestMessageDeleteResponseArray []interface{} -func (r RequestMessageDeleteResponseSuccess) IsKnown() bool { - switch r { - case RequestMessageDeleteResponseSuccessTrue: - return true - } - return false +func (r RequestMessageDeleteResponseArray) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() { } type RequestMessageNewParams struct { @@ -171,9 +163,9 @@ func (r RequestMessageNewParams) MarshalJSON() (data []byte, err error) { type RequestMessageNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageNewResponseEnvelopeSuccess `json:"success,required"` - Result Message `json:"result"` JSON requestMessageNewResponseEnvelopeJSON `json:"-"` } @@ -182,8 +174,8 @@ type RequestMessageNewResponseEnvelope struct { type requestMessageNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -250,9 +242,9 @@ func (r RequestMessageUpdateParamsTlp) IsKnown() bool { type RequestMessageUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageUpdateResponseEnvelopeSuccess `json:"success,required"` - Result Message `json:"result"` JSON requestMessageUpdateResponseEnvelopeJSON `json:"-"` } @@ -261,8 +253,8 @@ type RequestMessageUpdateResponseEnvelope struct { type requestMessageUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -290,6 +282,49 @@ func (r RequestMessageUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } +type RequestMessageDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestMessageDeleteResponseUnion `json:"result,required"` + // Whether the API call was successful + Success RequestMessageDeleteResponseEnvelopeSuccess `json:"success,required"` + JSON requestMessageDeleteResponseEnvelopeJSON `json:"-"` +} + +// requestMessageDeleteResponseEnvelopeJSON contains the JSON metadata for the +// struct [RequestMessageDeleteResponseEnvelope] +type requestMessageDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestMessageDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r requestMessageDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestMessageDeleteResponseEnvelopeSuccess bool + +const ( + RequestMessageDeleteResponseEnvelopeSuccessTrue RequestMessageDeleteResponseEnvelopeSuccess = true +) + +func (r RequestMessageDeleteResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case RequestMessageDeleteResponseEnvelopeSuccessTrue: + return true + } + return false +} + type RequestMessageGetParams struct { // Page number of results Page param.Field[int64] `json:"page,required"` @@ -328,9 +363,9 @@ func (r RequestMessageGetParamsSortOrder) IsKnown() bool { type RequestMessageGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result []Message `json:"result,required"` // Whether the API call was successful Success RequestMessageGetResponseEnvelopeSuccess `json:"success,required"` - Result []Message `json:"result"` JSON requestMessageGetResponseEnvelopeJSON `json:"-"` } @@ -339,8 +374,8 @@ type RequestMessageGetResponseEnvelope struct { type requestMessageGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestpriority.go b/cloudforce_one/requestpriority.go index eef29460bf..702df8b577 100644 --- a/cloudforce_one/requestpriority.go +++ b/cloudforce_one/requestpriority.go @@ -6,6 +6,7 @@ import ( "context" "fmt" "net/http" + "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -13,6 +14,7 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" + "github.com/tidwall/gjson" ) // RequestPriorityService contains methods and other services that help with @@ -60,10 +62,15 @@ func (r *RequestPriorityService) Update(ctx context.Context, accountIdentifier s } // Delete a Priority Intelligence Report -func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponse, err error) { +func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) + var env RequestPriorityDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/priority/%s", accountIdentifier, priorityIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result return } @@ -189,45 +196,30 @@ func (r PriorityEditTlp) IsKnown() bool { return false } -type RequestPriorityDeleteResponse struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success RequestPriorityDeleteResponseSuccess `json:"success,required"` - JSON requestPriorityDeleteResponseJSON `json:"-"` +// Union satisfied by [cloudforce_one.RequestPriorityDeleteResponseUnknown], +// [cloudforce_one.RequestPriorityDeleteResponseArray] or [shared.UnionString]. +type RequestPriorityDeleteResponseUnion interface { + ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() } -// requestPriorityDeleteResponseJSON contains the JSON metadata for the struct -// [RequestPriorityDeleteResponse] -type requestPriorityDeleteResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*RequestPriorityDeleteResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(RequestPriorityDeleteResponseArray{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) } -func (r *RequestPriorityDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} +type RequestPriorityDeleteResponseArray []interface{} -func (r requestPriorityDeleteResponseJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestPriorityDeleteResponseSuccess bool - -const ( - RequestPriorityDeleteResponseSuccessTrue RequestPriorityDeleteResponseSuccess = true -) - -func (r RequestPriorityDeleteResponseSuccess) IsKnown() bool { - switch r { - case RequestPriorityDeleteResponseSuccessTrue: - return true - } - return false +func (r RequestPriorityDeleteResponseArray) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() { } type RequestPriorityNewParams struct { @@ -241,9 +233,9 @@ func (r RequestPriorityNewParams) MarshalJSON() (data []byte, err error) { type RequestPriorityNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Priority `json:"result,required"` // Whether the API call was successful Success RequestPriorityNewResponseEnvelopeSuccess `json:"success,required"` - Result Priority `json:"result"` JSON requestPriorityNewResponseEnvelopeJSON `json:"-"` } @@ -252,8 +244,8 @@ type RequestPriorityNewResponseEnvelope struct { type requestPriorityNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -292,9 +284,9 @@ func (r RequestPriorityUpdateParams) MarshalJSON() (data []byte, err error) { type RequestPriorityUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityUpdateResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestPriorityUpdateResponseEnvelopeJSON `json:"-"` } @@ -303,8 +295,8 @@ type RequestPriorityUpdateResponseEnvelope struct { type requestPriorityUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -332,12 +324,55 @@ func (r RequestPriorityUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } +type RequestPriorityDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestPriorityDeleteResponseUnion `json:"result,required"` + // Whether the API call was successful + Success RequestPriorityDeleteResponseEnvelopeSuccess `json:"success,required"` + JSON requestPriorityDeleteResponseEnvelopeJSON `json:"-"` +} + +// requestPriorityDeleteResponseEnvelopeJSON contains the JSON metadata for the +// struct [RequestPriorityDeleteResponseEnvelope] +type requestPriorityDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestPriorityDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r requestPriorityDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestPriorityDeleteResponseEnvelopeSuccess bool + +const ( + RequestPriorityDeleteResponseEnvelopeSuccessTrue RequestPriorityDeleteResponseEnvelopeSuccess = true +) + +func (r RequestPriorityDeleteResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case RequestPriorityDeleteResponseEnvelopeSuccessTrue: + return true + } + return false +} + type RequestPriorityGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityGetResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestPriorityGetResponseEnvelopeJSON `json:"-"` } @@ -346,8 +381,8 @@ type RequestPriorityGetResponseEnvelope struct { type requestPriorityGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -378,9 +413,9 @@ func (r RequestPriorityGetResponseEnvelopeSuccess) IsKnown() bool { type RequestPriorityQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Quota `json:"result,required"` // Whether the API call was successful Success RequestPriorityQuotaResponseEnvelopeSuccess `json:"success,required"` - Result Quota `json:"result"` JSON requestPriorityQuotaResponseEnvelopeJSON `json:"-"` } @@ -389,8 +424,8 @@ type RequestPriorityQuotaResponseEnvelope struct { type requestPriorityQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/intel/whois.go b/intel/whois.go index 5655c7c1a8..ece63a5b8f 100644 --- a/intel/whois.go +++ b/intel/whois.go @@ -259,9 +259,9 @@ func (r WhoisGetParams) URLQuery() (v url.Values) { type WhoisGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result WhoisGetResponse `json:"result,required"` // Whether the API call was successful Success WhoisGetResponseEnvelopeSuccess `json:"success,required"` - Result WhoisGetResponse `json:"result"` JSON whoisGetResponseEnvelopeJSON `json:"-"` } @@ -270,8 +270,8 @@ type WhoisGetResponseEnvelope struct { type whoisGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/shared/union.go b/shared/union.go index a7e14ce40b..6ee8fd1516 100644 --- a/shared/union.go +++ b/shared/union.go @@ -163,6 +163,9 @@ func (UnionString) ImplementsOriginPostQuantumEncryptionOriginPostQuantumEncrypt } func (UnionString) ImplementsHostnamesSettingValueUnionParam() {} func (UnionString) ImplementsHostnamesSettingValueUnion() {} +func (UnionString) ImplementsCloudforceOneRequestDeleteResponseUnion() {} +func (UnionString) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() {} +func (UnionString) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() {} func (UnionString) ImplementsEventNotificationsR2ConfigurationQueueDeleteResponseUnion() {} type UnionInt int64 From ef1504ccaf174b491a2b17ef4f836c20e6932398 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 17:52:23 +0000 Subject: [PATCH 107/127] feat(api): OpenAPI spec update via Stainless API (#1954) --- .stats.yml | 2 +- api.md | 12 +-- cloudforce_one/request.go | 132 +++++++++++------------------- cloudforce_one/requestmessage.go | 119 ++++++++++----------------- cloudforce_one/requestpriority.go | 123 ++++++++++------------------ intel/whois.go | 4 +- shared/union.go | 4 - workers/ai.go | 27 ++---- 8 files changed, 152 insertions(+), 271 deletions(-) diff --git a/.stats.yml b/.stats.yml index 962272c1e3..4b0a6c99fd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1274 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9bc8c7349e1faaedaba66ec467cb51af588573ea2e3fb8e107a7f91904ef1f11.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7630542ab54cbf2ecc413fca70bec2ea5d9670cb4a3e6d02247f4a2509e9643b.yml diff --git a/api.md b/api.md index 61db0ef41f..4ad576f165 100644 --- a/api.md +++ b/api.md @@ -6739,14 +6739,14 @@ Response Types: - cloudforce_one.Quota - cloudforce_one.RequestConstants - cloudforce_one.RequestTypes -- cloudforce_one.RequestDeleteResponseUnion +- cloudforce_one.RequestDeleteResponse Methods: - client.CloudforceOne.Requests.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestNewParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestUpdateParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.List(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestListParams) (pagination.V4PagePaginationArray[cloudforce_one.ListItem], error) -- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponse, error) - client.CloudforceOne.Requests.Constants(ctx context.Context, accountIdentifier string) (cloudforce_one.RequestConstants, error) - client.CloudforceOne.Requests.Get(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) @@ -6757,13 +6757,13 @@ Methods: Response Types: - cloudforce_one.Message -- cloudforce_one.RequestMessageDeleteResponseUnion +- cloudforce_one.RequestMessageDeleteResponse Methods: - client.CloudforceOne.Requests.Message.New(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageNewParams) (cloudforce_one.Message, error) - client.CloudforceOne.Requests.Message.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, body cloudforce_one.RequestMessageUpdateParams) (cloudforce_one.Message, error) -- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponse, error) - client.CloudforceOne.Requests.Message.Get(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageGetParams) ([]cloudforce_one.Message, error) ### Priority @@ -6777,13 +6777,13 @@ Response Types: - cloudforce_one.Label - cloudforce_one.Priority -- cloudforce_one.RequestPriorityDeleteResponseUnion +- cloudforce_one.RequestPriorityDeleteResponse Methods: - client.CloudforceOne.Requests.Priority.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestPriorityNewParams) (cloudforce_one.Priority, error) - client.CloudforceOne.Requests.Priority.Update(ctx context.Context, accountIdentifier string, priorityIdentifer string, body cloudforce_one.RequestPriorityUpdateParams) (cloudforce_one.Item, error) -- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponse, error) - client.CloudforceOne.Requests.Priority.Get(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Priority.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) diff --git a/cloudforce_one/request.go b/cloudforce_one/request.go index ce028e3612..a5865d5f35 100644 --- a/cloudforce_one/request.go +++ b/cloudforce_one/request.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -15,7 +14,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestService contains methods and other services that help with interacting @@ -93,15 +91,10 @@ func (r *RequestService) ListAutoPaging(ctx context.Context, accountIdentifier s } // Delete a Request -func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponseUnion, err error) { +func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s", accountIdentifier, requestIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -469,30 +462,46 @@ func (r RequestConstantsTlp) IsKnown() bool { type RequestTypes []string -// Union satisfied by [cloudforce_one.RequestDeleteResponseUnknown], -// [cloudforce_one.RequestDeleteResponseArray] or [shared.UnionString]. -type RequestDeleteResponseUnion interface { - ImplementsCloudforceOneRequestDeleteResponseUnion() +type RequestDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestDeleteResponseSuccess `json:"success,required"` + JSON requestDeleteResponseJSON `json:"-"` +} + +// requestDeleteResponseJSON contains the JSON metadata for the struct +// [RequestDeleteResponse] +type requestDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +func (r requestDeleteResponseJSON) RawJSON() string { + return r.raw } -type RequestDeleteResponseArray []interface{} +// Whether the API call was successful +type RequestDeleteResponseSuccess bool -func (r RequestDeleteResponseArray) ImplementsCloudforceOneRequestDeleteResponseUnion() {} +const ( + RequestDeleteResponseSuccessTrue RequestDeleteResponseSuccess = true +) + +func (r RequestDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestDeleteResponseSuccessTrue: + return true + } + return false +} type RequestNewParams struct { // Request content @@ -533,9 +542,9 @@ func (r RequestNewParamsTlp) IsKnown() bool { type RequestNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestNewResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestNewResponseEnvelopeJSON `json:"-"` } @@ -544,8 +553,8 @@ type RequestNewResponseEnvelope struct { type requestNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -612,9 +621,9 @@ func (r RequestUpdateParamsTlp) IsKnown() bool { type RequestUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestUpdateResponseEnvelopeJSON `json:"-"` } @@ -623,8 +632,8 @@ type RequestUpdateResponseEnvelope struct { type requestUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -715,55 +724,12 @@ func (r RequestListParamsStatus) IsKnown() bool { return false } -type RequestDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestDeleteResponseEnvelopeJSON contains the JSON metadata for the struct -// [RequestDeleteResponseEnvelope] -type requestDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestDeleteResponseEnvelopeSuccess bool - -const ( - RequestDeleteResponseEnvelopeSuccessTrue RequestDeleteResponseEnvelopeSuccess = true -) - -func (r RequestDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestConstantsResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestConstants `json:"result,required"` // Whether the API call was successful Success RequestConstantsResponseEnvelopeSuccess `json:"success,required"` + Result RequestConstants `json:"result"` JSON requestConstantsResponseEnvelopeJSON `json:"-"` } @@ -772,8 +738,8 @@ type RequestConstantsResponseEnvelope struct { type requestConstantsResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -804,9 +770,9 @@ func (r RequestConstantsResponseEnvelopeSuccess) IsKnown() bool { type RequestGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestGetResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestGetResponseEnvelopeJSON `json:"-"` } @@ -815,8 +781,8 @@ type RequestGetResponseEnvelope struct { type requestGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -847,9 +813,9 @@ func (r RequestGetResponseEnvelopeSuccess) IsKnown() bool { type RequestQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Quota `json:"result,required"` // Whether the API call was successful Success RequestQuotaResponseEnvelopeSuccess `json:"success,required"` + Result Quota `json:"result"` JSON requestQuotaResponseEnvelopeJSON `json:"-"` } @@ -858,8 +824,8 @@ type RequestQuotaResponseEnvelope struct { type requestQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -890,9 +856,9 @@ func (r RequestQuotaResponseEnvelopeSuccess) IsKnown() bool { type RequestTypesResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestTypes `json:"result,required"` // Whether the API call was successful Success RequestTypesResponseEnvelopeSuccess `json:"success,required"` + Result RequestTypes `json:"result"` JSON requestTypesResponseEnvelopeJSON `json:"-"` } @@ -901,8 +867,8 @@ type RequestTypesResponseEnvelope struct { type requestTypesResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestmessage.go b/cloudforce_one/requestmessage.go index b5a88e43b5..f3949be2ee 100644 --- a/cloudforce_one/requestmessage.go +++ b/cloudforce_one/requestmessage.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -14,7 +13,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestMessageService contains methods and other services that help with @@ -64,15 +62,10 @@ func (r *RequestMessageService) Update(ctx context.Context, accountIdentifier st } // Delete a Request Message -func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponseUnion, err error) { +func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestMessageDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s/message/%v", accountIdentifier, requestIdentifier, messageIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -125,30 +118,45 @@ func (r messageJSON) RawJSON() string { return r.raw } -// Union satisfied by [cloudforce_one.RequestMessageDeleteResponseUnknown], -// [cloudforce_one.RequestMessageDeleteResponseArray] or [shared.UnionString]. -type RequestMessageDeleteResponseUnion interface { - ImplementsCloudforceOneRequestMessageDeleteResponseUnion() +type RequestMessageDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestMessageDeleteResponseSuccess `json:"success,required"` + JSON requestMessageDeleteResponseJSON `json:"-"` +} + +// requestMessageDeleteResponseJSON contains the JSON metadata for the struct +// [RequestMessageDeleteResponse] +type requestMessageDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestMessageDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestMessageDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestMessageDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +func (r requestMessageDeleteResponseJSON) RawJSON() string { + return r.raw } -type RequestMessageDeleteResponseArray []interface{} +// Whether the API call was successful +type RequestMessageDeleteResponseSuccess bool + +const ( + RequestMessageDeleteResponseSuccessTrue RequestMessageDeleteResponseSuccess = true +) -func (r RequestMessageDeleteResponseArray) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() { +func (r RequestMessageDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestMessageDeleteResponseSuccessTrue: + return true + } + return false } type RequestMessageNewParams struct { @@ -163,9 +171,9 @@ func (r RequestMessageNewParams) MarshalJSON() (data []byte, err error) { type RequestMessageNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageNewResponseEnvelopeSuccess `json:"success,required"` + Result Message `json:"result"` JSON requestMessageNewResponseEnvelopeJSON `json:"-"` } @@ -174,8 +182,8 @@ type RequestMessageNewResponseEnvelope struct { type requestMessageNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -242,9 +250,9 @@ func (r RequestMessageUpdateParamsTlp) IsKnown() bool { type RequestMessageUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Message `json:"result"` JSON requestMessageUpdateResponseEnvelopeJSON `json:"-"` } @@ -253,8 +261,8 @@ type RequestMessageUpdateResponseEnvelope struct { type requestMessageUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -282,49 +290,6 @@ func (r RequestMessageUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } -type RequestMessageDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestMessageDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestMessageDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestMessageDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestMessageDeleteResponseEnvelopeJSON contains the JSON metadata for the -// struct [RequestMessageDeleteResponseEnvelope] -type requestMessageDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestMessageDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestMessageDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestMessageDeleteResponseEnvelopeSuccess bool - -const ( - RequestMessageDeleteResponseEnvelopeSuccessTrue RequestMessageDeleteResponseEnvelopeSuccess = true -) - -func (r RequestMessageDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestMessageDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestMessageGetParams struct { // Page number of results Page param.Field[int64] `json:"page,required"` @@ -363,9 +328,9 @@ func (r RequestMessageGetParamsSortOrder) IsKnown() bool { type RequestMessageGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result []Message `json:"result,required"` // Whether the API call was successful Success RequestMessageGetResponseEnvelopeSuccess `json:"success,required"` + Result []Message `json:"result"` JSON requestMessageGetResponseEnvelopeJSON `json:"-"` } @@ -374,8 +339,8 @@ type RequestMessageGetResponseEnvelope struct { type requestMessageGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestpriority.go b/cloudforce_one/requestpriority.go index 702df8b577..eef29460bf 100644 --- a/cloudforce_one/requestpriority.go +++ b/cloudforce_one/requestpriority.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -14,7 +13,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestPriorityService contains methods and other services that help with @@ -62,15 +60,10 @@ func (r *RequestPriorityService) Update(ctx context.Context, accountIdentifier s } // Delete a Priority Intelligence Report -func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponseUnion, err error) { +func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestPriorityDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/priority/%s", accountIdentifier, priorityIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -196,30 +189,45 @@ func (r PriorityEditTlp) IsKnown() bool { return false } -// Union satisfied by [cloudforce_one.RequestPriorityDeleteResponseUnknown], -// [cloudforce_one.RequestPriorityDeleteResponseArray] or [shared.UnionString]. -type RequestPriorityDeleteResponseUnion interface { - ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() +type RequestPriorityDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestPriorityDeleteResponseSuccess `json:"success,required"` + JSON requestPriorityDeleteResponseJSON `json:"-"` } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestPriorityDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestPriorityDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +// requestPriorityDeleteResponseJSON contains the JSON metadata for the struct +// [RequestPriorityDeleteResponse] +type requestPriorityDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field } -type RequestPriorityDeleteResponseArray []interface{} +func (r *RequestPriorityDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} -func (r RequestPriorityDeleteResponseArray) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() { +func (r requestPriorityDeleteResponseJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestPriorityDeleteResponseSuccess bool + +const ( + RequestPriorityDeleteResponseSuccessTrue RequestPriorityDeleteResponseSuccess = true +) + +func (r RequestPriorityDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestPriorityDeleteResponseSuccessTrue: + return true + } + return false } type RequestPriorityNewParams struct { @@ -233,9 +241,9 @@ func (r RequestPriorityNewParams) MarshalJSON() (data []byte, err error) { type RequestPriorityNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Priority `json:"result,required"` // Whether the API call was successful Success RequestPriorityNewResponseEnvelopeSuccess `json:"success,required"` + Result Priority `json:"result"` JSON requestPriorityNewResponseEnvelopeJSON `json:"-"` } @@ -244,8 +252,8 @@ type RequestPriorityNewResponseEnvelope struct { type requestPriorityNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -284,9 +292,9 @@ func (r RequestPriorityUpdateParams) MarshalJSON() (data []byte, err error) { type RequestPriorityUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestPriorityUpdateResponseEnvelopeJSON `json:"-"` } @@ -295,8 +303,8 @@ type RequestPriorityUpdateResponseEnvelope struct { type requestPriorityUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -324,55 +332,12 @@ func (r RequestPriorityUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } -type RequestPriorityDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestPriorityDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestPriorityDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestPriorityDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestPriorityDeleteResponseEnvelopeJSON contains the JSON metadata for the -// struct [RequestPriorityDeleteResponseEnvelope] -type requestPriorityDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestPriorityDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestPriorityDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestPriorityDeleteResponseEnvelopeSuccess bool - -const ( - RequestPriorityDeleteResponseEnvelopeSuccessTrue RequestPriorityDeleteResponseEnvelopeSuccess = true -) - -func (r RequestPriorityDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestPriorityDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestPriorityGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityGetResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestPriorityGetResponseEnvelopeJSON `json:"-"` } @@ -381,8 +346,8 @@ type RequestPriorityGetResponseEnvelope struct { type requestPriorityGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -413,9 +378,9 @@ func (r RequestPriorityGetResponseEnvelopeSuccess) IsKnown() bool { type RequestPriorityQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Quota `json:"result,required"` // Whether the API call was successful Success RequestPriorityQuotaResponseEnvelopeSuccess `json:"success,required"` + Result Quota `json:"result"` JSON requestPriorityQuotaResponseEnvelopeJSON `json:"-"` } @@ -424,8 +389,8 @@ type RequestPriorityQuotaResponseEnvelope struct { type requestPriorityQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/intel/whois.go b/intel/whois.go index ece63a5b8f..5655c7c1a8 100644 --- a/intel/whois.go +++ b/intel/whois.go @@ -259,9 +259,9 @@ func (r WhoisGetParams) URLQuery() (v url.Values) { type WhoisGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result WhoisGetResponse `json:"result,required"` // Whether the API call was successful Success WhoisGetResponseEnvelopeSuccess `json:"success,required"` + Result WhoisGetResponse `json:"result"` JSON whoisGetResponseEnvelopeJSON `json:"-"` } @@ -270,8 +270,8 @@ type WhoisGetResponseEnvelope struct { type whoisGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/shared/union.go b/shared/union.go index 6ee8fd1516..00ab7eb2d6 100644 --- a/shared/union.go +++ b/shared/union.go @@ -79,7 +79,6 @@ func (UnionString) ImplementsRateLimitsRateLimitEditResponseUnion() func (UnionString) ImplementsRateLimitsRateLimitGetResponseUnion() {} func (UnionString) ImplementsWorkersAIRunResponseUnion() {} func (UnionString) ImplementsWorkersAIRunParamsBodyTextEmbeddingsTextUnion() {} -func (UnionString) ImplementsWorkersAIRunParamsBodyImageToTextImageUnion() {} func (UnionString) ImplementsKVNamespaceUpdateResponseUnion() {} func (UnionString) ImplementsKVNamespaceDeleteResponseUnion() {} func (UnionString) ImplementsKVNamespaceBulkUpdateResponseUnion() {} @@ -163,9 +162,6 @@ func (UnionString) ImplementsOriginPostQuantumEncryptionOriginPostQuantumEncrypt } func (UnionString) ImplementsHostnamesSettingValueUnionParam() {} func (UnionString) ImplementsHostnamesSettingValueUnion() {} -func (UnionString) ImplementsCloudforceOneRequestDeleteResponseUnion() {} -func (UnionString) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() {} -func (UnionString) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() {} func (UnionString) ImplementsEventNotificationsR2ConfigurationQueueDeleteResponseUnion() {} type UnionInt int64 diff --git a/workers/ai.go b/workers/ai.go index 274b13f36f..dda8ef18f6 100644 --- a/workers/ai.go +++ b/workers/ai.go @@ -417,7 +417,7 @@ func (r AIRunParamsBodyTextEmbeddingsTextArray) ImplementsWorkersAIRunParamsBody } type AIRunParamsBodySpeechRecognition struct { - Audio param.Field[[]float64] `json:"audio"` + Audio param.Field[[]float64] `json:"audio,required"` } func (r AIRunParamsBodySpeechRecognition) MarshalJSON() (data []byte, err error) { @@ -427,7 +427,7 @@ func (r AIRunParamsBodySpeechRecognition) MarshalJSON() (data []byte, err error) func (r AIRunParamsBodySpeechRecognition) implementsWorkersAIRunParamsBodyUnion() {} type AIRunParamsBodyImageClassification struct { - Image param.Field[[]float64] `json:"image"` + Image param.Field[[]float64] `json:"image,required"` } func (r AIRunParamsBodyImageClassification) MarshalJSON() (data []byte, err error) { @@ -494,12 +494,12 @@ func (r AIRunParamsBodySummarization) MarshalJSON() (data []byte, err error) { func (r AIRunParamsBodySummarization) implementsWorkersAIRunParamsBodyUnion() {} type AIRunParamsBodyImageToText struct { - Image param.Field[AIRunParamsBodyImageToTextImageUnion] `json:"image,required" format:"base64"` - MaxTokens param.Field[int64] `json:"max_tokens"` - Messages param.Field[[]AIRunParamsBodyImageToTextMessage] `json:"messages"` - Prompt param.Field[string] `json:"prompt"` - Raw param.Field[bool] `json:"raw"` - Temperature param.Field[float64] `json:"temperature"` + Image param.Field[[]float64] `json:"image,required"` + MaxTokens param.Field[int64] `json:"max_tokens"` + Messages param.Field[[]AIRunParamsBodyImageToTextMessage] `json:"messages"` + Prompt param.Field[string] `json:"prompt"` + Raw param.Field[bool] `json:"raw"` + Temperature param.Field[float64] `json:"temperature"` } func (r AIRunParamsBodyImageToText) MarshalJSON() (data []byte, err error) { @@ -508,17 +508,6 @@ func (r AIRunParamsBodyImageToText) MarshalJSON() (data []byte, err error) { func (r AIRunParamsBodyImageToText) implementsWorkersAIRunParamsBodyUnion() {} -// Satisfied by [workers.AIRunParamsBodyImageToTextImageArray], -// [shared.UnionString]. -type AIRunParamsBodyImageToTextImageUnion interface { - ImplementsWorkersAIRunParamsBodyImageToTextImageUnion() -} - -type AIRunParamsBodyImageToTextImageArray []float64 - -func (r AIRunParamsBodyImageToTextImageArray) ImplementsWorkersAIRunParamsBodyImageToTextImageUnion() { -} - type AIRunParamsBodyImageToTextMessage struct { Content param.Field[string] `json:"content,required"` Role param.Field[string] `json:"role,required"` From ecbc2adec50da77990bfa2afe3b2ead175fb95cc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 17:55:11 +0000 Subject: [PATCH 108/127] feat(api): OpenAPI spec update via Stainless API (#1955) --- .stats.yml | 2 +- api.md | 12 +-- cloudforce_one/request.go | 132 +++++++++++++++++++----------- cloudforce_one/requestmessage.go | 119 +++++++++++++++++---------- cloudforce_one/requestpriority.go | 123 ++++++++++++++++++---------- intel/whois.go | 4 +- shared/union.go | 4 + workers/ai.go | 27 ++++-- 8 files changed, 271 insertions(+), 152 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4b0a6c99fd..962272c1e3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1274 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7630542ab54cbf2ecc413fca70bec2ea5d9670cb4a3e6d02247f4a2509e9643b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9bc8c7349e1faaedaba66ec467cb51af588573ea2e3fb8e107a7f91904ef1f11.yml diff --git a/api.md b/api.md index 4ad576f165..61db0ef41f 100644 --- a/api.md +++ b/api.md @@ -6739,14 +6739,14 @@ Response Types: - cloudforce_one.Quota - cloudforce_one.RequestConstants - cloudforce_one.RequestTypes -- cloudforce_one.RequestDeleteResponse +- cloudforce_one.RequestDeleteResponseUnion Methods: - client.CloudforceOne.Requests.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestNewParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestUpdateParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.List(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestListParams) (pagination.V4PagePaginationArray[cloudforce_one.ListItem], error) -- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponse, error) +- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponseUnion, error) - client.CloudforceOne.Requests.Constants(ctx context.Context, accountIdentifier string) (cloudforce_one.RequestConstants, error) - client.CloudforceOne.Requests.Get(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) @@ -6757,13 +6757,13 @@ Methods: Response Types: - cloudforce_one.Message -- cloudforce_one.RequestMessageDeleteResponse +- cloudforce_one.RequestMessageDeleteResponseUnion Methods: - client.CloudforceOne.Requests.Message.New(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageNewParams) (cloudforce_one.Message, error) - client.CloudforceOne.Requests.Message.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, body cloudforce_one.RequestMessageUpdateParams) (cloudforce_one.Message, error) -- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponse, error) +- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponseUnion, error) - client.CloudforceOne.Requests.Message.Get(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageGetParams) ([]cloudforce_one.Message, error) ### Priority @@ -6777,13 +6777,13 @@ Response Types: - cloudforce_one.Label - cloudforce_one.Priority -- cloudforce_one.RequestPriorityDeleteResponse +- cloudforce_one.RequestPriorityDeleteResponseUnion Methods: - client.CloudforceOne.Requests.Priority.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestPriorityNewParams) (cloudforce_one.Priority, error) - client.CloudforceOne.Requests.Priority.Update(ctx context.Context, accountIdentifier string, priorityIdentifer string, body cloudforce_one.RequestPriorityUpdateParams) (cloudforce_one.Item, error) -- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponse, error) +- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponseUnion, error) - client.CloudforceOne.Requests.Priority.Get(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Priority.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) diff --git a/cloudforce_one/request.go b/cloudforce_one/request.go index a5865d5f35..ce028e3612 100644 --- a/cloudforce_one/request.go +++ b/cloudforce_one/request.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/option" "github.com/cloudflare/cloudflare-go/v2/shared" + "github.com/tidwall/gjson" ) // RequestService contains methods and other services that help with interacting @@ -91,10 +93,15 @@ func (r *RequestService) ListAutoPaging(ctx context.Context, accountIdentifier s } // Delete a Request -func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponse, err error) { +func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) + var env RequestDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s", accountIdentifier, requestIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result return } @@ -462,46 +469,30 @@ func (r RequestConstantsTlp) IsKnown() bool { type RequestTypes []string -type RequestDeleteResponse struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success RequestDeleteResponseSuccess `json:"success,required"` - JSON requestDeleteResponseJSON `json:"-"` -} - -// requestDeleteResponseJSON contains the JSON metadata for the struct -// [RequestDeleteResponse] -type requestDeleteResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) +// Union satisfied by [cloudforce_one.RequestDeleteResponseUnknown], +// [cloudforce_one.RequestDeleteResponseArray] or [shared.UnionString]. +type RequestDeleteResponseUnion interface { + ImplementsCloudforceOneRequestDeleteResponseUnion() } -func (r requestDeleteResponseJSON) RawJSON() string { - return r.raw +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*RequestDeleteResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(RequestDeleteResponseArray{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) } -// Whether the API call was successful -type RequestDeleteResponseSuccess bool +type RequestDeleteResponseArray []interface{} -const ( - RequestDeleteResponseSuccessTrue RequestDeleteResponseSuccess = true -) - -func (r RequestDeleteResponseSuccess) IsKnown() bool { - switch r { - case RequestDeleteResponseSuccessTrue: - return true - } - return false -} +func (r RequestDeleteResponseArray) ImplementsCloudforceOneRequestDeleteResponseUnion() {} type RequestNewParams struct { // Request content @@ -542,9 +533,9 @@ func (r RequestNewParamsTlp) IsKnown() bool { type RequestNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestNewResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestNewResponseEnvelopeJSON `json:"-"` } @@ -553,8 +544,8 @@ type RequestNewResponseEnvelope struct { type requestNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -621,9 +612,9 @@ func (r RequestUpdateParamsTlp) IsKnown() bool { type RequestUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestUpdateResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestUpdateResponseEnvelopeJSON `json:"-"` } @@ -632,8 +623,8 @@ type RequestUpdateResponseEnvelope struct { type requestUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -724,12 +715,55 @@ func (r RequestListParamsStatus) IsKnown() bool { return false } +type RequestDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestDeleteResponseUnion `json:"result,required"` + // Whether the API call was successful + Success RequestDeleteResponseEnvelopeSuccess `json:"success,required"` + JSON requestDeleteResponseEnvelopeJSON `json:"-"` +} + +// requestDeleteResponseEnvelopeJSON contains the JSON metadata for the struct +// [RequestDeleteResponseEnvelope] +type requestDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r requestDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestDeleteResponseEnvelopeSuccess bool + +const ( + RequestDeleteResponseEnvelopeSuccessTrue RequestDeleteResponseEnvelopeSuccess = true +) + +func (r RequestDeleteResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case RequestDeleteResponseEnvelopeSuccessTrue: + return true + } + return false +} + type RequestConstantsResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestConstants `json:"result,required"` // Whether the API call was successful Success RequestConstantsResponseEnvelopeSuccess `json:"success,required"` - Result RequestConstants `json:"result"` JSON requestConstantsResponseEnvelopeJSON `json:"-"` } @@ -738,8 +772,8 @@ type RequestConstantsResponseEnvelope struct { type requestConstantsResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -770,9 +804,9 @@ func (r RequestConstantsResponseEnvelopeSuccess) IsKnown() bool { type RequestGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestGetResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestGetResponseEnvelopeJSON `json:"-"` } @@ -781,8 +815,8 @@ type RequestGetResponseEnvelope struct { type requestGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -813,9 +847,9 @@ func (r RequestGetResponseEnvelopeSuccess) IsKnown() bool { type RequestQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Quota `json:"result,required"` // Whether the API call was successful Success RequestQuotaResponseEnvelopeSuccess `json:"success,required"` - Result Quota `json:"result"` JSON requestQuotaResponseEnvelopeJSON `json:"-"` } @@ -824,8 +858,8 @@ type RequestQuotaResponseEnvelope struct { type requestQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -856,9 +890,9 @@ func (r RequestQuotaResponseEnvelopeSuccess) IsKnown() bool { type RequestTypesResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestTypes `json:"result,required"` // Whether the API call was successful Success RequestTypesResponseEnvelopeSuccess `json:"success,required"` - Result RequestTypes `json:"result"` JSON requestTypesResponseEnvelopeJSON `json:"-"` } @@ -867,8 +901,8 @@ type RequestTypesResponseEnvelope struct { type requestTypesResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestmessage.go b/cloudforce_one/requestmessage.go index f3949be2ee..b5a88e43b5 100644 --- a/cloudforce_one/requestmessage.go +++ b/cloudforce_one/requestmessage.go @@ -6,6 +6,7 @@ import ( "context" "fmt" "net/http" + "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -13,6 +14,7 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" + "github.com/tidwall/gjson" ) // RequestMessageService contains methods and other services that help with @@ -62,10 +64,15 @@ func (r *RequestMessageService) Update(ctx context.Context, accountIdentifier st } // Delete a Request Message -func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponse, err error) { +func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) + var env RequestMessageDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s/message/%v", accountIdentifier, requestIdentifier, messageIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result return } @@ -118,45 +125,30 @@ func (r messageJSON) RawJSON() string { return r.raw } -type RequestMessageDeleteResponse struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success RequestMessageDeleteResponseSuccess `json:"success,required"` - JSON requestMessageDeleteResponseJSON `json:"-"` -} - -// requestMessageDeleteResponseJSON contains the JSON metadata for the struct -// [RequestMessageDeleteResponse] -type requestMessageDeleteResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestMessageDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) +// Union satisfied by [cloudforce_one.RequestMessageDeleteResponseUnknown], +// [cloudforce_one.RequestMessageDeleteResponseArray] or [shared.UnionString]. +type RequestMessageDeleteResponseUnion interface { + ImplementsCloudforceOneRequestMessageDeleteResponseUnion() } -func (r requestMessageDeleteResponseJSON) RawJSON() string { - return r.raw +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*RequestMessageDeleteResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(RequestMessageDeleteResponseArray{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) } -// Whether the API call was successful -type RequestMessageDeleteResponseSuccess bool - -const ( - RequestMessageDeleteResponseSuccessTrue RequestMessageDeleteResponseSuccess = true -) +type RequestMessageDeleteResponseArray []interface{} -func (r RequestMessageDeleteResponseSuccess) IsKnown() bool { - switch r { - case RequestMessageDeleteResponseSuccessTrue: - return true - } - return false +func (r RequestMessageDeleteResponseArray) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() { } type RequestMessageNewParams struct { @@ -171,9 +163,9 @@ func (r RequestMessageNewParams) MarshalJSON() (data []byte, err error) { type RequestMessageNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageNewResponseEnvelopeSuccess `json:"success,required"` - Result Message `json:"result"` JSON requestMessageNewResponseEnvelopeJSON `json:"-"` } @@ -182,8 +174,8 @@ type RequestMessageNewResponseEnvelope struct { type requestMessageNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -250,9 +242,9 @@ func (r RequestMessageUpdateParamsTlp) IsKnown() bool { type RequestMessageUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageUpdateResponseEnvelopeSuccess `json:"success,required"` - Result Message `json:"result"` JSON requestMessageUpdateResponseEnvelopeJSON `json:"-"` } @@ -261,8 +253,8 @@ type RequestMessageUpdateResponseEnvelope struct { type requestMessageUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -290,6 +282,49 @@ func (r RequestMessageUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } +type RequestMessageDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestMessageDeleteResponseUnion `json:"result,required"` + // Whether the API call was successful + Success RequestMessageDeleteResponseEnvelopeSuccess `json:"success,required"` + JSON requestMessageDeleteResponseEnvelopeJSON `json:"-"` +} + +// requestMessageDeleteResponseEnvelopeJSON contains the JSON metadata for the +// struct [RequestMessageDeleteResponseEnvelope] +type requestMessageDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestMessageDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r requestMessageDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestMessageDeleteResponseEnvelopeSuccess bool + +const ( + RequestMessageDeleteResponseEnvelopeSuccessTrue RequestMessageDeleteResponseEnvelopeSuccess = true +) + +func (r RequestMessageDeleteResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case RequestMessageDeleteResponseEnvelopeSuccessTrue: + return true + } + return false +} + type RequestMessageGetParams struct { // Page number of results Page param.Field[int64] `json:"page,required"` @@ -328,9 +363,9 @@ func (r RequestMessageGetParamsSortOrder) IsKnown() bool { type RequestMessageGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result []Message `json:"result,required"` // Whether the API call was successful Success RequestMessageGetResponseEnvelopeSuccess `json:"success,required"` - Result []Message `json:"result"` JSON requestMessageGetResponseEnvelopeJSON `json:"-"` } @@ -339,8 +374,8 @@ type RequestMessageGetResponseEnvelope struct { type requestMessageGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestpriority.go b/cloudforce_one/requestpriority.go index eef29460bf..702df8b577 100644 --- a/cloudforce_one/requestpriority.go +++ b/cloudforce_one/requestpriority.go @@ -6,6 +6,7 @@ import ( "context" "fmt" "net/http" + "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -13,6 +14,7 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" + "github.com/tidwall/gjson" ) // RequestPriorityService contains methods and other services that help with @@ -60,10 +62,15 @@ func (r *RequestPriorityService) Update(ctx context.Context, accountIdentifier s } // Delete a Priority Intelligence Report -func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponse, err error) { +func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponseUnion, err error) { opts = append(r.Options[:], opts...) + var env RequestPriorityDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/priority/%s", accountIdentifier, priorityIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result return } @@ -189,45 +196,30 @@ func (r PriorityEditTlp) IsKnown() bool { return false } -type RequestPriorityDeleteResponse struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success RequestPriorityDeleteResponseSuccess `json:"success,required"` - JSON requestPriorityDeleteResponseJSON `json:"-"` +// Union satisfied by [cloudforce_one.RequestPriorityDeleteResponseUnknown], +// [cloudforce_one.RequestPriorityDeleteResponseArray] or [shared.UnionString]. +type RequestPriorityDeleteResponseUnion interface { + ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() } -// requestPriorityDeleteResponseJSON contains the JSON metadata for the struct -// [RequestPriorityDeleteResponse] -type requestPriorityDeleteResponseJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*RequestPriorityDeleteResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(RequestPriorityDeleteResponseArray{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.String, + Type: reflect.TypeOf(shared.UnionString("")), + }, + ) } -func (r *RequestPriorityDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} +type RequestPriorityDeleteResponseArray []interface{} -func (r requestPriorityDeleteResponseJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestPriorityDeleteResponseSuccess bool - -const ( - RequestPriorityDeleteResponseSuccessTrue RequestPriorityDeleteResponseSuccess = true -) - -func (r RequestPriorityDeleteResponseSuccess) IsKnown() bool { - switch r { - case RequestPriorityDeleteResponseSuccessTrue: - return true - } - return false +func (r RequestPriorityDeleteResponseArray) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() { } type RequestPriorityNewParams struct { @@ -241,9 +233,9 @@ func (r RequestPriorityNewParams) MarshalJSON() (data []byte, err error) { type RequestPriorityNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Priority `json:"result,required"` // Whether the API call was successful Success RequestPriorityNewResponseEnvelopeSuccess `json:"success,required"` - Result Priority `json:"result"` JSON requestPriorityNewResponseEnvelopeJSON `json:"-"` } @@ -252,8 +244,8 @@ type RequestPriorityNewResponseEnvelope struct { type requestPriorityNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -292,9 +284,9 @@ func (r RequestPriorityUpdateParams) MarshalJSON() (data []byte, err error) { type RequestPriorityUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityUpdateResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestPriorityUpdateResponseEnvelopeJSON `json:"-"` } @@ -303,8 +295,8 @@ type RequestPriorityUpdateResponseEnvelope struct { type requestPriorityUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -332,12 +324,55 @@ func (r RequestPriorityUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } +type RequestPriorityDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result RequestPriorityDeleteResponseUnion `json:"result,required"` + // Whether the API call was successful + Success RequestPriorityDeleteResponseEnvelopeSuccess `json:"success,required"` + JSON requestPriorityDeleteResponseEnvelopeJSON `json:"-"` +} + +// requestPriorityDeleteResponseEnvelopeJSON contains the JSON metadata for the +// struct [RequestPriorityDeleteResponseEnvelope] +type requestPriorityDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestPriorityDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r requestPriorityDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestPriorityDeleteResponseEnvelopeSuccess bool + +const ( + RequestPriorityDeleteResponseEnvelopeSuccessTrue RequestPriorityDeleteResponseEnvelopeSuccess = true +) + +func (r RequestPriorityDeleteResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case RequestPriorityDeleteResponseEnvelopeSuccessTrue: + return true + } + return false +} + type RequestPriorityGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityGetResponseEnvelopeSuccess `json:"success,required"` - Result Item `json:"result"` JSON requestPriorityGetResponseEnvelopeJSON `json:"-"` } @@ -346,8 +381,8 @@ type RequestPriorityGetResponseEnvelope struct { type requestPriorityGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -378,9 +413,9 @@ func (r RequestPriorityGetResponseEnvelopeSuccess) IsKnown() bool { type RequestPriorityQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result Quota `json:"result,required"` // Whether the API call was successful Success RequestPriorityQuotaResponseEnvelopeSuccess `json:"success,required"` - Result Quota `json:"result"` JSON requestPriorityQuotaResponseEnvelopeJSON `json:"-"` } @@ -389,8 +424,8 @@ type RequestPriorityQuotaResponseEnvelope struct { type requestPriorityQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/intel/whois.go b/intel/whois.go index 5655c7c1a8..ece63a5b8f 100644 --- a/intel/whois.go +++ b/intel/whois.go @@ -259,9 +259,9 @@ func (r WhoisGetParams) URLQuery() (v url.Values) { type WhoisGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` + Result WhoisGetResponse `json:"result,required"` // Whether the API call was successful Success WhoisGetResponseEnvelopeSuccess `json:"success,required"` - Result WhoisGetResponse `json:"result"` JSON whoisGetResponseEnvelopeJSON `json:"-"` } @@ -270,8 +270,8 @@ type WhoisGetResponseEnvelope struct { type whoisGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Success apijson.Field Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/shared/union.go b/shared/union.go index 00ab7eb2d6..6ee8fd1516 100644 --- a/shared/union.go +++ b/shared/union.go @@ -79,6 +79,7 @@ func (UnionString) ImplementsRateLimitsRateLimitEditResponseUnion() func (UnionString) ImplementsRateLimitsRateLimitGetResponseUnion() {} func (UnionString) ImplementsWorkersAIRunResponseUnion() {} func (UnionString) ImplementsWorkersAIRunParamsBodyTextEmbeddingsTextUnion() {} +func (UnionString) ImplementsWorkersAIRunParamsBodyImageToTextImageUnion() {} func (UnionString) ImplementsKVNamespaceUpdateResponseUnion() {} func (UnionString) ImplementsKVNamespaceDeleteResponseUnion() {} func (UnionString) ImplementsKVNamespaceBulkUpdateResponseUnion() {} @@ -162,6 +163,9 @@ func (UnionString) ImplementsOriginPostQuantumEncryptionOriginPostQuantumEncrypt } func (UnionString) ImplementsHostnamesSettingValueUnionParam() {} func (UnionString) ImplementsHostnamesSettingValueUnion() {} +func (UnionString) ImplementsCloudforceOneRequestDeleteResponseUnion() {} +func (UnionString) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() {} +func (UnionString) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() {} func (UnionString) ImplementsEventNotificationsR2ConfigurationQueueDeleteResponseUnion() {} type UnionInt int64 diff --git a/workers/ai.go b/workers/ai.go index dda8ef18f6..274b13f36f 100644 --- a/workers/ai.go +++ b/workers/ai.go @@ -417,7 +417,7 @@ func (r AIRunParamsBodyTextEmbeddingsTextArray) ImplementsWorkersAIRunParamsBody } type AIRunParamsBodySpeechRecognition struct { - Audio param.Field[[]float64] `json:"audio,required"` + Audio param.Field[[]float64] `json:"audio"` } func (r AIRunParamsBodySpeechRecognition) MarshalJSON() (data []byte, err error) { @@ -427,7 +427,7 @@ func (r AIRunParamsBodySpeechRecognition) MarshalJSON() (data []byte, err error) func (r AIRunParamsBodySpeechRecognition) implementsWorkersAIRunParamsBodyUnion() {} type AIRunParamsBodyImageClassification struct { - Image param.Field[[]float64] `json:"image,required"` + Image param.Field[[]float64] `json:"image"` } func (r AIRunParamsBodyImageClassification) MarshalJSON() (data []byte, err error) { @@ -494,12 +494,12 @@ func (r AIRunParamsBodySummarization) MarshalJSON() (data []byte, err error) { func (r AIRunParamsBodySummarization) implementsWorkersAIRunParamsBodyUnion() {} type AIRunParamsBodyImageToText struct { - Image param.Field[[]float64] `json:"image,required"` - MaxTokens param.Field[int64] `json:"max_tokens"` - Messages param.Field[[]AIRunParamsBodyImageToTextMessage] `json:"messages"` - Prompt param.Field[string] `json:"prompt"` - Raw param.Field[bool] `json:"raw"` - Temperature param.Field[float64] `json:"temperature"` + Image param.Field[AIRunParamsBodyImageToTextImageUnion] `json:"image,required" format:"base64"` + MaxTokens param.Field[int64] `json:"max_tokens"` + Messages param.Field[[]AIRunParamsBodyImageToTextMessage] `json:"messages"` + Prompt param.Field[string] `json:"prompt"` + Raw param.Field[bool] `json:"raw"` + Temperature param.Field[float64] `json:"temperature"` } func (r AIRunParamsBodyImageToText) MarshalJSON() (data []byte, err error) { @@ -508,6 +508,17 @@ func (r AIRunParamsBodyImageToText) MarshalJSON() (data []byte, err error) { func (r AIRunParamsBodyImageToText) implementsWorkersAIRunParamsBodyUnion() {} +// Satisfied by [workers.AIRunParamsBodyImageToTextImageArray], +// [shared.UnionString]. +type AIRunParamsBodyImageToTextImageUnion interface { + ImplementsWorkersAIRunParamsBodyImageToTextImageUnion() +} + +type AIRunParamsBodyImageToTextImageArray []float64 + +func (r AIRunParamsBodyImageToTextImageArray) ImplementsWorkersAIRunParamsBodyImageToTextImageUnion() { +} + type AIRunParamsBodyImageToTextMessage struct { Content param.Field[string] `json:"content,required"` Role param.Field[string] `json:"role,required"` From 324465c09cb501a272bee2a4175e93ee38464819 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 18:37:53 +0000 Subject: [PATCH 109/127] feat(api): OpenAPI spec update via Stainless API (#1957) --- .stats.yml | 2 +- api.md | 12 +-- cloudforce_one/request.go | 132 +++++++++++------------------- cloudforce_one/requestmessage.go | 119 ++++++++++----------------- cloudforce_one/requestpriority.go | 123 ++++++++++------------------ intel/whois.go | 4 +- shared/union.go | 4 - workers/ai.go | 27 ++---- 8 files changed, 152 insertions(+), 271 deletions(-) diff --git a/.stats.yml b/.stats.yml index 962272c1e3..b162e09939 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1274 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9bc8c7349e1faaedaba66ec467cb51af588573ea2e3fb8e107a7f91904ef1f11.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-07ec76fab00de3d6227209faf0af1ed586cde9e2f243c13d3db555da20f13d99.yml diff --git a/api.md b/api.md index 61db0ef41f..4ad576f165 100644 --- a/api.md +++ b/api.md @@ -6739,14 +6739,14 @@ Response Types: - cloudforce_one.Quota - cloudforce_one.RequestConstants - cloudforce_one.RequestTypes -- cloudforce_one.RequestDeleteResponseUnion +- cloudforce_one.RequestDeleteResponse Methods: - client.CloudforceOne.Requests.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestNewParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestUpdateParams) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.List(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestListParams) (pagination.V4PagePaginationArray[cloudforce_one.ListItem], error) -- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.RequestDeleteResponse, error) - client.CloudforceOne.Requests.Constants(ctx context.Context, accountIdentifier string) (cloudforce_one.RequestConstants, error) - client.CloudforceOne.Requests.Get(ctx context.Context, accountIdentifier string, requestIdentifier string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) @@ -6757,13 +6757,13 @@ Methods: Response Types: - cloudforce_one.Message -- cloudforce_one.RequestMessageDeleteResponseUnion +- cloudforce_one.RequestMessageDeleteResponse Methods: - client.CloudforceOne.Requests.Message.New(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageNewParams) (cloudforce_one.Message, error) - client.CloudforceOne.Requests.Message.Update(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, body cloudforce_one.RequestMessageUpdateParams) (cloudforce_one.Message, error) -- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Message.Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64) (cloudforce_one.RequestMessageDeleteResponse, error) - client.CloudforceOne.Requests.Message.Get(ctx context.Context, accountIdentifier string, requestIdentifier string, body cloudforce_one.RequestMessageGetParams) ([]cloudforce_one.Message, error) ### Priority @@ -6777,13 +6777,13 @@ Response Types: - cloudforce_one.Label - cloudforce_one.Priority -- cloudforce_one.RequestPriorityDeleteResponseUnion +- cloudforce_one.RequestPriorityDeleteResponse Methods: - client.CloudforceOne.Requests.Priority.New(ctx context.Context, accountIdentifier string, body cloudforce_one.RequestPriorityNewParams) (cloudforce_one.Priority, error) - client.CloudforceOne.Requests.Priority.Update(ctx context.Context, accountIdentifier string, priorityIdentifer string, body cloudforce_one.RequestPriorityUpdateParams) (cloudforce_one.Item, error) -- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponseUnion, error) +- client.CloudforceOne.Requests.Priority.Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.RequestPriorityDeleteResponse, error) - client.CloudforceOne.Requests.Priority.Get(ctx context.Context, accountIdentifier string, priorityIdentifer string) (cloudforce_one.Item, error) - client.CloudforceOne.Requests.Priority.Quota(ctx context.Context, accountIdentifier string) (cloudforce_one.Quota, error) diff --git a/cloudforce_one/request.go b/cloudforce_one/request.go index ce028e3612..a5865d5f35 100644 --- a/cloudforce_one/request.go +++ b/cloudforce_one/request.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -15,7 +14,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestService contains methods and other services that help with interacting @@ -93,15 +91,10 @@ func (r *RequestService) ListAutoPaging(ctx context.Context, accountIdentifier s } // Delete a Request -func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponseUnion, err error) { +func (r *RequestService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, opts ...option.RequestOption) (res *RequestDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s", accountIdentifier, requestIdentifier) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -469,30 +462,46 @@ func (r RequestConstantsTlp) IsKnown() bool { type RequestTypes []string -// Union satisfied by [cloudforce_one.RequestDeleteResponseUnknown], -// [cloudforce_one.RequestDeleteResponseArray] or [shared.UnionString]. -type RequestDeleteResponseUnion interface { - ImplementsCloudforceOneRequestDeleteResponseUnion() +type RequestDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestDeleteResponseSuccess `json:"success,required"` + JSON requestDeleteResponseJSON `json:"-"` +} + +// requestDeleteResponseJSON contains the JSON metadata for the struct +// [RequestDeleteResponse] +type requestDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +func (r requestDeleteResponseJSON) RawJSON() string { + return r.raw } -type RequestDeleteResponseArray []interface{} +// Whether the API call was successful +type RequestDeleteResponseSuccess bool -func (r RequestDeleteResponseArray) ImplementsCloudforceOneRequestDeleteResponseUnion() {} +const ( + RequestDeleteResponseSuccessTrue RequestDeleteResponseSuccess = true +) + +func (r RequestDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestDeleteResponseSuccessTrue: + return true + } + return false +} type RequestNewParams struct { // Request content @@ -533,9 +542,9 @@ func (r RequestNewParamsTlp) IsKnown() bool { type RequestNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestNewResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestNewResponseEnvelopeJSON `json:"-"` } @@ -544,8 +553,8 @@ type RequestNewResponseEnvelope struct { type requestNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -612,9 +621,9 @@ func (r RequestUpdateParamsTlp) IsKnown() bool { type RequestUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestUpdateResponseEnvelopeJSON `json:"-"` } @@ -623,8 +632,8 @@ type RequestUpdateResponseEnvelope struct { type requestUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -715,55 +724,12 @@ func (r RequestListParamsStatus) IsKnown() bool { return false } -type RequestDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestDeleteResponseEnvelopeJSON contains the JSON metadata for the struct -// [RequestDeleteResponseEnvelope] -type requestDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestDeleteResponseEnvelopeSuccess bool - -const ( - RequestDeleteResponseEnvelopeSuccessTrue RequestDeleteResponseEnvelopeSuccess = true -) - -func (r RequestDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestConstantsResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestConstants `json:"result,required"` // Whether the API call was successful Success RequestConstantsResponseEnvelopeSuccess `json:"success,required"` + Result RequestConstants `json:"result"` JSON requestConstantsResponseEnvelopeJSON `json:"-"` } @@ -772,8 +738,8 @@ type RequestConstantsResponseEnvelope struct { type requestConstantsResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -804,9 +770,9 @@ func (r RequestConstantsResponseEnvelopeSuccess) IsKnown() bool { type RequestGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestGetResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestGetResponseEnvelopeJSON `json:"-"` } @@ -815,8 +781,8 @@ type RequestGetResponseEnvelope struct { type requestGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -847,9 +813,9 @@ func (r RequestGetResponseEnvelopeSuccess) IsKnown() bool { type RequestQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Quota `json:"result,required"` // Whether the API call was successful Success RequestQuotaResponseEnvelopeSuccess `json:"success,required"` + Result Quota `json:"result"` JSON requestQuotaResponseEnvelopeJSON `json:"-"` } @@ -858,8 +824,8 @@ type RequestQuotaResponseEnvelope struct { type requestQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -890,9 +856,9 @@ func (r RequestQuotaResponseEnvelopeSuccess) IsKnown() bool { type RequestTypesResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestTypes `json:"result,required"` // Whether the API call was successful Success RequestTypesResponseEnvelopeSuccess `json:"success,required"` + Result RequestTypes `json:"result"` JSON requestTypesResponseEnvelopeJSON `json:"-"` } @@ -901,8 +867,8 @@ type RequestTypesResponseEnvelope struct { type requestTypesResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestmessage.go b/cloudforce_one/requestmessage.go index b5a88e43b5..f3949be2ee 100644 --- a/cloudforce_one/requestmessage.go +++ b/cloudforce_one/requestmessage.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -14,7 +13,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestMessageService contains methods and other services that help with @@ -64,15 +62,10 @@ func (r *RequestMessageService) Update(ctx context.Context, accountIdentifier st } // Delete a Request Message -func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponseUnion, err error) { +func (r *RequestMessageService) Delete(ctx context.Context, accountIdentifier string, requestIdentifier string, messageIdentifer int64, opts ...option.RequestOption) (res *RequestMessageDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestMessageDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/%s/message/%v", accountIdentifier, requestIdentifier, messageIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -125,30 +118,45 @@ func (r messageJSON) RawJSON() string { return r.raw } -// Union satisfied by [cloudforce_one.RequestMessageDeleteResponseUnknown], -// [cloudforce_one.RequestMessageDeleteResponseArray] or [shared.UnionString]. -type RequestMessageDeleteResponseUnion interface { - ImplementsCloudforceOneRequestMessageDeleteResponseUnion() +type RequestMessageDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestMessageDeleteResponseSuccess `json:"success,required"` + JSON requestMessageDeleteResponseJSON `json:"-"` +} + +// requestMessageDeleteResponseJSON contains the JSON metadata for the struct +// [RequestMessageDeleteResponse] +type requestMessageDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *RequestMessageDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestMessageDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestMessageDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +func (r requestMessageDeleteResponseJSON) RawJSON() string { + return r.raw } -type RequestMessageDeleteResponseArray []interface{} +// Whether the API call was successful +type RequestMessageDeleteResponseSuccess bool + +const ( + RequestMessageDeleteResponseSuccessTrue RequestMessageDeleteResponseSuccess = true +) -func (r RequestMessageDeleteResponseArray) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() { +func (r RequestMessageDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestMessageDeleteResponseSuccessTrue: + return true + } + return false } type RequestMessageNewParams struct { @@ -163,9 +171,9 @@ func (r RequestMessageNewParams) MarshalJSON() (data []byte, err error) { type RequestMessageNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageNewResponseEnvelopeSuccess `json:"success,required"` + Result Message `json:"result"` JSON requestMessageNewResponseEnvelopeJSON `json:"-"` } @@ -174,8 +182,8 @@ type RequestMessageNewResponseEnvelope struct { type requestMessageNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -242,9 +250,9 @@ func (r RequestMessageUpdateParamsTlp) IsKnown() bool { type RequestMessageUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Message `json:"result,required"` // Whether the API call was successful Success RequestMessageUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Message `json:"result"` JSON requestMessageUpdateResponseEnvelopeJSON `json:"-"` } @@ -253,8 +261,8 @@ type RequestMessageUpdateResponseEnvelope struct { type requestMessageUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -282,49 +290,6 @@ func (r RequestMessageUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } -type RequestMessageDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestMessageDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestMessageDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestMessageDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestMessageDeleteResponseEnvelopeJSON contains the JSON metadata for the -// struct [RequestMessageDeleteResponseEnvelope] -type requestMessageDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestMessageDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestMessageDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestMessageDeleteResponseEnvelopeSuccess bool - -const ( - RequestMessageDeleteResponseEnvelopeSuccessTrue RequestMessageDeleteResponseEnvelopeSuccess = true -) - -func (r RequestMessageDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestMessageDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestMessageGetParams struct { // Page number of results Page param.Field[int64] `json:"page,required"` @@ -363,9 +328,9 @@ func (r RequestMessageGetParamsSortOrder) IsKnown() bool { type RequestMessageGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result []Message `json:"result,required"` // Whether the API call was successful Success RequestMessageGetResponseEnvelopeSuccess `json:"success,required"` + Result []Message `json:"result"` JSON requestMessageGetResponseEnvelopeJSON `json:"-"` } @@ -374,8 +339,8 @@ type RequestMessageGetResponseEnvelope struct { type requestMessageGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/cloudforce_one/requestpriority.go b/cloudforce_one/requestpriority.go index 702df8b577..eef29460bf 100644 --- a/cloudforce_one/requestpriority.go +++ b/cloudforce_one/requestpriority.go @@ -6,7 +6,6 @@ import ( "context" "fmt" "net/http" - "reflect" "time" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" @@ -14,7 +13,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/tidwall/gjson" ) // RequestPriorityService contains methods and other services that help with @@ -62,15 +60,10 @@ func (r *RequestPriorityService) Update(ctx context.Context, accountIdentifier s } // Delete a Priority Intelligence Report -func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponseUnion, err error) { +func (r *RequestPriorityService) Delete(ctx context.Context, accountIdentifier string, priorityIdentifer string, opts ...option.RequestOption) (res *RequestPriorityDeleteResponse, err error) { opts = append(r.Options[:], opts...) - var env RequestPriorityDeleteResponseEnvelope path := fmt.Sprintf("accounts/%s/cloudforce-one/requests/priority/%s", accountIdentifier, priorityIdentifer) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) return } @@ -196,30 +189,45 @@ func (r PriorityEditTlp) IsKnown() bool { return false } -// Union satisfied by [cloudforce_one.RequestPriorityDeleteResponseUnknown], -// [cloudforce_one.RequestPriorityDeleteResponseArray] or [shared.UnionString]. -type RequestPriorityDeleteResponseUnion interface { - ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() +type RequestPriorityDeleteResponse struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success RequestPriorityDeleteResponseSuccess `json:"success,required"` + JSON requestPriorityDeleteResponseJSON `json:"-"` } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*RequestPriorityDeleteResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(RequestPriorityDeleteResponseArray{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.String, - Type: reflect.TypeOf(shared.UnionString("")), - }, - ) +// requestPriorityDeleteResponseJSON contains the JSON metadata for the struct +// [RequestPriorityDeleteResponse] +type requestPriorityDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field } -type RequestPriorityDeleteResponseArray []interface{} +func (r *RequestPriorityDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} -func (r RequestPriorityDeleteResponseArray) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() { +func (r requestPriorityDeleteResponseJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type RequestPriorityDeleteResponseSuccess bool + +const ( + RequestPriorityDeleteResponseSuccessTrue RequestPriorityDeleteResponseSuccess = true +) + +func (r RequestPriorityDeleteResponseSuccess) IsKnown() bool { + switch r { + case RequestPriorityDeleteResponseSuccessTrue: + return true + } + return false } type RequestPriorityNewParams struct { @@ -233,9 +241,9 @@ func (r RequestPriorityNewParams) MarshalJSON() (data []byte, err error) { type RequestPriorityNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Priority `json:"result,required"` // Whether the API call was successful Success RequestPriorityNewResponseEnvelopeSuccess `json:"success,required"` + Result Priority `json:"result"` JSON requestPriorityNewResponseEnvelopeJSON `json:"-"` } @@ -244,8 +252,8 @@ type RequestPriorityNewResponseEnvelope struct { type requestPriorityNewResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -284,9 +292,9 @@ func (r RequestPriorityUpdateParams) MarshalJSON() (data []byte, err error) { type RequestPriorityUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityUpdateResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestPriorityUpdateResponseEnvelopeJSON `json:"-"` } @@ -295,8 +303,8 @@ type RequestPriorityUpdateResponseEnvelope struct { type requestPriorityUpdateResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -324,55 +332,12 @@ func (r RequestPriorityUpdateResponseEnvelopeSuccess) IsKnown() bool { return false } -type RequestPriorityDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result RequestPriorityDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful - Success RequestPriorityDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON requestPriorityDeleteResponseEnvelopeJSON `json:"-"` -} - -// requestPriorityDeleteResponseEnvelopeJSON contains the JSON metadata for the -// struct [RequestPriorityDeleteResponseEnvelope] -type requestPriorityDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *RequestPriorityDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r requestPriorityDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type RequestPriorityDeleteResponseEnvelopeSuccess bool - -const ( - RequestPriorityDeleteResponseEnvelopeSuccessTrue RequestPriorityDeleteResponseEnvelopeSuccess = true -) - -func (r RequestPriorityDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case RequestPriorityDeleteResponseEnvelopeSuccessTrue: - return true - } - return false -} - type RequestPriorityGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Item `json:"result,required"` // Whether the API call was successful Success RequestPriorityGetResponseEnvelopeSuccess `json:"success,required"` + Result Item `json:"result"` JSON requestPriorityGetResponseEnvelopeJSON `json:"-"` } @@ -381,8 +346,8 @@ type RequestPriorityGetResponseEnvelope struct { type requestPriorityGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -413,9 +378,9 @@ func (r RequestPriorityGetResponseEnvelopeSuccess) IsKnown() bool { type RequestPriorityQuotaResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result Quota `json:"result,required"` // Whether the API call was successful Success RequestPriorityQuotaResponseEnvelopeSuccess `json:"success,required"` + Result Quota `json:"result"` JSON requestPriorityQuotaResponseEnvelopeJSON `json:"-"` } @@ -424,8 +389,8 @@ type RequestPriorityQuotaResponseEnvelope struct { type requestPriorityQuotaResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/intel/whois.go b/intel/whois.go index ece63a5b8f..5655c7c1a8 100644 --- a/intel/whois.go +++ b/intel/whois.go @@ -259,9 +259,9 @@ func (r WhoisGetParams) URLQuery() (v url.Values) { type WhoisGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` - Result WhoisGetResponse `json:"result,required"` // Whether the API call was successful Success WhoisGetResponseEnvelopeSuccess `json:"success,required"` + Result WhoisGetResponse `json:"result"` JSON whoisGetResponseEnvelopeJSON `json:"-"` } @@ -270,8 +270,8 @@ type WhoisGetResponseEnvelope struct { type whoisGetResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field - Result apijson.Field Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/shared/union.go b/shared/union.go index 6ee8fd1516..00ab7eb2d6 100644 --- a/shared/union.go +++ b/shared/union.go @@ -79,7 +79,6 @@ func (UnionString) ImplementsRateLimitsRateLimitEditResponseUnion() func (UnionString) ImplementsRateLimitsRateLimitGetResponseUnion() {} func (UnionString) ImplementsWorkersAIRunResponseUnion() {} func (UnionString) ImplementsWorkersAIRunParamsBodyTextEmbeddingsTextUnion() {} -func (UnionString) ImplementsWorkersAIRunParamsBodyImageToTextImageUnion() {} func (UnionString) ImplementsKVNamespaceUpdateResponseUnion() {} func (UnionString) ImplementsKVNamespaceDeleteResponseUnion() {} func (UnionString) ImplementsKVNamespaceBulkUpdateResponseUnion() {} @@ -163,9 +162,6 @@ func (UnionString) ImplementsOriginPostQuantumEncryptionOriginPostQuantumEncrypt } func (UnionString) ImplementsHostnamesSettingValueUnionParam() {} func (UnionString) ImplementsHostnamesSettingValueUnion() {} -func (UnionString) ImplementsCloudforceOneRequestDeleteResponseUnion() {} -func (UnionString) ImplementsCloudforceOneRequestMessageDeleteResponseUnion() {} -func (UnionString) ImplementsCloudforceOneRequestPriorityDeleteResponseUnion() {} func (UnionString) ImplementsEventNotificationsR2ConfigurationQueueDeleteResponseUnion() {} type UnionInt int64 diff --git a/workers/ai.go b/workers/ai.go index 274b13f36f..dda8ef18f6 100644 --- a/workers/ai.go +++ b/workers/ai.go @@ -417,7 +417,7 @@ func (r AIRunParamsBodyTextEmbeddingsTextArray) ImplementsWorkersAIRunParamsBody } type AIRunParamsBodySpeechRecognition struct { - Audio param.Field[[]float64] `json:"audio"` + Audio param.Field[[]float64] `json:"audio,required"` } func (r AIRunParamsBodySpeechRecognition) MarshalJSON() (data []byte, err error) { @@ -427,7 +427,7 @@ func (r AIRunParamsBodySpeechRecognition) MarshalJSON() (data []byte, err error) func (r AIRunParamsBodySpeechRecognition) implementsWorkersAIRunParamsBodyUnion() {} type AIRunParamsBodyImageClassification struct { - Image param.Field[[]float64] `json:"image"` + Image param.Field[[]float64] `json:"image,required"` } func (r AIRunParamsBodyImageClassification) MarshalJSON() (data []byte, err error) { @@ -494,12 +494,12 @@ func (r AIRunParamsBodySummarization) MarshalJSON() (data []byte, err error) { func (r AIRunParamsBodySummarization) implementsWorkersAIRunParamsBodyUnion() {} type AIRunParamsBodyImageToText struct { - Image param.Field[AIRunParamsBodyImageToTextImageUnion] `json:"image,required" format:"base64"` - MaxTokens param.Field[int64] `json:"max_tokens"` - Messages param.Field[[]AIRunParamsBodyImageToTextMessage] `json:"messages"` - Prompt param.Field[string] `json:"prompt"` - Raw param.Field[bool] `json:"raw"` - Temperature param.Field[float64] `json:"temperature"` + Image param.Field[[]float64] `json:"image,required"` + MaxTokens param.Field[int64] `json:"max_tokens"` + Messages param.Field[[]AIRunParamsBodyImageToTextMessage] `json:"messages"` + Prompt param.Field[string] `json:"prompt"` + Raw param.Field[bool] `json:"raw"` + Temperature param.Field[float64] `json:"temperature"` } func (r AIRunParamsBodyImageToText) MarshalJSON() (data []byte, err error) { @@ -508,17 +508,6 @@ func (r AIRunParamsBodyImageToText) MarshalJSON() (data []byte, err error) { func (r AIRunParamsBodyImageToText) implementsWorkersAIRunParamsBodyUnion() {} -// Satisfied by [workers.AIRunParamsBodyImageToTextImageArray], -// [shared.UnionString]. -type AIRunParamsBodyImageToTextImageUnion interface { - ImplementsWorkersAIRunParamsBodyImageToTextImageUnion() -} - -type AIRunParamsBodyImageToTextImageArray []float64 - -func (r AIRunParamsBodyImageToTextImageArray) ImplementsWorkersAIRunParamsBodyImageToTextImageUnion() { -} - type AIRunParamsBodyImageToTextMessage struct { Content param.Field[string] `json:"content,required"` Role param.Field[string] `json:"role,required"` From 539d2ee8194a058818b55d063adc1a5fed86bba9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 22:25:09 +0000 Subject: [PATCH 110/127] feat(api): update via SDK Studio (#1958) --- zero_trust/accessapplication.go | 48 ++++++++++++++-------------- zero_trust/accessapplication_test.go | 4 +-- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/zero_trust/accessapplication.go b/zero_trust/accessapplication.go index d095018da5..4fd76e6106 100644 --- a/zero_trust/accessapplication.go +++ b/zero_trust/accessapplication.go @@ -237,7 +237,7 @@ type Application struct { // authentication. This setting always overrides the organization setting for WARP // authentication. AllowAuthenticateViaWARP bool `json:"allow_authenticate_via_warp"` - AllowedIdps interface{} `json:"allowed_idps,required"` + AllowedIdPs interface{} `json:"allowed_idps,required"` // Displays the application in the App Launcher. AppLauncherVisible bool `json:"app_launcher_visible"` // When set to `true`, users skip the identity provider selection step during @@ -300,7 +300,7 @@ type applicationJSON struct { ID apijson.Field UpdatedAt apijson.Field AllowAuthenticateViaWARP apijson.Field - AllowedIdps apijson.Field + AllowedIdPs apijson.Field AppLauncherVisible apijson.Field AutoRedirectToIdentity apijson.Field CORSHeaders apijson.Field @@ -409,7 +409,7 @@ type ApplicationSelfHostedApplication struct { AllowAuthenticateViaWARP bool `json:"allow_authenticate_via_warp"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdps []AllowedIdpsh `json:"allowed_idps"` + AllowedIdPs []AllowedIdpsh `json:"allowed_idps"` // Displays the application in the App Launcher. AppLauncherVisible bool `json:"app_launcher_visible"` // Audience tag. @@ -473,7 +473,7 @@ type applicationSelfHostedApplicationJSON struct { Type apijson.Field ID apijson.Field AllowAuthenticateViaWARP apijson.Field - AllowedIdps apijson.Field + AllowedIdPs apijson.Field AppLauncherVisible apijson.Field AUD apijson.Field AutoRedirectToIdentity apijson.Field @@ -515,7 +515,7 @@ type ApplicationSaaSApplication struct { ID string `json:"id"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdps []AllowedIdpsh `json:"allowed_idps"` + AllowedIdPs []AllowedIdpsh `json:"allowed_idps"` // Displays the application in the App Launcher. AppLauncherVisible bool `json:"app_launcher_visible"` // Audience tag. @@ -544,7 +544,7 @@ type ApplicationSaaSApplication struct { // [ApplicationSaaSApplication] type applicationSaaSApplicationJSON struct { ID apijson.Field - AllowedIdps apijson.Field + AllowedIdPs apijson.Field AppLauncherVisible apijson.Field AUD apijson.Field AutoRedirectToIdentity apijson.Field @@ -898,7 +898,7 @@ type ApplicationBrowserSSHApplication struct { AllowAuthenticateViaWARP bool `json:"allow_authenticate_via_warp"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdps []AllowedIdpsh `json:"allowed_idps"` + AllowedIdPs []AllowedIdpsh `json:"allowed_idps"` // Displays the application in the App Launcher. AppLauncherVisible bool `json:"app_launcher_visible"` // Audience tag. @@ -962,7 +962,7 @@ type applicationBrowserSSHApplicationJSON struct { Type apijson.Field ID apijson.Field AllowAuthenticateViaWARP apijson.Field - AllowedIdps apijson.Field + AllowedIdPs apijson.Field AppLauncherVisible apijson.Field AUD apijson.Field AutoRedirectToIdentity apijson.Field @@ -1014,7 +1014,7 @@ type ApplicationBrowserVncApplication struct { AllowAuthenticateViaWARP bool `json:"allow_authenticate_via_warp"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdps []AllowedIdpsh `json:"allowed_idps"` + AllowedIdPs []AllowedIdpsh `json:"allowed_idps"` // Displays the application in the App Launcher. AppLauncherVisible bool `json:"app_launcher_visible"` // Audience tag. @@ -1078,7 +1078,7 @@ type applicationBrowserVncApplicationJSON struct { Type apijson.Field ID apijson.Field AllowAuthenticateViaWARP apijson.Field - AllowedIdps apijson.Field + AllowedIdPs apijson.Field AppLauncherVisible apijson.Field AUD apijson.Field AutoRedirectToIdentity apijson.Field @@ -1122,7 +1122,7 @@ type ApplicationAppLauncherApplication struct { ID string `json:"id"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdps []AllowedIdpsh `json:"allowed_idps"` + AllowedIdPs []AllowedIdpsh `json:"allowed_idps"` // Audience tag. AUD string `json:"aud"` // When set to `true`, users skip the identity provider selection step during @@ -1147,7 +1147,7 @@ type ApplicationAppLauncherApplication struct { type applicationAppLauncherApplicationJSON struct { Type apijson.Field ID apijson.Field - AllowedIdps apijson.Field + AllowedIdPs apijson.Field AUD apijson.Field AutoRedirectToIdentity apijson.Field CreatedAt apijson.Field @@ -1199,7 +1199,7 @@ type ApplicationDeviceEnrollmentPermissionsApplication struct { ID string `json:"id"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdps []AllowedIdpsh `json:"allowed_idps"` + AllowedIdPs []AllowedIdpsh `json:"allowed_idps"` // Audience tag. AUD string `json:"aud"` // When set to `true`, users skip the identity provider selection step during @@ -1224,7 +1224,7 @@ type ApplicationDeviceEnrollmentPermissionsApplication struct { type applicationDeviceEnrollmentPermissionsApplicationJSON struct { Type apijson.Field ID apijson.Field - AllowedIdps apijson.Field + AllowedIdPs apijson.Field AUD apijson.Field AutoRedirectToIdentity apijson.Field CreatedAt apijson.Field @@ -1276,7 +1276,7 @@ type ApplicationBrowserIsolationPermissionsApplication struct { ID string `json:"id"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdps []AllowedIdpsh `json:"allowed_idps"` + AllowedIdPs []AllowedIdpsh `json:"allowed_idps"` // Audience tag. AUD string `json:"aud"` // When set to `true`, users skip the identity provider selection step during @@ -1301,7 +1301,7 @@ type ApplicationBrowserIsolationPermissionsApplication struct { type applicationBrowserIsolationPermissionsApplicationJSON struct { Type apijson.Field ID apijson.Field - AllowedIdps apijson.Field + AllowedIdPs apijson.Field AUD apijson.Field AutoRedirectToIdentity apijson.Field CreatedAt apijson.Field @@ -1402,7 +1402,7 @@ type ApplicationParam struct { // authentication. This setting always overrides the organization setting for WARP // authentication. AllowAuthenticateViaWARP param.Field[bool] `json:"allow_authenticate_via_warp"` - AllowedIdps param.Field[interface{}] `json:"allowed_idps,required"` + AllowedIdPs param.Field[interface{}] `json:"allowed_idps,required"` // Displays the application in the App Launcher. AppLauncherVisible param.Field[bool] `json:"app_launcher_visible"` // When set to `true`, users skip the identity provider selection step during @@ -1487,7 +1487,7 @@ type ApplicationSelfHostedApplicationParam struct { AllowAuthenticateViaWARP param.Field[bool] `json:"allow_authenticate_via_warp"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdps param.Field[[]AllowedIdpshParam] `json:"allowed_idps"` + AllowedIdPs param.Field[[]AllowedIdpshParam] `json:"allowed_idps"` // Displays the application in the App Launcher. AppLauncherVisible param.Field[bool] `json:"app_launcher_visible"` // When set to `true`, users skip the identity provider selection step during @@ -1548,7 +1548,7 @@ func (r ApplicationSelfHostedApplicationParam) implementsZeroTrustApplicationUni type ApplicationSaaSApplicationParam struct { // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdps param.Field[[]AllowedIdpshParam] `json:"allowed_idps"` + AllowedIdPs param.Field[[]AllowedIdpshParam] `json:"allowed_idps"` // Displays the application in the App Launcher. AppLauncherVisible param.Field[bool] `json:"app_launcher_visible"` // When set to `true`, users skip the identity provider selection step during @@ -1703,7 +1703,7 @@ type ApplicationBrowserSSHApplicationParam struct { AllowAuthenticateViaWARP param.Field[bool] `json:"allow_authenticate_via_warp"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdps param.Field[[]AllowedIdpshParam] `json:"allowed_idps"` + AllowedIdPs param.Field[[]AllowedIdpshParam] `json:"allowed_idps"` // Displays the application in the App Launcher. AppLauncherVisible param.Field[bool] `json:"app_launcher_visible"` // When set to `true`, users skip the identity provider selection step during @@ -1774,7 +1774,7 @@ type ApplicationBrowserVncApplicationParam struct { AllowAuthenticateViaWARP param.Field[bool] `json:"allow_authenticate_via_warp"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdps param.Field[[]AllowedIdpshParam] `json:"allowed_idps"` + AllowedIdPs param.Field[[]AllowedIdpshParam] `json:"allowed_idps"` // Displays the application in the App Launcher. AppLauncherVisible param.Field[bool] `json:"app_launcher_visible"` // When set to `true`, users skip the identity provider selection step during @@ -1837,7 +1837,7 @@ type ApplicationAppLauncherApplicationParam struct { Type param.Field[ApplicationAppLauncherApplicationType] `json:"type,required"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdps param.Field[[]AllowedIdpshParam] `json:"allowed_idps"` + AllowedIdPs param.Field[[]AllowedIdpshParam] `json:"allowed_idps"` // When set to `true`, users skip the identity provider selection step during // login. You must specify only one identity provider in allowed_idps. AutoRedirectToIdentity param.Field[bool] `json:"auto_redirect_to_identity"` @@ -1858,7 +1858,7 @@ type ApplicationDeviceEnrollmentPermissionsApplicationParam struct { Type param.Field[ApplicationDeviceEnrollmentPermissionsApplicationType] `json:"type,required"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdps param.Field[[]AllowedIdpshParam] `json:"allowed_idps"` + AllowedIdPs param.Field[[]AllowedIdpshParam] `json:"allowed_idps"` // When set to `true`, users skip the identity provider selection step during // login. You must specify only one identity provider in allowed_idps. AutoRedirectToIdentity param.Field[bool] `json:"auto_redirect_to_identity"` @@ -1880,7 +1880,7 @@ type ApplicationBrowserIsolationPermissionsApplicationParam struct { Type param.Field[ApplicationBrowserIsolationPermissionsApplicationType] `json:"type,required"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdps param.Field[[]AllowedIdpshParam] `json:"allowed_idps"` + AllowedIdPs param.Field[[]AllowedIdpshParam] `json:"allowed_idps"` // When set to `true`, users skip the identity provider selection step during // login. You must specify only one identity provider in allowed_idps. AutoRedirectToIdentity param.Field[bool] `json:"auto_redirect_to_identity"` diff --git a/zero_trust/accessapplication_test.go b/zero_trust/accessapplication_test.go index beb5e3c74c..ec268aca79 100644 --- a/zero_trust/accessapplication_test.go +++ b/zero_trust/accessapplication_test.go @@ -32,7 +32,7 @@ func TestAccessApplicationNewWithOptionalParams(t *testing.T) { _, err := client.ZeroTrust.Access.Applications.New(context.TODO(), zero_trust.AccessApplicationNewParams{ Application: zero_trust.ApplicationSelfHostedApplicationParam{ AllowAuthenticateViaWARP: cloudflare.F(true), - AllowedIdps: cloudflare.F([]zero_trust.AllowedIdpshParam{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}), + AllowedIdPs: cloudflare.F([]zero_trust.AllowedIdpshParam{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}), AppLauncherVisible: cloudflare.F(true), AutoRedirectToIdentity: cloudflare.F(true), CORSHeaders: cloudflare.F(zero_trust.CORSHeadersParam{ @@ -96,7 +96,7 @@ func TestAccessApplicationUpdateWithOptionalParams(t *testing.T) { zero_trust.AccessApplicationUpdateParams{ Application: zero_trust.ApplicationSelfHostedApplicationParam{ AllowAuthenticateViaWARP: cloudflare.F(true), - AllowedIdps: cloudflare.F([]zero_trust.AllowedIdpshParam{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}), + AllowedIdPs: cloudflare.F([]zero_trust.AllowedIdpshParam{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}), AppLauncherVisible: cloudflare.F(true), AutoRedirectToIdentity: cloudflare.F(true), CORSHeaders: cloudflare.F(zero_trust.CORSHeadersParam{ From 4298c4699360f7cd4303babf3795e348e4cd1634 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 03:57:54 +0000 Subject: [PATCH 111/127] feat(api): update via SDK Studio (#1960) --- api.md | 1 + ssl/certificatepack.go | 72 ++++++++++++++++++------------------- ssl/certificatepackorder.go | 37 +------------------ 3 files changed, 38 insertions(+), 72 deletions(-) diff --git a/api.md b/api.md index 4ad576f165..6af4a5b3e3 100644 --- a/api.md +++ b/api.md @@ -1168,6 +1168,7 @@ Params Types: Response Types: +- ssl.CertificatePackStatus - ssl.Host - ssl.CertificatePackListResponse - ssl.CertificatePackDeleteResponse diff --git a/ssl/certificatepack.go b/ssl/certificatepack.go index ef2988edca..80d26b1c41 100644 --- a/ssl/certificatepack.go +++ b/ssl/certificatepack.go @@ -105,6 +105,41 @@ func (r *CertificatePackService) Get(ctx context.Context, certificatePackID stri return } +// Status of certificate pack. +type CertificatePackStatus string + +const ( + CertificatePackStatusInitializing CertificatePackStatus = "initializing" + CertificatePackStatusPendingValidation CertificatePackStatus = "pending_validation" + CertificatePackStatusDeleted CertificatePackStatus = "deleted" + CertificatePackStatusPendingIssuance CertificatePackStatus = "pending_issuance" + CertificatePackStatusPendingDeployment CertificatePackStatus = "pending_deployment" + CertificatePackStatusPendingDeletion CertificatePackStatus = "pending_deletion" + CertificatePackStatusPendingExpiration CertificatePackStatus = "pending_expiration" + CertificatePackStatusExpired CertificatePackStatus = "expired" + CertificatePackStatusActive CertificatePackStatus = "active" + CertificatePackStatusInitializingTimedOut CertificatePackStatus = "initializing_timed_out" + CertificatePackStatusValidationTimedOut CertificatePackStatus = "validation_timed_out" + CertificatePackStatusIssuanceTimedOut CertificatePackStatus = "issuance_timed_out" + CertificatePackStatusDeploymentTimedOut CertificatePackStatus = "deployment_timed_out" + CertificatePackStatusDeletionTimedOut CertificatePackStatus = "deletion_timed_out" + CertificatePackStatusPendingCleanup CertificatePackStatus = "pending_cleanup" + CertificatePackStatusStagingDeployment CertificatePackStatus = "staging_deployment" + CertificatePackStatusStagingActive CertificatePackStatus = "staging_active" + CertificatePackStatusDeactivating CertificatePackStatus = "deactivating" + CertificatePackStatusInactive CertificatePackStatus = "inactive" + CertificatePackStatusBackupIssued CertificatePackStatus = "backup_issued" + CertificatePackStatusHoldingDeployment CertificatePackStatus = "holding_deployment" +) + +func (r CertificatePackStatus) IsKnown() bool { + switch r { + case CertificatePackStatusInitializing, CertificatePackStatusPendingValidation, CertificatePackStatusDeleted, CertificatePackStatusPendingIssuance, CertificatePackStatusPendingDeployment, CertificatePackStatusPendingDeletion, CertificatePackStatusPendingExpiration, CertificatePackStatusExpired, CertificatePackStatusActive, CertificatePackStatusInitializingTimedOut, CertificatePackStatusValidationTimedOut, CertificatePackStatusIssuanceTimedOut, CertificatePackStatusDeploymentTimedOut, CertificatePackStatusDeletionTimedOut, CertificatePackStatusPendingCleanup, CertificatePackStatusStagingDeployment, CertificatePackStatusStagingActive, CertificatePackStatusDeactivating, CertificatePackStatusInactive, CertificatePackStatusBackupIssued, CertificatePackStatusHoldingDeployment: + return true + } + return false +} + type Host = string type HostParam = string @@ -147,7 +182,7 @@ type CertificatePackEditResponse struct { // the zone apex, may not contain more than 50 hosts, and may not be empty. Hosts []Host `json:"hosts"` // Status of certificate pack. - Status CertificatePackEditResponseStatus `json:"status"` + Status CertificatePackStatus `json:"status"` // Type of certificate pack. Type CertificatePackEditResponseType `json:"type"` // Validation Method selected for the order. @@ -198,41 +233,6 @@ func (r CertificatePackEditResponseCertificateAuthority) IsKnown() bool { return false } -// Status of certificate pack. -type CertificatePackEditResponseStatus string - -const ( - CertificatePackEditResponseStatusInitializing CertificatePackEditResponseStatus = "initializing" - CertificatePackEditResponseStatusPendingValidation CertificatePackEditResponseStatus = "pending_validation" - CertificatePackEditResponseStatusDeleted CertificatePackEditResponseStatus = "deleted" - CertificatePackEditResponseStatusPendingIssuance CertificatePackEditResponseStatus = "pending_issuance" - CertificatePackEditResponseStatusPendingDeployment CertificatePackEditResponseStatus = "pending_deployment" - CertificatePackEditResponseStatusPendingDeletion CertificatePackEditResponseStatus = "pending_deletion" - CertificatePackEditResponseStatusPendingExpiration CertificatePackEditResponseStatus = "pending_expiration" - CertificatePackEditResponseStatusExpired CertificatePackEditResponseStatus = "expired" - CertificatePackEditResponseStatusActive CertificatePackEditResponseStatus = "active" - CertificatePackEditResponseStatusInitializingTimedOut CertificatePackEditResponseStatus = "initializing_timed_out" - CertificatePackEditResponseStatusValidationTimedOut CertificatePackEditResponseStatus = "validation_timed_out" - CertificatePackEditResponseStatusIssuanceTimedOut CertificatePackEditResponseStatus = "issuance_timed_out" - CertificatePackEditResponseStatusDeploymentTimedOut CertificatePackEditResponseStatus = "deployment_timed_out" - CertificatePackEditResponseStatusDeletionTimedOut CertificatePackEditResponseStatus = "deletion_timed_out" - CertificatePackEditResponseStatusPendingCleanup CertificatePackEditResponseStatus = "pending_cleanup" - CertificatePackEditResponseStatusStagingDeployment CertificatePackEditResponseStatus = "staging_deployment" - CertificatePackEditResponseStatusStagingActive CertificatePackEditResponseStatus = "staging_active" - CertificatePackEditResponseStatusDeactivating CertificatePackEditResponseStatus = "deactivating" - CertificatePackEditResponseStatusInactive CertificatePackEditResponseStatus = "inactive" - CertificatePackEditResponseStatusBackupIssued CertificatePackEditResponseStatus = "backup_issued" - CertificatePackEditResponseStatusHoldingDeployment CertificatePackEditResponseStatus = "holding_deployment" -) - -func (r CertificatePackEditResponseStatus) IsKnown() bool { - switch r { - case CertificatePackEditResponseStatusInitializing, CertificatePackEditResponseStatusPendingValidation, CertificatePackEditResponseStatusDeleted, CertificatePackEditResponseStatusPendingIssuance, CertificatePackEditResponseStatusPendingDeployment, CertificatePackEditResponseStatusPendingDeletion, CertificatePackEditResponseStatusPendingExpiration, CertificatePackEditResponseStatusExpired, CertificatePackEditResponseStatusActive, CertificatePackEditResponseStatusInitializingTimedOut, CertificatePackEditResponseStatusValidationTimedOut, CertificatePackEditResponseStatusIssuanceTimedOut, CertificatePackEditResponseStatusDeploymentTimedOut, CertificatePackEditResponseStatusDeletionTimedOut, CertificatePackEditResponseStatusPendingCleanup, CertificatePackEditResponseStatusStagingDeployment, CertificatePackEditResponseStatusStagingActive, CertificatePackEditResponseStatusDeactivating, CertificatePackEditResponseStatusInactive, CertificatePackEditResponseStatusBackupIssued, CertificatePackEditResponseStatusHoldingDeployment: - return true - } - return false -} - // Type of certificate pack. type CertificatePackEditResponseType string diff --git a/ssl/certificatepackorder.go b/ssl/certificatepackorder.go index 41aba5397a..eb87ac0ce4 100644 --- a/ssl/certificatepackorder.go +++ b/ssl/certificatepackorder.go @@ -59,7 +59,7 @@ type CertificatePackOrderNewResponse struct { // the zone apex, may not contain more than 50 hosts, and may not be empty. Hosts []Host `json:"hosts"` // Status of certificate pack. - Status CertificatePackOrderNewResponseStatus `json:"status"` + Status CertificatePackStatus `json:"status"` // Type of certificate pack. Type CertificatePackOrderNewResponseType `json:"type"` // Validation Method selected for the order. @@ -110,41 +110,6 @@ func (r CertificatePackOrderNewResponseCertificateAuthority) IsKnown() bool { return false } -// Status of certificate pack. -type CertificatePackOrderNewResponseStatus string - -const ( - CertificatePackOrderNewResponseStatusInitializing CertificatePackOrderNewResponseStatus = "initializing" - CertificatePackOrderNewResponseStatusPendingValidation CertificatePackOrderNewResponseStatus = "pending_validation" - CertificatePackOrderNewResponseStatusDeleted CertificatePackOrderNewResponseStatus = "deleted" - CertificatePackOrderNewResponseStatusPendingIssuance CertificatePackOrderNewResponseStatus = "pending_issuance" - CertificatePackOrderNewResponseStatusPendingDeployment CertificatePackOrderNewResponseStatus = "pending_deployment" - CertificatePackOrderNewResponseStatusPendingDeletion CertificatePackOrderNewResponseStatus = "pending_deletion" - CertificatePackOrderNewResponseStatusPendingExpiration CertificatePackOrderNewResponseStatus = "pending_expiration" - CertificatePackOrderNewResponseStatusExpired CertificatePackOrderNewResponseStatus = "expired" - CertificatePackOrderNewResponseStatusActive CertificatePackOrderNewResponseStatus = "active" - CertificatePackOrderNewResponseStatusInitializingTimedOut CertificatePackOrderNewResponseStatus = "initializing_timed_out" - CertificatePackOrderNewResponseStatusValidationTimedOut CertificatePackOrderNewResponseStatus = "validation_timed_out" - CertificatePackOrderNewResponseStatusIssuanceTimedOut CertificatePackOrderNewResponseStatus = "issuance_timed_out" - CertificatePackOrderNewResponseStatusDeploymentTimedOut CertificatePackOrderNewResponseStatus = "deployment_timed_out" - CertificatePackOrderNewResponseStatusDeletionTimedOut CertificatePackOrderNewResponseStatus = "deletion_timed_out" - CertificatePackOrderNewResponseStatusPendingCleanup CertificatePackOrderNewResponseStatus = "pending_cleanup" - CertificatePackOrderNewResponseStatusStagingDeployment CertificatePackOrderNewResponseStatus = "staging_deployment" - CertificatePackOrderNewResponseStatusStagingActive CertificatePackOrderNewResponseStatus = "staging_active" - CertificatePackOrderNewResponseStatusDeactivating CertificatePackOrderNewResponseStatus = "deactivating" - CertificatePackOrderNewResponseStatusInactive CertificatePackOrderNewResponseStatus = "inactive" - CertificatePackOrderNewResponseStatusBackupIssued CertificatePackOrderNewResponseStatus = "backup_issued" - CertificatePackOrderNewResponseStatusHoldingDeployment CertificatePackOrderNewResponseStatus = "holding_deployment" -) - -func (r CertificatePackOrderNewResponseStatus) IsKnown() bool { - switch r { - case CertificatePackOrderNewResponseStatusInitializing, CertificatePackOrderNewResponseStatusPendingValidation, CertificatePackOrderNewResponseStatusDeleted, CertificatePackOrderNewResponseStatusPendingIssuance, CertificatePackOrderNewResponseStatusPendingDeployment, CertificatePackOrderNewResponseStatusPendingDeletion, CertificatePackOrderNewResponseStatusPendingExpiration, CertificatePackOrderNewResponseStatusExpired, CertificatePackOrderNewResponseStatusActive, CertificatePackOrderNewResponseStatusInitializingTimedOut, CertificatePackOrderNewResponseStatusValidationTimedOut, CertificatePackOrderNewResponseStatusIssuanceTimedOut, CertificatePackOrderNewResponseStatusDeploymentTimedOut, CertificatePackOrderNewResponseStatusDeletionTimedOut, CertificatePackOrderNewResponseStatusPendingCleanup, CertificatePackOrderNewResponseStatusStagingDeployment, CertificatePackOrderNewResponseStatusStagingActive, CertificatePackOrderNewResponseStatusDeactivating, CertificatePackOrderNewResponseStatusInactive, CertificatePackOrderNewResponseStatusBackupIssued, CertificatePackOrderNewResponseStatusHoldingDeployment: - return true - } - return false -} - // Type of certificate pack. type CertificatePackOrderNewResponseType string From 493200df97b38fa36e0dc36500d006de8c229e6c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 04:07:34 +0000 Subject: [PATCH 112/127] feat(api): update via SDK Studio (#1961) --- api.md | 7 ++ custom_hostnames/customhostname.go | 115 ++---------------- custom_hostnames/customhostname_test.go | 5 +- origin_ca_certificates/origincacertificate.go | 87 +------------ .../origincacertificate_test.go | 5 +- ssl/certificatepack.go | 73 +++++++++++ ssl/verification.go | 19 +-- 7 files changed, 99 insertions(+), 212 deletions(-) diff --git a/api.md b/api.md index 6af4a5b3e3..0c838a51c7 100644 --- a/api.md +++ b/api.md @@ -1164,11 +1164,18 @@ Methods: Params Types: +- ssl.CertificatePackCA +- ssl.CertificatePackRequestType +- ssl.CertificatePackRequestValidity - ssl.HostParam Response Types: +- ssl.CertificatePackCA +- ssl.CertificatePackRequestType +- ssl.CertificatePackRequestValidity - ssl.CertificatePackStatus +- ssl.CertificatePackValidationMethod - ssl.Host - ssl.CertificatePackListResponse - ssl.CertificatePackDeleteResponse diff --git a/custom_hostnames/customhostname.go b/custom_hostnames/customhostname.go index 05bd056728..a997b6957a 100644 --- a/custom_hostnames/customhostname.go +++ b/custom_hostnames/customhostname.go @@ -16,6 +16,7 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" + "github.com/cloudflare/cloudflare-go/v2/ssl" ) // CustomHostnameService contains methods and other services that help with @@ -238,7 +239,7 @@ type CustomHostnameNewResponseSSL struct { // chain, but does not otherwise modify it. BundleMethod BundleMethod `json:"bundle_method"` // The Certificate Authority that will issue the certificate - CertificateAuthority CustomHostnameNewResponseSSLCertificateAuthority `json:"certificate_authority"` + CertificateAuthority ssl.CertificatePackCA `json:"certificate_authority"` // If a custom uploaded certificate is used. CustomCertificate string `json:"custom_certificate"` // The identifier for the Custom CSR that was used. @@ -309,23 +310,6 @@ func (r customHostnameNewResponseSSLJSON) RawJSON() string { return r.raw } -// The Certificate Authority that will issue the certificate -type CustomHostnameNewResponseSSLCertificateAuthority string - -const ( - CustomHostnameNewResponseSSLCertificateAuthorityDigicert CustomHostnameNewResponseSSLCertificateAuthority = "digicert" - CustomHostnameNewResponseSSLCertificateAuthorityGoogle CustomHostnameNewResponseSSLCertificateAuthority = "google" - CustomHostnameNewResponseSSLCertificateAuthorityLetsEncrypt CustomHostnameNewResponseSSLCertificateAuthority = "lets_encrypt" -) - -func (r CustomHostnameNewResponseSSLCertificateAuthority) IsKnown() bool { - switch r { - case CustomHostnameNewResponseSSLCertificateAuthorityDigicert, CustomHostnameNewResponseSSLCertificateAuthorityGoogle, CustomHostnameNewResponseSSLCertificateAuthorityLetsEncrypt: - return true - } - return false -} - // SSL specific settings. type CustomHostnameNewResponseSSLSettings struct { // An allowlist of ciphers for TLS termination. These ciphers must be in the @@ -717,7 +701,7 @@ type CustomHostnameListResponseSSL struct { // chain, but does not otherwise modify it. BundleMethod BundleMethod `json:"bundle_method"` // The Certificate Authority that will issue the certificate - CertificateAuthority CustomHostnameListResponseSSLCertificateAuthority `json:"certificate_authority"` + CertificateAuthority ssl.CertificatePackCA `json:"certificate_authority"` // If a custom uploaded certificate is used. CustomCertificate string `json:"custom_certificate"` // The identifier for the Custom CSR that was used. @@ -788,23 +772,6 @@ func (r customHostnameListResponseSSLJSON) RawJSON() string { return r.raw } -// The Certificate Authority that will issue the certificate -type CustomHostnameListResponseSSLCertificateAuthority string - -const ( - CustomHostnameListResponseSSLCertificateAuthorityDigicert CustomHostnameListResponseSSLCertificateAuthority = "digicert" - CustomHostnameListResponseSSLCertificateAuthorityGoogle CustomHostnameListResponseSSLCertificateAuthority = "google" - CustomHostnameListResponseSSLCertificateAuthorityLetsEncrypt CustomHostnameListResponseSSLCertificateAuthority = "lets_encrypt" -) - -func (r CustomHostnameListResponseSSLCertificateAuthority) IsKnown() bool { - switch r { - case CustomHostnameListResponseSSLCertificateAuthorityDigicert, CustomHostnameListResponseSSLCertificateAuthorityGoogle, CustomHostnameListResponseSSLCertificateAuthorityLetsEncrypt: - return true - } - return false -} - // SSL specific settings. type CustomHostnameListResponseSSLSettings struct { // An allowlist of ciphers for TLS termination. These ciphers must be in the @@ -1218,7 +1185,7 @@ type CustomHostnameEditResponseSSL struct { // chain, but does not otherwise modify it. BundleMethod BundleMethod `json:"bundle_method"` // The Certificate Authority that will issue the certificate - CertificateAuthority CustomHostnameEditResponseSSLCertificateAuthority `json:"certificate_authority"` + CertificateAuthority ssl.CertificatePackCA `json:"certificate_authority"` // If a custom uploaded certificate is used. CustomCertificate string `json:"custom_certificate"` // The identifier for the Custom CSR that was used. @@ -1289,23 +1256,6 @@ func (r customHostnameEditResponseSSLJSON) RawJSON() string { return r.raw } -// The Certificate Authority that will issue the certificate -type CustomHostnameEditResponseSSLCertificateAuthority string - -const ( - CustomHostnameEditResponseSSLCertificateAuthorityDigicert CustomHostnameEditResponseSSLCertificateAuthority = "digicert" - CustomHostnameEditResponseSSLCertificateAuthorityGoogle CustomHostnameEditResponseSSLCertificateAuthority = "google" - CustomHostnameEditResponseSSLCertificateAuthorityLetsEncrypt CustomHostnameEditResponseSSLCertificateAuthority = "lets_encrypt" -) - -func (r CustomHostnameEditResponseSSLCertificateAuthority) IsKnown() bool { - switch r { - case CustomHostnameEditResponseSSLCertificateAuthorityDigicert, CustomHostnameEditResponseSSLCertificateAuthorityGoogle, CustomHostnameEditResponseSSLCertificateAuthorityLetsEncrypt: - return true - } - return false -} - // SSL specific settings. type CustomHostnameEditResponseSSLSettings struct { // An allowlist of ciphers for TLS termination. These ciphers must be in the @@ -1697,7 +1647,7 @@ type CustomHostnameGetResponseSSL struct { // chain, but does not otherwise modify it. BundleMethod BundleMethod `json:"bundle_method"` // The Certificate Authority that will issue the certificate - CertificateAuthority CustomHostnameGetResponseSSLCertificateAuthority `json:"certificate_authority"` + CertificateAuthority ssl.CertificatePackCA `json:"certificate_authority"` // If a custom uploaded certificate is used. CustomCertificate string `json:"custom_certificate"` // The identifier for the Custom CSR that was used. @@ -1768,23 +1718,6 @@ func (r customHostnameGetResponseSSLJSON) RawJSON() string { return r.raw } -// The Certificate Authority that will issue the certificate -type CustomHostnameGetResponseSSLCertificateAuthority string - -const ( - CustomHostnameGetResponseSSLCertificateAuthorityDigicert CustomHostnameGetResponseSSLCertificateAuthority = "digicert" - CustomHostnameGetResponseSSLCertificateAuthorityGoogle CustomHostnameGetResponseSSLCertificateAuthority = "google" - CustomHostnameGetResponseSSLCertificateAuthorityLetsEncrypt CustomHostnameGetResponseSSLCertificateAuthority = "lets_encrypt" -) - -func (r CustomHostnameGetResponseSSLCertificateAuthority) IsKnown() bool { - switch r { - case CustomHostnameGetResponseSSLCertificateAuthorityDigicert, CustomHostnameGetResponseSSLCertificateAuthorityGoogle, CustomHostnameGetResponseSSLCertificateAuthorityLetsEncrypt: - return true - } - return false -} - // SSL specific settings. type CustomHostnameGetResponseSSLSettings struct { // An allowlist of ciphers for TLS termination. These ciphers must be in the @@ -2131,7 +2064,7 @@ type CustomHostnameNewParamsSSL struct { // chain, but does not otherwise modify it. BundleMethod param.Field[BundleMethod] `json:"bundle_method"` // The Certificate Authority that will issue the certificate - CertificateAuthority param.Field[CustomHostnameNewParamsSSLCertificateAuthority] `json:"certificate_authority"` + CertificateAuthority param.Field[ssl.CertificatePackCA] `json:"certificate_authority"` // If a custom uploaded certificate is used. CustomCertificate param.Field[string] `json:"custom_certificate"` // The key for a custom uploaded certificate. @@ -2151,23 +2084,6 @@ func (r CustomHostnameNewParamsSSL) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -// The Certificate Authority that will issue the certificate -type CustomHostnameNewParamsSSLCertificateAuthority string - -const ( - CustomHostnameNewParamsSSLCertificateAuthorityDigicert CustomHostnameNewParamsSSLCertificateAuthority = "digicert" - CustomHostnameNewParamsSSLCertificateAuthorityGoogle CustomHostnameNewParamsSSLCertificateAuthority = "google" - CustomHostnameNewParamsSSLCertificateAuthorityLetsEncrypt CustomHostnameNewParamsSSLCertificateAuthority = "lets_encrypt" -) - -func (r CustomHostnameNewParamsSSLCertificateAuthority) IsKnown() bool { - switch r { - case CustomHostnameNewParamsSSLCertificateAuthorityDigicert, CustomHostnameNewParamsSSLCertificateAuthorityGoogle, CustomHostnameNewParamsSSLCertificateAuthorityLetsEncrypt: - return true - } - return false -} - // SSL specific settings. type CustomHostnameNewParamsSSLSettings struct { // An allowlist of ciphers for TLS termination. These ciphers must be in the @@ -2430,7 +2346,7 @@ type CustomHostnameEditParamsSSL struct { // chain, but does not otherwise modify it. BundleMethod param.Field[BundleMethod] `json:"bundle_method"` // The Certificate Authority that will issue the certificate - CertificateAuthority param.Field[CustomHostnameEditParamsSSLCertificateAuthority] `json:"certificate_authority"` + CertificateAuthority param.Field[ssl.CertificatePackCA] `json:"certificate_authority"` // If a custom uploaded certificate is used. CustomCertificate param.Field[string] `json:"custom_certificate"` // The key for a custom uploaded certificate. @@ -2450,23 +2366,6 @@ func (r CustomHostnameEditParamsSSL) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -// The Certificate Authority that will issue the certificate -type CustomHostnameEditParamsSSLCertificateAuthority string - -const ( - CustomHostnameEditParamsSSLCertificateAuthorityDigicert CustomHostnameEditParamsSSLCertificateAuthority = "digicert" - CustomHostnameEditParamsSSLCertificateAuthorityGoogle CustomHostnameEditParamsSSLCertificateAuthority = "google" - CustomHostnameEditParamsSSLCertificateAuthorityLetsEncrypt CustomHostnameEditParamsSSLCertificateAuthority = "lets_encrypt" -) - -func (r CustomHostnameEditParamsSSLCertificateAuthority) IsKnown() bool { - switch r { - case CustomHostnameEditParamsSSLCertificateAuthorityDigicert, CustomHostnameEditParamsSSLCertificateAuthorityGoogle, CustomHostnameEditParamsSSLCertificateAuthorityLetsEncrypt: - return true - } - return false -} - // SSL specific settings. type CustomHostnameEditParamsSSLSettings struct { // An allowlist of ciphers for TLS termination. These ciphers must be in the diff --git a/custom_hostnames/customhostname_test.go b/custom_hostnames/customhostname_test.go index b6c63c7e1f..58e35a9121 100644 --- a/custom_hostnames/customhostname_test.go +++ b/custom_hostnames/customhostname_test.go @@ -12,6 +12,7 @@ import ( "github.com/cloudflare/cloudflare-go/v2/custom_hostnames" "github.com/cloudflare/cloudflare-go/v2/internal/testutil" "github.com/cloudflare/cloudflare-go/v2/option" + "github.com/cloudflare/cloudflare-go/v2/ssl" ) func TestCustomHostnameNewWithOptionalParams(t *testing.T) { @@ -32,7 +33,7 @@ func TestCustomHostnameNewWithOptionalParams(t *testing.T) { Hostname: cloudflare.F("app.example.com"), SSL: cloudflare.F(custom_hostnames.CustomHostnameNewParamsSSL{ BundleMethod: cloudflare.F(custom_hostnames.BundleMethodUbiquitous), - CertificateAuthority: cloudflare.F(custom_hostnames.CustomHostnameNewParamsSSLCertificateAuthorityGoogle), + CertificateAuthority: cloudflare.F(ssl.CertificatePackCAGoogle), CustomCertificate: cloudflare.F("-----BEGIN CERTIFICATE-----\\nMIIFJDCCBAygAwIBAgIQD0ifmj/Yi5NP/2gdUySbfzANBgkqhkiG9w0BAQsFADBN\\nMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMScwJQYDVQQDEx5E...SzSHfXp5lnu/3V08I72q1QNzOCgY1XeL4GKVcj4or6cT6tX6oJH7ePPmfrBfqI/O\\nOeH8gMJ+FuwtXYEPa4hBf38M5eU5xWG7\\n-----END CERTIFICATE-----\\n"), CustomKey: cloudflare.F("-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n"), Method: cloudflare.F(custom_hostnames.DCVMethodHTTP), @@ -145,7 +146,7 @@ func TestCustomHostnameEditWithOptionalParams(t *testing.T) { CustomOriginSni: cloudflare.F("sni.example.com"), SSL: cloudflare.F(custom_hostnames.CustomHostnameEditParamsSSL{ BundleMethod: cloudflare.F(custom_hostnames.BundleMethodUbiquitous), - CertificateAuthority: cloudflare.F(custom_hostnames.CustomHostnameEditParamsSSLCertificateAuthorityGoogle), + CertificateAuthority: cloudflare.F(ssl.CertificatePackCAGoogle), CustomCertificate: cloudflare.F("-----BEGIN CERTIFICATE-----\\nMIIFJDCCBAygAwIBAgIQD0ifmj/Yi5NP/2gdUySbfzANBgkqhkiG9w0BAQsFADBN\\nMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMScwJQYDVQQDEx5E...SzSHfXp5lnu/3V08I72q1QNzOCgY1XeL4GKVcj4or6cT6tX6oJH7ePPmfrBfqI/O\\nOeH8gMJ+FuwtXYEPa4hBf38M5eU5xWG7\\n-----END CERTIFICATE-----\\n"), CustomKey: cloudflare.F("-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n"), Method: cloudflare.F(custom_hostnames.DCVMethodHTTP), diff --git a/origin_ca_certificates/origincacertificate.go b/origin_ca_certificates/origincacertificate.go index a446ce978f..e8e22547b2 100644 --- a/origin_ca_certificates/origincacertificate.go +++ b/origin_ca_certificates/origincacertificate.go @@ -17,6 +17,7 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" + "github.com/cloudflare/cloudflare-go/v2/ssl" "github.com/tidwall/gjson" ) @@ -117,9 +118,9 @@ type OriginCACertificate struct { Hostnames []interface{} `json:"hostnames,required"` // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). - RequestType OriginCACertificateRequestType `json:"request_type,required"` + RequestType ssl.CertificatePackRequestType `json:"request_type,required"` // The number of days for which the certificate should be valid. - RequestedValidity OriginCACertificateRequestedValidity `json:"requested_validity,required"` + RequestedValidity ssl.CertificatePackRequestValidity `json:"requested_validity,required"` // Identifier ID string `json:"id"` // The Origin CA certificate. Will be newline-encoded. @@ -151,45 +152,6 @@ func (r originCACertificateJSON) RawJSON() string { return r.raw } -// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), -// or "keyless-certificate" (for Keyless SSL servers). -type OriginCACertificateRequestType string - -const ( - OriginCACertificateRequestTypeOriginRsa OriginCACertificateRequestType = "origin-rsa" - OriginCACertificateRequestTypeOriginEcc OriginCACertificateRequestType = "origin-ecc" - OriginCACertificateRequestTypeKeylessCertificate OriginCACertificateRequestType = "keyless-certificate" -) - -func (r OriginCACertificateRequestType) IsKnown() bool { - switch r { - case OriginCACertificateRequestTypeOriginRsa, OriginCACertificateRequestTypeOriginEcc, OriginCACertificateRequestTypeKeylessCertificate: - return true - } - return false -} - -// The number of days for which the certificate should be valid. -type OriginCACertificateRequestedValidity float64 - -const ( - OriginCACertificateRequestedValidity7 OriginCACertificateRequestedValidity = 7 - OriginCACertificateRequestedValidity30 OriginCACertificateRequestedValidity = 30 - OriginCACertificateRequestedValidity90 OriginCACertificateRequestedValidity = 90 - OriginCACertificateRequestedValidity365 OriginCACertificateRequestedValidity = 365 - OriginCACertificateRequestedValidity730 OriginCACertificateRequestedValidity = 730 - OriginCACertificateRequestedValidity1095 OriginCACertificateRequestedValidity = 1095 - OriginCACertificateRequestedValidity5475 OriginCACertificateRequestedValidity = 5475 -) - -func (r OriginCACertificateRequestedValidity) IsKnown() bool { - switch r { - case OriginCACertificateRequestedValidity7, OriginCACertificateRequestedValidity30, OriginCACertificateRequestedValidity90, OriginCACertificateRequestedValidity365, OriginCACertificateRequestedValidity730, OriginCACertificateRequestedValidity1095, OriginCACertificateRequestedValidity5475: - return true - } - return false -} - // Union satisfied by // [origin_ca_certificates.OriginCACertificateNewResponseUnknown] or // [shared.UnionString]. @@ -256,54 +218,15 @@ type OriginCACertificateNewParams struct { Hostnames param.Field[[]interface{}] `json:"hostnames"` // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). - RequestType param.Field[OriginCACertificateNewParamsRequestType] `json:"request_type"` + RequestType param.Field[ssl.CertificatePackRequestType] `json:"request_type"` // The number of days for which the certificate should be valid. - RequestedValidity param.Field[OriginCACertificateNewParamsRequestedValidity] `json:"requested_validity"` + RequestedValidity param.Field[ssl.CertificatePackRequestValidity] `json:"requested_validity"` } func (r OriginCACertificateNewParams) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), -// or "keyless-certificate" (for Keyless SSL servers). -type OriginCACertificateNewParamsRequestType string - -const ( - OriginCACertificateNewParamsRequestTypeOriginRsa OriginCACertificateNewParamsRequestType = "origin-rsa" - OriginCACertificateNewParamsRequestTypeOriginEcc OriginCACertificateNewParamsRequestType = "origin-ecc" - OriginCACertificateNewParamsRequestTypeKeylessCertificate OriginCACertificateNewParamsRequestType = "keyless-certificate" -) - -func (r OriginCACertificateNewParamsRequestType) IsKnown() bool { - switch r { - case OriginCACertificateNewParamsRequestTypeOriginRsa, OriginCACertificateNewParamsRequestTypeOriginEcc, OriginCACertificateNewParamsRequestTypeKeylessCertificate: - return true - } - return false -} - -// The number of days for which the certificate should be valid. -type OriginCACertificateNewParamsRequestedValidity float64 - -const ( - OriginCACertificateNewParamsRequestedValidity7 OriginCACertificateNewParamsRequestedValidity = 7 - OriginCACertificateNewParamsRequestedValidity30 OriginCACertificateNewParamsRequestedValidity = 30 - OriginCACertificateNewParamsRequestedValidity90 OriginCACertificateNewParamsRequestedValidity = 90 - OriginCACertificateNewParamsRequestedValidity365 OriginCACertificateNewParamsRequestedValidity = 365 - OriginCACertificateNewParamsRequestedValidity730 OriginCACertificateNewParamsRequestedValidity = 730 - OriginCACertificateNewParamsRequestedValidity1095 OriginCACertificateNewParamsRequestedValidity = 1095 - OriginCACertificateNewParamsRequestedValidity5475 OriginCACertificateNewParamsRequestedValidity = 5475 -) - -func (r OriginCACertificateNewParamsRequestedValidity) IsKnown() bool { - switch r { - case OriginCACertificateNewParamsRequestedValidity7, OriginCACertificateNewParamsRequestedValidity30, OriginCACertificateNewParamsRequestedValidity90, OriginCACertificateNewParamsRequestedValidity365, OriginCACertificateNewParamsRequestedValidity730, OriginCACertificateNewParamsRequestedValidity1095, OriginCACertificateNewParamsRequestedValidity5475: - return true - } - return false -} - type OriginCACertificateNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` diff --git a/origin_ca_certificates/origincacertificate_test.go b/origin_ca_certificates/origincacertificate_test.go index 50dd8acff4..da3b1bede7 100644 --- a/origin_ca_certificates/origincacertificate_test.go +++ b/origin_ca_certificates/origincacertificate_test.go @@ -12,6 +12,7 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/testutil" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/origin_ca_certificates" + "github.com/cloudflare/cloudflare-go/v2/ssl" ) func TestOriginCACertificateNewWithOptionalParams(t *testing.T) { @@ -30,8 +31,8 @@ func TestOriginCACertificateNewWithOptionalParams(t *testing.T) { _, err := client.OriginCACertificates.New(context.TODO(), origin_ca_certificates.OriginCACertificateNewParams{ Csr: cloudflare.F("-----BEGIN CERTIFICATE REQUEST-----\nMIICxzCCAa8CAQAwSDELMAkGA1UEBhMCVVMxFjAUBgNVBAgTDVNhbiBGcmFuY2lz\nY28xCzAJBgNVBAcTAkNBMRQwEgYDVQQDEwtleGFtcGxlLm5ldDCCASIwDQYJKoZI\nhvcNAQEBBQADggEPADCCAQoCggEBALxejtu4b+jPdFeFi6OUsye8TYJQBm3WfCvL\nHu5EvijMO/4Z2TImwASbwUF7Ir8OLgH+mGlQZeqyNvGoSOMEaZVXcYfpR1hlVak8\n4GGVr+04IGfOCqaBokaBFIwzclGZbzKmLGwIQioNxGfqFm6RGYGA3be2Je2iseBc\nN8GV1wYmvYE0RR+yWweJCTJ157exyRzu7sVxaEW9F87zBQLyOnwXc64rflXslRqi\ng7F7w5IaQYOl8yvmk/jEPCAha7fkiUfEpj4N12+oPRiMvleJF98chxjD4MH39c5I\nuOslULhrWunfh7GB1jwWNA9y44H0snrf+xvoy2TcHmxvma9Eln8CAwEAAaA6MDgG\nCSqGSIb3DQEJDjErMCkwJwYDVR0RBCAwHoILZXhhbXBsZS5uZXSCD3d3dy5leGFt\ncGxlLm5ldDANBgkqhkiG9w0BAQsFAAOCAQEAcBaX6dOnI8ncARrI9ZSF2AJX+8mx\npTHY2+Y2C0VvrVDGMtbBRH8R9yMbqWtlxeeNGf//LeMkSKSFa4kbpdx226lfui8/\nauRDBTJGx2R1ccUxmLZXx4my0W5iIMxunu+kez+BDlu7bTT2io0uXMRHue4i6quH\nyc5ibxvbJMjR7dqbcanVE10/34oprzXQsJ/VmSuZNXtjbtSKDlmcpw6To/eeAJ+J\nhXykcUihvHyG4A1m2R6qpANBjnA0pHexfwM/SgfzvpbvUg0T1ubmer8BgTwCKIWs\ndcWYTthM51JIqRBfNqy4QcBnX+GY05yltEEswQI55wdiS3CjTTA67sdbcQ==\n-----END CERTIFICATE REQUEST-----"), Hostnames: cloudflare.F([]interface{}{"example.com", "*.example.com"}), - RequestType: cloudflare.F(origin_ca_certificates.OriginCACertificateNewParamsRequestTypeOriginRsa), - RequestedValidity: cloudflare.F(origin_ca_certificates.OriginCACertificateNewParamsRequestedValidity5475), + RequestType: cloudflare.F(ssl.CertificatePackRequestTypeOriginRsa), + RequestedValidity: cloudflare.F(ssl.CertificatePackRequestValidity5475), }) if err != nil { var apierr *cloudflare.Error diff --git a/ssl/certificatepack.go b/ssl/certificatepack.go index 80d26b1c41..c59935d18e 100644 --- a/ssl/certificatepack.go +++ b/ssl/certificatepack.go @@ -105,6 +105,62 @@ func (r *CertificatePackService) Get(ctx context.Context, certificatePackID stri return } +// The Certificate Authority that will issue the certificate +type CertificatePackCA string + +const ( + CertificatePackCADigicert CertificatePackCA = "digicert" + CertificatePackCAGoogle CertificatePackCA = "google" + CertificatePackCALetsEncrypt CertificatePackCA = "lets_encrypt" +) + +func (r CertificatePackCA) IsKnown() bool { + switch r { + case CertificatePackCADigicert, CertificatePackCAGoogle, CertificatePackCALetsEncrypt: + return true + } + return false +} + +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +type CertificatePackRequestType string + +const ( + CertificatePackRequestTypeOriginRsa CertificatePackRequestType = "origin-rsa" + CertificatePackRequestTypeOriginEcc CertificatePackRequestType = "origin-ecc" + CertificatePackRequestTypeKeylessCertificate CertificatePackRequestType = "keyless-certificate" +) + +func (r CertificatePackRequestType) IsKnown() bool { + switch r { + case CertificatePackRequestTypeOriginRsa, CertificatePackRequestTypeOriginEcc, CertificatePackRequestTypeKeylessCertificate: + return true + } + return false +} + +// The number of days for which the certificate should be valid. +type CertificatePackRequestValidity float64 + +const ( + CertificatePackRequestValidity7 CertificatePackRequestValidity = 7 + CertificatePackRequestValidity30 CertificatePackRequestValidity = 30 + CertificatePackRequestValidity90 CertificatePackRequestValidity = 90 + CertificatePackRequestValidity365 CertificatePackRequestValidity = 365 + CertificatePackRequestValidity730 CertificatePackRequestValidity = 730 + CertificatePackRequestValidity1095 CertificatePackRequestValidity = 1095 + CertificatePackRequestValidity5475 CertificatePackRequestValidity = 5475 +) + +func (r CertificatePackRequestValidity) IsKnown() bool { + switch r { + case CertificatePackRequestValidity7, CertificatePackRequestValidity30, CertificatePackRequestValidity90, CertificatePackRequestValidity365, CertificatePackRequestValidity730, CertificatePackRequestValidity1095, CertificatePackRequestValidity5475: + return true + } + return false +} + // Status of certificate pack. type CertificatePackStatus string @@ -140,6 +196,23 @@ func (r CertificatePackStatus) IsKnown() bool { return false } +// Validation method in use for a certificate pack order. +type CertificatePackValidationMethod string + +const ( + CertificatePackValidationMethodHTTP CertificatePackValidationMethod = "http" + CertificatePackValidationMethodCNAME CertificatePackValidationMethod = "cname" + CertificatePackValidationMethodTXT CertificatePackValidationMethod = "txt" +) + +func (r CertificatePackValidationMethod) IsKnown() bool { + switch r { + case CertificatePackValidationMethodHTTP, CertificatePackValidationMethodCNAME, CertificatePackValidationMethodTXT: + return true + } + return false +} + type Host = string type HostParam = string diff --git a/ssl/verification.go b/ssl/verification.go index 01fd7e4fee..a7b87d57f5 100644 --- a/ssl/verification.go +++ b/ssl/verification.go @@ -73,7 +73,7 @@ type Verification struct { // Certificate's signature algorithm. Signature VerificationSignature `json:"signature"` // Validation method in use for a certificate pack order. - ValidationMethod VerificationValidationMethod `json:"validation_method"` + ValidationMethod CertificatePackValidationMethod `json:"validation_method"` // Certificate's required verification information. VerificationInfo VerificationVerificationInfo `json:"verification_info"` // Status of the required verification information, omitted if verification status @@ -144,23 +144,6 @@ func (r VerificationSignature) IsKnown() bool { return false } -// Validation method in use for a certificate pack order. -type VerificationValidationMethod string - -const ( - VerificationValidationMethodHTTP VerificationValidationMethod = "http" - VerificationValidationMethodCNAME VerificationValidationMethod = "cname" - VerificationValidationMethodTXT VerificationValidationMethod = "txt" -) - -func (r VerificationValidationMethod) IsKnown() bool { - switch r { - case VerificationValidationMethodHTTP, VerificationValidationMethodCNAME, VerificationValidationMethodTXT: - return true - } - return false -} - // Certificate's required verification information. type VerificationVerificationInfo struct { // Name of CNAME record. From a70e598fcca1774a21514c0bb5767cf76947eb8d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 04:15:04 +0000 Subject: [PATCH 113/127] feat(api): update via SDK Studio (#1962) --- accounts/member.go | 16 +++++ acm/totaltls.go | 70 +++++-------------- acm/totaltls_test.go | 2 +- addressing/addressmap.go | 70 +++++++------------ addressing/addressmap_test.go | 2 +- api.md | 7 ++ custom_certificates/customcertificate.go | 4 +- custom_certificates/customcertificate_test.go | 2 +- custom_hostnames/customhostname.go | 18 ++--- custom_hostnames/customhostname_test.go | 2 +- rulesets/rule.go | 24 +++---- user/organization.go | 21 +----- 12 files changed, 99 insertions(+), 139 deletions(-) diff --git a/accounts/member.go b/accounts/member.go index 28cdcf290c..f6f2d5f859 100644 --- a/accounts/member.go +++ b/accounts/member.go @@ -109,6 +109,22 @@ func (r *MemberService) Get(ctx context.Context, memberID string, query MemberGe return } +// Whether the user is a member of the organization or has an inivitation pending. +type MemberStatus string + +const ( + MemberStatusMember MemberStatus = "member" + MemberStatusInvited MemberStatus = "invited" +) + +func (r MemberStatus) IsKnown() bool { + switch r { + case MemberStatusMember, MemberStatusInvited: + return true + } + return false +} + type UserWithInviteCode struct { // Membership identifier tag. ID string `json:"id,required"` diff --git a/acm/totaltls.go b/acm/totaltls.go index 6a60926d92..ae6836eeea 100644 --- a/acm/totaltls.go +++ b/acm/totaltls.go @@ -57,9 +57,25 @@ func (r *TotalTLSService) Get(ctx context.Context, query TotalTLSGetParams, opts return } +// The Certificate Authority that Total TLS certificates will be issued through. +type TotalTLSCertificateAuthority string + +const ( + TotalTLSCertificateAuthorityGoogle TotalTLSCertificateAuthority = "google" + TotalTLSCertificateAuthorityLetsEncrypt TotalTLSCertificateAuthority = "lets_encrypt" +) + +func (r TotalTLSCertificateAuthority) IsKnown() bool { + switch r { + case TotalTLSCertificateAuthorityGoogle, TotalTLSCertificateAuthorityLetsEncrypt: + return true + } + return false +} + type TotalTLSNewResponse struct { // The Certificate Authority that Total TLS certificates will be issued through. - CertificateAuthority TotalTLSNewResponseCertificateAuthority `json:"certificate_authority"` + CertificateAuthority TotalTLSCertificateAuthority `json:"certificate_authority"` // If enabled, Total TLS will order a hostname specific TLS certificate for any // proxied A, AAAA, or CNAME record in your zone. Enabled bool `json:"enabled"` @@ -86,22 +102,6 @@ func (r totalTLSNewResponseJSON) RawJSON() string { return r.raw } -// The Certificate Authority that Total TLS certificates will be issued through. -type TotalTLSNewResponseCertificateAuthority string - -const ( - TotalTLSNewResponseCertificateAuthorityGoogle TotalTLSNewResponseCertificateAuthority = "google" - TotalTLSNewResponseCertificateAuthorityLetsEncrypt TotalTLSNewResponseCertificateAuthority = "lets_encrypt" -) - -func (r TotalTLSNewResponseCertificateAuthority) IsKnown() bool { - switch r { - case TotalTLSNewResponseCertificateAuthorityGoogle, TotalTLSNewResponseCertificateAuthorityLetsEncrypt: - return true - } - return false -} - // The validity period in days for the certificates ordered via Total TLS. type TotalTLSNewResponseValidityDays int64 @@ -119,7 +119,7 @@ func (r TotalTLSNewResponseValidityDays) IsKnown() bool { type TotalTLSGetResponse struct { // The Certificate Authority that Total TLS certificates will be issued through. - CertificateAuthority TotalTLSGetResponseCertificateAuthority `json:"certificate_authority"` + CertificateAuthority TotalTLSCertificateAuthority `json:"certificate_authority"` // If enabled, Total TLS will order a hostname specific TLS certificate for any // proxied A, AAAA, or CNAME record in your zone. Enabled bool `json:"enabled"` @@ -146,22 +146,6 @@ func (r totalTLSGetResponseJSON) RawJSON() string { return r.raw } -// The Certificate Authority that Total TLS certificates will be issued through. -type TotalTLSGetResponseCertificateAuthority string - -const ( - TotalTLSGetResponseCertificateAuthorityGoogle TotalTLSGetResponseCertificateAuthority = "google" - TotalTLSGetResponseCertificateAuthorityLetsEncrypt TotalTLSGetResponseCertificateAuthority = "lets_encrypt" -) - -func (r TotalTLSGetResponseCertificateAuthority) IsKnown() bool { - switch r { - case TotalTLSGetResponseCertificateAuthorityGoogle, TotalTLSGetResponseCertificateAuthorityLetsEncrypt: - return true - } - return false -} - // The validity period in days for the certificates ordered via Total TLS. type TotalTLSGetResponseValidityDays int64 @@ -184,29 +168,13 @@ type TotalTLSNewParams struct { // proxied A, AAAA, or CNAME record in your zone. Enabled param.Field[bool] `json:"enabled,required"` // The Certificate Authority that Total TLS certificates will be issued through. - CertificateAuthority param.Field[TotalTLSNewParamsCertificateAuthority] `json:"certificate_authority"` + CertificateAuthority param.Field[TotalTLSCertificateAuthority] `json:"certificate_authority"` } func (r TotalTLSNewParams) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -// The Certificate Authority that Total TLS certificates will be issued through. -type TotalTLSNewParamsCertificateAuthority string - -const ( - TotalTLSNewParamsCertificateAuthorityGoogle TotalTLSNewParamsCertificateAuthority = "google" - TotalTLSNewParamsCertificateAuthorityLetsEncrypt TotalTLSNewParamsCertificateAuthority = "lets_encrypt" -) - -func (r TotalTLSNewParamsCertificateAuthority) IsKnown() bool { - switch r { - case TotalTLSNewParamsCertificateAuthorityGoogle, TotalTLSNewParamsCertificateAuthorityLetsEncrypt: - return true - } - return false -} - type TotalTLSNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` diff --git a/acm/totaltls_test.go b/acm/totaltls_test.go index 87496fef01..58acf876d7 100644 --- a/acm/totaltls_test.go +++ b/acm/totaltls_test.go @@ -30,7 +30,7 @@ func TestTotalTLSNewWithOptionalParams(t *testing.T) { _, err := client.ACM.TotalTLS.New(context.TODO(), acm.TotalTLSNewParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Enabled: cloudflare.F(true), - CertificateAuthority: cloudflare.F(acm.TotalTLSNewParamsCertificateAuthorityGoogle), + CertificateAuthority: cloudflare.F(acm.TotalTLSCertificateAuthorityGoogle), }) if err != nil { var apierr *cloudflare.Error diff --git a/addressing/addressmap.go b/addressing/addressmap.go index 44aa60b6d6..5f5bed0647 100644 --- a/addressing/addressmap.go +++ b/addressing/addressmap.go @@ -130,7 +130,7 @@ type AddressMap struct { // handshake from a client without an SNI, it will respond with the default SNI on // those IPs. The default SNI can be any valid zone or subdomain owned by the // account. - DefaultSni string `json:"default_sni,nullable"` + DefaultSNI string `json:"default_sni,nullable"` // An optional description field which may be used to describe the types of IPs or // zones on the map. Description string `json:"description,nullable"` @@ -147,7 +147,7 @@ type addressMapJSON struct { CanDelete apijson.Field CanModifyIPs apijson.Field CreatedAt apijson.Field - DefaultSni apijson.Field + DefaultSNI apijson.Field Description apijson.Field Enabled apijson.Field ModifiedAt apijson.Field @@ -163,6 +163,22 @@ func (r addressMapJSON) RawJSON() string { return r.raw } +// The type of the membership. +type AddressMapKind string + +const ( + AddressMapKindZone AddressMapKind = "zone" + AddressMapKindAccount AddressMapKind = "account" +) + +func (r AddressMapKind) IsKnown() bool { + switch r { + case AddressMapKindZone, AddressMapKindAccount: + return true + } + return false +} + type AddressMapNewResponse struct { // Identifier ID string `json:"id"` @@ -178,7 +194,7 @@ type AddressMapNewResponse struct { // handshake from a client without an SNI, it will respond with the default SNI on // those IPs. The default SNI can be any valid zone or subdomain owned by the // account. - DefaultSni string `json:"default_sni,nullable"` + DefaultSNI string `json:"default_sni,nullable"` // An optional description field which may be used to describe the types of IPs or // zones on the map. Description string `json:"description,nullable"` @@ -201,7 +217,7 @@ type addressMapNewResponseJSON struct { CanDelete apijson.Field CanModifyIPs apijson.Field CreatedAt apijson.Field - DefaultSni apijson.Field + DefaultSNI apijson.Field Description apijson.Field Enabled apijson.Field IPs apijson.Field @@ -250,8 +266,8 @@ type AddressMapNewResponseMembership struct { // Identifier Identifier string `json:"identifier"` // The type of the membership. - Kind AddressMapNewResponseMembershipsKind `json:"kind"` - JSON addressMapNewResponseMembershipJSON `json:"-"` + Kind AddressMapKind `json:"kind"` + JSON addressMapNewResponseMembershipJSON `json:"-"` } // addressMapNewResponseMembershipJSON contains the JSON metadata for the struct @@ -273,22 +289,6 @@ func (r addressMapNewResponseMembershipJSON) RawJSON() string { return r.raw } -// The type of the membership. -type AddressMapNewResponseMembershipsKind string - -const ( - AddressMapNewResponseMembershipsKindZone AddressMapNewResponseMembershipsKind = "zone" - AddressMapNewResponseMembershipsKindAccount AddressMapNewResponseMembershipsKind = "account" -) - -func (r AddressMapNewResponseMembershipsKind) IsKnown() bool { - switch r { - case AddressMapNewResponseMembershipsKindZone, AddressMapNewResponseMembershipsKindAccount: - return true - } - return false -} - type AddressMapDeleteResponse = interface{} type AddressMapGetResponse struct { @@ -306,7 +306,7 @@ type AddressMapGetResponse struct { // handshake from a client without an SNI, it will respond with the default SNI on // those IPs. The default SNI can be any valid zone or subdomain owned by the // account. - DefaultSni string `json:"default_sni,nullable"` + DefaultSNI string `json:"default_sni,nullable"` // An optional description field which may be used to describe the types of IPs or // zones on the map. Description string `json:"description,nullable"` @@ -329,7 +329,7 @@ type addressMapGetResponseJSON struct { CanDelete apijson.Field CanModifyIPs apijson.Field CreatedAt apijson.Field - DefaultSni apijson.Field + DefaultSNI apijson.Field Description apijson.Field Enabled apijson.Field IPs apijson.Field @@ -378,8 +378,8 @@ type AddressMapGetResponseMembership struct { // Identifier Identifier string `json:"identifier"` // The type of the membership. - Kind AddressMapGetResponseMembershipsKind `json:"kind"` - JSON addressMapGetResponseMembershipJSON `json:"-"` + Kind AddressMapKind `json:"kind"` + JSON addressMapGetResponseMembershipJSON `json:"-"` } // addressMapGetResponseMembershipJSON contains the JSON metadata for the struct @@ -401,22 +401,6 @@ func (r addressMapGetResponseMembershipJSON) RawJSON() string { return r.raw } -// The type of the membership. -type AddressMapGetResponseMembershipsKind string - -const ( - AddressMapGetResponseMembershipsKindZone AddressMapGetResponseMembershipsKind = "zone" - AddressMapGetResponseMembershipsKindAccount AddressMapGetResponseMembershipsKind = "account" -) - -func (r AddressMapGetResponseMembershipsKind) IsKnown() bool { - switch r { - case AddressMapGetResponseMembershipsKindZone, AddressMapGetResponseMembershipsKindAccount: - return true - } - return false -} - type AddressMapNewParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` @@ -569,7 +553,7 @@ type AddressMapEditParams struct { // handshake from a client without an SNI, it will respond with the default SNI on // those IPs. The default SNI can be any valid zone or subdomain owned by the // account. - DefaultSni param.Field[string] `json:"default_sni"` + DefaultSNI param.Field[string] `json:"default_sni"` // An optional description field which may be used to describe the types of IPs or // zones on the map. Description param.Field[string] `json:"description"` diff --git a/addressing/addressmap_test.go b/addressing/addressmap_test.go index 5687a20130..c55a6b76aa 100644 --- a/addressing/addressmap_test.go +++ b/addressing/addressmap_test.go @@ -113,7 +113,7 @@ func TestAddressMapEditWithOptionalParams(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", addressing.AddressMapEditParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - DefaultSni: cloudflare.F("*.example.com"), + DefaultSNI: cloudflare.F("*.example.com"), Description: cloudflare.F("My Ecommerce zones"), Enabled: cloudflare.F(true), }, diff --git a/api.md b/api.md index 0c838a51c7..6c879c8f87 100644 --- a/api.md +++ b/api.md @@ -39,6 +39,7 @@ Methods: Response Types: +- accounts.MemberStatus - accounts.UserWithInviteCode - accounts.MemberListResponse - accounts.MemberDeleteResponse @@ -1269,8 +1270,13 @@ Methods: ## TotalTLS +Params Types: + +- acm.TotalTLSCertificateAuthority + Response Types: +- acm.TotalTLSCertificateAuthority - acm.TotalTLSNewResponse - acm.TotalTLSGetResponse @@ -2989,6 +2995,7 @@ Methods: Response Types: - addressing.AddressMap +- addressing.AddressMapKind - addressing.AddressMapNewResponse - addressing.AddressMapDeleteResponse - addressing.AddressMapGetResponse diff --git a/custom_certificates/customcertificate.go b/custom_certificates/customcertificate.go index 3c3d3fbe06..9c06f33271 100644 --- a/custom_certificates/customcertificate.go +++ b/custom_certificates/customcertificate.go @@ -397,12 +397,12 @@ type CustomCertificateNewParamsType string const ( CustomCertificateNewParamsTypeLegacyCustom CustomCertificateNewParamsType = "legacy_custom" - CustomCertificateNewParamsTypeSniCustom CustomCertificateNewParamsType = "sni_custom" + CustomCertificateNewParamsTypeSNICustom CustomCertificateNewParamsType = "sni_custom" ) func (r CustomCertificateNewParamsType) IsKnown() bool { switch r { - case CustomCertificateNewParamsTypeLegacyCustom, CustomCertificateNewParamsTypeSniCustom: + case CustomCertificateNewParamsTypeLegacyCustom, CustomCertificateNewParamsTypeSNICustom: return true } return false diff --git a/custom_certificates/customcertificate_test.go b/custom_certificates/customcertificate_test.go index f0ee1cfcb3..1f4a58aa30 100644 --- a/custom_certificates/customcertificate_test.go +++ b/custom_certificates/customcertificate_test.go @@ -37,7 +37,7 @@ func TestCustomCertificateNewWithOptionalParams(t *testing.T) { Label: cloudflare.F(custom_certificates.GeoRestrictionsLabelUs), }), Policy: cloudflare.F("(country: US) or (region: EU)"), - Type: cloudflare.F(custom_certificates.CustomCertificateNewParamsTypeSniCustom), + Type: cloudflare.F(custom_certificates.CustomCertificateNewParamsTypeSNICustom), }) if err != nil { var apierr *cloudflare.Error diff --git a/custom_hostnames/customhostname.go b/custom_hostnames/customhostname.go index a997b6957a..54d19acd62 100644 --- a/custom_hostnames/customhostname.go +++ b/custom_hostnames/customhostname.go @@ -190,7 +190,7 @@ type CustomHostnameNewResponse struct { // name or the string ':request_host_header:' which will cause the host header in // the request to be used as SNI. Not configurable with default/fallback origin // server. - CustomOriginSni string `json:"custom_origin_sni"` + CustomOriginSNI string `json:"custom_origin_sni"` // This is a record which can be placed to activate a hostname. OwnershipVerification CustomHostnameNewResponseOwnershipVerification `json:"ownership_verification"` // This presents the token to be served by the given http url to activate a @@ -212,7 +212,7 @@ type customHostnameNewResponseJSON struct { CreatedAt apijson.Field CustomMetadata apijson.Field CustomOriginServer apijson.Field - CustomOriginSni apijson.Field + CustomOriginSNI apijson.Field OwnershipVerification apijson.Field OwnershipVerificationHTTP apijson.Field Status apijson.Field @@ -652,7 +652,7 @@ type CustomHostnameListResponse struct { // name or the string ':request_host_header:' which will cause the host header in // the request to be used as SNI. Not configurable with default/fallback origin // server. - CustomOriginSni string `json:"custom_origin_sni"` + CustomOriginSNI string `json:"custom_origin_sni"` // This is a record which can be placed to activate a hostname. OwnershipVerification CustomHostnameListResponseOwnershipVerification `json:"ownership_verification"` // This presents the token to be served by the given http url to activate a @@ -674,7 +674,7 @@ type customHostnameListResponseJSON struct { CreatedAt apijson.Field CustomMetadata apijson.Field CustomOriginServer apijson.Field - CustomOriginSni apijson.Field + CustomOriginSNI apijson.Field OwnershipVerification apijson.Field OwnershipVerificationHTTP apijson.Field Status apijson.Field @@ -1136,7 +1136,7 @@ type CustomHostnameEditResponse struct { // name or the string ':request_host_header:' which will cause the host header in // the request to be used as SNI. Not configurable with default/fallback origin // server. - CustomOriginSni string `json:"custom_origin_sni"` + CustomOriginSNI string `json:"custom_origin_sni"` // This is a record which can be placed to activate a hostname. OwnershipVerification CustomHostnameEditResponseOwnershipVerification `json:"ownership_verification"` // This presents the token to be served by the given http url to activate a @@ -1158,7 +1158,7 @@ type customHostnameEditResponseJSON struct { CreatedAt apijson.Field CustomMetadata apijson.Field CustomOriginServer apijson.Field - CustomOriginSni apijson.Field + CustomOriginSNI apijson.Field OwnershipVerification apijson.Field OwnershipVerificationHTTP apijson.Field Status apijson.Field @@ -1598,7 +1598,7 @@ type CustomHostnameGetResponse struct { // name or the string ':request_host_header:' which will cause the host header in // the request to be used as SNI. Not configurable with default/fallback origin // server. - CustomOriginSni string `json:"custom_origin_sni"` + CustomOriginSNI string `json:"custom_origin_sni"` // This is a record which can be placed to activate a hostname. OwnershipVerification CustomHostnameGetResponseOwnershipVerification `json:"ownership_verification"` // This presents the token to be served by the given http url to activate a @@ -1620,7 +1620,7 @@ type customHostnameGetResponseJSON struct { CreatedAt apijson.Field CustomMetadata apijson.Field CustomOriginServer apijson.Field - CustomOriginSni apijson.Field + CustomOriginSNI apijson.Field OwnershipVerification apijson.Field OwnershipVerificationHTTP apijson.Field Status apijson.Field @@ -2319,7 +2319,7 @@ type CustomHostnameEditParams struct { // name or the string ':request_host_header:' which will cause the host header in // the request to be used as SNI. Not configurable with default/fallback origin // server. - CustomOriginSni param.Field[string] `json:"custom_origin_sni"` + CustomOriginSNI param.Field[string] `json:"custom_origin_sni"` // SSL properties used when creating the custom hostname. SSL param.Field[CustomHostnameEditParamsSSL] `json:"ssl"` } diff --git a/custom_hostnames/customhostname_test.go b/custom_hostnames/customhostname_test.go index 58e35a9121..555dbd77e7 100644 --- a/custom_hostnames/customhostname_test.go +++ b/custom_hostnames/customhostname_test.go @@ -143,7 +143,7 @@ func TestCustomHostnameEditWithOptionalParams(t *testing.T) { Key: cloudflare.F("value"), }), CustomOriginServer: cloudflare.F("origin2.example.com"), - CustomOriginSni: cloudflare.F("sni.example.com"), + CustomOriginSNI: cloudflare.F("sni.example.com"), SSL: cloudflare.F(custom_hostnames.CustomHostnameEditParamsSSL{ BundleMethod: cloudflare.F(custom_hostnames.BundleMethodUbiquitous), CertificateAuthority: cloudflare.F(ssl.CertificatePackCAGoogle), diff --git a/rulesets/rule.go b/rulesets/rule.go index 4bfabe41fa..3f6bb6ea59 100644 --- a/rulesets/rule.go +++ b/rulesets/rule.go @@ -2522,7 +2522,7 @@ type RouteRuleActionParameters struct { // Override the IP/TCP destination. Origin RouteRuleActionParametersOrigin `json:"origin"` // Override the Server Name Indication (SNI). - Sni RouteRuleActionParametersSni `json:"sni"` + SNI RouteRuleActionParametersSNI `json:"sni"` JSON routeRuleActionParametersJSON `json:"-"` } @@ -2531,7 +2531,7 @@ type RouteRuleActionParameters struct { type routeRuleActionParametersJSON struct { HostHeader apijson.Field Origin apijson.Field - Sni apijson.Field + SNI apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -2571,25 +2571,25 @@ func (r routeRuleActionParametersOriginJSON) RawJSON() string { } // Override the Server Name Indication (SNI). -type RouteRuleActionParametersSni struct { +type RouteRuleActionParametersSNI struct { // The SNI override. Value string `json:"value,required"` - JSON routeRuleActionParametersSniJSON `json:"-"` + JSON routeRuleActionParametersSNIJSON `json:"-"` } -// routeRuleActionParametersSniJSON contains the JSON metadata for the struct -// [RouteRuleActionParametersSni] -type routeRuleActionParametersSniJSON struct { +// routeRuleActionParametersSNIJSON contains the JSON metadata for the struct +// [RouteRuleActionParametersSNI] +type routeRuleActionParametersSNIJSON struct { Value apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *RouteRuleActionParametersSni) UnmarshalJSON(data []byte) (err error) { +func (r *RouteRuleActionParametersSNI) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r routeRuleActionParametersSniJSON) RawJSON() string { +func (r routeRuleActionParametersSNIJSON) RawJSON() string { return r.raw } @@ -2629,7 +2629,7 @@ type RouteRuleActionParametersParam struct { // Override the IP/TCP destination. Origin param.Field[RouteRuleActionParametersOriginParam] `json:"origin"` // Override the Server Name Indication (SNI). - Sni param.Field[RouteRuleActionParametersSniParam] `json:"sni"` + SNI param.Field[RouteRuleActionParametersSNIParam] `json:"sni"` } func (r RouteRuleActionParametersParam) MarshalJSON() (data []byte, err error) { @@ -2649,12 +2649,12 @@ func (r RouteRuleActionParametersOriginParam) MarshalJSON() (data []byte, err er } // Override the Server Name Indication (SNI). -type RouteRuleActionParametersSniParam struct { +type RouteRuleActionParametersSNIParam struct { // The SNI override. Value param.Field[string] `json:"value,required"` } -func (r RouteRuleActionParametersSniParam) MarshalJSON() (data []byte, err error) { +func (r RouteRuleActionParametersSNIParam) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } diff --git a/user/organization.go b/user/organization.go index c971b63d0f..31deefc16e 100644 --- a/user/organization.go +++ b/user/organization.go @@ -9,6 +9,7 @@ import ( "net/url" "reflect" + "github.com/cloudflare/cloudflare-go/v2/accounts" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/pagination" @@ -91,8 +92,8 @@ type Organization struct { // 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. - Status OrganizationStatus `json:"status"` - JSON organizationJSON `json:"-"` + Status accounts.MemberStatus `json:"status"` + JSON organizationJSON `json:"-"` } // organizationJSON contains the JSON metadata for the struct [Organization] @@ -114,22 +115,6 @@ func (r organizationJSON) RawJSON() string { return r.raw } -// Whether the user is a member of the organization or has an inivitation pending. -type OrganizationStatus string - -const ( - OrganizationStatusMember OrganizationStatus = "member" - OrganizationStatusInvited OrganizationStatus = "invited" -) - -func (r OrganizationStatus) IsKnown() bool { - switch r { - case OrganizationStatusMember, OrganizationStatusInvited: - return true - } - return false -} - type OrganizationDeleteResponse struct { // Identifier ID string `json:"id"` From 515ec56470e963778eed62ddc973dd680b5a32f0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 04:19:36 +0000 Subject: [PATCH 114/127] feat(api): update via SDK Studio (#1963) --- accounts/member.go | 10 +- acm/totaltls.go | 16 +-- acm/totaltls_test.go | 2 +- addressing/addressmap.go | 14 +-- api.md | 25 ++-- client_certificates/clientcertificate.go | 22 +--- custom_certificates/customcertificate.go | 19 +++ custom_hostnames/customhostname.go | 12 +- custom_hostnames/customhostname_test.go | 4 +- origin_ca_certificates/origincacertificate.go | 8 +- .../origincacertificate_test.go | 4 +- ssl/certificatepack.go | 114 +++++++++--------- ssl/certificatepackorder.go | 2 +- ssl/verification.go | 2 +- user/organization.go | 4 +- 15 files changed, 130 insertions(+), 128 deletions(-) diff --git a/accounts/member.go b/accounts/member.go index f6f2d5f859..5d4a833b98 100644 --- a/accounts/member.go +++ b/accounts/member.go @@ -110,16 +110,16 @@ func (r *MemberService) Get(ctx context.Context, memberID string, query MemberGe } // Whether the user is a member of the organization or has an inivitation pending. -type MemberStatus string +type Status string const ( - MemberStatusMember MemberStatus = "member" - MemberStatusInvited MemberStatus = "invited" + StatusMember Status = "member" + StatusInvited Status = "invited" ) -func (r MemberStatus) IsKnown() bool { +func (r Status) IsKnown() bool { switch r { - case MemberStatusMember, MemberStatusInvited: + case StatusMember, StatusInvited: return true } return false diff --git a/acm/totaltls.go b/acm/totaltls.go index ae6836eeea..d29d7a8c61 100644 --- a/acm/totaltls.go +++ b/acm/totaltls.go @@ -58,16 +58,16 @@ func (r *TotalTLSService) Get(ctx context.Context, query TotalTLSGetParams, opts } // The Certificate Authority that Total TLS certificates will be issued through. -type TotalTLSCertificateAuthority string +type CertificateAuthority string const ( - TotalTLSCertificateAuthorityGoogle TotalTLSCertificateAuthority = "google" - TotalTLSCertificateAuthorityLetsEncrypt TotalTLSCertificateAuthority = "lets_encrypt" + CertificateAuthorityGoogle CertificateAuthority = "google" + CertificateAuthorityLetsEncrypt CertificateAuthority = "lets_encrypt" ) -func (r TotalTLSCertificateAuthority) IsKnown() bool { +func (r CertificateAuthority) IsKnown() bool { switch r { - case TotalTLSCertificateAuthorityGoogle, TotalTLSCertificateAuthorityLetsEncrypt: + case CertificateAuthorityGoogle, CertificateAuthorityLetsEncrypt: return true } return false @@ -75,7 +75,7 @@ func (r TotalTLSCertificateAuthority) IsKnown() bool { type TotalTLSNewResponse struct { // The Certificate Authority that Total TLS certificates will be issued through. - CertificateAuthority TotalTLSCertificateAuthority `json:"certificate_authority"` + CertificateAuthority CertificateAuthority `json:"certificate_authority"` // If enabled, Total TLS will order a hostname specific TLS certificate for any // proxied A, AAAA, or CNAME record in your zone. Enabled bool `json:"enabled"` @@ -119,7 +119,7 @@ func (r TotalTLSNewResponseValidityDays) IsKnown() bool { type TotalTLSGetResponse struct { // The Certificate Authority that Total TLS certificates will be issued through. - CertificateAuthority TotalTLSCertificateAuthority `json:"certificate_authority"` + CertificateAuthority CertificateAuthority `json:"certificate_authority"` // If enabled, Total TLS will order a hostname specific TLS certificate for any // proxied A, AAAA, or CNAME record in your zone. Enabled bool `json:"enabled"` @@ -168,7 +168,7 @@ type TotalTLSNewParams struct { // proxied A, AAAA, or CNAME record in your zone. Enabled param.Field[bool] `json:"enabled,required"` // The Certificate Authority that Total TLS certificates will be issued through. - CertificateAuthority param.Field[TotalTLSCertificateAuthority] `json:"certificate_authority"` + CertificateAuthority param.Field[CertificateAuthority] `json:"certificate_authority"` } func (r TotalTLSNewParams) MarshalJSON() (data []byte, err error) { diff --git a/acm/totaltls_test.go b/acm/totaltls_test.go index 58acf876d7..4dd85e1450 100644 --- a/acm/totaltls_test.go +++ b/acm/totaltls_test.go @@ -30,7 +30,7 @@ func TestTotalTLSNewWithOptionalParams(t *testing.T) { _, err := client.ACM.TotalTLS.New(context.TODO(), acm.TotalTLSNewParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Enabled: cloudflare.F(true), - CertificateAuthority: cloudflare.F(acm.TotalTLSCertificateAuthorityGoogle), + CertificateAuthority: cloudflare.F(acm.CertificateAuthorityGoogle), }) if err != nil { var apierr *cloudflare.Error diff --git a/addressing/addressmap.go b/addressing/addressmap.go index 5f5bed0647..e1df0209c8 100644 --- a/addressing/addressmap.go +++ b/addressing/addressmap.go @@ -164,16 +164,16 @@ func (r addressMapJSON) RawJSON() string { } // The type of the membership. -type AddressMapKind string +type Kind string const ( - AddressMapKindZone AddressMapKind = "zone" - AddressMapKindAccount AddressMapKind = "account" + KindZone Kind = "zone" + KindAccount Kind = "account" ) -func (r AddressMapKind) IsKnown() bool { +func (r Kind) IsKnown() bool { switch r { - case AddressMapKindZone, AddressMapKindAccount: + case KindZone, KindAccount: return true } return false @@ -266,7 +266,7 @@ type AddressMapNewResponseMembership struct { // Identifier Identifier string `json:"identifier"` // The type of the membership. - Kind AddressMapKind `json:"kind"` + Kind Kind `json:"kind"` JSON addressMapNewResponseMembershipJSON `json:"-"` } @@ -378,7 +378,7 @@ type AddressMapGetResponseMembership struct { // Identifier Identifier string `json:"identifier"` // The type of the membership. - Kind AddressMapKind `json:"kind"` + Kind Kind `json:"kind"` JSON addressMapGetResponseMembershipJSON `json:"-"` } diff --git a/api.md b/api.md index 6c879c8f87..3f3395ce99 100644 --- a/api.md +++ b/api.md @@ -39,7 +39,7 @@ Methods: Response Types: -- accounts.MemberStatus +- accounts.Status - accounts.UserWithInviteCode - accounts.MemberListResponse - accounts.MemberDeleteResponse @@ -1165,19 +1165,19 @@ Methods: Params Types: -- ssl.CertificatePackCA -- ssl.CertificatePackRequestType -- ssl.CertificatePackRequestValidity +- ssl.CertificateAuthority - ssl.HostParam +- ssl.RequestType +- ssl.RequestValidity Response Types: -- ssl.CertificatePackCA -- ssl.CertificatePackRequestType -- ssl.CertificatePackRequestValidity -- ssl.CertificatePackStatus -- ssl.CertificatePackValidationMethod +- ssl.CertificateAuthority - ssl.Host +- ssl.RequestType +- ssl.RequestValidity +- ssl.Status +- ssl.ValidationMethod - ssl.CertificatePackListResponse - ssl.CertificatePackDeleteResponse - ssl.CertificatePackEditResponse @@ -1272,11 +1272,11 @@ Methods: Params Types: -- acm.TotalTLSCertificateAuthority +- acm.CertificateAuthority Response Types: -- acm.TotalTLSCertificateAuthority +- acm.CertificateAuthority - acm.TotalTLSNewResponse - acm.TotalTLSGetResponse @@ -1376,6 +1376,7 @@ Response Types: - custom_certificates.CustomCertificate - custom_certificates.GeoRestrictions +- custom_certificates.Status - custom_certificates.CustomCertificateNewResponseUnion - custom_certificates.CustomCertificateDeleteResponse - custom_certificates.CustomCertificateEditResponseUnion @@ -2995,7 +2996,7 @@ Methods: Response Types: - addressing.AddressMap -- addressing.AddressMapKind +- addressing.Kind - addressing.AddressMapNewResponse - addressing.AddressMapDeleteResponse - addressing.AddressMapGetResponse diff --git a/client_certificates/clientcertificate.go b/client_certificates/clientcertificate.go index 799a2033f5..5069f10323 100644 --- a/client_certificates/clientcertificate.go +++ b/client_certificates/clientcertificate.go @@ -8,6 +8,7 @@ import ( "net/http" "net/url" + "github.com/cloudflare/cloudflare-go/v2/custom_certificates" "github.com/cloudflare/cloudflare-go/v2/internal/apijson" "github.com/cloudflare/cloudflare-go/v2/internal/apiquery" "github.com/cloudflare/cloudflare-go/v2/internal/pagination" @@ -149,7 +150,7 @@ type ClientCertificate struct { State string `json:"state"` // Client Certificates may be active or revoked, and the pending_reactivation or // pending_revocation represent in-progress asynchronous transitions - Status ClientCertificateStatus `json:"status"` + Status custom_certificates.Status `json:"status"` // The number of days the Client Certificate will be valid after the issued_on date ValidityDays int64 `json:"validity_days"` JSON clientCertificateJSON `json:"-"` @@ -212,25 +213,6 @@ func (r clientCertificateCertificateAuthorityJSON) RawJSON() string { return r.raw } -// Client Certificates may be active or revoked, and the pending_reactivation or -// pending_revocation represent in-progress asynchronous transitions -type ClientCertificateStatus string - -const ( - ClientCertificateStatusActive ClientCertificateStatus = "active" - ClientCertificateStatusPendingReactivation ClientCertificateStatus = "pending_reactivation" - ClientCertificateStatusPendingRevocation ClientCertificateStatus = "pending_revocation" - ClientCertificateStatusRevoked ClientCertificateStatus = "revoked" -) - -func (r ClientCertificateStatus) IsKnown() bool { - switch r { - case ClientCertificateStatusActive, ClientCertificateStatusPendingReactivation, ClientCertificateStatusPendingRevocation, ClientCertificateStatusRevoked: - return true - } - return false -} - type ClientCertificateNewParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` diff --git a/custom_certificates/customcertificate.go b/custom_certificates/customcertificate.go index 9c06f33271..6b04f11e55 100644 --- a/custom_certificates/customcertificate.go +++ b/custom_certificates/customcertificate.go @@ -279,6 +279,25 @@ func (r GeoRestrictionsParam) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } +// Client Certificates may be active or revoked, and the pending_reactivation or +// pending_revocation represent in-progress asynchronous transitions +type Status string + +const ( + StatusActive Status = "active" + StatusPendingReactivation Status = "pending_reactivation" + StatusPendingRevocation Status = "pending_revocation" + StatusRevoked Status = "revoked" +) + +func (r Status) IsKnown() bool { + switch r { + case StatusActive, StatusPendingReactivation, StatusPendingRevocation, StatusRevoked: + return true + } + return false +} + // Union satisfied by [custom_certificates.CustomCertificateNewResponseUnknown] or // [shared.UnionString]. type CustomCertificateNewResponseUnion interface { diff --git a/custom_hostnames/customhostname.go b/custom_hostnames/customhostname.go index 54d19acd62..ec1d8d8f81 100644 --- a/custom_hostnames/customhostname.go +++ b/custom_hostnames/customhostname.go @@ -239,7 +239,7 @@ type CustomHostnameNewResponseSSL struct { // chain, but does not otherwise modify it. BundleMethod BundleMethod `json:"bundle_method"` // The Certificate Authority that will issue the certificate - CertificateAuthority ssl.CertificatePackCA `json:"certificate_authority"` + CertificateAuthority ssl.CertificateAuthority `json:"certificate_authority"` // If a custom uploaded certificate is used. CustomCertificate string `json:"custom_certificate"` // The identifier for the Custom CSR that was used. @@ -701,7 +701,7 @@ type CustomHostnameListResponseSSL struct { // chain, but does not otherwise modify it. BundleMethod BundleMethod `json:"bundle_method"` // The Certificate Authority that will issue the certificate - CertificateAuthority ssl.CertificatePackCA `json:"certificate_authority"` + CertificateAuthority ssl.CertificateAuthority `json:"certificate_authority"` // If a custom uploaded certificate is used. CustomCertificate string `json:"custom_certificate"` // The identifier for the Custom CSR that was used. @@ -1185,7 +1185,7 @@ type CustomHostnameEditResponseSSL struct { // chain, but does not otherwise modify it. BundleMethod BundleMethod `json:"bundle_method"` // The Certificate Authority that will issue the certificate - CertificateAuthority ssl.CertificatePackCA `json:"certificate_authority"` + CertificateAuthority ssl.CertificateAuthority `json:"certificate_authority"` // If a custom uploaded certificate is used. CustomCertificate string `json:"custom_certificate"` // The identifier for the Custom CSR that was used. @@ -1647,7 +1647,7 @@ type CustomHostnameGetResponseSSL struct { // chain, but does not otherwise modify it. BundleMethod BundleMethod `json:"bundle_method"` // The Certificate Authority that will issue the certificate - CertificateAuthority ssl.CertificatePackCA `json:"certificate_authority"` + CertificateAuthority ssl.CertificateAuthority `json:"certificate_authority"` // If a custom uploaded certificate is used. CustomCertificate string `json:"custom_certificate"` // The identifier for the Custom CSR that was used. @@ -2064,7 +2064,7 @@ type CustomHostnameNewParamsSSL struct { // chain, but does not otherwise modify it. BundleMethod param.Field[BundleMethod] `json:"bundle_method"` // The Certificate Authority that will issue the certificate - CertificateAuthority param.Field[ssl.CertificatePackCA] `json:"certificate_authority"` + CertificateAuthority param.Field[ssl.CertificateAuthority] `json:"certificate_authority"` // If a custom uploaded certificate is used. CustomCertificate param.Field[string] `json:"custom_certificate"` // The key for a custom uploaded certificate. @@ -2346,7 +2346,7 @@ type CustomHostnameEditParamsSSL struct { // chain, but does not otherwise modify it. BundleMethod param.Field[BundleMethod] `json:"bundle_method"` // The Certificate Authority that will issue the certificate - CertificateAuthority param.Field[ssl.CertificatePackCA] `json:"certificate_authority"` + CertificateAuthority param.Field[ssl.CertificateAuthority] `json:"certificate_authority"` // If a custom uploaded certificate is used. CustomCertificate param.Field[string] `json:"custom_certificate"` // The key for a custom uploaded certificate. diff --git a/custom_hostnames/customhostname_test.go b/custom_hostnames/customhostname_test.go index 555dbd77e7..e76d1c95be 100644 --- a/custom_hostnames/customhostname_test.go +++ b/custom_hostnames/customhostname_test.go @@ -33,7 +33,7 @@ func TestCustomHostnameNewWithOptionalParams(t *testing.T) { Hostname: cloudflare.F("app.example.com"), SSL: cloudflare.F(custom_hostnames.CustomHostnameNewParamsSSL{ BundleMethod: cloudflare.F(custom_hostnames.BundleMethodUbiquitous), - CertificateAuthority: cloudflare.F(ssl.CertificatePackCAGoogle), + CertificateAuthority: cloudflare.F(ssl.CertificateAuthorityGoogle), CustomCertificate: cloudflare.F("-----BEGIN CERTIFICATE-----\\nMIIFJDCCBAygAwIBAgIQD0ifmj/Yi5NP/2gdUySbfzANBgkqhkiG9w0BAQsFADBN\\nMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMScwJQYDVQQDEx5E...SzSHfXp5lnu/3V08I72q1QNzOCgY1XeL4GKVcj4or6cT6tX6oJH7ePPmfrBfqI/O\\nOeH8gMJ+FuwtXYEPa4hBf38M5eU5xWG7\\n-----END CERTIFICATE-----\\n"), CustomKey: cloudflare.F("-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n"), Method: cloudflare.F(custom_hostnames.DCVMethodHTTP), @@ -146,7 +146,7 @@ func TestCustomHostnameEditWithOptionalParams(t *testing.T) { CustomOriginSNI: cloudflare.F("sni.example.com"), SSL: cloudflare.F(custom_hostnames.CustomHostnameEditParamsSSL{ BundleMethod: cloudflare.F(custom_hostnames.BundleMethodUbiquitous), - CertificateAuthority: cloudflare.F(ssl.CertificatePackCAGoogle), + CertificateAuthority: cloudflare.F(ssl.CertificateAuthorityGoogle), CustomCertificate: cloudflare.F("-----BEGIN CERTIFICATE-----\\nMIIFJDCCBAygAwIBAgIQD0ifmj/Yi5NP/2gdUySbfzANBgkqhkiG9w0BAQsFADBN\\nMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMScwJQYDVQQDEx5E...SzSHfXp5lnu/3V08I72q1QNzOCgY1XeL4GKVcj4or6cT6tX6oJH7ePPmfrBfqI/O\\nOeH8gMJ+FuwtXYEPa4hBf38M5eU5xWG7\\n-----END CERTIFICATE-----\\n"), CustomKey: cloudflare.F("-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n"), Method: cloudflare.F(custom_hostnames.DCVMethodHTTP), diff --git a/origin_ca_certificates/origincacertificate.go b/origin_ca_certificates/origincacertificate.go index e8e22547b2..4ac8f75f11 100644 --- a/origin_ca_certificates/origincacertificate.go +++ b/origin_ca_certificates/origincacertificate.go @@ -118,9 +118,9 @@ type OriginCACertificate struct { Hostnames []interface{} `json:"hostnames,required"` // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). - RequestType ssl.CertificatePackRequestType `json:"request_type,required"` + RequestType ssl.RequestType `json:"request_type,required"` // The number of days for which the certificate should be valid. - RequestedValidity ssl.CertificatePackRequestValidity `json:"requested_validity,required"` + RequestedValidity ssl.RequestValidity `json:"requested_validity,required"` // Identifier ID string `json:"id"` // The Origin CA certificate. Will be newline-encoded. @@ -218,9 +218,9 @@ type OriginCACertificateNewParams struct { Hostnames param.Field[[]interface{}] `json:"hostnames"` // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). - RequestType param.Field[ssl.CertificatePackRequestType] `json:"request_type"` + RequestType param.Field[ssl.RequestType] `json:"request_type"` // The number of days for which the certificate should be valid. - RequestedValidity param.Field[ssl.CertificatePackRequestValidity] `json:"requested_validity"` + RequestedValidity param.Field[ssl.RequestValidity] `json:"requested_validity"` } func (r OriginCACertificateNewParams) MarshalJSON() (data []byte, err error) { diff --git a/origin_ca_certificates/origincacertificate_test.go b/origin_ca_certificates/origincacertificate_test.go index da3b1bede7..32dba76844 100644 --- a/origin_ca_certificates/origincacertificate_test.go +++ b/origin_ca_certificates/origincacertificate_test.go @@ -31,8 +31,8 @@ func TestOriginCACertificateNewWithOptionalParams(t *testing.T) { _, err := client.OriginCACertificates.New(context.TODO(), origin_ca_certificates.OriginCACertificateNewParams{ Csr: cloudflare.F("-----BEGIN CERTIFICATE REQUEST-----\nMIICxzCCAa8CAQAwSDELMAkGA1UEBhMCVVMxFjAUBgNVBAgTDVNhbiBGcmFuY2lz\nY28xCzAJBgNVBAcTAkNBMRQwEgYDVQQDEwtleGFtcGxlLm5ldDCCASIwDQYJKoZI\nhvcNAQEBBQADggEPADCCAQoCggEBALxejtu4b+jPdFeFi6OUsye8TYJQBm3WfCvL\nHu5EvijMO/4Z2TImwASbwUF7Ir8OLgH+mGlQZeqyNvGoSOMEaZVXcYfpR1hlVak8\n4GGVr+04IGfOCqaBokaBFIwzclGZbzKmLGwIQioNxGfqFm6RGYGA3be2Je2iseBc\nN8GV1wYmvYE0RR+yWweJCTJ157exyRzu7sVxaEW9F87zBQLyOnwXc64rflXslRqi\ng7F7w5IaQYOl8yvmk/jEPCAha7fkiUfEpj4N12+oPRiMvleJF98chxjD4MH39c5I\nuOslULhrWunfh7GB1jwWNA9y44H0snrf+xvoy2TcHmxvma9Eln8CAwEAAaA6MDgG\nCSqGSIb3DQEJDjErMCkwJwYDVR0RBCAwHoILZXhhbXBsZS5uZXSCD3d3dy5leGFt\ncGxlLm5ldDANBgkqhkiG9w0BAQsFAAOCAQEAcBaX6dOnI8ncARrI9ZSF2AJX+8mx\npTHY2+Y2C0VvrVDGMtbBRH8R9yMbqWtlxeeNGf//LeMkSKSFa4kbpdx226lfui8/\nauRDBTJGx2R1ccUxmLZXx4my0W5iIMxunu+kez+BDlu7bTT2io0uXMRHue4i6quH\nyc5ibxvbJMjR7dqbcanVE10/34oprzXQsJ/VmSuZNXtjbtSKDlmcpw6To/eeAJ+J\nhXykcUihvHyG4A1m2R6qpANBjnA0pHexfwM/SgfzvpbvUg0T1ubmer8BgTwCKIWs\ndcWYTthM51JIqRBfNqy4QcBnX+GY05yltEEswQI55wdiS3CjTTA67sdbcQ==\n-----END CERTIFICATE REQUEST-----"), Hostnames: cloudflare.F([]interface{}{"example.com", "*.example.com"}), - RequestType: cloudflare.F(ssl.CertificatePackRequestTypeOriginRsa), - RequestedValidity: cloudflare.F(ssl.CertificatePackRequestValidity5475), + RequestType: cloudflare.F(ssl.RequestTypeOriginRsa), + RequestedValidity: cloudflare.F(ssl.RequestValidity5475), }) if err != nil { var apierr *cloudflare.Error diff --git a/ssl/certificatepack.go b/ssl/certificatepack.go index c59935d18e..c5c873aa60 100644 --- a/ssl/certificatepack.go +++ b/ssl/certificatepack.go @@ -106,117 +106,117 @@ func (r *CertificatePackService) Get(ctx context.Context, certificatePackID stri } // The Certificate Authority that will issue the certificate -type CertificatePackCA string +type CertificateAuthority string const ( - CertificatePackCADigicert CertificatePackCA = "digicert" - CertificatePackCAGoogle CertificatePackCA = "google" - CertificatePackCALetsEncrypt CertificatePackCA = "lets_encrypt" + CertificateAuthorityDigicert CertificateAuthority = "digicert" + CertificateAuthorityGoogle CertificateAuthority = "google" + CertificateAuthorityLetsEncrypt CertificateAuthority = "lets_encrypt" ) -func (r CertificatePackCA) IsKnown() bool { +func (r CertificateAuthority) IsKnown() bool { switch r { - case CertificatePackCADigicert, CertificatePackCAGoogle, CertificatePackCALetsEncrypt: + case CertificateAuthorityDigicert, CertificateAuthorityGoogle, CertificateAuthorityLetsEncrypt: return true } return false } +type Host = string + +type HostParam = string + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). -type CertificatePackRequestType string +type RequestType string const ( - CertificatePackRequestTypeOriginRsa CertificatePackRequestType = "origin-rsa" - CertificatePackRequestTypeOriginEcc CertificatePackRequestType = "origin-ecc" - CertificatePackRequestTypeKeylessCertificate CertificatePackRequestType = "keyless-certificate" + RequestTypeOriginRsa RequestType = "origin-rsa" + RequestTypeOriginEcc RequestType = "origin-ecc" + RequestTypeKeylessCertificate RequestType = "keyless-certificate" ) -func (r CertificatePackRequestType) IsKnown() bool { +func (r RequestType) IsKnown() bool { switch r { - case CertificatePackRequestTypeOriginRsa, CertificatePackRequestTypeOriginEcc, CertificatePackRequestTypeKeylessCertificate: + case RequestTypeOriginRsa, RequestTypeOriginEcc, RequestTypeKeylessCertificate: return true } return false } // The number of days for which the certificate should be valid. -type CertificatePackRequestValidity float64 +type RequestValidity float64 const ( - CertificatePackRequestValidity7 CertificatePackRequestValidity = 7 - CertificatePackRequestValidity30 CertificatePackRequestValidity = 30 - CertificatePackRequestValidity90 CertificatePackRequestValidity = 90 - CertificatePackRequestValidity365 CertificatePackRequestValidity = 365 - CertificatePackRequestValidity730 CertificatePackRequestValidity = 730 - CertificatePackRequestValidity1095 CertificatePackRequestValidity = 1095 - CertificatePackRequestValidity5475 CertificatePackRequestValidity = 5475 + RequestValidity7 RequestValidity = 7 + RequestValidity30 RequestValidity = 30 + RequestValidity90 RequestValidity = 90 + RequestValidity365 RequestValidity = 365 + RequestValidity730 RequestValidity = 730 + RequestValidity1095 RequestValidity = 1095 + RequestValidity5475 RequestValidity = 5475 ) -func (r CertificatePackRequestValidity) IsKnown() bool { +func (r RequestValidity) IsKnown() bool { switch r { - case CertificatePackRequestValidity7, CertificatePackRequestValidity30, CertificatePackRequestValidity90, CertificatePackRequestValidity365, CertificatePackRequestValidity730, CertificatePackRequestValidity1095, CertificatePackRequestValidity5475: + case RequestValidity7, RequestValidity30, RequestValidity90, RequestValidity365, RequestValidity730, RequestValidity1095, RequestValidity5475: return true } return false } // Status of certificate pack. -type CertificatePackStatus string +type Status string const ( - CertificatePackStatusInitializing CertificatePackStatus = "initializing" - CertificatePackStatusPendingValidation CertificatePackStatus = "pending_validation" - CertificatePackStatusDeleted CertificatePackStatus = "deleted" - CertificatePackStatusPendingIssuance CertificatePackStatus = "pending_issuance" - CertificatePackStatusPendingDeployment CertificatePackStatus = "pending_deployment" - CertificatePackStatusPendingDeletion CertificatePackStatus = "pending_deletion" - CertificatePackStatusPendingExpiration CertificatePackStatus = "pending_expiration" - CertificatePackStatusExpired CertificatePackStatus = "expired" - CertificatePackStatusActive CertificatePackStatus = "active" - CertificatePackStatusInitializingTimedOut CertificatePackStatus = "initializing_timed_out" - CertificatePackStatusValidationTimedOut CertificatePackStatus = "validation_timed_out" - CertificatePackStatusIssuanceTimedOut CertificatePackStatus = "issuance_timed_out" - CertificatePackStatusDeploymentTimedOut CertificatePackStatus = "deployment_timed_out" - CertificatePackStatusDeletionTimedOut CertificatePackStatus = "deletion_timed_out" - CertificatePackStatusPendingCleanup CertificatePackStatus = "pending_cleanup" - CertificatePackStatusStagingDeployment CertificatePackStatus = "staging_deployment" - CertificatePackStatusStagingActive CertificatePackStatus = "staging_active" - CertificatePackStatusDeactivating CertificatePackStatus = "deactivating" - CertificatePackStatusInactive CertificatePackStatus = "inactive" - CertificatePackStatusBackupIssued CertificatePackStatus = "backup_issued" - CertificatePackStatusHoldingDeployment CertificatePackStatus = "holding_deployment" + StatusInitializing Status = "initializing" + StatusPendingValidation Status = "pending_validation" + StatusDeleted Status = "deleted" + StatusPendingIssuance Status = "pending_issuance" + StatusPendingDeployment Status = "pending_deployment" + StatusPendingDeletion Status = "pending_deletion" + StatusPendingExpiration Status = "pending_expiration" + StatusExpired Status = "expired" + StatusActive Status = "active" + StatusInitializingTimedOut Status = "initializing_timed_out" + StatusValidationTimedOut Status = "validation_timed_out" + StatusIssuanceTimedOut Status = "issuance_timed_out" + StatusDeploymentTimedOut Status = "deployment_timed_out" + StatusDeletionTimedOut Status = "deletion_timed_out" + StatusPendingCleanup Status = "pending_cleanup" + StatusStagingDeployment Status = "staging_deployment" + StatusStagingActive Status = "staging_active" + StatusDeactivating Status = "deactivating" + StatusInactive Status = "inactive" + StatusBackupIssued Status = "backup_issued" + StatusHoldingDeployment Status = "holding_deployment" ) -func (r CertificatePackStatus) IsKnown() bool { +func (r Status) IsKnown() bool { switch r { - case CertificatePackStatusInitializing, CertificatePackStatusPendingValidation, CertificatePackStatusDeleted, CertificatePackStatusPendingIssuance, CertificatePackStatusPendingDeployment, CertificatePackStatusPendingDeletion, CertificatePackStatusPendingExpiration, CertificatePackStatusExpired, CertificatePackStatusActive, CertificatePackStatusInitializingTimedOut, CertificatePackStatusValidationTimedOut, CertificatePackStatusIssuanceTimedOut, CertificatePackStatusDeploymentTimedOut, CertificatePackStatusDeletionTimedOut, CertificatePackStatusPendingCleanup, CertificatePackStatusStagingDeployment, CertificatePackStatusStagingActive, CertificatePackStatusDeactivating, CertificatePackStatusInactive, CertificatePackStatusBackupIssued, CertificatePackStatusHoldingDeployment: + case StatusInitializing, StatusPendingValidation, StatusDeleted, StatusPendingIssuance, StatusPendingDeployment, StatusPendingDeletion, StatusPendingExpiration, StatusExpired, StatusActive, StatusInitializingTimedOut, StatusValidationTimedOut, StatusIssuanceTimedOut, StatusDeploymentTimedOut, StatusDeletionTimedOut, StatusPendingCleanup, StatusStagingDeployment, StatusStagingActive, StatusDeactivating, StatusInactive, StatusBackupIssued, StatusHoldingDeployment: return true } return false } // Validation method in use for a certificate pack order. -type CertificatePackValidationMethod string +type ValidationMethod string const ( - CertificatePackValidationMethodHTTP CertificatePackValidationMethod = "http" - CertificatePackValidationMethodCNAME CertificatePackValidationMethod = "cname" - CertificatePackValidationMethodTXT CertificatePackValidationMethod = "txt" + ValidationMethodHTTP ValidationMethod = "http" + ValidationMethodCNAME ValidationMethod = "cname" + ValidationMethodTXT ValidationMethod = "txt" ) -func (r CertificatePackValidationMethod) IsKnown() bool { +func (r ValidationMethod) IsKnown() bool { switch r { - case CertificatePackValidationMethodHTTP, CertificatePackValidationMethodCNAME, CertificatePackValidationMethodTXT: + case ValidationMethodHTTP, ValidationMethodCNAME, ValidationMethodTXT: return true } return false } -type Host = string - -type HostParam = string - type CertificatePackListResponse = interface{} type CertificatePackDeleteResponse struct { @@ -255,7 +255,7 @@ type CertificatePackEditResponse struct { // the zone apex, may not contain more than 50 hosts, and may not be empty. Hosts []Host `json:"hosts"` // Status of certificate pack. - Status CertificatePackStatus `json:"status"` + Status Status `json:"status"` // Type of certificate pack. Type CertificatePackEditResponseType `json:"type"` // Validation Method selected for the order. diff --git a/ssl/certificatepackorder.go b/ssl/certificatepackorder.go index eb87ac0ce4..2c892dc23e 100644 --- a/ssl/certificatepackorder.go +++ b/ssl/certificatepackorder.go @@ -59,7 +59,7 @@ type CertificatePackOrderNewResponse struct { // the zone apex, may not contain more than 50 hosts, and may not be empty. Hosts []Host `json:"hosts"` // Status of certificate pack. - Status CertificatePackStatus `json:"status"` + Status Status `json:"status"` // Type of certificate pack. Type CertificatePackOrderNewResponseType `json:"type"` // Validation Method selected for the order. diff --git a/ssl/verification.go b/ssl/verification.go index a7b87d57f5..5571fa2989 100644 --- a/ssl/verification.go +++ b/ssl/verification.go @@ -73,7 +73,7 @@ type Verification struct { // Certificate's signature algorithm. Signature VerificationSignature `json:"signature"` // Validation method in use for a certificate pack order. - ValidationMethod CertificatePackValidationMethod `json:"validation_method"` + ValidationMethod ValidationMethod `json:"validation_method"` // Certificate's required verification information. VerificationInfo VerificationVerificationInfo `json:"verification_info"` // Status of the required verification information, omitted if verification status diff --git a/user/organization.go b/user/organization.go index 31deefc16e..fa9a95c5c7 100644 --- a/user/organization.go +++ b/user/organization.go @@ -92,8 +92,8 @@ type Organization struct { // 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. - Status accounts.MemberStatus `json:"status"` - JSON organizationJSON `json:"-"` + Status accounts.Status `json:"status"` + JSON organizationJSON `json:"-"` } // organizationJSON contains the JSON metadata for the struct [Organization] From 7a0993dcdfe1753b05827f80925c65ecfdbb9662 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 04:30:07 +0000 Subject: [PATCH 115/127] feat(api): update via SDK Studio (#1964) --- accounts/aliases.go | 15 +++++++++++ acm/aliases.go | 15 +++++++++++ addressing/aliases.go | 15 +++++++++++ ai_gateway/aliases.go | 15 +++++++++++ alerting/aliases.go | 15 +++++++++++ aliases.go | 15 +++++++++++ api.md | 12 +++++++-- argo/aliases.go | 15 +++++++++++ audit_logs/aliases.go | 15 +++++++++++ billing/aliases.go | 15 +++++++++++ bot_management/aliases.go | 15 +++++++++++ brand_protection/aliases.go | 15 +++++++++++ cache/aliases.go | 15 +++++++++++ cache/variant.go | 20 +++++++------- cache/variant_test.go | 4 +-- calls/aliases.go | 15 +++++++++++ certificate_authorities/aliases.go | 15 +++++++++++ challenges/aliases.go | 15 +++++++++++ client_certificates/aliases.go | 15 +++++++++++ cloudforce_one/aliases.go | 15 +++++++++++ custom_certificates/aliases.go | 15 +++++++++++ custom_hostnames/aliases.go | 15 +++++++++++ custom_nameservers/aliases.go | 15 +++++++++++ d1/aliases.go | 15 +++++++++++ dcv_delegation/aliases.go | 15 +++++++++++ diagnostics/aliases.go | 15 +++++++++++ dns/aliases.go | 15 +++++++++++ dns/analyticsreportbytime.go | 26 +------------------ dns/analyticsreportbytime_test.go | 2 +- dns/dns.go | 26 +------------------ dns/firewallanalytics.go | 24 +++++++++++++++++ dns/firewallanalyticsreportbytime.go | 26 +------------------ dns/firewallanalyticsreportbytime_test.go | 2 +- dnssec/aliases.go | 15 +++++++++++ durable_objects/aliases.go | 15 +++++++++++ email_routing/aliases.go | 15 +++++++++++ event_notifications/aliases.go | 15 +++++++++++ filters/aliases.go | 15 +++++++++++ firewall/aliases.go | 15 +++++++++++ healthchecks/aliases.go | 15 +++++++++++ hostnames/aliases.go | 15 +++++++++++ hyperdrive/aliases.go | 15 +++++++++++ images/aliases.go | 15 +++++++++++ intel/aliases.go | 15 +++++++++++ ips/aliases.go | 15 +++++++++++ keyless_certificates/aliases.go | 15 +++++++++++ kv/aliases.go | 15 +++++++++++ load_balancers/aliases.go | 15 +++++++++++ logpush/aliases.go | 15 +++++++++++ logs/aliases.go | 15 +++++++++++ magic_network_monitoring/aliases.go | 15 +++++++++++ magic_transit/aliases.go | 15 +++++++++++ managed_headers/aliases.go | 15 +++++++++++ memberships/aliases.go | 15 +++++++++++ mtls_certificates/aliases.go | 15 +++++++++++ origin_ca_certificates/aliases.go | 15 +++++++++++ origin_ca_certificates/origincacertificate.go | 4 +-- .../origincacertificate_test.go | 3 ++- origin_post_quantum_encryption/aliases.go | 15 +++++++++++ origin_tls_client_auth/aliases.go | 15 +++++++++++ page_shield/aliases.go | 15 +++++++++++ pagerules/aliases.go | 15 +++++++++++ pages/aliases.go | 15 +++++++++++ pcaps/aliases.go | 15 +++++++++++ plans/aliases.go | 15 +++++++++++ queues/aliases.go | 15 +++++++++++ r2/aliases.go | 15 +++++++++++ radar/aliases.go | 15 +++++++++++ rate_limits/aliases.go | 15 +++++++++++ rate_plans/aliases.go | 15 +++++++++++ registrar/aliases.go | 15 +++++++++++ request_tracers/aliases.go | 15 +++++++++++ rules/aliases.go | 15 +++++++++++ rulesets/aliases.go | 15 +++++++++++ rum/aliases.go | 15 +++++++++++ secondary_dns/aliases.go | 15 +++++++++++ shared/shared.go | 18 +++++++++++++ snippets/aliases.go | 15 +++++++++++ spectrum/aliases.go | 15 +++++++++++ speed/aliases.go | 15 +++++++++++ ssl/aliases.go | 15 +++++++++++ ssl/certificatepack.go | 18 ------------- storage/aliases.go | 15 +++++++++++ stream/aliases.go | 15 +++++++++++ subscriptions/aliases.go | 15 +++++++++++ url_normalization/aliases.go | 15 +++++++++++ url_scanner/aliases.go | 15 +++++++++++ user/aliases.go | 15 +++++++++++ vectorize/aliases.go | 15 +++++++++++ waiting_rooms/aliases.go | 15 +++++++++++ warp_connector/aliases.go | 15 +++++++++++ web3/aliases.go | 15 +++++++++++ workers/aliases.go | 15 +++++++++++ workers_for_platforms/aliases.go | 15 +++++++++++ zero_trust/aliases.go | 15 +++++++++++ zones/aliases.go | 15 +++++++++++ 96 files changed, 1318 insertions(+), 112 deletions(-) diff --git a/accounts/aliases.go b/accounts/aliases.go index 4f29b455d2..4126333d38 100644 --- a/accounts/aliases.go +++ b/accounts/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/acm/aliases.go b/acm/aliases.go index e78ba3d1a9..ff1b428209 100644 --- a/acm/aliases.go +++ b/acm/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/addressing/aliases.go b/addressing/aliases.go index d308babcea..58447a39d7 100644 --- a/addressing/aliases.go +++ b/addressing/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/ai_gateway/aliases.go b/ai_gateway/aliases.go index 662911204f..e6070cfe79 100644 --- a/ai_gateway/aliases.go +++ b/ai_gateway/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/alerting/aliases.go b/alerting/aliases.go index d8733c40ff..24b6298aae 100644 --- a/alerting/aliases.go +++ b/alerting/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/aliases.go b/aliases.go index 0d6e3454c7..c296fff32b 100644 --- a/aliases.go +++ b/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/api.md b/api.md index 3f3395ce99..d037f6dfe4 100644 --- a/api.md +++ b/api.md @@ -1,6 +1,7 @@ # Shared Params Types - shared.ASNParam +- shared.CertificatePackRequestType - shared.MemberParam - shared.PermissionGrantParam @@ -8,6 +9,7 @@ - shared.ASN - shared.AuditLog +- shared.CertificatePackRequestType - shared.CloudflareTunnel - shared.ErrorData - shared.Member @@ -1167,14 +1169,12 @@ Params Types: - ssl.CertificateAuthority - ssl.HostParam -- ssl.RequestType - ssl.RequestValidity Response Types: - ssl.CertificateAuthority - ssl.Host -- ssl.RequestType - ssl.RequestValidity - ssl.Status - ssl.ValidationMethod @@ -1579,6 +1579,14 @@ Methods: ### Analytics +Params Types: + +- dns.Delta + +Response Types: + +- dns.Delta + #### Reports Methods: diff --git a/argo/aliases.go b/argo/aliases.go index 4e590d1fc5..5b7e43865e 100644 --- a/argo/aliases.go +++ b/argo/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/audit_logs/aliases.go b/audit_logs/aliases.go index 496e4bf315..3bbd585f82 100644 --- a/audit_logs/aliases.go +++ b/audit_logs/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/billing/aliases.go b/billing/aliases.go index 7b658c85a5..b7625b73fa 100644 --- a/billing/aliases.go +++ b/billing/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/bot_management/aliases.go b/bot_management/aliases.go index dda99f755b..9d3ad15f77 100644 --- a/bot_management/aliases.go +++ b/bot_management/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/brand_protection/aliases.go b/brand_protection/aliases.go index 61705c2892..6480f7bc0a 100644 --- a/brand_protection/aliases.go +++ b/brand_protection/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/cache/aliases.go b/cache/aliases.go index 39f25d5123..13695404a1 100644 --- a/cache/aliases.go +++ b/cache/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/cache/variant.go b/cache/variant.go index e29a7718ed..8dbe5889bd 100644 --- a/cache/variant.go +++ b/cache/variant.go @@ -164,7 +164,7 @@ func (r variantEditResponseJSON) RawJSON() string { type VariantEditResponseValue struct { // List of strings with the MIME types of all the variants that should be served // for avif. - Avif []string `json:"avif"` + AVIF []string `json:"avif"` // List of strings with the MIME types of all the variants that should be served // for bmp. BMP []string `json:"bmp"` @@ -179,7 +179,7 @@ type VariantEditResponseValue struct { JPEG []string `json:"jpeg"` // List of strings with the MIME types of all the variants that should be served // for jpg. - Jpg []string `json:"jpg"` + JPG []string `json:"jpg"` // List of strings with the MIME types of all the variants that should be served // for jpg2. JPG2 []string `json:"jpg2"` @@ -201,12 +201,12 @@ type VariantEditResponseValue struct { // variantEditResponseValueJSON contains the JSON metadata for the struct // [VariantEditResponseValue] type variantEditResponseValueJSON struct { - Avif apijson.Field + AVIF apijson.Field BMP apijson.Field GIF apijson.Field JP2 apijson.Field JPEG apijson.Field - Jpg apijson.Field + JPG apijson.Field JPG2 apijson.Field PNG apijson.Field TIF apijson.Field @@ -261,7 +261,7 @@ func (r variantGetResponseJSON) RawJSON() string { type VariantGetResponseValue struct { // List of strings with the MIME types of all the variants that should be served // for avif. - Avif []string `json:"avif"` + AVIF []string `json:"avif"` // List of strings with the MIME types of all the variants that should be served // for bmp. BMP []string `json:"bmp"` @@ -276,7 +276,7 @@ type VariantGetResponseValue struct { JPEG []string `json:"jpeg"` // List of strings with the MIME types of all the variants that should be served // for jpg. - Jpg []string `json:"jpg"` + JPG []string `json:"jpg"` // List of strings with the MIME types of all the variants that should be served // for jpg2. JPG2 []string `json:"jpg2"` @@ -298,12 +298,12 @@ type VariantGetResponseValue struct { // variantGetResponseValueJSON contains the JSON metadata for the struct // [VariantGetResponseValue] type variantGetResponseValueJSON struct { - Avif apijson.Field + AVIF apijson.Field BMP apijson.Field GIF apijson.Field JP2 apijson.Field JPEG apijson.Field - Jpg apijson.Field + JPG apijson.Field JPG2 apijson.Field PNG apijson.Field TIF apijson.Field @@ -389,7 +389,7 @@ func (r VariantEditParams) MarshalJSON() (data []byte, err error) { type VariantEditParamsValue struct { // List of strings with the MIME types of all the variants that should be served // for avif. - Avif param.Field[[]string] `json:"avif"` + AVIF param.Field[[]string] `json:"avif"` // List of strings with the MIME types of all the variants that should be served // for bmp. BMP param.Field[[]string] `json:"bmp"` @@ -404,7 +404,7 @@ type VariantEditParamsValue struct { JPEG param.Field[[]string] `json:"jpeg"` // List of strings with the MIME types of all the variants that should be served // for jpg. - Jpg param.Field[[]string] `json:"jpg"` + JPG param.Field[[]string] `json:"jpg"` // List of strings with the MIME types of all the variants that should be served // for jpg2. JPG2 param.Field[[]string] `json:"jpg2"` diff --git a/cache/variant_test.go b/cache/variant_test.go index fa83402e99..6a75ae1eac 100644 --- a/cache/variant_test.go +++ b/cache/variant_test.go @@ -55,12 +55,12 @@ func TestVariantEditWithOptionalParams(t *testing.T) { _, err := client.Cache.Variants.Edit(context.TODO(), cache.VariantEditParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Value: cloudflare.F(cache.VariantEditParamsValue{ - Avif: cloudflare.F([]string{"image/webp", "image/jpeg"}), + AVIF: cloudflare.F([]string{"image/webp", "image/jpeg"}), BMP: cloudflare.F([]string{"image/webp", "image/jpeg"}), GIF: cloudflare.F([]string{"image/webp", "image/jpeg"}), JP2: cloudflare.F([]string{"image/webp", "image/avif"}), JPEG: cloudflare.F([]string{"image/webp", "image/avif"}), - Jpg: cloudflare.F([]string{"image/webp", "image/avif"}), + JPG: cloudflare.F([]string{"image/webp", "image/avif"}), JPG2: cloudflare.F([]string{"image/webp", "image/avif"}), PNG: cloudflare.F([]string{"image/webp", "image/avif"}), TIF: cloudflare.F([]string{"image/webp", "image/avif"}), diff --git a/calls/aliases.go b/calls/aliases.go index 6985787d90..f100ba7787 100644 --- a/calls/aliases.go +++ b/calls/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/certificate_authorities/aliases.go b/certificate_authorities/aliases.go index f2b9b1768e..412b3bbc94 100644 --- a/certificate_authorities/aliases.go +++ b/certificate_authorities/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/challenges/aliases.go b/challenges/aliases.go index 4c54c4d5ca..8ce3e507cf 100644 --- a/challenges/aliases.go +++ b/challenges/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/client_certificates/aliases.go b/client_certificates/aliases.go index 1caca50040..08b1059aaa 100644 --- a/client_certificates/aliases.go +++ b/client_certificates/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/cloudforce_one/aliases.go b/cloudforce_one/aliases.go index d6a74a8caa..6f4c348b11 100644 --- a/cloudforce_one/aliases.go +++ b/cloudforce_one/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/custom_certificates/aliases.go b/custom_certificates/aliases.go index 4da6b1368c..b427cfd142 100644 --- a/custom_certificates/aliases.go +++ b/custom_certificates/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/custom_hostnames/aliases.go b/custom_hostnames/aliases.go index dcd0aaa51f..c6009719d9 100644 --- a/custom_hostnames/aliases.go +++ b/custom_hostnames/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/custom_nameservers/aliases.go b/custom_nameservers/aliases.go index d247d088b5..7f55c81996 100644 --- a/custom_nameservers/aliases.go +++ b/custom_nameservers/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/d1/aliases.go b/d1/aliases.go index 44e64bc418..6fce75cc59 100644 --- a/d1/aliases.go +++ b/d1/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/dcv_delegation/aliases.go b/dcv_delegation/aliases.go index b14d7f9bdd..2fd7e9793e 100644 --- a/dcv_delegation/aliases.go +++ b/dcv_delegation/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/diagnostics/aliases.go b/diagnostics/aliases.go index 4d3dfc2a32..c2ccc3d2fe 100644 --- a/diagnostics/aliases.go +++ b/diagnostics/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/dns/aliases.go b/dns/aliases.go index 17e7ff0fdb..99cf16991a 100644 --- a/dns/aliases.go +++ b/dns/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/dns/analyticsreportbytime.go b/dns/analyticsreportbytime.go index 0eb4449939..a5afea77e6 100644 --- a/dns/analyticsreportbytime.go +++ b/dns/analyticsreportbytime.go @@ -141,7 +141,7 @@ type AnalyticsReportBytimeGetParams struct { // prefixed by - (descending) or + (ascending). Sort param.Field[string] `query:"sort"` // Unit of time to group data by. - TimeDelta param.Field[AnalyticsReportBytimeGetParamsTimeDelta] `query:"time_delta"` + TimeDelta param.Field[Delta] `query:"time_delta"` // End date and time of requesting data period in ISO 8601 format. Until param.Field[time.Time] `query:"until" format:"date-time"` } @@ -155,30 +155,6 @@ func (r AnalyticsReportBytimeGetParams) URLQuery() (v url.Values) { }) } -// Unit of time to group data by. -type AnalyticsReportBytimeGetParamsTimeDelta string - -const ( - AnalyticsReportBytimeGetParamsTimeDeltaAll AnalyticsReportBytimeGetParamsTimeDelta = "all" - AnalyticsReportBytimeGetParamsTimeDeltaAuto AnalyticsReportBytimeGetParamsTimeDelta = "auto" - AnalyticsReportBytimeGetParamsTimeDeltaYear AnalyticsReportBytimeGetParamsTimeDelta = "year" - AnalyticsReportBytimeGetParamsTimeDeltaQuarter AnalyticsReportBytimeGetParamsTimeDelta = "quarter" - AnalyticsReportBytimeGetParamsTimeDeltaMonth AnalyticsReportBytimeGetParamsTimeDelta = "month" - AnalyticsReportBytimeGetParamsTimeDeltaWeek AnalyticsReportBytimeGetParamsTimeDelta = "week" - AnalyticsReportBytimeGetParamsTimeDeltaDay AnalyticsReportBytimeGetParamsTimeDelta = "day" - AnalyticsReportBytimeGetParamsTimeDeltaHour AnalyticsReportBytimeGetParamsTimeDelta = "hour" - AnalyticsReportBytimeGetParamsTimeDeltaDekaminute AnalyticsReportBytimeGetParamsTimeDelta = "dekaminute" - AnalyticsReportBytimeGetParamsTimeDeltaMinute AnalyticsReportBytimeGetParamsTimeDelta = "minute" -) - -func (r AnalyticsReportBytimeGetParamsTimeDelta) IsKnown() bool { - switch r { - case AnalyticsReportBytimeGetParamsTimeDeltaAll, AnalyticsReportBytimeGetParamsTimeDeltaAuto, AnalyticsReportBytimeGetParamsTimeDeltaYear, AnalyticsReportBytimeGetParamsTimeDeltaQuarter, AnalyticsReportBytimeGetParamsTimeDeltaMonth, AnalyticsReportBytimeGetParamsTimeDeltaWeek, AnalyticsReportBytimeGetParamsTimeDeltaDay, AnalyticsReportBytimeGetParamsTimeDeltaHour, AnalyticsReportBytimeGetParamsTimeDeltaDekaminute, AnalyticsReportBytimeGetParamsTimeDeltaMinute: - return true - } - return false -} - type AnalyticsReportBytimeGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` diff --git a/dns/analyticsreportbytime_test.go b/dns/analyticsreportbytime_test.go index 5894bf3dfa..4ba00b6747 100644 --- a/dns/analyticsreportbytime_test.go +++ b/dns/analyticsreportbytime_test.go @@ -36,7 +36,7 @@ func TestAnalyticsReportBytimeGetWithOptionalParams(t *testing.T) { Metrics: cloudflare.F("queryCount,uncachedCount"), Since: cloudflare.F(time.Now()), Sort: cloudflare.F("+responseCode,-queryName"), - TimeDelta: cloudflare.F(dns.AnalyticsReportBytimeGetParamsTimeDeltaHour), + TimeDelta: cloudflare.F(dns.DeltaHour), Until: cloudflare.F(time.Now()), }) if err != nil { diff --git a/dns/dns.go b/dns/dns.go index 1237b3e020..32d4377def 100644 --- a/dns/dns.go +++ b/dns/dns.go @@ -44,7 +44,7 @@ type DNSAnalyticsQuery struct { // Start date and time of requesting data period in ISO 8601 format. Since time.Time `json:"since,required" format:"date-time"` // Unit of time to group data by. - TimeDelta DNSAnalyticsQueryTimeDelta `json:"time_delta,required"` + TimeDelta Delta `json:"time_delta,required"` // End date and time of requesting data period in ISO 8601 format. Until time.Time `json:"until,required" format:"date-time"` // Segmentation filter in 'attribute operator value' format. @@ -77,27 +77,3 @@ func (r *DNSAnalyticsQuery) UnmarshalJSON(data []byte) (err error) { func (r dnsAnalyticsQueryJSON) RawJSON() string { return r.raw } - -// Unit of time to group data by. -type DNSAnalyticsQueryTimeDelta string - -const ( - DNSAnalyticsQueryTimeDeltaAll DNSAnalyticsQueryTimeDelta = "all" - DNSAnalyticsQueryTimeDeltaAuto DNSAnalyticsQueryTimeDelta = "auto" - DNSAnalyticsQueryTimeDeltaYear DNSAnalyticsQueryTimeDelta = "year" - DNSAnalyticsQueryTimeDeltaQuarter DNSAnalyticsQueryTimeDelta = "quarter" - DNSAnalyticsQueryTimeDeltaMonth DNSAnalyticsQueryTimeDelta = "month" - DNSAnalyticsQueryTimeDeltaWeek DNSAnalyticsQueryTimeDelta = "week" - DNSAnalyticsQueryTimeDeltaDay DNSAnalyticsQueryTimeDelta = "day" - DNSAnalyticsQueryTimeDeltaHour DNSAnalyticsQueryTimeDelta = "hour" - DNSAnalyticsQueryTimeDeltaDekaminute DNSAnalyticsQueryTimeDelta = "dekaminute" - DNSAnalyticsQueryTimeDeltaMinute DNSAnalyticsQueryTimeDelta = "minute" -) - -func (r DNSAnalyticsQueryTimeDelta) IsKnown() bool { - switch r { - case DNSAnalyticsQueryTimeDeltaAll, DNSAnalyticsQueryTimeDeltaAuto, DNSAnalyticsQueryTimeDeltaYear, DNSAnalyticsQueryTimeDeltaQuarter, DNSAnalyticsQueryTimeDeltaMonth, DNSAnalyticsQueryTimeDeltaWeek, DNSAnalyticsQueryTimeDeltaDay, DNSAnalyticsQueryTimeDeltaHour, DNSAnalyticsQueryTimeDeltaDekaminute, DNSAnalyticsQueryTimeDeltaMinute: - return true - } - return false -} diff --git a/dns/firewallanalytics.go b/dns/firewallanalytics.go index 0e121e2e85..8cb00ee865 100644 --- a/dns/firewallanalytics.go +++ b/dns/firewallanalytics.go @@ -25,3 +25,27 @@ func NewFirewallAnalyticsService(opts ...option.RequestOption) (r *FirewallAnaly r.Reports = NewFirewallAnalyticsReportService(opts...) return } + +// Unit of time to group data by. +type Delta string + +const ( + DeltaAll Delta = "all" + DeltaAuto Delta = "auto" + DeltaYear Delta = "year" + DeltaQuarter Delta = "quarter" + DeltaMonth Delta = "month" + DeltaWeek Delta = "week" + DeltaDay Delta = "day" + DeltaHour Delta = "hour" + DeltaDekaminute Delta = "dekaminute" + DeltaMinute Delta = "minute" +) + +func (r Delta) IsKnown() bool { + switch r { + case DeltaAll, DeltaAuto, DeltaYear, DeltaQuarter, DeltaMonth, DeltaWeek, DeltaDay, DeltaHour, DeltaDekaminute, DeltaMinute: + return true + } + return false +} diff --git a/dns/firewallanalyticsreportbytime.go b/dns/firewallanalyticsreportbytime.go index 57681e71b5..57298398f0 100644 --- a/dns/firewallanalyticsreportbytime.go +++ b/dns/firewallanalyticsreportbytime.go @@ -69,7 +69,7 @@ type FirewallAnalyticsReportBytimeGetParams struct { // prefixed by - (descending) or + (ascending). Sort param.Field[string] `query:"sort"` // Unit of time to group data by. - TimeDelta param.Field[FirewallAnalyticsReportBytimeGetParamsTimeDelta] `query:"time_delta"` + TimeDelta param.Field[Delta] `query:"time_delta"` // End date and time of requesting data period in ISO 8601 format. Until param.Field[time.Time] `query:"until" format:"date-time"` } @@ -83,30 +83,6 @@ func (r FirewallAnalyticsReportBytimeGetParams) URLQuery() (v url.Values) { }) } -// Unit of time to group data by. -type FirewallAnalyticsReportBytimeGetParamsTimeDelta string - -const ( - FirewallAnalyticsReportBytimeGetParamsTimeDeltaAll FirewallAnalyticsReportBytimeGetParamsTimeDelta = "all" - FirewallAnalyticsReportBytimeGetParamsTimeDeltaAuto FirewallAnalyticsReportBytimeGetParamsTimeDelta = "auto" - FirewallAnalyticsReportBytimeGetParamsTimeDeltaYear FirewallAnalyticsReportBytimeGetParamsTimeDelta = "year" - FirewallAnalyticsReportBytimeGetParamsTimeDeltaQuarter FirewallAnalyticsReportBytimeGetParamsTimeDelta = "quarter" - FirewallAnalyticsReportBytimeGetParamsTimeDeltaMonth FirewallAnalyticsReportBytimeGetParamsTimeDelta = "month" - FirewallAnalyticsReportBytimeGetParamsTimeDeltaWeek FirewallAnalyticsReportBytimeGetParamsTimeDelta = "week" - FirewallAnalyticsReportBytimeGetParamsTimeDeltaDay FirewallAnalyticsReportBytimeGetParamsTimeDelta = "day" - FirewallAnalyticsReportBytimeGetParamsTimeDeltaHour FirewallAnalyticsReportBytimeGetParamsTimeDelta = "hour" - FirewallAnalyticsReportBytimeGetParamsTimeDeltaDekaminute FirewallAnalyticsReportBytimeGetParamsTimeDelta = "dekaminute" - FirewallAnalyticsReportBytimeGetParamsTimeDeltaMinute FirewallAnalyticsReportBytimeGetParamsTimeDelta = "minute" -) - -func (r FirewallAnalyticsReportBytimeGetParamsTimeDelta) IsKnown() bool { - switch r { - case FirewallAnalyticsReportBytimeGetParamsTimeDeltaAll, FirewallAnalyticsReportBytimeGetParamsTimeDeltaAuto, FirewallAnalyticsReportBytimeGetParamsTimeDeltaYear, FirewallAnalyticsReportBytimeGetParamsTimeDeltaQuarter, FirewallAnalyticsReportBytimeGetParamsTimeDeltaMonth, FirewallAnalyticsReportBytimeGetParamsTimeDeltaWeek, FirewallAnalyticsReportBytimeGetParamsTimeDeltaDay, FirewallAnalyticsReportBytimeGetParamsTimeDeltaHour, FirewallAnalyticsReportBytimeGetParamsTimeDeltaDekaminute, FirewallAnalyticsReportBytimeGetParamsTimeDeltaMinute: - return true - } - return false -} - type FirewallAnalyticsReportBytimeGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` diff --git a/dns/firewallanalyticsreportbytime_test.go b/dns/firewallanalyticsreportbytime_test.go index 9b0cc654e3..74a1442e22 100644 --- a/dns/firewallanalyticsreportbytime_test.go +++ b/dns/firewallanalyticsreportbytime_test.go @@ -39,7 +39,7 @@ func TestFirewallAnalyticsReportBytimeGetWithOptionalParams(t *testing.T) { Metrics: cloudflare.F("queryCount,uncachedCount"), Since: cloudflare.F(time.Now()), Sort: cloudflare.F("+responseCode,-queryName"), - TimeDelta: cloudflare.F(dns.FirewallAnalyticsReportBytimeGetParamsTimeDeltaHour), + TimeDelta: cloudflare.F(dns.DeltaHour), Until: cloudflare.F(time.Now()), }, ) diff --git a/dnssec/aliases.go b/dnssec/aliases.go index 195a7d4c15..ce88588260 100644 --- a/dnssec/aliases.go +++ b/dnssec/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/durable_objects/aliases.go b/durable_objects/aliases.go index 7159319288..c26a1c7562 100644 --- a/durable_objects/aliases.go +++ b/durable_objects/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/email_routing/aliases.go b/email_routing/aliases.go index 499339e815..db9d7addd3 100644 --- a/email_routing/aliases.go +++ b/email_routing/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/event_notifications/aliases.go b/event_notifications/aliases.go index 30f8ad4d04..ed499ce805 100644 --- a/event_notifications/aliases.go +++ b/event_notifications/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/filters/aliases.go b/filters/aliases.go index 63bb4d4110..c4e335e7f5 100644 --- a/filters/aliases.go +++ b/filters/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/firewall/aliases.go b/firewall/aliases.go index 049c2258f5..f47a0f09ef 100644 --- a/firewall/aliases.go +++ b/firewall/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/healthchecks/aliases.go b/healthchecks/aliases.go index 0b2147b672..8c423fa5fd 100644 --- a/healthchecks/aliases.go +++ b/healthchecks/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/hostnames/aliases.go b/hostnames/aliases.go index acf5c0d226..4f7360872a 100644 --- a/hostnames/aliases.go +++ b/hostnames/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/hyperdrive/aliases.go b/hyperdrive/aliases.go index 9cba85768b..99f757de8d 100644 --- a/hyperdrive/aliases.go +++ b/hyperdrive/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/images/aliases.go b/images/aliases.go index 24c94298fc..b2a6f579a4 100644 --- a/images/aliases.go +++ b/images/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/intel/aliases.go b/intel/aliases.go index 0a7f65568d..d3424619a9 100644 --- a/intel/aliases.go +++ b/intel/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/ips/aliases.go b/ips/aliases.go index 9cc921eb39..842bbb356b 100644 --- a/ips/aliases.go +++ b/ips/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/keyless_certificates/aliases.go b/keyless_certificates/aliases.go index a760f7d911..6c6660c7ba 100644 --- a/keyless_certificates/aliases.go +++ b/keyless_certificates/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/kv/aliases.go b/kv/aliases.go index 36cde081d0..b8cc052065 100644 --- a/kv/aliases.go +++ b/kv/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/load_balancers/aliases.go b/load_balancers/aliases.go index a21059946b..362dcf3c15 100644 --- a/load_balancers/aliases.go +++ b/load_balancers/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/logpush/aliases.go b/logpush/aliases.go index 747b23a710..dede5b56d4 100644 --- a/logpush/aliases.go +++ b/logpush/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/logs/aliases.go b/logs/aliases.go index 4beb1f64a0..f1406a7c8b 100644 --- a/logs/aliases.go +++ b/logs/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/magic_network_monitoring/aliases.go b/magic_network_monitoring/aliases.go index d4119a69f4..a1442fb47c 100644 --- a/magic_network_monitoring/aliases.go +++ b/magic_network_monitoring/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/magic_transit/aliases.go b/magic_transit/aliases.go index 1cb7876dcc..ea7330d517 100644 --- a/magic_transit/aliases.go +++ b/magic_transit/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/managed_headers/aliases.go b/managed_headers/aliases.go index 684ad169d6..4f68da6736 100644 --- a/managed_headers/aliases.go +++ b/managed_headers/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/memberships/aliases.go b/memberships/aliases.go index 07c45e3c8a..8419e231e4 100644 --- a/memberships/aliases.go +++ b/memberships/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/mtls_certificates/aliases.go b/mtls_certificates/aliases.go index 4196b32264..9ebc921da0 100644 --- a/mtls_certificates/aliases.go +++ b/mtls_certificates/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/origin_ca_certificates/aliases.go b/origin_ca_certificates/aliases.go index 9e24da6c52..adfb5f46b9 100644 --- a/origin_ca_certificates/aliases.go +++ b/origin_ca_certificates/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/origin_ca_certificates/origincacertificate.go b/origin_ca_certificates/origincacertificate.go index 4ac8f75f11..91742c8887 100644 --- a/origin_ca_certificates/origincacertificate.go +++ b/origin_ca_certificates/origincacertificate.go @@ -118,7 +118,7 @@ type OriginCACertificate struct { Hostnames []interface{} `json:"hostnames,required"` // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). - RequestType ssl.RequestType `json:"request_type,required"` + RequestType shared.CertificatePackRequestType `json:"request_type,required"` // The number of days for which the certificate should be valid. RequestedValidity ssl.RequestValidity `json:"requested_validity,required"` // Identifier @@ -218,7 +218,7 @@ type OriginCACertificateNewParams struct { Hostnames param.Field[[]interface{}] `json:"hostnames"` // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). - RequestType param.Field[ssl.RequestType] `json:"request_type"` + RequestType param.Field[shared.CertificatePackRequestType] `json:"request_type"` // The number of days for which the certificate should be valid. RequestedValidity param.Field[ssl.RequestValidity] `json:"requested_validity"` } diff --git a/origin_ca_certificates/origincacertificate_test.go b/origin_ca_certificates/origincacertificate_test.go index 32dba76844..6aa570f6ea 100644 --- a/origin_ca_certificates/origincacertificate_test.go +++ b/origin_ca_certificates/origincacertificate_test.go @@ -12,6 +12,7 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/testutil" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/origin_ca_certificates" + "github.com/cloudflare/cloudflare-go/v2/shared" "github.com/cloudflare/cloudflare-go/v2/ssl" ) @@ -31,7 +32,7 @@ func TestOriginCACertificateNewWithOptionalParams(t *testing.T) { _, err := client.OriginCACertificates.New(context.TODO(), origin_ca_certificates.OriginCACertificateNewParams{ Csr: cloudflare.F("-----BEGIN CERTIFICATE REQUEST-----\nMIICxzCCAa8CAQAwSDELMAkGA1UEBhMCVVMxFjAUBgNVBAgTDVNhbiBGcmFuY2lz\nY28xCzAJBgNVBAcTAkNBMRQwEgYDVQQDEwtleGFtcGxlLm5ldDCCASIwDQYJKoZI\nhvcNAQEBBQADggEPADCCAQoCggEBALxejtu4b+jPdFeFi6OUsye8TYJQBm3WfCvL\nHu5EvijMO/4Z2TImwASbwUF7Ir8OLgH+mGlQZeqyNvGoSOMEaZVXcYfpR1hlVak8\n4GGVr+04IGfOCqaBokaBFIwzclGZbzKmLGwIQioNxGfqFm6RGYGA3be2Je2iseBc\nN8GV1wYmvYE0RR+yWweJCTJ157exyRzu7sVxaEW9F87zBQLyOnwXc64rflXslRqi\ng7F7w5IaQYOl8yvmk/jEPCAha7fkiUfEpj4N12+oPRiMvleJF98chxjD4MH39c5I\nuOslULhrWunfh7GB1jwWNA9y44H0snrf+xvoy2TcHmxvma9Eln8CAwEAAaA6MDgG\nCSqGSIb3DQEJDjErMCkwJwYDVR0RBCAwHoILZXhhbXBsZS5uZXSCD3d3dy5leGFt\ncGxlLm5ldDANBgkqhkiG9w0BAQsFAAOCAQEAcBaX6dOnI8ncARrI9ZSF2AJX+8mx\npTHY2+Y2C0VvrVDGMtbBRH8R9yMbqWtlxeeNGf//LeMkSKSFa4kbpdx226lfui8/\nauRDBTJGx2R1ccUxmLZXx4my0W5iIMxunu+kez+BDlu7bTT2io0uXMRHue4i6quH\nyc5ibxvbJMjR7dqbcanVE10/34oprzXQsJ/VmSuZNXtjbtSKDlmcpw6To/eeAJ+J\nhXykcUihvHyG4A1m2R6qpANBjnA0pHexfwM/SgfzvpbvUg0T1ubmer8BgTwCKIWs\ndcWYTthM51JIqRBfNqy4QcBnX+GY05yltEEswQI55wdiS3CjTTA67sdbcQ==\n-----END CERTIFICATE REQUEST-----"), Hostnames: cloudflare.F([]interface{}{"example.com", "*.example.com"}), - RequestType: cloudflare.F(ssl.RequestTypeOriginRsa), + RequestType: cloudflare.F(shared.CertificatePackRequestTypeOriginRsa), RequestedValidity: cloudflare.F(ssl.RequestValidity5475), }) if err != nil { diff --git a/origin_post_quantum_encryption/aliases.go b/origin_post_quantum_encryption/aliases.go index c5ef686eaa..c8b40183d7 100644 --- a/origin_post_quantum_encryption/aliases.go +++ b/origin_post_quantum_encryption/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/origin_tls_client_auth/aliases.go b/origin_tls_client_auth/aliases.go index 4c689b51dc..b34e78fbd4 100644 --- a/origin_tls_client_auth/aliases.go +++ b/origin_tls_client_auth/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/page_shield/aliases.go b/page_shield/aliases.go index 40cac14bd5..c9e88dd3a3 100644 --- a/page_shield/aliases.go +++ b/page_shield/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/pagerules/aliases.go b/pagerules/aliases.go index 39e79549a0..4029d1c3ce 100644 --- a/pagerules/aliases.go +++ b/pagerules/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/pages/aliases.go b/pages/aliases.go index 15b96ebb30..756fe08f5e 100644 --- a/pages/aliases.go +++ b/pages/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/pcaps/aliases.go b/pcaps/aliases.go index 43d425c680..3f1989e3d7 100644 --- a/pcaps/aliases.go +++ b/pcaps/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/plans/aliases.go b/plans/aliases.go index 5e0b397282..2b6455a948 100644 --- a/plans/aliases.go +++ b/plans/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/queues/aliases.go b/queues/aliases.go index 39bea750c6..7870abc152 100644 --- a/queues/aliases.go +++ b/queues/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/r2/aliases.go b/r2/aliases.go index 2665cfc73e..0c138987e6 100644 --- a/r2/aliases.go +++ b/r2/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/radar/aliases.go b/radar/aliases.go index 22b205a2bd..9de653075b 100644 --- a/radar/aliases.go +++ b/radar/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/rate_limits/aliases.go b/rate_limits/aliases.go index 50b59c8707..3351dfa68c 100644 --- a/rate_limits/aliases.go +++ b/rate_limits/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/rate_plans/aliases.go b/rate_plans/aliases.go index 0d9d6f325f..133d2a17b3 100644 --- a/rate_plans/aliases.go +++ b/rate_plans/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/registrar/aliases.go b/registrar/aliases.go index 203fce4f20..345b84977d 100644 --- a/registrar/aliases.go +++ b/registrar/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/request_tracers/aliases.go b/request_tracers/aliases.go index 89c56346ee..dc1488725d 100644 --- a/request_tracers/aliases.go +++ b/request_tracers/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/rules/aliases.go b/rules/aliases.go index 644ad6aaf7..30783f1f9b 100644 --- a/rules/aliases.go +++ b/rules/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/rulesets/aliases.go b/rulesets/aliases.go index f32a225e20..e4f8750704 100644 --- a/rulesets/aliases.go +++ b/rulesets/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/rum/aliases.go b/rum/aliases.go index 5b1b15c889..8dfa9aab38 100644 --- a/rum/aliases.go +++ b/rum/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/secondary_dns/aliases.go b/secondary_dns/aliases.go index 92b7ce1758..39114d9da0 100644 --- a/secondary_dns/aliases.go +++ b/secondary_dns/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/shared/shared.go b/shared/shared.go index cba6e01452..b88619c265 100644 --- a/shared/shared.go +++ b/shared/shared.go @@ -176,6 +176,24 @@ func (r auditLogResourceJSON) RawJSON() string { return r.raw } +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +type CertificatePackRequestType string + +const ( + CertificatePackRequestTypeOriginRsa CertificatePackRequestType = "origin-rsa" + CertificatePackRequestTypeOriginEcc CertificatePackRequestType = "origin-ecc" + CertificatePackRequestTypeKeylessCertificate CertificatePackRequestType = "keyless-certificate" +) + +func (r CertificatePackRequestType) IsKnown() bool { + switch r { + case CertificatePackRequestTypeOriginRsa, CertificatePackRequestTypeOriginEcc, CertificatePackRequestTypeKeylessCertificate: + return true + } + return false +} + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. type CloudflareTunnel struct { // UUID of the tunnel. diff --git a/snippets/aliases.go b/snippets/aliases.go index 03e8215e70..4c58c2290b 100644 --- a/snippets/aliases.go +++ b/snippets/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/spectrum/aliases.go b/spectrum/aliases.go index c1d37ab2da..90a5aa5505 100644 --- a/spectrum/aliases.go +++ b/spectrum/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/speed/aliases.go b/speed/aliases.go index 02be0b57ff..39069f73e3 100644 --- a/speed/aliases.go +++ b/speed/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/ssl/aliases.go b/ssl/aliases.go index 515de20f50..45185bb2b6 100644 --- a/ssl/aliases.go +++ b/ssl/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/ssl/certificatepack.go b/ssl/certificatepack.go index c5c873aa60..3aa00f20f2 100644 --- a/ssl/certificatepack.go +++ b/ssl/certificatepack.go @@ -126,24 +126,6 @@ type Host = string type HostParam = string -// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), -// or "keyless-certificate" (for Keyless SSL servers). -type RequestType string - -const ( - RequestTypeOriginRsa RequestType = "origin-rsa" - RequestTypeOriginEcc RequestType = "origin-ecc" - RequestTypeKeylessCertificate RequestType = "keyless-certificate" -) - -func (r RequestType) IsKnown() bool { - switch r { - case RequestTypeOriginRsa, RequestTypeOriginEcc, RequestTypeKeylessCertificate: - return true - } - return false -} - // The number of days for which the certificate should be valid. type RequestValidity float64 diff --git a/storage/aliases.go b/storage/aliases.go index 6a3906b4b8..92ca558a05 100644 --- a/storage/aliases.go +++ b/storage/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/stream/aliases.go b/stream/aliases.go index 55e16a500e..dbec289f40 100644 --- a/stream/aliases.go +++ b/stream/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/subscriptions/aliases.go b/subscriptions/aliases.go index 8f6c1908a0..7c8e1de5d9 100644 --- a/subscriptions/aliases.go +++ b/subscriptions/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/url_normalization/aliases.go b/url_normalization/aliases.go index 2d1a205dbc..f210f80d36 100644 --- a/url_normalization/aliases.go +++ b/url_normalization/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/url_scanner/aliases.go b/url_scanner/aliases.go index c493589f26..3dddf4df56 100644 --- a/url_scanner/aliases.go +++ b/url_scanner/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/user/aliases.go b/user/aliases.go index dd4de0e629..282f6982c3 100644 --- a/user/aliases.go +++ b/user/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/vectorize/aliases.go b/vectorize/aliases.go index 7efa29e0f5..aadc498c9f 100644 --- a/vectorize/aliases.go +++ b/vectorize/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/waiting_rooms/aliases.go b/waiting_rooms/aliases.go index 7ef6f422b1..ce1a8e44cb 100644 --- a/waiting_rooms/aliases.go +++ b/waiting_rooms/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/warp_connector/aliases.go b/warp_connector/aliases.go index a1bcffc90e..cfbd388aba 100644 --- a/warp_connector/aliases.go +++ b/warp_connector/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/web3/aliases.go b/web3/aliases.go index 5f0052c24f..83d7348bc3 100644 --- a/web3/aliases.go +++ b/web3/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/workers/aliases.go b/workers/aliases.go index 5701515e93..064c686c28 100644 --- a/workers/aliases.go +++ b/workers/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/workers_for_platforms/aliases.go b/workers_for_platforms/aliases.go index b3419dd934..0fb3a33ce6 100644 --- a/workers_for_platforms/aliases.go +++ b/workers_for_platforms/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/zero_trust/aliases.go b/zero_trust/aliases.go index 436d2e0ce6..8c8e07ca2c 100644 --- a/zero_trust/aliases.go +++ b/zero_trust/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. diff --git a/zones/aliases.go b/zones/aliases.go index 03d6cb8d48..375421cee3 100644 --- a/zones/aliases.go +++ b/zones/aliases.go @@ -44,6 +44,21 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificatePackRequestType = shared.CertificatePackRequestType + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa + +// This is an alias to an internal value. +const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc + +// This is an alias to an internal value. +const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate + // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // // This is an alias to an internal type. From e1341b8e899474285e897e9b03a53534d9f37fc9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 04:31:53 +0000 Subject: [PATCH 116/127] feat(api): update via SDK Studio (#1965) --- accounts/aliases.go | 8 ++++---- acm/aliases.go | 8 ++++---- addressing/aliases.go | 8 ++++---- ai_gateway/aliases.go | 8 ++++---- alerting/aliases.go | 8 ++++---- aliases.go | 8 ++++---- api.md | 4 ++-- argo/aliases.go | 8 ++++---- audit_logs/aliases.go | 8 ++++---- billing/aliases.go | 8 ++++---- bot_management/aliases.go | 8 ++++---- brand_protection/aliases.go | 8 ++++---- cache/aliases.go | 8 ++++---- calls/aliases.go | 8 ++++---- certificate_authorities/aliases.go | 8 ++++---- challenges/aliases.go | 8 ++++---- client_certificates/aliases.go | 8 ++++---- cloudforce_one/aliases.go | 8 ++++---- custom_certificates/aliases.go | 8 ++++---- custom_hostnames/aliases.go | 8 ++++---- custom_nameservers/aliases.go | 8 ++++---- d1/aliases.go | 8 ++++---- dcv_delegation/aliases.go | 8 ++++---- diagnostics/aliases.go | 8 ++++---- dns/aliases.go | 8 ++++---- dnssec/aliases.go | 8 ++++---- durable_objects/aliases.go | 8 ++++---- email_routing/aliases.go | 8 ++++---- event_notifications/aliases.go | 8 ++++---- filters/aliases.go | 8 ++++---- firewall/aliases.go | 8 ++++---- healthchecks/aliases.go | 8 ++++---- hostnames/aliases.go | 8 ++++---- hyperdrive/aliases.go | 8 ++++---- images/aliases.go | 8 ++++---- intel/aliases.go | 8 ++++---- ips/aliases.go | 8 ++++---- keyless_certificates/aliases.go | 8 ++++---- kv/aliases.go | 8 ++++---- load_balancers/aliases.go | 8 ++++---- logpush/aliases.go | 8 ++++---- logs/aliases.go | 8 ++++---- magic_network_monitoring/aliases.go | 8 ++++---- magic_transit/aliases.go | 8 ++++---- managed_headers/aliases.go | 8 ++++---- memberships/aliases.go | 8 ++++---- mtls_certificates/aliases.go | 8 ++++---- origin_ca_certificates/aliases.go | 8 ++++---- origin_ca_certificates/origincacertificate.go | 4 ++-- origin_ca_certificates/origincacertificate_test.go | 2 +- origin_post_quantum_encryption/aliases.go | 8 ++++---- origin_tls_client_auth/aliases.go | 8 ++++---- page_shield/aliases.go | 8 ++++---- pagerules/aliases.go | 8 ++++---- pages/aliases.go | 8 ++++---- pcaps/aliases.go | 8 ++++---- plans/aliases.go | 8 ++++---- queues/aliases.go | 8 ++++---- r2/aliases.go | 8 ++++---- radar/aliases.go | 8 ++++---- rate_limits/aliases.go | 8 ++++---- rate_plans/aliases.go | 8 ++++---- registrar/aliases.go | 8 ++++---- request_tracers/aliases.go | 8 ++++---- rules/aliases.go | 8 ++++---- rulesets/aliases.go | 8 ++++---- rum/aliases.go | 8 ++++---- secondary_dns/aliases.go | 8 ++++---- shared/shared.go | 12 ++++++------ snippets/aliases.go | 8 ++++---- spectrum/aliases.go | 8 ++++---- speed/aliases.go | 8 ++++---- ssl/aliases.go | 8 ++++---- storage/aliases.go | 8 ++++---- stream/aliases.go | 8 ++++---- subscriptions/aliases.go | 8 ++++---- url_normalization/aliases.go | 8 ++++---- url_scanner/aliases.go | 8 ++++---- user/aliases.go | 8 ++++---- vectorize/aliases.go | 8 ++++---- waiting_rooms/aliases.go | 8 ++++---- warp_connector/aliases.go | 8 ++++---- web3/aliases.go | 8 ++++---- workers/aliases.go | 8 ++++---- workers_for_platforms/aliases.go | 8 ++++---- zero_trust/aliases.go | 8 ++++---- zones/aliases.go | 8 ++++---- 87 files changed, 343 insertions(+), 343 deletions(-) diff --git a/accounts/aliases.go b/accounts/aliases.go index 4126333d38..e0630f65ae 100644 --- a/accounts/aliases.go +++ b/accounts/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/acm/aliases.go b/acm/aliases.go index ff1b428209..c36c79964d 100644 --- a/acm/aliases.go +++ b/acm/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/addressing/aliases.go b/addressing/aliases.go index 58447a39d7..37eb52652e 100644 --- a/addressing/aliases.go +++ b/addressing/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/ai_gateway/aliases.go b/ai_gateway/aliases.go index e6070cfe79..e06ca58e44 100644 --- a/ai_gateway/aliases.go +++ b/ai_gateway/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/alerting/aliases.go b/alerting/aliases.go index 24b6298aae..9a20229c69 100644 --- a/alerting/aliases.go +++ b/alerting/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/aliases.go b/aliases.go index c296fff32b..489c05ebc9 100644 --- a/aliases.go +++ b/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/api.md b/api.md index d037f6dfe4..cff785dd6f 100644 --- a/api.md +++ b/api.md @@ -1,7 +1,7 @@ # Shared Params Types - shared.ASNParam -- shared.CertificatePackRequestType +- shared.CertificateRequestType - shared.MemberParam - shared.PermissionGrantParam @@ -9,7 +9,7 @@ - shared.ASN - shared.AuditLog -- shared.CertificatePackRequestType +- shared.CertificateRequestType - shared.CloudflareTunnel - shared.ErrorData - shared.Member diff --git a/argo/aliases.go b/argo/aliases.go index 5b7e43865e..3ac831eeea 100644 --- a/argo/aliases.go +++ b/argo/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/audit_logs/aliases.go b/audit_logs/aliases.go index 3bbd585f82..371253e1b2 100644 --- a/audit_logs/aliases.go +++ b/audit_logs/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/billing/aliases.go b/billing/aliases.go index b7625b73fa..88af6f85af 100644 --- a/billing/aliases.go +++ b/billing/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/bot_management/aliases.go b/bot_management/aliases.go index 9d3ad15f77..b6e2f73628 100644 --- a/bot_management/aliases.go +++ b/bot_management/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/brand_protection/aliases.go b/brand_protection/aliases.go index 6480f7bc0a..c1059d9c35 100644 --- a/brand_protection/aliases.go +++ b/brand_protection/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/cache/aliases.go b/cache/aliases.go index 13695404a1..9acedec7bb 100644 --- a/cache/aliases.go +++ b/cache/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/calls/aliases.go b/calls/aliases.go index f100ba7787..e8cbbfebfe 100644 --- a/calls/aliases.go +++ b/calls/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/certificate_authorities/aliases.go b/certificate_authorities/aliases.go index 412b3bbc94..db09fb817b 100644 --- a/certificate_authorities/aliases.go +++ b/certificate_authorities/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/challenges/aliases.go b/challenges/aliases.go index 8ce3e507cf..ea84602e5e 100644 --- a/challenges/aliases.go +++ b/challenges/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/client_certificates/aliases.go b/client_certificates/aliases.go index 08b1059aaa..92c0c04b41 100644 --- a/client_certificates/aliases.go +++ b/client_certificates/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/cloudforce_one/aliases.go b/cloudforce_one/aliases.go index 6f4c348b11..84245903e4 100644 --- a/cloudforce_one/aliases.go +++ b/cloudforce_one/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/custom_certificates/aliases.go b/custom_certificates/aliases.go index b427cfd142..42424dd887 100644 --- a/custom_certificates/aliases.go +++ b/custom_certificates/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/custom_hostnames/aliases.go b/custom_hostnames/aliases.go index c6009719d9..790bd9ffb5 100644 --- a/custom_hostnames/aliases.go +++ b/custom_hostnames/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/custom_nameservers/aliases.go b/custom_nameservers/aliases.go index 7f55c81996..8ceeb9ddba 100644 --- a/custom_nameservers/aliases.go +++ b/custom_nameservers/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/d1/aliases.go b/d1/aliases.go index 6fce75cc59..d9aee8da18 100644 --- a/d1/aliases.go +++ b/d1/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/dcv_delegation/aliases.go b/dcv_delegation/aliases.go index 2fd7e9793e..7e6ae296c3 100644 --- a/dcv_delegation/aliases.go +++ b/dcv_delegation/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/diagnostics/aliases.go b/diagnostics/aliases.go index c2ccc3d2fe..60ad2711b1 100644 --- a/diagnostics/aliases.go +++ b/diagnostics/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/dns/aliases.go b/dns/aliases.go index 99cf16991a..e388b005ea 100644 --- a/dns/aliases.go +++ b/dns/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/dnssec/aliases.go b/dnssec/aliases.go index ce88588260..71cc2f4f57 100644 --- a/dnssec/aliases.go +++ b/dnssec/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/durable_objects/aliases.go b/durable_objects/aliases.go index c26a1c7562..1d11ccb5e3 100644 --- a/durable_objects/aliases.go +++ b/durable_objects/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/email_routing/aliases.go b/email_routing/aliases.go index db9d7addd3..05f9bd75dc 100644 --- a/email_routing/aliases.go +++ b/email_routing/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/event_notifications/aliases.go b/event_notifications/aliases.go index ed499ce805..43e0cd35b0 100644 --- a/event_notifications/aliases.go +++ b/event_notifications/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/filters/aliases.go b/filters/aliases.go index c4e335e7f5..6310e87181 100644 --- a/filters/aliases.go +++ b/filters/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/firewall/aliases.go b/firewall/aliases.go index f47a0f09ef..3564a555d6 100644 --- a/firewall/aliases.go +++ b/firewall/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/healthchecks/aliases.go b/healthchecks/aliases.go index 8c423fa5fd..9c1c3c06db 100644 --- a/healthchecks/aliases.go +++ b/healthchecks/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/hostnames/aliases.go b/hostnames/aliases.go index 4f7360872a..d8592a32bf 100644 --- a/hostnames/aliases.go +++ b/hostnames/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/hyperdrive/aliases.go b/hyperdrive/aliases.go index 99f757de8d..ce0c91b4d8 100644 --- a/hyperdrive/aliases.go +++ b/hyperdrive/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/images/aliases.go b/images/aliases.go index b2a6f579a4..716703519f 100644 --- a/images/aliases.go +++ b/images/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/intel/aliases.go b/intel/aliases.go index d3424619a9..823f6e91d7 100644 --- a/intel/aliases.go +++ b/intel/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/ips/aliases.go b/ips/aliases.go index 842bbb356b..9b4fd25d87 100644 --- a/ips/aliases.go +++ b/ips/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/keyless_certificates/aliases.go b/keyless_certificates/aliases.go index 6c6660c7ba..92e30e8136 100644 --- a/keyless_certificates/aliases.go +++ b/keyless_certificates/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/kv/aliases.go b/kv/aliases.go index b8cc052065..cbded865a1 100644 --- a/kv/aliases.go +++ b/kv/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/load_balancers/aliases.go b/load_balancers/aliases.go index 362dcf3c15..90cb5f3637 100644 --- a/load_balancers/aliases.go +++ b/load_balancers/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/logpush/aliases.go b/logpush/aliases.go index dede5b56d4..8e24c46fcf 100644 --- a/logpush/aliases.go +++ b/logpush/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/logs/aliases.go b/logs/aliases.go index f1406a7c8b..07b766a509 100644 --- a/logs/aliases.go +++ b/logs/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/magic_network_monitoring/aliases.go b/magic_network_monitoring/aliases.go index a1442fb47c..bed2d6a18c 100644 --- a/magic_network_monitoring/aliases.go +++ b/magic_network_monitoring/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/magic_transit/aliases.go b/magic_transit/aliases.go index ea7330d517..db9ec8189a 100644 --- a/magic_transit/aliases.go +++ b/magic_transit/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/managed_headers/aliases.go b/managed_headers/aliases.go index 4f68da6736..9f6d69c886 100644 --- a/managed_headers/aliases.go +++ b/managed_headers/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/memberships/aliases.go b/memberships/aliases.go index 8419e231e4..08353f2e61 100644 --- a/memberships/aliases.go +++ b/memberships/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/mtls_certificates/aliases.go b/mtls_certificates/aliases.go index 9ebc921da0..7c0f26dcde 100644 --- a/mtls_certificates/aliases.go +++ b/mtls_certificates/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/origin_ca_certificates/aliases.go b/origin_ca_certificates/aliases.go index adfb5f46b9..930482825f 100644 --- a/origin_ca_certificates/aliases.go +++ b/origin_ca_certificates/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/origin_ca_certificates/origincacertificate.go b/origin_ca_certificates/origincacertificate.go index 91742c8887..dcec7fb6cc 100644 --- a/origin_ca_certificates/origincacertificate.go +++ b/origin_ca_certificates/origincacertificate.go @@ -118,7 +118,7 @@ type OriginCACertificate struct { Hostnames []interface{} `json:"hostnames,required"` // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). - RequestType shared.CertificatePackRequestType `json:"request_type,required"` + RequestType shared.CertificateRequestType `json:"request_type,required"` // The number of days for which the certificate should be valid. RequestedValidity ssl.RequestValidity `json:"requested_validity,required"` // Identifier @@ -218,7 +218,7 @@ type OriginCACertificateNewParams struct { Hostnames param.Field[[]interface{}] `json:"hostnames"` // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). - RequestType param.Field[shared.CertificatePackRequestType] `json:"request_type"` + RequestType param.Field[shared.CertificateRequestType] `json:"request_type"` // The number of days for which the certificate should be valid. RequestedValidity param.Field[ssl.RequestValidity] `json:"requested_validity"` } diff --git a/origin_ca_certificates/origincacertificate_test.go b/origin_ca_certificates/origincacertificate_test.go index 6aa570f6ea..9afb5f6715 100644 --- a/origin_ca_certificates/origincacertificate_test.go +++ b/origin_ca_certificates/origincacertificate_test.go @@ -32,7 +32,7 @@ func TestOriginCACertificateNewWithOptionalParams(t *testing.T) { _, err := client.OriginCACertificates.New(context.TODO(), origin_ca_certificates.OriginCACertificateNewParams{ Csr: cloudflare.F("-----BEGIN CERTIFICATE REQUEST-----\nMIICxzCCAa8CAQAwSDELMAkGA1UEBhMCVVMxFjAUBgNVBAgTDVNhbiBGcmFuY2lz\nY28xCzAJBgNVBAcTAkNBMRQwEgYDVQQDEwtleGFtcGxlLm5ldDCCASIwDQYJKoZI\nhvcNAQEBBQADggEPADCCAQoCggEBALxejtu4b+jPdFeFi6OUsye8TYJQBm3WfCvL\nHu5EvijMO/4Z2TImwASbwUF7Ir8OLgH+mGlQZeqyNvGoSOMEaZVXcYfpR1hlVak8\n4GGVr+04IGfOCqaBokaBFIwzclGZbzKmLGwIQioNxGfqFm6RGYGA3be2Je2iseBc\nN8GV1wYmvYE0RR+yWweJCTJ157exyRzu7sVxaEW9F87zBQLyOnwXc64rflXslRqi\ng7F7w5IaQYOl8yvmk/jEPCAha7fkiUfEpj4N12+oPRiMvleJF98chxjD4MH39c5I\nuOslULhrWunfh7GB1jwWNA9y44H0snrf+xvoy2TcHmxvma9Eln8CAwEAAaA6MDgG\nCSqGSIb3DQEJDjErMCkwJwYDVR0RBCAwHoILZXhhbXBsZS5uZXSCD3d3dy5leGFt\ncGxlLm5ldDANBgkqhkiG9w0BAQsFAAOCAQEAcBaX6dOnI8ncARrI9ZSF2AJX+8mx\npTHY2+Y2C0VvrVDGMtbBRH8R9yMbqWtlxeeNGf//LeMkSKSFa4kbpdx226lfui8/\nauRDBTJGx2R1ccUxmLZXx4my0W5iIMxunu+kez+BDlu7bTT2io0uXMRHue4i6quH\nyc5ibxvbJMjR7dqbcanVE10/34oprzXQsJ/VmSuZNXtjbtSKDlmcpw6To/eeAJ+J\nhXykcUihvHyG4A1m2R6qpANBjnA0pHexfwM/SgfzvpbvUg0T1ubmer8BgTwCKIWs\ndcWYTthM51JIqRBfNqy4QcBnX+GY05yltEEswQI55wdiS3CjTTA67sdbcQ==\n-----END CERTIFICATE REQUEST-----"), Hostnames: cloudflare.F([]interface{}{"example.com", "*.example.com"}), - RequestType: cloudflare.F(shared.CertificatePackRequestTypeOriginRsa), + RequestType: cloudflare.F(shared.CertificateRequestTypeOriginRsa), RequestedValidity: cloudflare.F(ssl.RequestValidity5475), }) if err != nil { diff --git a/origin_post_quantum_encryption/aliases.go b/origin_post_quantum_encryption/aliases.go index c8b40183d7..fa34f36eaa 100644 --- a/origin_post_quantum_encryption/aliases.go +++ b/origin_post_quantum_encryption/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/origin_tls_client_auth/aliases.go b/origin_tls_client_auth/aliases.go index b34e78fbd4..3d37dd2f5e 100644 --- a/origin_tls_client_auth/aliases.go +++ b/origin_tls_client_auth/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/page_shield/aliases.go b/page_shield/aliases.go index c9e88dd3a3..80adbcbe43 100644 --- a/page_shield/aliases.go +++ b/page_shield/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/pagerules/aliases.go b/pagerules/aliases.go index 4029d1c3ce..a8e4ef447d 100644 --- a/pagerules/aliases.go +++ b/pagerules/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/pages/aliases.go b/pages/aliases.go index 756fe08f5e..6f445b58ec 100644 --- a/pages/aliases.go +++ b/pages/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/pcaps/aliases.go b/pcaps/aliases.go index 3f1989e3d7..1729412bdb 100644 --- a/pcaps/aliases.go +++ b/pcaps/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/plans/aliases.go b/plans/aliases.go index 2b6455a948..2d550e892c 100644 --- a/plans/aliases.go +++ b/plans/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/queues/aliases.go b/queues/aliases.go index 7870abc152..956a943935 100644 --- a/queues/aliases.go +++ b/queues/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/r2/aliases.go b/r2/aliases.go index 0c138987e6..c03ec59182 100644 --- a/r2/aliases.go +++ b/r2/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/radar/aliases.go b/radar/aliases.go index 9de653075b..8b30be9444 100644 --- a/radar/aliases.go +++ b/radar/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/rate_limits/aliases.go b/rate_limits/aliases.go index 3351dfa68c..147301b574 100644 --- a/rate_limits/aliases.go +++ b/rate_limits/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/rate_plans/aliases.go b/rate_plans/aliases.go index 133d2a17b3..a8141f4c87 100644 --- a/rate_plans/aliases.go +++ b/rate_plans/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/registrar/aliases.go b/registrar/aliases.go index 345b84977d..54edc7a374 100644 --- a/registrar/aliases.go +++ b/registrar/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/request_tracers/aliases.go b/request_tracers/aliases.go index dc1488725d..0acc0cd65e 100644 --- a/request_tracers/aliases.go +++ b/request_tracers/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/rules/aliases.go b/rules/aliases.go index 30783f1f9b..674713c3ee 100644 --- a/rules/aliases.go +++ b/rules/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/rulesets/aliases.go b/rulesets/aliases.go index e4f8750704..ab94cfb537 100644 --- a/rulesets/aliases.go +++ b/rulesets/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/rum/aliases.go b/rum/aliases.go index 8dfa9aab38..f733c43942 100644 --- a/rum/aliases.go +++ b/rum/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/secondary_dns/aliases.go b/secondary_dns/aliases.go index 39114d9da0..6732b5409b 100644 --- a/secondary_dns/aliases.go +++ b/secondary_dns/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/shared/shared.go b/shared/shared.go index b88619c265..85caedffcf 100644 --- a/shared/shared.go +++ b/shared/shared.go @@ -178,17 +178,17 @@ func (r auditLogResourceJSON) RawJSON() string { // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). -type CertificatePackRequestType string +type CertificateRequestType string const ( - CertificatePackRequestTypeOriginRsa CertificatePackRequestType = "origin-rsa" - CertificatePackRequestTypeOriginEcc CertificatePackRequestType = "origin-ecc" - CertificatePackRequestTypeKeylessCertificate CertificatePackRequestType = "keyless-certificate" + CertificateRequestTypeOriginRsa CertificateRequestType = "origin-rsa" + CertificateRequestTypeOriginEcc CertificateRequestType = "origin-ecc" + CertificateRequestTypeKeylessCertificate CertificateRequestType = "keyless-certificate" ) -func (r CertificatePackRequestType) IsKnown() bool { +func (r CertificateRequestType) IsKnown() bool { switch r { - case CertificatePackRequestTypeOriginRsa, CertificatePackRequestTypeOriginEcc, CertificatePackRequestTypeKeylessCertificate: + case CertificateRequestTypeOriginRsa, CertificateRequestTypeOriginEcc, CertificateRequestTypeKeylessCertificate: return true } return false diff --git a/snippets/aliases.go b/snippets/aliases.go index 4c58c2290b..ac25e8ff34 100644 --- a/snippets/aliases.go +++ b/snippets/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/spectrum/aliases.go b/spectrum/aliases.go index 90a5aa5505..ccafed7393 100644 --- a/spectrum/aliases.go +++ b/spectrum/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/speed/aliases.go b/speed/aliases.go index 39069f73e3..d39afed4d6 100644 --- a/speed/aliases.go +++ b/speed/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/ssl/aliases.go b/ssl/aliases.go index 45185bb2b6..a1e68ac174 100644 --- a/ssl/aliases.go +++ b/ssl/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/storage/aliases.go b/storage/aliases.go index 92ca558a05..ef9516906c 100644 --- a/storage/aliases.go +++ b/storage/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/stream/aliases.go b/stream/aliases.go index dbec289f40..fa2e6d3cf0 100644 --- a/stream/aliases.go +++ b/stream/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/subscriptions/aliases.go b/subscriptions/aliases.go index 7c8e1de5d9..9e964cdcea 100644 --- a/subscriptions/aliases.go +++ b/subscriptions/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/url_normalization/aliases.go b/url_normalization/aliases.go index f210f80d36..14608ab31e 100644 --- a/url_normalization/aliases.go +++ b/url_normalization/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/url_scanner/aliases.go b/url_scanner/aliases.go index 3dddf4df56..9b968f7ba2 100644 --- a/url_scanner/aliases.go +++ b/url_scanner/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/user/aliases.go b/user/aliases.go index 282f6982c3..8066c303c2 100644 --- a/user/aliases.go +++ b/user/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/vectorize/aliases.go b/vectorize/aliases.go index aadc498c9f..0fa6bbe067 100644 --- a/vectorize/aliases.go +++ b/vectorize/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/waiting_rooms/aliases.go b/waiting_rooms/aliases.go index ce1a8e44cb..31f5a55a56 100644 --- a/waiting_rooms/aliases.go +++ b/waiting_rooms/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/warp_connector/aliases.go b/warp_connector/aliases.go index cfbd388aba..b34e0437c5 100644 --- a/warp_connector/aliases.go +++ b/warp_connector/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/web3/aliases.go b/web3/aliases.go index 83d7348bc3..dd7644404c 100644 --- a/web3/aliases.go +++ b/web3/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/workers/aliases.go b/workers/aliases.go index 064c686c28..b02d121132 100644 --- a/workers/aliases.go +++ b/workers/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/workers_for_platforms/aliases.go b/workers_for_platforms/aliases.go index 0fb3a33ce6..31311ccfb3 100644 --- a/workers_for_platforms/aliases.go +++ b/workers_for_platforms/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/zero_trust/aliases.go b/zero_trust/aliases.go index 8c8e07ca2c..9afb5ed494 100644 --- a/zero_trust/aliases.go +++ b/zero_trust/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // diff --git a/zones/aliases.go b/zones/aliases.go index 375421cee3..d3b2c71414 100644 --- a/zones/aliases.go +++ b/zones/aliases.go @@ -48,16 +48,16 @@ type AuditLogResource = shared.AuditLogResource // or "keyless-certificate" (for Keyless SSL servers). // // This is an alias to an internal type. -type CertificatePackRequestType = shared.CertificatePackRequestType +type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificatePackRequestTypeOriginRsa = shared.CertificatePackRequestTypeOriginRsa +const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa // This is an alias to an internal value. -const CertificatePackRequestTypeOriginEcc = shared.CertificatePackRequestTypeOriginEcc +const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc // This is an alias to an internal value. -const CertificatePackRequestTypeKeylessCertificate = shared.CertificatePackRequestTypeKeylessCertificate +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate // A Cloudflare Tunnel that connects your origin to Cloudflare's edge. // From 069c7fe233d9fddb80ae85d1135025b7ff38a41f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 04:38:23 +0000 Subject: [PATCH 117/127] feat(api): update via SDK Studio (#1966) --- accounts/aliases.go | 18 +- acm/aliases.go | 18 +- addressing/aliases.go | 18 +- ai_gateway/aliases.go | 18 +- alerting/aliases.go | 18 +- aliases.go | 18 +- api.md | 8 +- argo/aliases.go | 18 +- audit_logs/aliases.go | 18 +- billing/aliases.go | 18 +- bot_management/aliases.go | 18 +- brand_protection/aliases.go | 18 +- cache/aliases.go | 18 +- calls/aliases.go | 18 +- certificate_authorities/aliases.go | 18 +- challenges/aliases.go | 18 +- client_certificates/aliases.go | 18 +- cloudforce_one/aliases.go | 18 +- custom_certificates/aliases.go | 18 +- custom_hostnames/aliases.go | 18 +- custom_hostnames/customhostname.go | 13 +- custom_hostnames/customhostname_test.go | 6 +- custom_nameservers/aliases.go | 18 +- d1/aliases.go | 18 +- dcv_delegation/aliases.go | 18 +- diagnostics/aliases.go | 18 +- dns/aliases.go | 18 +- dnssec/aliases.go | 18 +- durable_objects/aliases.go | 18 +- email_routing/aliases.go | 18 +- event_notifications/aliases.go | 18 +- filters/aliases.go | 18 +- firewall/aliases.go | 18 +- healthchecks/aliases.go | 18 +- hostnames/aliases.go | 18 +- hyperdrive/aliases.go | 18 +- images/aliases.go | 18 +- intel/aliases.go | 18 +- ips/aliases.go | 18 +- keyless_certificates/aliases.go | 18 +- kv/aliases.go | 18 +- load_balancers/aliases.go | 18 +- load_balancers/loadbalancer.go | 528 ++++-------------- load_balancers/loadbalancer_test.go | 48 +- logpush/aliases.go | 18 +- logs/aliases.go | 18 +- magic_network_monitoring/aliases.go | 18 +- magic_transit/aliases.go | 18 +- managed_headers/aliases.go | 18 +- memberships/aliases.go | 18 +- mtls_certificates/aliases.go | 18 +- origin_ca_certificates/aliases.go | 18 +- .../origincacertificate_test.go | 2 +- origin_post_quantum_encryption/aliases.go | 18 +- origin_tls_client_auth/aliases.go | 18 +- page_shield/aliases.go | 18 +- pagerules/aliases.go | 18 +- pages/aliases.go | 18 +- pcaps/aliases.go | 18 +- plans/aliases.go | 18 +- queues/aliases.go | 18 +- r2/aliases.go | 18 +- radar/aliases.go | 18 +- rate_limits/aliases.go | 18 +- rate_plans/aliases.go | 18 +- registrar/aliases.go | 18 +- request_tracers/aliases.go | 18 +- rules/aliases.go | 18 +- rulesets/aliases.go | 18 +- rum/aliases.go | 18 +- secondary_dns/aliases.go | 18 +- shared/shared.go | 23 +- snippets/aliases.go | 18 +- spectrum/aliases.go | 18 +- speed/aliases.go | 18 +- ssl/aliases.go | 18 +- ssl/certificatepack.go | 17 - ssl/verification.go | 6 +- storage/aliases.go | 18 +- stream/aliases.go | 18 +- subscriptions/aliases.go | 18 +- url_normalization/aliases.go | 18 +- url_scanner/aliases.go | 18 +- user/aliases.go | 18 +- vectorize/aliases.go | 18 +- waiting_rooms/aliases.go | 18 +- warp_connector/aliases.go | 18 +- web3/aliases.go | 18 +- workers/aliases.go | 18 +- workers_for_platforms/aliases.go | 18 +- zero_trust/aliases.go | 18 +- zones/aliases.go | 18 +- 92 files changed, 1487 insertions(+), 658 deletions(-) diff --git a/accounts/aliases.go b/accounts/aliases.go index e0630f65ae..7f3e80badb 100644 --- a/accounts/aliases.go +++ b/accounts/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/acm/aliases.go b/acm/aliases.go index c36c79964d..4311264a10 100644 --- a/acm/aliases.go +++ b/acm/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/addressing/aliases.go b/addressing/aliases.go index 37eb52652e..2e8c26ece3 100644 --- a/addressing/aliases.go +++ b/addressing/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/ai_gateway/aliases.go b/ai_gateway/aliases.go index e06ca58e44..532fac2cb6 100644 --- a/ai_gateway/aliases.go +++ b/ai_gateway/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/alerting/aliases.go b/alerting/aliases.go index 9a20229c69..dea3ad5ce2 100644 --- a/alerting/aliases.go +++ b/alerting/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/aliases.go b/aliases.go index 489c05ebc9..8ea4581af8 100644 --- a/aliases.go +++ b/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/api.md b/api.md index cff785dd6f..2cc0c5ce4b 100644 --- a/api.md +++ b/api.md @@ -1,6 +1,7 @@ # Shared Params Types - shared.ASNParam +- shared.CertificateCA - shared.CertificateRequestType - shared.MemberParam - shared.PermissionGrantParam @@ -9,6 +10,7 @@ - shared.ASN - shared.AuditLog +- shared.CertificateCA - shared.CertificateRequestType - shared.CloudflareTunnel - shared.ErrorData @@ -945,7 +947,9 @@ Params Types: - load_balancers.OriginSteeringParam - load_balancers.RandomSteeringParam - load_balancers.RulesParam +- load_balancers.SessionAffinity - load_balancers.SessionAffinityAttributesParam +- load_balancers.SteeringPolicy Response Types: @@ -963,7 +967,9 @@ Response Types: - load_balancers.OriginSteering - load_balancers.RandomSteering - load_balancers.Rules +- load_balancers.SessionAffinity - load_balancers.SessionAffinityAttributes +- load_balancers.SteeringPolicy - load_balancers.LoadBalancerDeleteResponse Methods: @@ -1167,13 +1173,11 @@ Methods: Params Types: -- ssl.CertificateAuthority - ssl.HostParam - ssl.RequestValidity Response Types: -- ssl.CertificateAuthority - ssl.Host - ssl.RequestValidity - ssl.Status diff --git a/argo/aliases.go b/argo/aliases.go index 3ac831eeea..6209f47c24 100644 --- a/argo/aliases.go +++ b/argo/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/audit_logs/aliases.go b/audit_logs/aliases.go index 371253e1b2..957c68c3dc 100644 --- a/audit_logs/aliases.go +++ b/audit_logs/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/billing/aliases.go b/billing/aliases.go index 88af6f85af..3821bf55fa 100644 --- a/billing/aliases.go +++ b/billing/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/bot_management/aliases.go b/bot_management/aliases.go index b6e2f73628..3409c87fb6 100644 --- a/bot_management/aliases.go +++ b/bot_management/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/brand_protection/aliases.go b/brand_protection/aliases.go index c1059d9c35..5ae140bfcf 100644 --- a/brand_protection/aliases.go +++ b/brand_protection/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/cache/aliases.go b/cache/aliases.go index 9acedec7bb..78f320d929 100644 --- a/cache/aliases.go +++ b/cache/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/calls/aliases.go b/calls/aliases.go index e8cbbfebfe..67b5f822c2 100644 --- a/calls/aliases.go +++ b/calls/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/certificate_authorities/aliases.go b/certificate_authorities/aliases.go index db09fb817b..c3a0c28b27 100644 --- a/certificate_authorities/aliases.go +++ b/certificate_authorities/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/challenges/aliases.go b/challenges/aliases.go index ea84602e5e..cc401bcd77 100644 --- a/challenges/aliases.go +++ b/challenges/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/client_certificates/aliases.go b/client_certificates/aliases.go index 92c0c04b41..3a2219f249 100644 --- a/client_certificates/aliases.go +++ b/client_certificates/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/cloudforce_one/aliases.go b/cloudforce_one/aliases.go index 84245903e4..11fae41479 100644 --- a/cloudforce_one/aliases.go +++ b/cloudforce_one/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/custom_certificates/aliases.go b/custom_certificates/aliases.go index 42424dd887..d006093ba9 100644 --- a/custom_certificates/aliases.go +++ b/custom_certificates/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/custom_hostnames/aliases.go b/custom_hostnames/aliases.go index 790bd9ffb5..c66c380873 100644 --- a/custom_hostnames/aliases.go +++ b/custom_hostnames/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/custom_hostnames/customhostname.go b/custom_hostnames/customhostname.go index ec1d8d8f81..34bb210d72 100644 --- a/custom_hostnames/customhostname.go +++ b/custom_hostnames/customhostname.go @@ -16,7 +16,6 @@ import ( "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v2/option" "github.com/cloudflare/cloudflare-go/v2/shared" - "github.com/cloudflare/cloudflare-go/v2/ssl" ) // CustomHostnameService contains methods and other services that help with @@ -239,7 +238,7 @@ type CustomHostnameNewResponseSSL struct { // chain, but does not otherwise modify it. BundleMethod BundleMethod `json:"bundle_method"` // The Certificate Authority that will issue the certificate - CertificateAuthority ssl.CertificateAuthority `json:"certificate_authority"` + CertificateAuthority shared.CertificateCA `json:"certificate_authority"` // If a custom uploaded certificate is used. CustomCertificate string `json:"custom_certificate"` // The identifier for the Custom CSR that was used. @@ -701,7 +700,7 @@ type CustomHostnameListResponseSSL struct { // chain, but does not otherwise modify it. BundleMethod BundleMethod `json:"bundle_method"` // The Certificate Authority that will issue the certificate - CertificateAuthority ssl.CertificateAuthority `json:"certificate_authority"` + CertificateAuthority shared.CertificateCA `json:"certificate_authority"` // If a custom uploaded certificate is used. CustomCertificate string `json:"custom_certificate"` // The identifier for the Custom CSR that was used. @@ -1185,7 +1184,7 @@ type CustomHostnameEditResponseSSL struct { // chain, but does not otherwise modify it. BundleMethod BundleMethod `json:"bundle_method"` // The Certificate Authority that will issue the certificate - CertificateAuthority ssl.CertificateAuthority `json:"certificate_authority"` + CertificateAuthority shared.CertificateCA `json:"certificate_authority"` // If a custom uploaded certificate is used. CustomCertificate string `json:"custom_certificate"` // The identifier for the Custom CSR that was used. @@ -1647,7 +1646,7 @@ type CustomHostnameGetResponseSSL struct { // chain, but does not otherwise modify it. BundleMethod BundleMethod `json:"bundle_method"` // The Certificate Authority that will issue the certificate - CertificateAuthority ssl.CertificateAuthority `json:"certificate_authority"` + CertificateAuthority shared.CertificateCA `json:"certificate_authority"` // If a custom uploaded certificate is used. CustomCertificate string `json:"custom_certificate"` // The identifier for the Custom CSR that was used. @@ -2064,7 +2063,7 @@ type CustomHostnameNewParamsSSL struct { // chain, but does not otherwise modify it. BundleMethod param.Field[BundleMethod] `json:"bundle_method"` // The Certificate Authority that will issue the certificate - CertificateAuthority param.Field[ssl.CertificateAuthority] `json:"certificate_authority"` + CertificateAuthority param.Field[shared.CertificateCA] `json:"certificate_authority"` // If a custom uploaded certificate is used. CustomCertificate param.Field[string] `json:"custom_certificate"` // The key for a custom uploaded certificate. @@ -2346,7 +2345,7 @@ type CustomHostnameEditParamsSSL struct { // chain, but does not otherwise modify it. BundleMethod param.Field[BundleMethod] `json:"bundle_method"` // The Certificate Authority that will issue the certificate - CertificateAuthority param.Field[ssl.CertificateAuthority] `json:"certificate_authority"` + CertificateAuthority param.Field[shared.CertificateCA] `json:"certificate_authority"` // If a custom uploaded certificate is used. CustomCertificate param.Field[string] `json:"custom_certificate"` // The key for a custom uploaded certificate. diff --git a/custom_hostnames/customhostname_test.go b/custom_hostnames/customhostname_test.go index e76d1c95be..0b826e623c 100644 --- a/custom_hostnames/customhostname_test.go +++ b/custom_hostnames/customhostname_test.go @@ -12,7 +12,7 @@ import ( "github.com/cloudflare/cloudflare-go/v2/custom_hostnames" "github.com/cloudflare/cloudflare-go/v2/internal/testutil" "github.com/cloudflare/cloudflare-go/v2/option" - "github.com/cloudflare/cloudflare-go/v2/ssl" + "github.com/cloudflare/cloudflare-go/v2/shared" ) func TestCustomHostnameNewWithOptionalParams(t *testing.T) { @@ -33,7 +33,7 @@ func TestCustomHostnameNewWithOptionalParams(t *testing.T) { Hostname: cloudflare.F("app.example.com"), SSL: cloudflare.F(custom_hostnames.CustomHostnameNewParamsSSL{ BundleMethod: cloudflare.F(custom_hostnames.BundleMethodUbiquitous), - CertificateAuthority: cloudflare.F(ssl.CertificateAuthorityGoogle), + CertificateAuthority: cloudflare.F(shared.CertificateCAGoogle), CustomCertificate: cloudflare.F("-----BEGIN CERTIFICATE-----\\nMIIFJDCCBAygAwIBAgIQD0ifmj/Yi5NP/2gdUySbfzANBgkqhkiG9w0BAQsFADBN\\nMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMScwJQYDVQQDEx5E...SzSHfXp5lnu/3V08I72q1QNzOCgY1XeL4GKVcj4or6cT6tX6oJH7ePPmfrBfqI/O\\nOeH8gMJ+FuwtXYEPa4hBf38M5eU5xWG7\\n-----END CERTIFICATE-----\\n"), CustomKey: cloudflare.F("-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n"), Method: cloudflare.F(custom_hostnames.DCVMethodHTTP), @@ -146,7 +146,7 @@ func TestCustomHostnameEditWithOptionalParams(t *testing.T) { CustomOriginSNI: cloudflare.F("sni.example.com"), SSL: cloudflare.F(custom_hostnames.CustomHostnameEditParamsSSL{ BundleMethod: cloudflare.F(custom_hostnames.BundleMethodUbiquitous), - CertificateAuthority: cloudflare.F(ssl.CertificateAuthorityGoogle), + CertificateAuthority: cloudflare.F(shared.CertificateCAGoogle), CustomCertificate: cloudflare.F("-----BEGIN CERTIFICATE-----\\nMIIFJDCCBAygAwIBAgIQD0ifmj/Yi5NP/2gdUySbfzANBgkqhkiG9w0BAQsFADBN\\nMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMScwJQYDVQQDEx5E...SzSHfXp5lnu/3V08I72q1QNzOCgY1XeL4GKVcj4or6cT6tX6oJH7ePPmfrBfqI/O\\nOeH8gMJ+FuwtXYEPa4hBf38M5eU5xWG7\\n-----END CERTIFICATE-----\\n"), CustomKey: cloudflare.F("-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n"), Method: cloudflare.F(custom_hostnames.DCVMethodHTTP), diff --git a/custom_nameservers/aliases.go b/custom_nameservers/aliases.go index 8ceeb9ddba..6e5ebe5774 100644 --- a/custom_nameservers/aliases.go +++ b/custom_nameservers/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/d1/aliases.go b/d1/aliases.go index d9aee8da18..e7a05b3d35 100644 --- a/d1/aliases.go +++ b/d1/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/dcv_delegation/aliases.go b/dcv_delegation/aliases.go index 7e6ae296c3..6a35c890de 100644 --- a/dcv_delegation/aliases.go +++ b/dcv_delegation/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/diagnostics/aliases.go b/diagnostics/aliases.go index 60ad2711b1..d52618cace 100644 --- a/diagnostics/aliases.go +++ b/diagnostics/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/dns/aliases.go b/dns/aliases.go index e388b005ea..12d84b1ba1 100644 --- a/dns/aliases.go +++ b/dns/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/dnssec/aliases.go b/dnssec/aliases.go index 71cc2f4f57..f42ce38172 100644 --- a/dnssec/aliases.go +++ b/dnssec/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/durable_objects/aliases.go b/durable_objects/aliases.go index 1d11ccb5e3..016f5b3d7c 100644 --- a/durable_objects/aliases.go +++ b/durable_objects/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/email_routing/aliases.go b/email_routing/aliases.go index 05f9bd75dc..8c3853bb98 100644 --- a/email_routing/aliases.go +++ b/email_routing/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/event_notifications/aliases.go b/event_notifications/aliases.go index 43e0cd35b0..34a7d1a752 100644 --- a/event_notifications/aliases.go +++ b/event_notifications/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/filters/aliases.go b/filters/aliases.go index 6310e87181..811c09e9cc 100644 --- a/filters/aliases.go +++ b/filters/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/firewall/aliases.go b/firewall/aliases.go index 3564a555d6..14680d7772 100644 --- a/firewall/aliases.go +++ b/firewall/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/healthchecks/aliases.go b/healthchecks/aliases.go index 9c1c3c06db..ef5a781429 100644 --- a/healthchecks/aliases.go +++ b/healthchecks/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/hostnames/aliases.go b/hostnames/aliases.go index d8592a32bf..d085b9acd8 100644 --- a/hostnames/aliases.go +++ b/hostnames/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/hyperdrive/aliases.go b/hyperdrive/aliases.go index ce0c91b4d8..8cba2ae914 100644 --- a/hyperdrive/aliases.go +++ b/hyperdrive/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/images/aliases.go b/images/aliases.go index 716703519f..38f71907d8 100644 --- a/images/aliases.go +++ b/images/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/intel/aliases.go b/intel/aliases.go index 823f6e91d7..0011e18c5d 100644 --- a/intel/aliases.go +++ b/intel/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/ips/aliases.go b/ips/aliases.go index 9b4fd25d87..14be9f9db7 100644 --- a/ips/aliases.go +++ b/ips/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/keyless_certificates/aliases.go b/keyless_certificates/aliases.go index 92e30e8136..44c1fd223e 100644 --- a/keyless_certificates/aliases.go +++ b/keyless_certificates/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/kv/aliases.go b/kv/aliases.go index cbded865a1..7dfac36906 100644 --- a/kv/aliases.go +++ b/kv/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/load_balancers/aliases.go b/load_balancers/aliases.go index 90cb5f3637..233d856f7f 100644 --- a/load_balancers/aliases.go +++ b/load_balancers/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/load_balancers/loadbalancer.go b/load_balancers/loadbalancer.go index e8e72e1f4c..9a41ad3bba 100644 --- a/load_balancers/loadbalancer.go +++ b/load_balancers/loadbalancer.go @@ -379,7 +379,7 @@ type LoadBalancer struct { // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. - SessionAffinity LoadBalancerSessionAffinity `json:"session_affinity"` + SessionAffinity SessionAffinity `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 @@ -415,7 +415,7 @@ type LoadBalancer struct { // 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 LoadBalancerSteeringPolicy `json:"steering_policy"` + SteeringPolicy SteeringPolicy `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"` @@ -457,90 +457,6 @@ func (r loadBalancerJSON) 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 LoadBalancerSessionAffinity string - -const ( - LoadBalancerSessionAffinityNone LoadBalancerSessionAffinity = "none" - LoadBalancerSessionAffinityCookie LoadBalancerSessionAffinity = "cookie" - LoadBalancerSessionAffinityIPCookie LoadBalancerSessionAffinity = "ip_cookie" - LoadBalancerSessionAffinityHeader LoadBalancerSessionAffinity = "header" - LoadBalancerSessionAffinityEmpty LoadBalancerSessionAffinity = "\"\"" -) - -func (r LoadBalancerSessionAffinity) IsKnown() bool { - switch r { - case LoadBalancerSessionAffinityNone, LoadBalancerSessionAffinityCookie, LoadBalancerSessionAffinityIPCookie, LoadBalancerSessionAffinityHeader, LoadBalancerSessionAffinityEmpty: - 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 LoadBalancerSteeringPolicy string - -const ( - LoadBalancerSteeringPolicyOff LoadBalancerSteeringPolicy = "off" - LoadBalancerSteeringPolicyGeo LoadBalancerSteeringPolicy = "geo" - LoadBalancerSteeringPolicyRandom LoadBalancerSteeringPolicy = "random" - LoadBalancerSteeringPolicyDynamicLatency LoadBalancerSteeringPolicy = "dynamic_latency" - LoadBalancerSteeringPolicyProximity LoadBalancerSteeringPolicy = "proximity" - LoadBalancerSteeringPolicyLeastOutstandingRequests LoadBalancerSteeringPolicy = "least_outstanding_requests" - LoadBalancerSteeringPolicyLeastConnections LoadBalancerSteeringPolicy = "least_connections" - LoadBalancerSteeringPolicyEmpty LoadBalancerSteeringPolicy = "\"\"" -) - -func (r LoadBalancerSteeringPolicy) IsKnown() bool { - switch r { - case LoadBalancerSteeringPolicyOff, LoadBalancerSteeringPolicyGeo, LoadBalancerSteeringPolicyRandom, LoadBalancerSteeringPolicyDynamicLatency, LoadBalancerSteeringPolicyProximity, LoadBalancerSteeringPolicyLeastOutstandingRequests, LoadBalancerSteeringPolicyLeastConnections, LoadBalancerSteeringPolicyEmpty: - return true - } - return false -} - // Configures load shedding policies and percentages for the pool. type LoadShedding struct { // The percent of traffic to shed from the pool, according to the default policy. @@ -1166,7 +1082,7 @@ type RulesOverrides struct { // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. - SessionAffinity RulesOverridesSessionAffinity `json:"session_affinity"` + SessionAffinity SessionAffinity `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 @@ -1202,7 +1118,7 @@ type RulesOverrides struct { // 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 RulesOverridesSteeringPolicy `json:"steering_policy"` + SteeringPolicy SteeringPolicy `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"` @@ -1236,90 +1152,6 @@ func (r rulesOverridesJSON) 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 RulesOverridesSessionAffinity string - -const ( - RulesOverridesSessionAffinityNone RulesOverridesSessionAffinity = "none" - RulesOverridesSessionAffinityCookie RulesOverridesSessionAffinity = "cookie" - RulesOverridesSessionAffinityIPCookie RulesOverridesSessionAffinity = "ip_cookie" - RulesOverridesSessionAffinityHeader RulesOverridesSessionAffinity = "header" - RulesOverridesSessionAffinityEmpty RulesOverridesSessionAffinity = "\"\"" -) - -func (r RulesOverridesSessionAffinity) IsKnown() bool { - switch r { - case RulesOverridesSessionAffinityNone, RulesOverridesSessionAffinityCookie, RulesOverridesSessionAffinityIPCookie, RulesOverridesSessionAffinityHeader, RulesOverridesSessionAffinityEmpty: - 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 RulesOverridesSteeringPolicy string - -const ( - RulesOverridesSteeringPolicyOff RulesOverridesSteeringPolicy = "off" - RulesOverridesSteeringPolicyGeo RulesOverridesSteeringPolicy = "geo" - RulesOverridesSteeringPolicyRandom RulesOverridesSteeringPolicy = "random" - RulesOverridesSteeringPolicyDynamicLatency RulesOverridesSteeringPolicy = "dynamic_latency" - RulesOverridesSteeringPolicyProximity RulesOverridesSteeringPolicy = "proximity" - RulesOverridesSteeringPolicyLeastOutstandingRequests RulesOverridesSteeringPolicy = "least_outstanding_requests" - RulesOverridesSteeringPolicyLeastConnections RulesOverridesSteeringPolicy = "least_connections" - RulesOverridesSteeringPolicyEmpty RulesOverridesSteeringPolicy = "\"\"" -) - -func (r RulesOverridesSteeringPolicy) IsKnown() bool { - switch r { - case RulesOverridesSteeringPolicyOff, RulesOverridesSteeringPolicyGeo, RulesOverridesSteeringPolicyRandom, RulesOverridesSteeringPolicyDynamicLatency, RulesOverridesSteeringPolicyProximity, RulesOverridesSteeringPolicyLeastOutstandingRequests, RulesOverridesSteeringPolicyLeastConnections, RulesOverridesSteeringPolicyEmpty: - return true - } - return false -} - // A rule object containing conditions and overrides for this load balancer to // evaluate. type RulesParam struct { @@ -1436,7 +1268,7 @@ type RulesOverridesParam struct { // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. - SessionAffinity param.Field[RulesOverridesSessionAffinity] `json:"session_affinity"` + SessionAffinity param.Field[SessionAffinity] `json:"session_affinity"` // Configures attributes for session affinity. SessionAffinityAttributes param.Field[SessionAffinityAttributesParam] `json:"session_affinity_attributes"` // Time, in seconds, until a client's session expires after being created. Once the @@ -1472,7 +1304,7 @@ type RulesOverridesParam struct { // 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 param.Field[RulesOverridesSteeringPolicy] `json:"steering_policy"` + SteeringPolicy param.Field[SteeringPolicy] `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 param.Field[float64] `json:"ttl"` @@ -1482,6 +1314,47 @@ func (r RulesOverridesParam) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } +// 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 SessionAffinity string + +const ( + SessionAffinityNone SessionAffinity = "none" + SessionAffinityCookie SessionAffinity = "cookie" + SessionAffinityIPCookie SessionAffinity = "ip_cookie" + SessionAffinityHeader SessionAffinity = "header" + SessionAffinityEmpty SessionAffinity = "\"\"" +) + +func (r SessionAffinity) IsKnown() bool { + switch r { + case SessionAffinityNone, SessionAffinityCookie, SessionAffinityIPCookie, SessionAffinityHeader, SessionAffinityEmpty: + return true + } + return false +} + // Configures attributes for session affinity. type SessionAffinityAttributes struct { // Configures the drain duration in seconds. This field is only used when session @@ -1671,6 +1544,49 @@ func (r SessionAffinityAttributesParam) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } +// 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 SteeringPolicy string + +const ( + SteeringPolicyOff SteeringPolicy = "off" + SteeringPolicyGeo SteeringPolicy = "geo" + SteeringPolicyRandom SteeringPolicy = "random" + SteeringPolicyDynamicLatency SteeringPolicy = "dynamic_latency" + SteeringPolicyProximity SteeringPolicy = "proximity" + SteeringPolicyLeastOutstandingRequests SteeringPolicy = "least_outstanding_requests" + SteeringPolicyLeastConnections SteeringPolicy = "least_connections" + SteeringPolicyEmpty SteeringPolicy = "\"\"" +) + +func (r SteeringPolicy) IsKnown() bool { + switch r { + case SteeringPolicyOff, SteeringPolicyGeo, SteeringPolicyRandom, SteeringPolicyDynamicLatency, SteeringPolicyProximity, SteeringPolicyLeastOutstandingRequests, SteeringPolicyLeastConnections, SteeringPolicyEmpty: + return true + } + return false +} + type LoadBalancerDeleteResponse struct { ID string `json:"id"` JSON loadBalancerDeleteResponseJSON `json:"-"` @@ -1766,7 +1682,7 @@ type LoadBalancerNewParams struct { // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. - SessionAffinity param.Field[LoadBalancerNewParamsSessionAffinity] `json:"session_affinity"` + SessionAffinity param.Field[SessionAffinity] `json:"session_affinity"` // Configures attributes for session affinity. SessionAffinityAttributes param.Field[SessionAffinityAttributesParam] `json:"session_affinity_attributes"` // Time, in seconds, until a client's session expires after being created. Once the @@ -1802,7 +1718,7 @@ type LoadBalancerNewParams struct { // 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 param.Field[LoadBalancerNewParamsSteeringPolicy] `json:"steering_policy"` + SteeringPolicy param.Field[SteeringPolicy] `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 param.Field[float64] `json:"ttl"` @@ -1812,90 +1728,6 @@ func (r LoadBalancerNewParams) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -// 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 LoadBalancerNewParamsSessionAffinity string - -const ( - LoadBalancerNewParamsSessionAffinityNone LoadBalancerNewParamsSessionAffinity = "none" - LoadBalancerNewParamsSessionAffinityCookie LoadBalancerNewParamsSessionAffinity = "cookie" - LoadBalancerNewParamsSessionAffinityIPCookie LoadBalancerNewParamsSessionAffinity = "ip_cookie" - LoadBalancerNewParamsSessionAffinityHeader LoadBalancerNewParamsSessionAffinity = "header" - LoadBalancerNewParamsSessionAffinityEmpty LoadBalancerNewParamsSessionAffinity = "\"\"" -) - -func (r LoadBalancerNewParamsSessionAffinity) IsKnown() bool { - switch r { - case LoadBalancerNewParamsSessionAffinityNone, LoadBalancerNewParamsSessionAffinityCookie, LoadBalancerNewParamsSessionAffinityIPCookie, LoadBalancerNewParamsSessionAffinityHeader, LoadBalancerNewParamsSessionAffinityEmpty: - 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 LoadBalancerNewParamsSteeringPolicy string - -const ( - LoadBalancerNewParamsSteeringPolicyOff LoadBalancerNewParamsSteeringPolicy = "off" - LoadBalancerNewParamsSteeringPolicyGeo LoadBalancerNewParamsSteeringPolicy = "geo" - LoadBalancerNewParamsSteeringPolicyRandom LoadBalancerNewParamsSteeringPolicy = "random" - LoadBalancerNewParamsSteeringPolicyDynamicLatency LoadBalancerNewParamsSteeringPolicy = "dynamic_latency" - LoadBalancerNewParamsSteeringPolicyProximity LoadBalancerNewParamsSteeringPolicy = "proximity" - LoadBalancerNewParamsSteeringPolicyLeastOutstandingRequests LoadBalancerNewParamsSteeringPolicy = "least_outstanding_requests" - LoadBalancerNewParamsSteeringPolicyLeastConnections LoadBalancerNewParamsSteeringPolicy = "least_connections" - LoadBalancerNewParamsSteeringPolicyEmpty LoadBalancerNewParamsSteeringPolicy = "\"\"" -) - -func (r LoadBalancerNewParamsSteeringPolicy) IsKnown() bool { - switch r { - case LoadBalancerNewParamsSteeringPolicyOff, LoadBalancerNewParamsSteeringPolicyGeo, LoadBalancerNewParamsSteeringPolicyRandom, LoadBalancerNewParamsSteeringPolicyDynamicLatency, LoadBalancerNewParamsSteeringPolicyProximity, LoadBalancerNewParamsSteeringPolicyLeastOutstandingRequests, LoadBalancerNewParamsSteeringPolicyLeastConnections, LoadBalancerNewParamsSteeringPolicyEmpty: - return true - } - return false -} - type LoadBalancerNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` @@ -2015,7 +1847,7 @@ type LoadBalancerUpdateParams struct { // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. - SessionAffinity param.Field[LoadBalancerUpdateParamsSessionAffinity] `json:"session_affinity"` + SessionAffinity param.Field[SessionAffinity] `json:"session_affinity"` // Configures attributes for session affinity. SessionAffinityAttributes param.Field[SessionAffinityAttributesParam] `json:"session_affinity_attributes"` // Time, in seconds, until a client's session expires after being created. Once the @@ -2051,7 +1883,7 @@ type LoadBalancerUpdateParams struct { // 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 param.Field[LoadBalancerUpdateParamsSteeringPolicy] `json:"steering_policy"` + SteeringPolicy param.Field[SteeringPolicy] `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 param.Field[float64] `json:"ttl"` @@ -2061,90 +1893,6 @@ func (r LoadBalancerUpdateParams) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -// 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 LoadBalancerUpdateParamsSessionAffinity string - -const ( - LoadBalancerUpdateParamsSessionAffinityNone LoadBalancerUpdateParamsSessionAffinity = "none" - LoadBalancerUpdateParamsSessionAffinityCookie LoadBalancerUpdateParamsSessionAffinity = "cookie" - LoadBalancerUpdateParamsSessionAffinityIPCookie LoadBalancerUpdateParamsSessionAffinity = "ip_cookie" - LoadBalancerUpdateParamsSessionAffinityHeader LoadBalancerUpdateParamsSessionAffinity = "header" - LoadBalancerUpdateParamsSessionAffinityEmpty LoadBalancerUpdateParamsSessionAffinity = "\"\"" -) - -func (r LoadBalancerUpdateParamsSessionAffinity) IsKnown() bool { - switch r { - case LoadBalancerUpdateParamsSessionAffinityNone, LoadBalancerUpdateParamsSessionAffinityCookie, LoadBalancerUpdateParamsSessionAffinityIPCookie, LoadBalancerUpdateParamsSessionAffinityHeader, LoadBalancerUpdateParamsSessionAffinityEmpty: - 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 LoadBalancerUpdateParamsSteeringPolicy string - -const ( - LoadBalancerUpdateParamsSteeringPolicyOff LoadBalancerUpdateParamsSteeringPolicy = "off" - LoadBalancerUpdateParamsSteeringPolicyGeo LoadBalancerUpdateParamsSteeringPolicy = "geo" - LoadBalancerUpdateParamsSteeringPolicyRandom LoadBalancerUpdateParamsSteeringPolicy = "random" - LoadBalancerUpdateParamsSteeringPolicyDynamicLatency LoadBalancerUpdateParamsSteeringPolicy = "dynamic_latency" - LoadBalancerUpdateParamsSteeringPolicyProximity LoadBalancerUpdateParamsSteeringPolicy = "proximity" - LoadBalancerUpdateParamsSteeringPolicyLeastOutstandingRequests LoadBalancerUpdateParamsSteeringPolicy = "least_outstanding_requests" - LoadBalancerUpdateParamsSteeringPolicyLeastConnections LoadBalancerUpdateParamsSteeringPolicy = "least_connections" - LoadBalancerUpdateParamsSteeringPolicyEmpty LoadBalancerUpdateParamsSteeringPolicy = "\"\"" -) - -func (r LoadBalancerUpdateParamsSteeringPolicy) IsKnown() bool { - switch r { - case LoadBalancerUpdateParamsSteeringPolicyOff, LoadBalancerUpdateParamsSteeringPolicyGeo, LoadBalancerUpdateParamsSteeringPolicyRandom, LoadBalancerUpdateParamsSteeringPolicyDynamicLatency, LoadBalancerUpdateParamsSteeringPolicyProximity, LoadBalancerUpdateParamsSteeringPolicyLeastOutstandingRequests, LoadBalancerUpdateParamsSteeringPolicyLeastConnections, LoadBalancerUpdateParamsSteeringPolicyEmpty: - return true - } - return false -} - type LoadBalancerUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` @@ -2315,7 +2063,7 @@ type LoadBalancerEditParams struct { // server is unhealthy, then a new origin server is calculated and used. See // `headers` in `session_affinity_attributes` for additional required // configuration. - SessionAffinity param.Field[LoadBalancerEditParamsSessionAffinity] `json:"session_affinity"` + SessionAffinity param.Field[SessionAffinity] `json:"session_affinity"` // Configures attributes for session affinity. SessionAffinityAttributes param.Field[SessionAffinityAttributesParam] `json:"session_affinity_attributes"` // Time, in seconds, until a client's session expires after being created. Once the @@ -2351,7 +2099,7 @@ type LoadBalancerEditParams struct { // 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 param.Field[LoadBalancerEditParamsSteeringPolicy] `json:"steering_policy"` + SteeringPolicy param.Field[SteeringPolicy] `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 param.Field[float64] `json:"ttl"` @@ -2361,90 +2109,6 @@ func (r LoadBalancerEditParams) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -// 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 LoadBalancerEditParamsSessionAffinity string - -const ( - LoadBalancerEditParamsSessionAffinityNone LoadBalancerEditParamsSessionAffinity = "none" - LoadBalancerEditParamsSessionAffinityCookie LoadBalancerEditParamsSessionAffinity = "cookie" - LoadBalancerEditParamsSessionAffinityIPCookie LoadBalancerEditParamsSessionAffinity = "ip_cookie" - LoadBalancerEditParamsSessionAffinityHeader LoadBalancerEditParamsSessionAffinity = "header" - LoadBalancerEditParamsSessionAffinityEmpty LoadBalancerEditParamsSessionAffinity = "\"\"" -) - -func (r LoadBalancerEditParamsSessionAffinity) IsKnown() bool { - switch r { - case LoadBalancerEditParamsSessionAffinityNone, LoadBalancerEditParamsSessionAffinityCookie, LoadBalancerEditParamsSessionAffinityIPCookie, LoadBalancerEditParamsSessionAffinityHeader, LoadBalancerEditParamsSessionAffinityEmpty: - 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 LoadBalancerEditParamsSteeringPolicy string - -const ( - LoadBalancerEditParamsSteeringPolicyOff LoadBalancerEditParamsSteeringPolicy = "off" - LoadBalancerEditParamsSteeringPolicyGeo LoadBalancerEditParamsSteeringPolicy = "geo" - LoadBalancerEditParamsSteeringPolicyRandom LoadBalancerEditParamsSteeringPolicy = "random" - LoadBalancerEditParamsSteeringPolicyDynamicLatency LoadBalancerEditParamsSteeringPolicy = "dynamic_latency" - LoadBalancerEditParamsSteeringPolicyProximity LoadBalancerEditParamsSteeringPolicy = "proximity" - LoadBalancerEditParamsSteeringPolicyLeastOutstandingRequests LoadBalancerEditParamsSteeringPolicy = "least_outstanding_requests" - LoadBalancerEditParamsSteeringPolicyLeastConnections LoadBalancerEditParamsSteeringPolicy = "least_connections" - LoadBalancerEditParamsSteeringPolicyEmpty LoadBalancerEditParamsSteeringPolicy = "\"\"" -) - -func (r LoadBalancerEditParamsSteeringPolicy) IsKnown() bool { - switch r { - case LoadBalancerEditParamsSteeringPolicyOff, LoadBalancerEditParamsSteeringPolicyGeo, LoadBalancerEditParamsSteeringPolicyRandom, LoadBalancerEditParamsSteeringPolicyDynamicLatency, LoadBalancerEditParamsSteeringPolicyProximity, LoadBalancerEditParamsSteeringPolicyLeastOutstandingRequests, LoadBalancerEditParamsSteeringPolicyLeastConnections, LoadBalancerEditParamsSteeringPolicyEmpty: - return true - } - return false -} - type LoadBalancerEditResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` diff --git a/load_balancers/loadbalancer_test.go b/load_balancers/loadbalancer_test.go index 425a1e731e..279d27f923 100644 --- a/load_balancers/loadbalancer_test.go +++ b/load_balancers/loadbalancer_test.go @@ -137,7 +137,7 @@ func TestLoadBalancerNewWithOptionalParams(t *testing.T) { "1": "9290f38c5d07c2e2f4df57b1f61d4196", }, }), - SessionAffinity: cloudflare.F(load_balancers.RulesOverridesSessionAffinityCookie), + SessionAffinity: cloudflare.F(load_balancers.SessionAffinityCookie), SessionAffinityAttributes: cloudflare.F(load_balancers.SessionAffinityAttributesParam{ DrainDuration: cloudflare.F(100.000000), Headers: cloudflare.F([]string{"x"}), @@ -147,7 +147,7 @@ func TestLoadBalancerNewWithOptionalParams(t *testing.T) { ZeroDowntimeFailover: cloudflare.F(load_balancers.SessionAffinityAttributesZeroDowntimeFailoverSticky), }), SessionAffinityTTL: cloudflare.F(1800.000000), - SteeringPolicy: cloudflare.F(load_balancers.RulesOverridesSteeringPolicyDynamicLatency), + SteeringPolicy: cloudflare.F(load_balancers.SteeringPolicyDynamicLatency), TTL: cloudflare.F(30.000000), }), Priority: cloudflare.F(int64(0)), @@ -210,7 +210,7 @@ func TestLoadBalancerNewWithOptionalParams(t *testing.T) { "1": "9290f38c5d07c2e2f4df57b1f61d4196", }, }), - SessionAffinity: cloudflare.F(load_balancers.RulesOverridesSessionAffinityCookie), + SessionAffinity: cloudflare.F(load_balancers.SessionAffinityCookie), SessionAffinityAttributes: cloudflare.F(load_balancers.SessionAffinityAttributesParam{ DrainDuration: cloudflare.F(100.000000), Headers: cloudflare.F([]string{"x"}), @@ -220,7 +220,7 @@ func TestLoadBalancerNewWithOptionalParams(t *testing.T) { ZeroDowntimeFailover: cloudflare.F(load_balancers.SessionAffinityAttributesZeroDowntimeFailoverSticky), }), SessionAffinityTTL: cloudflare.F(1800.000000), - SteeringPolicy: cloudflare.F(load_balancers.RulesOverridesSteeringPolicyDynamicLatency), + SteeringPolicy: cloudflare.F(load_balancers.SteeringPolicyDynamicLatency), TTL: cloudflare.F(30.000000), }), Priority: cloudflare.F(int64(0)), @@ -283,7 +283,7 @@ func TestLoadBalancerNewWithOptionalParams(t *testing.T) { "1": "9290f38c5d07c2e2f4df57b1f61d4196", }, }), - SessionAffinity: cloudflare.F(load_balancers.RulesOverridesSessionAffinityCookie), + SessionAffinity: cloudflare.F(load_balancers.SessionAffinityCookie), SessionAffinityAttributes: cloudflare.F(load_balancers.SessionAffinityAttributesParam{ DrainDuration: cloudflare.F(100.000000), Headers: cloudflare.F([]string{"x"}), @@ -293,13 +293,13 @@ func TestLoadBalancerNewWithOptionalParams(t *testing.T) { ZeroDowntimeFailover: cloudflare.F(load_balancers.SessionAffinityAttributesZeroDowntimeFailoverSticky), }), SessionAffinityTTL: cloudflare.F(1800.000000), - SteeringPolicy: cloudflare.F(load_balancers.RulesOverridesSteeringPolicyDynamicLatency), + SteeringPolicy: cloudflare.F(load_balancers.SteeringPolicyDynamicLatency), TTL: cloudflare.F(30.000000), }), Priority: cloudflare.F(int64(0)), Terminates: cloudflare.F(true), }}), - SessionAffinity: cloudflare.F(load_balancers.LoadBalancerNewParamsSessionAffinityCookie), + SessionAffinity: cloudflare.F(load_balancers.SessionAffinityCookie), SessionAffinityAttributes: cloudflare.F(load_balancers.SessionAffinityAttributesParam{ DrainDuration: cloudflare.F(100.000000), Headers: cloudflare.F([]string{"x"}), @@ -309,7 +309,7 @@ func TestLoadBalancerNewWithOptionalParams(t *testing.T) { ZeroDowntimeFailover: cloudflare.F(load_balancers.SessionAffinityAttributesZeroDowntimeFailoverSticky), }), SessionAffinityTTL: cloudflare.F(1800.000000), - SteeringPolicy: cloudflare.F(load_balancers.LoadBalancerNewParamsSteeringPolicyDynamicLatency), + SteeringPolicy: cloudflare.F(load_balancers.SteeringPolicyDynamicLatency), TTL: cloudflare.F(30.000000), }) if err != nil { @@ -448,7 +448,7 @@ func TestLoadBalancerUpdateWithOptionalParams(t *testing.T) { "1": "9290f38c5d07c2e2f4df57b1f61d4196", }, }), - SessionAffinity: cloudflare.F(load_balancers.RulesOverridesSessionAffinityCookie), + SessionAffinity: cloudflare.F(load_balancers.SessionAffinityCookie), SessionAffinityAttributes: cloudflare.F(load_balancers.SessionAffinityAttributesParam{ DrainDuration: cloudflare.F(100.000000), Headers: cloudflare.F([]string{"x"}), @@ -458,7 +458,7 @@ func TestLoadBalancerUpdateWithOptionalParams(t *testing.T) { ZeroDowntimeFailover: cloudflare.F(load_balancers.SessionAffinityAttributesZeroDowntimeFailoverSticky), }), SessionAffinityTTL: cloudflare.F(1800.000000), - SteeringPolicy: cloudflare.F(load_balancers.RulesOverridesSteeringPolicyDynamicLatency), + SteeringPolicy: cloudflare.F(load_balancers.SteeringPolicyDynamicLatency), TTL: cloudflare.F(30.000000), }), Priority: cloudflare.F(int64(0)), @@ -521,7 +521,7 @@ func TestLoadBalancerUpdateWithOptionalParams(t *testing.T) { "1": "9290f38c5d07c2e2f4df57b1f61d4196", }, }), - SessionAffinity: cloudflare.F(load_balancers.RulesOverridesSessionAffinityCookie), + SessionAffinity: cloudflare.F(load_balancers.SessionAffinityCookie), SessionAffinityAttributes: cloudflare.F(load_balancers.SessionAffinityAttributesParam{ DrainDuration: cloudflare.F(100.000000), Headers: cloudflare.F([]string{"x"}), @@ -531,7 +531,7 @@ func TestLoadBalancerUpdateWithOptionalParams(t *testing.T) { ZeroDowntimeFailover: cloudflare.F(load_balancers.SessionAffinityAttributesZeroDowntimeFailoverSticky), }), SessionAffinityTTL: cloudflare.F(1800.000000), - SteeringPolicy: cloudflare.F(load_balancers.RulesOverridesSteeringPolicyDynamicLatency), + SteeringPolicy: cloudflare.F(load_balancers.SteeringPolicyDynamicLatency), TTL: cloudflare.F(30.000000), }), Priority: cloudflare.F(int64(0)), @@ -594,7 +594,7 @@ func TestLoadBalancerUpdateWithOptionalParams(t *testing.T) { "1": "9290f38c5d07c2e2f4df57b1f61d4196", }, }), - SessionAffinity: cloudflare.F(load_balancers.RulesOverridesSessionAffinityCookie), + SessionAffinity: cloudflare.F(load_balancers.SessionAffinityCookie), SessionAffinityAttributes: cloudflare.F(load_balancers.SessionAffinityAttributesParam{ DrainDuration: cloudflare.F(100.000000), Headers: cloudflare.F([]string{"x"}), @@ -604,13 +604,13 @@ func TestLoadBalancerUpdateWithOptionalParams(t *testing.T) { ZeroDowntimeFailover: cloudflare.F(load_balancers.SessionAffinityAttributesZeroDowntimeFailoverSticky), }), SessionAffinityTTL: cloudflare.F(1800.000000), - SteeringPolicy: cloudflare.F(load_balancers.RulesOverridesSteeringPolicyDynamicLatency), + SteeringPolicy: cloudflare.F(load_balancers.SteeringPolicyDynamicLatency), TTL: cloudflare.F(30.000000), }), Priority: cloudflare.F(int64(0)), Terminates: cloudflare.F(true), }}), - SessionAffinity: cloudflare.F(load_balancers.LoadBalancerUpdateParamsSessionAffinityCookie), + SessionAffinity: cloudflare.F(load_balancers.SessionAffinityCookie), SessionAffinityAttributes: cloudflare.F(load_balancers.SessionAffinityAttributesParam{ DrainDuration: cloudflare.F(100.000000), Headers: cloudflare.F([]string{"x"}), @@ -620,7 +620,7 @@ func TestLoadBalancerUpdateWithOptionalParams(t *testing.T) { ZeroDowntimeFailover: cloudflare.F(load_balancers.SessionAffinityAttributesZeroDowntimeFailoverSticky), }), SessionAffinityTTL: cloudflare.F(1800.000000), - SteeringPolicy: cloudflare.F(load_balancers.LoadBalancerUpdateParamsSteeringPolicyDynamicLatency), + SteeringPolicy: cloudflare.F(load_balancers.SteeringPolicyDynamicLatency), TTL: cloudflare.F(30.000000), }, ) @@ -814,7 +814,7 @@ func TestLoadBalancerEditWithOptionalParams(t *testing.T) { "1": "9290f38c5d07c2e2f4df57b1f61d4196", }, }), - SessionAffinity: cloudflare.F(load_balancers.RulesOverridesSessionAffinityCookie), + SessionAffinity: cloudflare.F(load_balancers.SessionAffinityCookie), SessionAffinityAttributes: cloudflare.F(load_balancers.SessionAffinityAttributesParam{ DrainDuration: cloudflare.F(100.000000), Headers: cloudflare.F([]string{"x"}), @@ -824,7 +824,7 @@ func TestLoadBalancerEditWithOptionalParams(t *testing.T) { ZeroDowntimeFailover: cloudflare.F(load_balancers.SessionAffinityAttributesZeroDowntimeFailoverSticky), }), SessionAffinityTTL: cloudflare.F(1800.000000), - SteeringPolicy: cloudflare.F(load_balancers.RulesOverridesSteeringPolicyDynamicLatency), + SteeringPolicy: cloudflare.F(load_balancers.SteeringPolicyDynamicLatency), TTL: cloudflare.F(30.000000), }), Priority: cloudflare.F(int64(0)), @@ -887,7 +887,7 @@ func TestLoadBalancerEditWithOptionalParams(t *testing.T) { "1": "9290f38c5d07c2e2f4df57b1f61d4196", }, }), - SessionAffinity: cloudflare.F(load_balancers.RulesOverridesSessionAffinityCookie), + SessionAffinity: cloudflare.F(load_balancers.SessionAffinityCookie), SessionAffinityAttributes: cloudflare.F(load_balancers.SessionAffinityAttributesParam{ DrainDuration: cloudflare.F(100.000000), Headers: cloudflare.F([]string{"x"}), @@ -897,7 +897,7 @@ func TestLoadBalancerEditWithOptionalParams(t *testing.T) { ZeroDowntimeFailover: cloudflare.F(load_balancers.SessionAffinityAttributesZeroDowntimeFailoverSticky), }), SessionAffinityTTL: cloudflare.F(1800.000000), - SteeringPolicy: cloudflare.F(load_balancers.RulesOverridesSteeringPolicyDynamicLatency), + SteeringPolicy: cloudflare.F(load_balancers.SteeringPolicyDynamicLatency), TTL: cloudflare.F(30.000000), }), Priority: cloudflare.F(int64(0)), @@ -960,7 +960,7 @@ func TestLoadBalancerEditWithOptionalParams(t *testing.T) { "1": "9290f38c5d07c2e2f4df57b1f61d4196", }, }), - SessionAffinity: cloudflare.F(load_balancers.RulesOverridesSessionAffinityCookie), + SessionAffinity: cloudflare.F(load_balancers.SessionAffinityCookie), SessionAffinityAttributes: cloudflare.F(load_balancers.SessionAffinityAttributesParam{ DrainDuration: cloudflare.F(100.000000), Headers: cloudflare.F([]string{"x"}), @@ -970,13 +970,13 @@ func TestLoadBalancerEditWithOptionalParams(t *testing.T) { ZeroDowntimeFailover: cloudflare.F(load_balancers.SessionAffinityAttributesZeroDowntimeFailoverSticky), }), SessionAffinityTTL: cloudflare.F(1800.000000), - SteeringPolicy: cloudflare.F(load_balancers.RulesOverridesSteeringPolicyDynamicLatency), + SteeringPolicy: cloudflare.F(load_balancers.SteeringPolicyDynamicLatency), TTL: cloudflare.F(30.000000), }), Priority: cloudflare.F(int64(0)), Terminates: cloudflare.F(true), }}), - SessionAffinity: cloudflare.F(load_balancers.LoadBalancerEditParamsSessionAffinityCookie), + SessionAffinity: cloudflare.F(load_balancers.SessionAffinityCookie), SessionAffinityAttributes: cloudflare.F(load_balancers.SessionAffinityAttributesParam{ DrainDuration: cloudflare.F(100.000000), Headers: cloudflare.F([]string{"x"}), @@ -986,7 +986,7 @@ func TestLoadBalancerEditWithOptionalParams(t *testing.T) { ZeroDowntimeFailover: cloudflare.F(load_balancers.SessionAffinityAttributesZeroDowntimeFailoverSticky), }), SessionAffinityTTL: cloudflare.F(1800.000000), - SteeringPolicy: cloudflare.F(load_balancers.LoadBalancerEditParamsSteeringPolicyDynamicLatency), + SteeringPolicy: cloudflare.F(load_balancers.SteeringPolicyDynamicLatency), TTL: cloudflare.F(30.000000), }, ) diff --git a/logpush/aliases.go b/logpush/aliases.go index 8e24c46fcf..a2e7812f3b 100644 --- a/logpush/aliases.go +++ b/logpush/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/logs/aliases.go b/logs/aliases.go index 07b766a509..fa4a0f0e54 100644 --- a/logs/aliases.go +++ b/logs/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/magic_network_monitoring/aliases.go b/magic_network_monitoring/aliases.go index bed2d6a18c..f7609bcb25 100644 --- a/magic_network_monitoring/aliases.go +++ b/magic_network_monitoring/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/magic_transit/aliases.go b/magic_transit/aliases.go index db9ec8189a..e49834fe63 100644 --- a/magic_transit/aliases.go +++ b/magic_transit/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/managed_headers/aliases.go b/managed_headers/aliases.go index 9f6d69c886..7ba59ad35a 100644 --- a/managed_headers/aliases.go +++ b/managed_headers/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/memberships/aliases.go b/memberships/aliases.go index 08353f2e61..31b6e73490 100644 --- a/memberships/aliases.go +++ b/memberships/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/mtls_certificates/aliases.go b/mtls_certificates/aliases.go index 7c0f26dcde..0825314aaf 100644 --- a/mtls_certificates/aliases.go +++ b/mtls_certificates/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/origin_ca_certificates/aliases.go b/origin_ca_certificates/aliases.go index 930482825f..b9b1a32def 100644 --- a/origin_ca_certificates/aliases.go +++ b/origin_ca_certificates/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/origin_ca_certificates/origincacertificate_test.go b/origin_ca_certificates/origincacertificate_test.go index 9afb5f6715..0a6253ab5a 100644 --- a/origin_ca_certificates/origincacertificate_test.go +++ b/origin_ca_certificates/origincacertificate_test.go @@ -32,7 +32,7 @@ func TestOriginCACertificateNewWithOptionalParams(t *testing.T) { _, err := client.OriginCACertificates.New(context.TODO(), origin_ca_certificates.OriginCACertificateNewParams{ Csr: cloudflare.F("-----BEGIN CERTIFICATE REQUEST-----\nMIICxzCCAa8CAQAwSDELMAkGA1UEBhMCVVMxFjAUBgNVBAgTDVNhbiBGcmFuY2lz\nY28xCzAJBgNVBAcTAkNBMRQwEgYDVQQDEwtleGFtcGxlLm5ldDCCASIwDQYJKoZI\nhvcNAQEBBQADggEPADCCAQoCggEBALxejtu4b+jPdFeFi6OUsye8TYJQBm3WfCvL\nHu5EvijMO/4Z2TImwASbwUF7Ir8OLgH+mGlQZeqyNvGoSOMEaZVXcYfpR1hlVak8\n4GGVr+04IGfOCqaBokaBFIwzclGZbzKmLGwIQioNxGfqFm6RGYGA3be2Je2iseBc\nN8GV1wYmvYE0RR+yWweJCTJ157exyRzu7sVxaEW9F87zBQLyOnwXc64rflXslRqi\ng7F7w5IaQYOl8yvmk/jEPCAha7fkiUfEpj4N12+oPRiMvleJF98chxjD4MH39c5I\nuOslULhrWunfh7GB1jwWNA9y44H0snrf+xvoy2TcHmxvma9Eln8CAwEAAaA6MDgG\nCSqGSIb3DQEJDjErMCkwJwYDVR0RBCAwHoILZXhhbXBsZS5uZXSCD3d3dy5leGFt\ncGxlLm5ldDANBgkqhkiG9w0BAQsFAAOCAQEAcBaX6dOnI8ncARrI9ZSF2AJX+8mx\npTHY2+Y2C0VvrVDGMtbBRH8R9yMbqWtlxeeNGf//LeMkSKSFa4kbpdx226lfui8/\nauRDBTJGx2R1ccUxmLZXx4my0W5iIMxunu+kez+BDlu7bTT2io0uXMRHue4i6quH\nyc5ibxvbJMjR7dqbcanVE10/34oprzXQsJ/VmSuZNXtjbtSKDlmcpw6To/eeAJ+J\nhXykcUihvHyG4A1m2R6qpANBjnA0pHexfwM/SgfzvpbvUg0T1ubmer8BgTwCKIWs\ndcWYTthM51JIqRBfNqy4QcBnX+GY05yltEEswQI55wdiS3CjTTA67sdbcQ==\n-----END CERTIFICATE REQUEST-----"), Hostnames: cloudflare.F([]interface{}{"example.com", "*.example.com"}), - RequestType: cloudflare.F(shared.CertificateRequestTypeOriginRsa), + RequestType: cloudflare.F(shared.CertificateRequestTypeOriginRSA), RequestedValidity: cloudflare.F(ssl.RequestValidity5475), }) if err != nil { diff --git a/origin_post_quantum_encryption/aliases.go b/origin_post_quantum_encryption/aliases.go index fa34f36eaa..a0600a83e6 100644 --- a/origin_post_quantum_encryption/aliases.go +++ b/origin_post_quantum_encryption/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/origin_tls_client_auth/aliases.go b/origin_tls_client_auth/aliases.go index 3d37dd2f5e..f9d38f7bfd 100644 --- a/origin_tls_client_auth/aliases.go +++ b/origin_tls_client_auth/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/page_shield/aliases.go b/page_shield/aliases.go index 80adbcbe43..8b9e55badf 100644 --- a/page_shield/aliases.go +++ b/page_shield/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/pagerules/aliases.go b/pagerules/aliases.go index a8e4ef447d..a3e753fc5e 100644 --- a/pagerules/aliases.go +++ b/pagerules/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/pages/aliases.go b/pages/aliases.go index 6f445b58ec..1d37a614cb 100644 --- a/pages/aliases.go +++ b/pages/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/pcaps/aliases.go b/pcaps/aliases.go index 1729412bdb..6e2ce5095d 100644 --- a/pcaps/aliases.go +++ b/pcaps/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/plans/aliases.go b/plans/aliases.go index 2d550e892c..40b225a8a7 100644 --- a/plans/aliases.go +++ b/plans/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/queues/aliases.go b/queues/aliases.go index 956a943935..a7a7578696 100644 --- a/queues/aliases.go +++ b/queues/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/r2/aliases.go b/r2/aliases.go index c03ec59182..5172382de0 100644 --- a/r2/aliases.go +++ b/r2/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/radar/aliases.go b/radar/aliases.go index 8b30be9444..94605c2c72 100644 --- a/radar/aliases.go +++ b/radar/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/rate_limits/aliases.go b/rate_limits/aliases.go index 147301b574..977b324f07 100644 --- a/rate_limits/aliases.go +++ b/rate_limits/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/rate_plans/aliases.go b/rate_plans/aliases.go index a8141f4c87..55d5609331 100644 --- a/rate_plans/aliases.go +++ b/rate_plans/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/registrar/aliases.go b/registrar/aliases.go index 54edc7a374..7b63d010fc 100644 --- a/registrar/aliases.go +++ b/registrar/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/request_tracers/aliases.go b/request_tracers/aliases.go index 0acc0cd65e..92b4e3fcd3 100644 --- a/request_tracers/aliases.go +++ b/request_tracers/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/rules/aliases.go b/rules/aliases.go index 674713c3ee..277fffe683 100644 --- a/rules/aliases.go +++ b/rules/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/rulesets/aliases.go b/rulesets/aliases.go index ab94cfb537..ce0883ffa1 100644 --- a/rulesets/aliases.go +++ b/rulesets/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/rum/aliases.go b/rum/aliases.go index f733c43942..a2abb297fd 100644 --- a/rum/aliases.go +++ b/rum/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/secondary_dns/aliases.go b/secondary_dns/aliases.go index 6732b5409b..788e8f5103 100644 --- a/secondary_dns/aliases.go +++ b/secondary_dns/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/shared/shared.go b/shared/shared.go index 85caedffcf..483abddce0 100644 --- a/shared/shared.go +++ b/shared/shared.go @@ -176,19 +176,36 @@ func (r auditLogResourceJSON) RawJSON() string { return r.raw } +// The Certificate Authority that will issue the certificate +type CertificateCA string + +const ( + CertificateCADigicert CertificateCA = "digicert" + CertificateCAGoogle CertificateCA = "google" + CertificateCALetsEncrypt CertificateCA = "lets_encrypt" +) + +func (r CertificateCA) IsKnown() bool { + switch r { + case CertificateCADigicert, CertificateCAGoogle, CertificateCALetsEncrypt: + return true + } + return false +} + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). type CertificateRequestType string const ( - CertificateRequestTypeOriginRsa CertificateRequestType = "origin-rsa" - CertificateRequestTypeOriginEcc CertificateRequestType = "origin-ecc" + CertificateRequestTypeOriginRSA CertificateRequestType = "origin-rsa" + CertificateRequestTypeOriginECC CertificateRequestType = "origin-ecc" CertificateRequestTypeKeylessCertificate CertificateRequestType = "keyless-certificate" ) func (r CertificateRequestType) IsKnown() bool { switch r { - case CertificateRequestTypeOriginRsa, CertificateRequestTypeOriginEcc, CertificateRequestTypeKeylessCertificate: + case CertificateRequestTypeOriginRSA, CertificateRequestTypeOriginECC, CertificateRequestTypeKeylessCertificate: return true } return false diff --git a/snippets/aliases.go b/snippets/aliases.go index ac25e8ff34..a3f652f297 100644 --- a/snippets/aliases.go +++ b/snippets/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/spectrum/aliases.go b/spectrum/aliases.go index ccafed7393..53e9a837c1 100644 --- a/spectrum/aliases.go +++ b/spectrum/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/speed/aliases.go b/speed/aliases.go index d39afed4d6..2e9ce22734 100644 --- a/speed/aliases.go +++ b/speed/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/ssl/aliases.go b/ssl/aliases.go index a1e68ac174..e04d4e3dbc 100644 --- a/ssl/aliases.go +++ b/ssl/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/ssl/certificatepack.go b/ssl/certificatepack.go index 3aa00f20f2..b9bdf48974 100644 --- a/ssl/certificatepack.go +++ b/ssl/certificatepack.go @@ -105,23 +105,6 @@ func (r *CertificatePackService) Get(ctx context.Context, certificatePackID stri return } -// The Certificate Authority that will issue the certificate -type CertificateAuthority string - -const ( - CertificateAuthorityDigicert CertificateAuthority = "digicert" - CertificateAuthorityGoogle CertificateAuthority = "google" - CertificateAuthorityLetsEncrypt CertificateAuthority = "lets_encrypt" -) - -func (r CertificateAuthority) IsKnown() bool { - switch r { - case CertificateAuthorityDigicert, CertificateAuthorityGoogle, CertificateAuthorityLetsEncrypt: - return true - } - return false -} - type Host = string type HostParam = string diff --git a/ssl/verification.go b/ssl/verification.go index 5571fa2989..a3070deb4c 100644 --- a/ssl/verification.go +++ b/ssl/verification.go @@ -132,13 +132,13 @@ type VerificationSignature string const ( VerificationSignatureEcdsaWithSha256 VerificationSignature = "ECDSAWithSHA256" - VerificationSignatureSha1WithRsa VerificationSignature = "SHA1WithRSA" - VerificationSignatureSha256WithRsa VerificationSignature = "SHA256WithRSA" + VerificationSignatureSha1WithRSA VerificationSignature = "SHA1WithRSA" + VerificationSignatureSha256WithRSA VerificationSignature = "SHA256WithRSA" ) func (r VerificationSignature) IsKnown() bool { switch r { - case VerificationSignatureEcdsaWithSha256, VerificationSignatureSha1WithRsa, VerificationSignatureSha256WithRsa: + case VerificationSignatureEcdsaWithSha256, VerificationSignatureSha1WithRSA, VerificationSignatureSha256WithRSA: return true } return false diff --git a/storage/aliases.go b/storage/aliases.go index ef9516906c..771f00c549 100644 --- a/storage/aliases.go +++ b/storage/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/stream/aliases.go b/stream/aliases.go index fa2e6d3cf0..0cdf7f1d29 100644 --- a/stream/aliases.go +++ b/stream/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/subscriptions/aliases.go b/subscriptions/aliases.go index 9e964cdcea..f28e9e089f 100644 --- a/subscriptions/aliases.go +++ b/subscriptions/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/url_normalization/aliases.go b/url_normalization/aliases.go index 14608ab31e..46f97c9489 100644 --- a/url_normalization/aliases.go +++ b/url_normalization/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/url_scanner/aliases.go b/url_scanner/aliases.go index 9b968f7ba2..75bc9579e6 100644 --- a/url_scanner/aliases.go +++ b/url_scanner/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/user/aliases.go b/user/aliases.go index 8066c303c2..8dd5458e74 100644 --- a/user/aliases.go +++ b/user/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/vectorize/aliases.go b/vectorize/aliases.go index 0fa6bbe067..1d547d2ff1 100644 --- a/vectorize/aliases.go +++ b/vectorize/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/waiting_rooms/aliases.go b/waiting_rooms/aliases.go index 31f5a55a56..c8d2243b90 100644 --- a/waiting_rooms/aliases.go +++ b/waiting_rooms/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/warp_connector/aliases.go b/warp_connector/aliases.go index b34e0437c5..5adf06aabf 100644 --- a/warp_connector/aliases.go +++ b/warp_connector/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/web3/aliases.go b/web3/aliases.go index dd7644404c..ac3f7bf9f5 100644 --- a/web3/aliases.go +++ b/web3/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/workers/aliases.go b/workers/aliases.go index b02d121132..aa23140211 100644 --- a/workers/aliases.go +++ b/workers/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/workers_for_platforms/aliases.go b/workers_for_platforms/aliases.go index 31311ccfb3..ab9fe62cf9 100644 --- a/workers_for_platforms/aliases.go +++ b/workers_for_platforms/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/zero_trust/aliases.go b/zero_trust/aliases.go index 9afb5ed494..798a2aa2f6 100644 --- a/zero_trust/aliases.go +++ b/zero_trust/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate diff --git a/zones/aliases.go b/zones/aliases.go index d3b2c71414..cd2bc80f06 100644 --- a/zones/aliases.go +++ b/zones/aliases.go @@ -44,6 +44,20 @@ type AuditLogOwner = shared.AuditLogOwner // This is an alias to an internal type. type AuditLogResource = shared.AuditLogResource +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). // @@ -51,10 +65,10 @@ type AuditLogResource = shared.AuditLogResource type CertificateRequestType = shared.CertificateRequestType // This is an alias to an internal value. -const CertificateRequestTypeOriginRsa = shared.CertificateRequestTypeOriginRsa +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA // This is an alias to an internal value. -const CertificateRequestTypeOriginEcc = shared.CertificateRequestTypeOriginEcc +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC // This is an alias to an internal value. const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate From 04a64571ffd56f49a6956fbc27106c38b78c7efb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 04:51:42 +0000 Subject: [PATCH 118/127] feat(api): update via SDK Studio (#1967) --- README.md | 2 +- accounts/aliases.go | 11 + acm/aliases.go | 11 + addressing/aliases.go | 11 + ai_gateway/aliases.go | 11 + alerting/aliases.go | 11 + aliases.go | 11 + api.md | 26 +- argo/aliases.go | 11 + audit_logs/aliases.go | 11 + billing/aliases.go | 11 + bot_management/aliases.go | 11 + brand_protection/aliases.go | 11 + cache/aliases.go | 11 + cache/cachereserve.go | 52 +-- calls/aliases.go | 11 + certificate_authorities/aliases.go | 11 + challenges/aliases.go | 11 + client_certificates/aliases.go | 11 + client_test.go | 12 +- cloudforce_one/aliases.go | 11 + custom_certificates/aliases.go | 11 + custom_hostnames/aliases.go | 11 + custom_nameservers/aliases.go | 11 + d1/aliases.go | 11 + dcv_delegation/aliases.go | 11 + diagnostics/aliases.go | 11 + dns/aliases.go | 11 + dns/record.go | 18 +- dns/record_test.go | 2 +- dnssec/aliases.go | 11 + durable_objects/aliases.go | 11 + email_routing/aliases.go | 11 + event_notifications/aliases.go | 11 + filters/aliases.go | 11 + firewall/aliases.go | 11 + healthchecks/aliases.go | 11 + hostnames/aliases.go | 11 + hyperdrive/aliases.go | 11 + images/aliases.go | 11 + intel/aliases.go | 11 + ips/aliases.go | 11 + keyless_certificates/aliases.go | 11 + kv/aliases.go | 11 + load_balancers/aliases.go | 11 + load_balancers/pool.go | 8 +- load_balancers/region.go | 4 + logpush/aliases.go | 11 + logs/aliases.go | 11 + magic_network_monitoring/aliases.go | 11 + magic_transit/aliases.go | 11 + managed_headers/aliases.go | 11 + memberships/aliases.go | 11 + mtls_certificates/aliases.go | 11 + origin_ca_certificates/aliases.go | 11 + origin_post_quantum_encryption/aliases.go | 11 + origin_tls_client_auth/aliases.go | 11 + page_shield/aliases.go | 11 + pagerules/aliases.go | 11 + pages/aliases.go | 11 + pcaps/aliases.go | 11 + plans/aliases.go | 11 + queues/aliases.go | 11 + r2/aliases.go | 11 + radar/aliases.go | 11 + rate_limits/aliases.go | 11 + rate_plans/aliases.go | 11 + registrar/aliases.go | 11 + request_tracers/aliases.go | 11 + rules/aliases.go | 11 + rulesets/aliases.go | 11 + rulesets/phase.go | 255 +------------- rulesets/phase_test.go | 8 +- rulesets/phaseversion.go | 139 +------- rulesets/phaseversion_test.go | 4 +- rulesets/rule.go | 218 +----------- rulesets/ruleset.go | 411 ++++------------------ rulesets/ruleset_test.go | 8 +- rulesets/version.go | 59 +--- rulesets/versionbytag.go | 59 +--- rum/aliases.go | 11 + secondary_dns/aliases.go | 11 + shared/shared.go | 16 + snippets/aliases.go | 11 + spectrum/aliases.go | 11 + speed/aliases.go | 11 + ssl/aliases.go | 11 + storage/aliases.go | 11 + stream/aliases.go | 11 + subscriptions/aliases.go | 11 + url_normalization/aliases.go | 11 + url_scanner/aliases.go | 11 + usage_test.go | 2 +- user/aliases.go | 11 + vectorize/aliases.go | 11 + waiting_rooms/aliases.go | 11 + warp_connector/aliases.go | 11 + web3/aliases.go | 11 + workers/aliases.go | 11 + workers_for_platforms/aliases.go | 11 + zero_trust/aliases.go | 11 + zones/aliases.go | 11 + zones/zone.go | 38 +- zones/zone_test.go | 2 +- 104 files changed, 1110 insertions(+), 1146 deletions(-) diff --git a/README.md b/README.md index 677ae4dd7c..3626c222d2 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ func main() { ID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }), Name: cloudflare.F("example.com"), - Type: cloudflare.F(zones.ZoneNewParamsTypeFull), + Type: cloudflare.F(zones.TypeFull), }) if err != nil { panic(err.Error()) diff --git a/accounts/aliases.go b/accounts/aliases.go index 7f3e80badb..d5ea651b2d 100644 --- a/accounts/aliases.go +++ b/accounts/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/acm/aliases.go b/acm/aliases.go index 4311264a10..d172c7f973 100644 --- a/acm/aliases.go +++ b/acm/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/addressing/aliases.go b/addressing/aliases.go index 2e8c26ece3..986aa91a27 100644 --- a/addressing/aliases.go +++ b/addressing/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/ai_gateway/aliases.go b/ai_gateway/aliases.go index 532fac2cb6..237b96aeae 100644 --- a/ai_gateway/aliases.go +++ b/ai_gateway/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/alerting/aliases.go b/alerting/aliases.go index dea3ad5ce2..582d2dfbdb 100644 --- a/alerting/aliases.go +++ b/alerting/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/aliases.go b/aliases.go index 8ea4581af8..0f192d5958 100644 --- a/aliases.go +++ b/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/api.md b/api.md index 2cc0c5ce4b..fb7649b427 100644 --- a/api.md +++ b/api.md @@ -5,6 +5,7 @@ - shared.CertificateRequestType - shared.MemberParam - shared.PermissionGrantParam +- shared.SortDirection # Shared Response Types @@ -253,6 +254,10 @@ Methods: # Zones +Params Types: + +- zones.Type + Response Types: - zones.Zone @@ -1067,8 +1072,13 @@ Methods: ## Regions +Params Types: + +- load_balancers.RegionIDParam + Response Types: +- load_balancers.RegionID - load_balancers.RegionListResponseUnion - load_balancers.RegionGetResponseUnion @@ -1103,6 +1113,7 @@ Response Types: - cache.CacheReserve - cache.CacheReserveClear +- cache.State - cache.CacheReserveClearResponse - cache.CacheReserveEditResponse - cache.CacheReserveGetResponse @@ -2794,8 +2805,15 @@ Methods: # Rulesets +Params Types: + +- rulesets.Kind +- rulesets.Phase + Response Types: +- rulesets.Kind +- rulesets.Phase - rulesets.Ruleset - rulesets.RulesetNewResponse - rulesets.RulesetUpdateResponse @@ -2818,8 +2836,8 @@ Response Types: Methods: -- client.Rulesets.Phases.Update(ctx context.Context, rulesetPhase rulesets.PhaseUpdateParamsRulesetPhase, params rulesets.PhaseUpdateParams) (rulesets.PhaseUpdateResponse, error) -- client.Rulesets.Phases.Get(ctx context.Context, rulesetPhase rulesets.PhaseGetParamsRulesetPhase, query rulesets.PhaseGetParams) (rulesets.PhaseGetResponse, error) +- client.Rulesets.Phases.Update(ctx context.Context, rulesetPhase rulesets.Phase, params rulesets.PhaseUpdateParams) (rulesets.PhaseUpdateResponse, error) +- client.Rulesets.Phases.Get(ctx context.Context, rulesetPhase rulesets.Phase, query rulesets.PhaseGetParams) (rulesets.PhaseGetResponse, error) ### Versions @@ -2829,8 +2847,8 @@ Response Types: Methods: -- client.Rulesets.Phases.Versions.List(ctx context.Context, rulesetPhase rulesets.PhaseVersionListParamsRulesetPhase, query rulesets.PhaseVersionListParams) (pagination.SinglePage[rulesets.Ruleset], error) -- client.Rulesets.Phases.Versions.Get(ctx context.Context, rulesetPhase rulesets.PhaseVersionGetParamsRulesetPhase, rulesetVersion string, query rulesets.PhaseVersionGetParams) (rulesets.PhaseVersionGetResponse, error) +- client.Rulesets.Phases.Versions.List(ctx context.Context, rulesetPhase rulesets.Phase, query rulesets.PhaseVersionListParams) (pagination.SinglePage[rulesets.Ruleset], error) +- client.Rulesets.Phases.Versions.Get(ctx context.Context, rulesetPhase rulesets.Phase, rulesetVersion string, query rulesets.PhaseVersionGetParams) (rulesets.PhaseVersionGetResponse, error) ## Rules diff --git a/argo/aliases.go b/argo/aliases.go index 6209f47c24..20804e99df 100644 --- a/argo/aliases.go +++ b/argo/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/audit_logs/aliases.go b/audit_logs/aliases.go index 957c68c3dc..56baddd283 100644 --- a/audit_logs/aliases.go +++ b/audit_logs/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/billing/aliases.go b/billing/aliases.go index 3821bf55fa..e00d02c091 100644 --- a/billing/aliases.go +++ b/billing/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/bot_management/aliases.go b/bot_management/aliases.go index 3409c87fb6..38cdc57343 100644 --- a/bot_management/aliases.go +++ b/bot_management/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/brand_protection/aliases.go b/brand_protection/aliases.go index 5ae140bfcf..028c9bf13a 100644 --- a/brand_protection/aliases.go +++ b/brand_protection/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/cache/aliases.go b/cache/aliases.go index 78f320d929..1d187d244c 100644 --- a/cache/aliases.go +++ b/cache/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/cache/cachereserve.go b/cache/cachereserve.go index aabdf90707..caa471998e 100644 --- a/cache/cachereserve.go +++ b/cache/cachereserve.go @@ -131,6 +131,22 @@ func (r CacheReserveClear) IsKnown() bool { return false } +// The current state of the Cache Reserve Clear operation. +type State string + +const ( + StateInProgress State = "In-progress" + StateCompleted State = "Completed" +) + +func (r State) IsKnown() bool { + switch r { + case StateInProgress, StateCompleted: + return true + } + return false +} + // You can use Cache Reserve Clear to clear your Cache Reserve, but you must first // disable Cache Reserve. In most cases, this will be accomplished within 24 hours. // You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind @@ -143,7 +159,7 @@ type CacheReserveClearResponse struct { // The time that the latest Cache Reserve Clear operation started. StartTs time.Time `json:"start_ts,required" format:"date-time"` // The current state of the Cache Reserve Clear operation. - State CacheReserveClearResponseState `json:"state,required"` + State State `json:"state,required"` // The time that the latest Cache Reserve Clear operation completed. EndTs time.Time `json:"end_ts" format:"date-time"` JSON cacheReserveClearResponseJSON `json:"-"` @@ -169,22 +185,6 @@ func (r cacheReserveClearResponseJSON) RawJSON() string { return r.raw } -// The current state of the Cache Reserve Clear operation. -type CacheReserveClearResponseState string - -const ( - CacheReserveClearResponseStateInProgress CacheReserveClearResponseState = "In-progress" - CacheReserveClearResponseStateCompleted CacheReserveClearResponseState = "Completed" -) - -func (r CacheReserveClearResponseState) IsKnown() bool { - switch r { - case CacheReserveClearResponseStateInProgress, CacheReserveClearResponseStateCompleted: - return true - } - return false -} - // Increase cache lifetimes by automatically storing all cacheable files into // Cloudflare's persistent object storage buckets. Requires Cache Reserve // subscription. Note: using Tiered Cache with Cache Reserve is highly recommended @@ -297,7 +297,7 @@ type CacheReserveStatusResponse struct { // The time that the latest Cache Reserve Clear operation started. StartTs time.Time `json:"start_ts,required" format:"date-time"` // The current state of the Cache Reserve Clear operation. - State CacheReserveStatusResponseState `json:"state,required"` + State State `json:"state,required"` // The time that the latest Cache Reserve Clear operation completed. EndTs time.Time `json:"end_ts" format:"date-time"` JSON cacheReserveStatusResponseJSON `json:"-"` @@ -323,22 +323,6 @@ func (r cacheReserveStatusResponseJSON) RawJSON() string { return r.raw } -// The current state of the Cache Reserve Clear operation. -type CacheReserveStatusResponseState string - -const ( - CacheReserveStatusResponseStateInProgress CacheReserveStatusResponseState = "In-progress" - CacheReserveStatusResponseStateCompleted CacheReserveStatusResponseState = "Completed" -) - -func (r CacheReserveStatusResponseState) IsKnown() bool { - switch r { - case CacheReserveStatusResponseStateInProgress, CacheReserveStatusResponseStateCompleted: - return true - } - return false -} - type CacheReserveClearParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` diff --git a/calls/aliases.go b/calls/aliases.go index 67b5f822c2..e18ab25a76 100644 --- a/calls/aliases.go +++ b/calls/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/certificate_authorities/aliases.go b/certificate_authorities/aliases.go index c3a0c28b27..9cdc6da859 100644 --- a/certificate_authorities/aliases.go +++ b/certificate_authorities/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/challenges/aliases.go b/challenges/aliases.go index cc401bcd77..e7865d17cd 100644 --- a/challenges/aliases.go +++ b/challenges/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/client_certificates/aliases.go b/client_certificates/aliases.go index 3a2219f249..c4ef11c077 100644 --- a/client_certificates/aliases.go +++ b/client_certificates/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/client_test.go b/client_test.go index d190cfc925..cf75e23d24 100644 --- a/client_test.go +++ b/client_test.go @@ -42,7 +42,7 @@ func TestUserAgentHeader(t *testing.T) { ID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }), Name: cloudflare.F("example.com"), - Type: cloudflare.F(zones.ZoneNewParamsTypeFull), + Type: cloudflare.F(zones.TypeFull), }) if userAgent != fmt.Sprintf("Cloudflare/Go %s", internal.PackageVersion) { t.Errorf("Expected User-Agent to be correct, but got: %#v", userAgent) @@ -71,7 +71,7 @@ func TestRetryAfter(t *testing.T) { ID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }), Name: cloudflare.F("example.com"), - Type: cloudflare.F(zones.ZoneNewParamsTypeFull), + Type: cloudflare.F(zones.TypeFull), }) if err == nil || res != nil { t.Error("Expected there to be a cancel error and for the response to be nil") @@ -103,7 +103,7 @@ func TestRetryAfterMs(t *testing.T) { ID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }), Name: cloudflare.F("example.com"), - Type: cloudflare.F(zones.ZoneNewParamsTypeFull), + Type: cloudflare.F(zones.TypeFull), }) if err == nil || res != nil { t.Error("Expected there to be a cancel error and for the response to be nil") @@ -131,7 +131,7 @@ func TestContextCancel(t *testing.T) { ID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }), Name: cloudflare.F("example.com"), - Type: cloudflare.F(zones.ZoneNewParamsTypeFull), + Type: cloudflare.F(zones.TypeFull), }) if err == nil || res != nil { t.Error("Expected there to be a cancel error and for the response to be nil") @@ -156,7 +156,7 @@ func TestContextCancelDelay(t *testing.T) { ID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }), Name: cloudflare.F("example.com"), - Type: cloudflare.F(zones.ZoneNewParamsTypeFull), + Type: cloudflare.F(zones.TypeFull), }) if err == nil || res != nil { t.Error("expected there to be a cancel error and for the response to be nil") @@ -187,7 +187,7 @@ func TestContextDeadline(t *testing.T) { ID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }), Name: cloudflare.F("example.com"), - Type: cloudflare.F(zones.ZoneNewParamsTypeFull), + Type: cloudflare.F(zones.TypeFull), }) if err == nil || res != nil { t.Error("expected there to be a deadline error and for the response to be nil") diff --git a/cloudforce_one/aliases.go b/cloudforce_one/aliases.go index 11fae41479..9de195f432 100644 --- a/cloudforce_one/aliases.go +++ b/cloudforce_one/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/custom_certificates/aliases.go b/custom_certificates/aliases.go index d006093ba9..d836857b4c 100644 --- a/custom_certificates/aliases.go +++ b/custom_certificates/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/custom_hostnames/aliases.go b/custom_hostnames/aliases.go index c66c380873..66355fbf02 100644 --- a/custom_hostnames/aliases.go +++ b/custom_hostnames/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/custom_nameservers/aliases.go b/custom_nameservers/aliases.go index 6e5ebe5774..c2e65fec1c 100644 --- a/custom_nameservers/aliases.go +++ b/custom_nameservers/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/d1/aliases.go b/d1/aliases.go index e7a05b3d35..6ca45d2b7b 100644 --- a/d1/aliases.go +++ b/d1/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/dcv_delegation/aliases.go b/dcv_delegation/aliases.go index 6a35c890de..64589d1c8b 100644 --- a/dcv_delegation/aliases.go +++ b/dcv_delegation/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/diagnostics/aliases.go b/diagnostics/aliases.go index d52618cace..18ae0a5756 100644 --- a/diagnostics/aliases.go +++ b/diagnostics/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/dns/aliases.go b/dns/aliases.go index 12d84b1ba1..a9f7109730 100644 --- a/dns/aliases.go +++ b/dns/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/dns/record.go b/dns/record.go index 86870a91a3..5593aac0ae 100644 --- a/dns/record.go +++ b/dns/record.go @@ -3639,7 +3639,7 @@ type RecordListParams struct { // DNS record content. Content param.Field[string] `query:"content"` // Direction to order DNS records in. - Direction param.Field[RecordListParamsDirection] `query:"direction"` + Direction param.Field[shared.SortDirection] `query:"direction"` // Whether to match all search requirements or at least one (any). If set to `all`, // acts like a logical AND between filters. If set to `any`, acts like a logical OR // instead. Note that the interaction between tag filters is controlled by the @@ -3704,22 +3704,6 @@ func (r RecordListParamsComment) URLQuery() (v url.Values) { }) } -// Direction to order DNS records in. -type RecordListParamsDirection string - -const ( - RecordListParamsDirectionAsc RecordListParamsDirection = "asc" - RecordListParamsDirectionDesc RecordListParamsDirection = "desc" -) - -func (r RecordListParamsDirection) IsKnown() bool { - switch r { - case RecordListParamsDirectionAsc, RecordListParamsDirectionDesc: - return true - } - return false -} - // Whether to match all search requirements or at least one (any). If set to `all`, // acts like a logical AND between filters. If set to `any`, acts like a logical OR // instead. Note that the interaction between tag filters is controlled by the diff --git a/dns/record_test.go b/dns/record_test.go index 693fdea848..b1b32f864a 100644 --- a/dns/record_test.go +++ b/dns/record_test.go @@ -113,7 +113,7 @@ func TestRecordListWithOptionalParams(t *testing.T) { Endswith: cloudflare.F("o, world"), }), Content: cloudflare.F("127.0.0.1"), - Direction: cloudflare.F(dns.RecordListParamsDirectionAsc), + Direction: cloudflare.F(shared.SortDirectionAsc), Match: cloudflare.F(dns.RecordListParamsMatchAny), Name: cloudflare.F("example.com"), Order: cloudflare.F(dns.RecordListParamsOrderType), diff --git a/dnssec/aliases.go b/dnssec/aliases.go index f42ce38172..7815bead07 100644 --- a/dnssec/aliases.go +++ b/dnssec/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/durable_objects/aliases.go b/durable_objects/aliases.go index 016f5b3d7c..cab5083ba9 100644 --- a/durable_objects/aliases.go +++ b/durable_objects/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/email_routing/aliases.go b/email_routing/aliases.go index 8c3853bb98..427c383fa0 100644 --- a/email_routing/aliases.go +++ b/email_routing/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/event_notifications/aliases.go b/event_notifications/aliases.go index 34a7d1a752..3bc83366e4 100644 --- a/event_notifications/aliases.go +++ b/event_notifications/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/filters/aliases.go b/filters/aliases.go index 811c09e9cc..ad67b43190 100644 --- a/filters/aliases.go +++ b/filters/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/firewall/aliases.go b/firewall/aliases.go index 14680d7772..8f069993d7 100644 --- a/firewall/aliases.go +++ b/firewall/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/healthchecks/aliases.go b/healthchecks/aliases.go index ef5a781429..d17b62e3db 100644 --- a/healthchecks/aliases.go +++ b/healthchecks/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/hostnames/aliases.go b/hostnames/aliases.go index d085b9acd8..b7f60a3475 100644 --- a/hostnames/aliases.go +++ b/hostnames/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/hyperdrive/aliases.go b/hyperdrive/aliases.go index 8cba2ae914..a786a9fcbb 100644 --- a/hyperdrive/aliases.go +++ b/hyperdrive/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/images/aliases.go b/images/aliases.go index 38f71907d8..b3ed3249ce 100644 --- a/images/aliases.go +++ b/images/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/intel/aliases.go b/intel/aliases.go index 0011e18c5d..8f36b37946 100644 --- a/intel/aliases.go +++ b/intel/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/ips/aliases.go b/ips/aliases.go index 14be9f9db7..3ca7ad37ac 100644 --- a/ips/aliases.go +++ b/ips/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/keyless_certificates/aliases.go b/keyless_certificates/aliases.go index 44c1fd223e..8af37e4056 100644 --- a/keyless_certificates/aliases.go +++ b/keyless_certificates/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/kv/aliases.go b/kv/aliases.go index 7dfac36906..9d9fa97e70 100644 --- a/kv/aliases.go +++ b/kv/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/load_balancers/aliases.go b/load_balancers/aliases.go index 233d856f7f..0dc9236645 100644 --- a/load_balancers/aliases.go +++ b/load_balancers/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/load_balancers/pool.go b/load_balancers/pool.go index baa3941080..89919c993d 100644 --- a/load_balancers/pool.go +++ b/load_balancers/pool.go @@ -131,8 +131,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 []CheckRegion `json:"check_regions,nullable"` - CreatedOn time.Time `json:"created_on" format:"date-time"` + CheckRegions RegionID `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 @@ -333,7 +333,7 @@ type PoolUpdateParams struct { Origins param.Field[[]OriginParam] `json:"origins,required"` // A list of regions from which to run health checks. Null means every Cloudflare // data center. - CheckRegions param.Field[[]CheckRegion] `json:"check_regions"` + CheckRegions param.Field[RegionIDParam] `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 @@ -485,7 +485,7 @@ type PoolEditParams struct { AccountID param.Field[string] `path:"account_id,required"` // A list of regions from which to run health checks. Null means every Cloudflare // data center. - CheckRegions param.Field[[]CheckRegion] `json:"check_regions"` + CheckRegions param.Field[RegionIDParam] `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 diff --git a/load_balancers/region.go b/load_balancers/region.go index 2fbfc850f6..db4f3ae49c 100644 --- a/load_balancers/region.go +++ b/load_balancers/region.go @@ -61,6 +61,10 @@ func (r *RegionService) Get(ctx context.Context, regionID RegionGetParamsRegionI return } +type RegionID []CheckRegion + +type RegionIDParam []CheckRegion + // Union satisfied by [load_balancers.RegionListResponseUnknown] or // [shared.UnionString]. type RegionListResponseUnion interface { diff --git a/logpush/aliases.go b/logpush/aliases.go index a2e7812f3b..d1b5893bed 100644 --- a/logpush/aliases.go +++ b/logpush/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/logs/aliases.go b/logs/aliases.go index fa4a0f0e54..e26c25714d 100644 --- a/logs/aliases.go +++ b/logs/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/magic_network_monitoring/aliases.go b/magic_network_monitoring/aliases.go index f7609bcb25..ace9a31e40 100644 --- a/magic_network_monitoring/aliases.go +++ b/magic_network_monitoring/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/magic_transit/aliases.go b/magic_transit/aliases.go index e49834fe63..4652b55da7 100644 --- a/magic_transit/aliases.go +++ b/magic_transit/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/managed_headers/aliases.go b/managed_headers/aliases.go index 7ba59ad35a..f5560e725e 100644 --- a/managed_headers/aliases.go +++ b/managed_headers/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/memberships/aliases.go b/memberships/aliases.go index 31b6e73490..0b05453e9c 100644 --- a/memberships/aliases.go +++ b/memberships/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/mtls_certificates/aliases.go b/mtls_certificates/aliases.go index 0825314aaf..5e90d9d612 100644 --- a/mtls_certificates/aliases.go +++ b/mtls_certificates/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/origin_ca_certificates/aliases.go b/origin_ca_certificates/aliases.go index b9b1a32def..7efc201b48 100644 --- a/origin_ca_certificates/aliases.go +++ b/origin_ca_certificates/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/origin_post_quantum_encryption/aliases.go b/origin_post_quantum_encryption/aliases.go index a0600a83e6..a9bd97b758 100644 --- a/origin_post_quantum_encryption/aliases.go +++ b/origin_post_quantum_encryption/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/origin_tls_client_auth/aliases.go b/origin_tls_client_auth/aliases.go index f9d38f7bfd..cf7baaa66e 100644 --- a/origin_tls_client_auth/aliases.go +++ b/origin_tls_client_auth/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/page_shield/aliases.go b/page_shield/aliases.go index 8b9e55badf..1c01202556 100644 --- a/page_shield/aliases.go +++ b/page_shield/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/pagerules/aliases.go b/pagerules/aliases.go index a3e753fc5e..41ab2ea28e 100644 --- a/pagerules/aliases.go +++ b/pagerules/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/pages/aliases.go b/pages/aliases.go index 1d37a614cb..54be946956 100644 --- a/pages/aliases.go +++ b/pages/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/pcaps/aliases.go b/pcaps/aliases.go index 6e2ce5095d..4f1ba029f9 100644 --- a/pcaps/aliases.go +++ b/pcaps/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/plans/aliases.go b/plans/aliases.go index 40b225a8a7..49d2495fb8 100644 --- a/plans/aliases.go +++ b/plans/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/queues/aliases.go b/queues/aliases.go index a7a7578696..63fa792776 100644 --- a/queues/aliases.go +++ b/queues/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/r2/aliases.go b/r2/aliases.go index 5172382de0..94dc84369c 100644 --- a/r2/aliases.go +++ b/r2/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/radar/aliases.go b/radar/aliases.go index 94605c2c72..e14e58cd7b 100644 --- a/radar/aliases.go +++ b/radar/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/rate_limits/aliases.go b/rate_limits/aliases.go index 977b324f07..78d0c76247 100644 --- a/rate_limits/aliases.go +++ b/rate_limits/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/rate_plans/aliases.go b/rate_plans/aliases.go index 55d5609331..1c4f898e7f 100644 --- a/rate_plans/aliases.go +++ b/rate_plans/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/registrar/aliases.go b/registrar/aliases.go index 7b63d010fc..98eb12de4e 100644 --- a/registrar/aliases.go +++ b/registrar/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/request_tracers/aliases.go b/request_tracers/aliases.go index 92b4e3fcd3..33837b9132 100644 --- a/request_tracers/aliases.go +++ b/request_tracers/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/rules/aliases.go b/rules/aliases.go index 277fffe683..64d53c4a13 100644 --- a/rules/aliases.go +++ b/rules/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/rulesets/aliases.go b/rulesets/aliases.go index ce0883ffa1..d926a6da50 100644 --- a/rulesets/aliases.go +++ b/rulesets/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/rulesets/phase.go b/rulesets/phase.go index 832f27b8bd..a679b30ee6 100644 --- a/rulesets/phase.go +++ b/rulesets/phase.go @@ -36,7 +36,7 @@ func NewPhaseService(opts ...option.RequestOption) (r *PhaseService) { } // Updates an account or zone entry point ruleset, creating a new version. -func (r *PhaseService) Update(ctx context.Context, rulesetPhase PhaseUpdateParamsRulesetPhase, params PhaseUpdateParams, opts ...option.RequestOption) (res *PhaseUpdateResponse, err error) { +func (r *PhaseService) Update(ctx context.Context, rulesetPhase Phase, params PhaseUpdateParams, opts ...option.RequestOption) (res *PhaseUpdateResponse, err error) { opts = append(r.Options[:], opts...) var env PhaseUpdateResponseEnvelope var accountOrZone string @@ -59,7 +59,7 @@ func (r *PhaseService) Update(ctx context.Context, rulesetPhase PhaseUpdateParam // Fetches the latest version of the account or zone entry point ruleset for a // given phase. -func (r *PhaseService) Get(ctx context.Context, rulesetPhase PhaseGetParamsRulesetPhase, query PhaseGetParams, opts ...option.RequestOption) (res *PhaseGetResponse, err error) { +func (r *PhaseService) Get(ctx context.Context, rulesetPhase Phase, query PhaseGetParams, opts ...option.RequestOption) (res *PhaseGetResponse, err error) { opts = append(r.Options[:], opts...) var env PhaseGetResponseEnvelope var accountOrZone string @@ -85,13 +85,13 @@ type PhaseUpdateResponse struct { // The unique ID of the ruleset. ID string `json:"id,required"` // The kind of the ruleset. - Kind PhaseUpdateResponseKind `json:"kind,required"` + Kind Kind `json:"kind,required"` // The timestamp of when the ruleset was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The human-readable name of the ruleset. Name string `json:"name,required"` // The phase of the ruleset. - Phase PhaseUpdateResponsePhase `json:"phase,required"` + Phase Phase `json:"phase,required"` // The list of rules in the ruleset. Rules []PhaseUpdateResponseRule `json:"rules,required"` // The version of the ruleset. @@ -124,61 +124,6 @@ func (r phaseUpdateResponseJSON) RawJSON() string { return r.raw } -// The kind of the ruleset. -type PhaseUpdateResponseKind string - -const ( - PhaseUpdateResponseKindManaged PhaseUpdateResponseKind = "managed" - PhaseUpdateResponseKindCustom PhaseUpdateResponseKind = "custom" - PhaseUpdateResponseKindRoot PhaseUpdateResponseKind = "root" - PhaseUpdateResponseKindZone PhaseUpdateResponseKind = "zone" -) - -func (r PhaseUpdateResponseKind) IsKnown() bool { - switch r { - case PhaseUpdateResponseKindManaged, PhaseUpdateResponseKindCustom, PhaseUpdateResponseKindRoot, PhaseUpdateResponseKindZone: - return true - } - return false -} - -// The phase of the ruleset. -type PhaseUpdateResponsePhase string - -const ( - PhaseUpdateResponsePhaseDDoSL4 PhaseUpdateResponsePhase = "ddos_l4" - PhaseUpdateResponsePhaseDDoSL7 PhaseUpdateResponsePhase = "ddos_l7" - PhaseUpdateResponsePhaseHTTPConfigSettings PhaseUpdateResponsePhase = "http_config_settings" - PhaseUpdateResponsePhaseHTTPCustomErrors PhaseUpdateResponsePhase = "http_custom_errors" - PhaseUpdateResponsePhaseHTTPLogCustomFields PhaseUpdateResponsePhase = "http_log_custom_fields" - PhaseUpdateResponsePhaseHTTPRatelimit PhaseUpdateResponsePhase = "http_ratelimit" - PhaseUpdateResponsePhaseHTTPRequestCacheSettings PhaseUpdateResponsePhase = "http_request_cache_settings" - PhaseUpdateResponsePhaseHTTPRequestDynamicRedirect PhaseUpdateResponsePhase = "http_request_dynamic_redirect" - PhaseUpdateResponsePhaseHTTPRequestFirewallCustom PhaseUpdateResponsePhase = "http_request_firewall_custom" - PhaseUpdateResponsePhaseHTTPRequestFirewallManaged PhaseUpdateResponsePhase = "http_request_firewall_managed" - PhaseUpdateResponsePhaseHTTPRequestLateTransform PhaseUpdateResponsePhase = "http_request_late_transform" - PhaseUpdateResponsePhaseHTTPRequestOrigin PhaseUpdateResponsePhase = "http_request_origin" - PhaseUpdateResponsePhaseHTTPRequestRedirect PhaseUpdateResponsePhase = "http_request_redirect" - PhaseUpdateResponsePhaseHTTPRequestSanitize PhaseUpdateResponsePhase = "http_request_sanitize" - PhaseUpdateResponsePhaseHTTPRequestSBFM PhaseUpdateResponsePhase = "http_request_sbfm" - PhaseUpdateResponsePhaseHTTPRequestSelectConfiguration PhaseUpdateResponsePhase = "http_request_select_configuration" - PhaseUpdateResponsePhaseHTTPRequestTransform PhaseUpdateResponsePhase = "http_request_transform" - PhaseUpdateResponsePhaseHTTPResponseCompression PhaseUpdateResponsePhase = "http_response_compression" - PhaseUpdateResponsePhaseHTTPResponseFirewallManaged PhaseUpdateResponsePhase = "http_response_firewall_managed" - PhaseUpdateResponsePhaseHTTPResponseHeadersTransform PhaseUpdateResponsePhase = "http_response_headers_transform" - PhaseUpdateResponsePhaseMagicTransit PhaseUpdateResponsePhase = "magic_transit" - PhaseUpdateResponsePhaseMagicTransitIDsManaged PhaseUpdateResponsePhase = "magic_transit_ids_managed" - PhaseUpdateResponsePhaseMagicTransitManaged PhaseUpdateResponsePhase = "magic_transit_managed" -) - -func (r PhaseUpdateResponsePhase) IsKnown() bool { - switch r { - case PhaseUpdateResponsePhaseDDoSL4, PhaseUpdateResponsePhaseDDoSL7, PhaseUpdateResponsePhaseHTTPConfigSettings, PhaseUpdateResponsePhaseHTTPCustomErrors, PhaseUpdateResponsePhaseHTTPLogCustomFields, PhaseUpdateResponsePhaseHTTPRatelimit, PhaseUpdateResponsePhaseHTTPRequestCacheSettings, PhaseUpdateResponsePhaseHTTPRequestDynamicRedirect, PhaseUpdateResponsePhaseHTTPRequestFirewallCustom, PhaseUpdateResponsePhaseHTTPRequestFirewallManaged, PhaseUpdateResponsePhaseHTTPRequestLateTransform, PhaseUpdateResponsePhaseHTTPRequestOrigin, PhaseUpdateResponsePhaseHTTPRequestRedirect, PhaseUpdateResponsePhaseHTTPRequestSanitize, PhaseUpdateResponsePhaseHTTPRequestSBFM, PhaseUpdateResponsePhaseHTTPRequestSelectConfiguration, PhaseUpdateResponsePhaseHTTPRequestTransform, PhaseUpdateResponsePhaseHTTPResponseCompression, PhaseUpdateResponsePhaseHTTPResponseFirewallManaged, PhaseUpdateResponsePhaseHTTPResponseHeadersTransform, PhaseUpdateResponsePhaseMagicTransit, PhaseUpdateResponsePhaseMagicTransitIDsManaged, PhaseUpdateResponsePhaseMagicTransitManaged: - return true - } - return false -} - type PhaseUpdateResponseRule struct { // The action to perform when the rule matches. Action PhaseUpdateResponseRulesAction `json:"action"` @@ -364,13 +309,13 @@ type PhaseGetResponse struct { // The unique ID of the ruleset. ID string `json:"id,required"` // The kind of the ruleset. - Kind PhaseGetResponseKind `json:"kind,required"` + Kind Kind `json:"kind,required"` // The timestamp of when the ruleset was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The human-readable name of the ruleset. Name string `json:"name,required"` // The phase of the ruleset. - Phase PhaseGetResponsePhase `json:"phase,required"` + Phase Phase `json:"phase,required"` // The list of rules in the ruleset. Rules []PhaseGetResponseRule `json:"rules,required"` // The version of the ruleset. @@ -403,61 +348,6 @@ func (r phaseGetResponseJSON) RawJSON() string { return r.raw } -// The kind of the ruleset. -type PhaseGetResponseKind string - -const ( - PhaseGetResponseKindManaged PhaseGetResponseKind = "managed" - PhaseGetResponseKindCustom PhaseGetResponseKind = "custom" - PhaseGetResponseKindRoot PhaseGetResponseKind = "root" - PhaseGetResponseKindZone PhaseGetResponseKind = "zone" -) - -func (r PhaseGetResponseKind) IsKnown() bool { - switch r { - case PhaseGetResponseKindManaged, PhaseGetResponseKindCustom, PhaseGetResponseKindRoot, PhaseGetResponseKindZone: - return true - } - return false -} - -// The phase of the ruleset. -type PhaseGetResponsePhase string - -const ( - PhaseGetResponsePhaseDDoSL4 PhaseGetResponsePhase = "ddos_l4" - PhaseGetResponsePhaseDDoSL7 PhaseGetResponsePhase = "ddos_l7" - PhaseGetResponsePhaseHTTPConfigSettings PhaseGetResponsePhase = "http_config_settings" - PhaseGetResponsePhaseHTTPCustomErrors PhaseGetResponsePhase = "http_custom_errors" - PhaseGetResponsePhaseHTTPLogCustomFields PhaseGetResponsePhase = "http_log_custom_fields" - PhaseGetResponsePhaseHTTPRatelimit PhaseGetResponsePhase = "http_ratelimit" - PhaseGetResponsePhaseHTTPRequestCacheSettings PhaseGetResponsePhase = "http_request_cache_settings" - PhaseGetResponsePhaseHTTPRequestDynamicRedirect PhaseGetResponsePhase = "http_request_dynamic_redirect" - PhaseGetResponsePhaseHTTPRequestFirewallCustom PhaseGetResponsePhase = "http_request_firewall_custom" - PhaseGetResponsePhaseHTTPRequestFirewallManaged PhaseGetResponsePhase = "http_request_firewall_managed" - PhaseGetResponsePhaseHTTPRequestLateTransform PhaseGetResponsePhase = "http_request_late_transform" - PhaseGetResponsePhaseHTTPRequestOrigin PhaseGetResponsePhase = "http_request_origin" - PhaseGetResponsePhaseHTTPRequestRedirect PhaseGetResponsePhase = "http_request_redirect" - PhaseGetResponsePhaseHTTPRequestSanitize PhaseGetResponsePhase = "http_request_sanitize" - PhaseGetResponsePhaseHTTPRequestSBFM PhaseGetResponsePhase = "http_request_sbfm" - PhaseGetResponsePhaseHTTPRequestSelectConfiguration PhaseGetResponsePhase = "http_request_select_configuration" - PhaseGetResponsePhaseHTTPRequestTransform PhaseGetResponsePhase = "http_request_transform" - PhaseGetResponsePhaseHTTPResponseCompression PhaseGetResponsePhase = "http_response_compression" - PhaseGetResponsePhaseHTTPResponseFirewallManaged PhaseGetResponsePhase = "http_response_firewall_managed" - PhaseGetResponsePhaseHTTPResponseHeadersTransform PhaseGetResponsePhase = "http_response_headers_transform" - PhaseGetResponsePhaseMagicTransit PhaseGetResponsePhase = "magic_transit" - PhaseGetResponsePhaseMagicTransitIDsManaged PhaseGetResponsePhase = "magic_transit_ids_managed" - PhaseGetResponsePhaseMagicTransitManaged PhaseGetResponsePhase = "magic_transit_managed" -) - -func (r PhaseGetResponsePhase) IsKnown() bool { - switch r { - case PhaseGetResponsePhaseDDoSL4, PhaseGetResponsePhaseDDoSL7, PhaseGetResponsePhaseHTTPConfigSettings, PhaseGetResponsePhaseHTTPCustomErrors, PhaseGetResponsePhaseHTTPLogCustomFields, PhaseGetResponsePhaseHTTPRatelimit, PhaseGetResponsePhaseHTTPRequestCacheSettings, PhaseGetResponsePhaseHTTPRequestDynamicRedirect, PhaseGetResponsePhaseHTTPRequestFirewallCustom, PhaseGetResponsePhaseHTTPRequestFirewallManaged, PhaseGetResponsePhaseHTTPRequestLateTransform, PhaseGetResponsePhaseHTTPRequestOrigin, PhaseGetResponsePhaseHTTPRequestRedirect, PhaseGetResponsePhaseHTTPRequestSanitize, PhaseGetResponsePhaseHTTPRequestSBFM, PhaseGetResponsePhaseHTTPRequestSelectConfiguration, PhaseGetResponsePhaseHTTPRequestTransform, PhaseGetResponsePhaseHTTPResponseCompression, PhaseGetResponsePhaseHTTPResponseFirewallManaged, PhaseGetResponsePhaseHTTPResponseHeadersTransform, PhaseGetResponsePhaseMagicTransit, PhaseGetResponsePhaseMagicTransitIDsManaged, PhaseGetResponsePhaseMagicTransitManaged: - return true - } - return false -} - type PhaseGetResponseRule struct { // The action to perform when the rule matches. Action PhaseGetResponseRulesAction `json:"action"` @@ -648,54 +538,17 @@ type PhaseUpdateParams struct { // An informative description of the ruleset. Description param.Field[string] `json:"description"` // The kind of the ruleset. - Kind param.Field[PhaseUpdateParamsKind] `json:"kind"` + Kind param.Field[Kind] `json:"kind"` // The human-readable name of the ruleset. Name param.Field[string] `json:"name"` // The phase of the ruleset. - Phase param.Field[PhaseUpdateParamsPhase] `json:"phase"` + Phase param.Field[Phase] `json:"phase"` } func (r PhaseUpdateParams) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -// The phase of the ruleset. -type PhaseUpdateParamsRulesetPhase string - -const ( - PhaseUpdateParamsRulesetPhaseDDoSL4 PhaseUpdateParamsRulesetPhase = "ddos_l4" - PhaseUpdateParamsRulesetPhaseDDoSL7 PhaseUpdateParamsRulesetPhase = "ddos_l7" - PhaseUpdateParamsRulesetPhaseHTTPConfigSettings PhaseUpdateParamsRulesetPhase = "http_config_settings" - PhaseUpdateParamsRulesetPhaseHTTPCustomErrors PhaseUpdateParamsRulesetPhase = "http_custom_errors" - PhaseUpdateParamsRulesetPhaseHTTPLogCustomFields PhaseUpdateParamsRulesetPhase = "http_log_custom_fields" - PhaseUpdateParamsRulesetPhaseHTTPRatelimit PhaseUpdateParamsRulesetPhase = "http_ratelimit" - PhaseUpdateParamsRulesetPhaseHTTPRequestCacheSettings PhaseUpdateParamsRulesetPhase = "http_request_cache_settings" - PhaseUpdateParamsRulesetPhaseHTTPRequestDynamicRedirect PhaseUpdateParamsRulesetPhase = "http_request_dynamic_redirect" - PhaseUpdateParamsRulesetPhaseHTTPRequestFirewallCustom PhaseUpdateParamsRulesetPhase = "http_request_firewall_custom" - PhaseUpdateParamsRulesetPhaseHTTPRequestFirewallManaged PhaseUpdateParamsRulesetPhase = "http_request_firewall_managed" - PhaseUpdateParamsRulesetPhaseHTTPRequestLateTransform PhaseUpdateParamsRulesetPhase = "http_request_late_transform" - PhaseUpdateParamsRulesetPhaseHTTPRequestOrigin PhaseUpdateParamsRulesetPhase = "http_request_origin" - PhaseUpdateParamsRulesetPhaseHTTPRequestRedirect PhaseUpdateParamsRulesetPhase = "http_request_redirect" - PhaseUpdateParamsRulesetPhaseHTTPRequestSanitize PhaseUpdateParamsRulesetPhase = "http_request_sanitize" - PhaseUpdateParamsRulesetPhaseHTTPRequestSBFM PhaseUpdateParamsRulesetPhase = "http_request_sbfm" - PhaseUpdateParamsRulesetPhaseHTTPRequestSelectConfiguration PhaseUpdateParamsRulesetPhase = "http_request_select_configuration" - PhaseUpdateParamsRulesetPhaseHTTPRequestTransform PhaseUpdateParamsRulesetPhase = "http_request_transform" - PhaseUpdateParamsRulesetPhaseHTTPResponseCompression PhaseUpdateParamsRulesetPhase = "http_response_compression" - PhaseUpdateParamsRulesetPhaseHTTPResponseFirewallManaged PhaseUpdateParamsRulesetPhase = "http_response_firewall_managed" - PhaseUpdateParamsRulesetPhaseHTTPResponseHeadersTransform PhaseUpdateParamsRulesetPhase = "http_response_headers_transform" - PhaseUpdateParamsRulesetPhaseMagicTransit PhaseUpdateParamsRulesetPhase = "magic_transit" - PhaseUpdateParamsRulesetPhaseMagicTransitIDsManaged PhaseUpdateParamsRulesetPhase = "magic_transit_ids_managed" - PhaseUpdateParamsRulesetPhaseMagicTransitManaged PhaseUpdateParamsRulesetPhase = "magic_transit_managed" -) - -func (r PhaseUpdateParamsRulesetPhase) IsKnown() bool { - switch r { - case PhaseUpdateParamsRulesetPhaseDDoSL4, PhaseUpdateParamsRulesetPhaseDDoSL7, PhaseUpdateParamsRulesetPhaseHTTPConfigSettings, PhaseUpdateParamsRulesetPhaseHTTPCustomErrors, PhaseUpdateParamsRulesetPhaseHTTPLogCustomFields, PhaseUpdateParamsRulesetPhaseHTTPRatelimit, PhaseUpdateParamsRulesetPhaseHTTPRequestCacheSettings, PhaseUpdateParamsRulesetPhaseHTTPRequestDynamicRedirect, PhaseUpdateParamsRulesetPhaseHTTPRequestFirewallCustom, PhaseUpdateParamsRulesetPhaseHTTPRequestFirewallManaged, PhaseUpdateParamsRulesetPhaseHTTPRequestLateTransform, PhaseUpdateParamsRulesetPhaseHTTPRequestOrigin, PhaseUpdateParamsRulesetPhaseHTTPRequestRedirect, PhaseUpdateParamsRulesetPhaseHTTPRequestSanitize, PhaseUpdateParamsRulesetPhaseHTTPRequestSBFM, PhaseUpdateParamsRulesetPhaseHTTPRequestSelectConfiguration, PhaseUpdateParamsRulesetPhaseHTTPRequestTransform, PhaseUpdateParamsRulesetPhaseHTTPResponseCompression, PhaseUpdateParamsRulesetPhaseHTTPResponseFirewallManaged, PhaseUpdateParamsRulesetPhaseHTTPResponseHeadersTransform, PhaseUpdateParamsRulesetPhaseMagicTransit, PhaseUpdateParamsRulesetPhaseMagicTransitIDsManaged, PhaseUpdateParamsRulesetPhaseMagicTransitManaged: - return true - } - return false -} - type PhaseUpdateParamsRule struct { // The action to perform when the rule matches. Action param.Field[PhaseUpdateParamsRulesAction] `json:"action"` @@ -762,61 +615,6 @@ func (r PhaseUpdateParamsRulesAction) IsKnown() bool { return false } -// The kind of the ruleset. -type PhaseUpdateParamsKind string - -const ( - PhaseUpdateParamsKindManaged PhaseUpdateParamsKind = "managed" - PhaseUpdateParamsKindCustom PhaseUpdateParamsKind = "custom" - PhaseUpdateParamsKindRoot PhaseUpdateParamsKind = "root" - PhaseUpdateParamsKindZone PhaseUpdateParamsKind = "zone" -) - -func (r PhaseUpdateParamsKind) IsKnown() bool { - switch r { - case PhaseUpdateParamsKindManaged, PhaseUpdateParamsKindCustom, PhaseUpdateParamsKindRoot, PhaseUpdateParamsKindZone: - return true - } - return false -} - -// The phase of the ruleset. -type PhaseUpdateParamsPhase string - -const ( - PhaseUpdateParamsPhaseDDoSL4 PhaseUpdateParamsPhase = "ddos_l4" - PhaseUpdateParamsPhaseDDoSL7 PhaseUpdateParamsPhase = "ddos_l7" - PhaseUpdateParamsPhaseHTTPConfigSettings PhaseUpdateParamsPhase = "http_config_settings" - PhaseUpdateParamsPhaseHTTPCustomErrors PhaseUpdateParamsPhase = "http_custom_errors" - PhaseUpdateParamsPhaseHTTPLogCustomFields PhaseUpdateParamsPhase = "http_log_custom_fields" - PhaseUpdateParamsPhaseHTTPRatelimit PhaseUpdateParamsPhase = "http_ratelimit" - PhaseUpdateParamsPhaseHTTPRequestCacheSettings PhaseUpdateParamsPhase = "http_request_cache_settings" - PhaseUpdateParamsPhaseHTTPRequestDynamicRedirect PhaseUpdateParamsPhase = "http_request_dynamic_redirect" - PhaseUpdateParamsPhaseHTTPRequestFirewallCustom PhaseUpdateParamsPhase = "http_request_firewall_custom" - PhaseUpdateParamsPhaseHTTPRequestFirewallManaged PhaseUpdateParamsPhase = "http_request_firewall_managed" - PhaseUpdateParamsPhaseHTTPRequestLateTransform PhaseUpdateParamsPhase = "http_request_late_transform" - PhaseUpdateParamsPhaseHTTPRequestOrigin PhaseUpdateParamsPhase = "http_request_origin" - PhaseUpdateParamsPhaseHTTPRequestRedirect PhaseUpdateParamsPhase = "http_request_redirect" - PhaseUpdateParamsPhaseHTTPRequestSanitize PhaseUpdateParamsPhase = "http_request_sanitize" - PhaseUpdateParamsPhaseHTTPRequestSBFM PhaseUpdateParamsPhase = "http_request_sbfm" - PhaseUpdateParamsPhaseHTTPRequestSelectConfiguration PhaseUpdateParamsPhase = "http_request_select_configuration" - PhaseUpdateParamsPhaseHTTPRequestTransform PhaseUpdateParamsPhase = "http_request_transform" - PhaseUpdateParamsPhaseHTTPResponseCompression PhaseUpdateParamsPhase = "http_response_compression" - PhaseUpdateParamsPhaseHTTPResponseFirewallManaged PhaseUpdateParamsPhase = "http_response_firewall_managed" - PhaseUpdateParamsPhaseHTTPResponseHeadersTransform PhaseUpdateParamsPhase = "http_response_headers_transform" - PhaseUpdateParamsPhaseMagicTransit PhaseUpdateParamsPhase = "magic_transit" - PhaseUpdateParamsPhaseMagicTransitIDsManaged PhaseUpdateParamsPhase = "magic_transit_ids_managed" - PhaseUpdateParamsPhaseMagicTransitManaged PhaseUpdateParamsPhase = "magic_transit_managed" -) - -func (r PhaseUpdateParamsPhase) IsKnown() bool { - switch r { - case PhaseUpdateParamsPhaseDDoSL4, PhaseUpdateParamsPhaseDDoSL7, PhaseUpdateParamsPhaseHTTPConfigSettings, PhaseUpdateParamsPhaseHTTPCustomErrors, PhaseUpdateParamsPhaseHTTPLogCustomFields, PhaseUpdateParamsPhaseHTTPRatelimit, PhaseUpdateParamsPhaseHTTPRequestCacheSettings, PhaseUpdateParamsPhaseHTTPRequestDynamicRedirect, PhaseUpdateParamsPhaseHTTPRequestFirewallCustom, PhaseUpdateParamsPhaseHTTPRequestFirewallManaged, PhaseUpdateParamsPhaseHTTPRequestLateTransform, PhaseUpdateParamsPhaseHTTPRequestOrigin, PhaseUpdateParamsPhaseHTTPRequestRedirect, PhaseUpdateParamsPhaseHTTPRequestSanitize, PhaseUpdateParamsPhaseHTTPRequestSBFM, PhaseUpdateParamsPhaseHTTPRequestSelectConfiguration, PhaseUpdateParamsPhaseHTTPRequestTransform, PhaseUpdateParamsPhaseHTTPResponseCompression, PhaseUpdateParamsPhaseHTTPResponseFirewallManaged, PhaseUpdateParamsPhaseHTTPResponseHeadersTransform, PhaseUpdateParamsPhaseMagicTransit, PhaseUpdateParamsPhaseMagicTransitIDsManaged, PhaseUpdateParamsPhaseMagicTransitManaged: - return true - } - return false -} - // A response object. type PhaseUpdateResponseEnvelope struct { // A list of error messages. @@ -975,43 +773,6 @@ type PhaseGetParams struct { ZoneID param.Field[string] `path:"zone_id"` } -// The phase of the ruleset. -type PhaseGetParamsRulesetPhase string - -const ( - PhaseGetParamsRulesetPhaseDDoSL4 PhaseGetParamsRulesetPhase = "ddos_l4" - PhaseGetParamsRulesetPhaseDDoSL7 PhaseGetParamsRulesetPhase = "ddos_l7" - PhaseGetParamsRulesetPhaseHTTPConfigSettings PhaseGetParamsRulesetPhase = "http_config_settings" - PhaseGetParamsRulesetPhaseHTTPCustomErrors PhaseGetParamsRulesetPhase = "http_custom_errors" - PhaseGetParamsRulesetPhaseHTTPLogCustomFields PhaseGetParamsRulesetPhase = "http_log_custom_fields" - PhaseGetParamsRulesetPhaseHTTPRatelimit PhaseGetParamsRulesetPhase = "http_ratelimit" - PhaseGetParamsRulesetPhaseHTTPRequestCacheSettings PhaseGetParamsRulesetPhase = "http_request_cache_settings" - PhaseGetParamsRulesetPhaseHTTPRequestDynamicRedirect PhaseGetParamsRulesetPhase = "http_request_dynamic_redirect" - PhaseGetParamsRulesetPhaseHTTPRequestFirewallCustom PhaseGetParamsRulesetPhase = "http_request_firewall_custom" - PhaseGetParamsRulesetPhaseHTTPRequestFirewallManaged PhaseGetParamsRulesetPhase = "http_request_firewall_managed" - PhaseGetParamsRulesetPhaseHTTPRequestLateTransform PhaseGetParamsRulesetPhase = "http_request_late_transform" - PhaseGetParamsRulesetPhaseHTTPRequestOrigin PhaseGetParamsRulesetPhase = "http_request_origin" - PhaseGetParamsRulesetPhaseHTTPRequestRedirect PhaseGetParamsRulesetPhase = "http_request_redirect" - PhaseGetParamsRulesetPhaseHTTPRequestSanitize PhaseGetParamsRulesetPhase = "http_request_sanitize" - PhaseGetParamsRulesetPhaseHTTPRequestSBFM PhaseGetParamsRulesetPhase = "http_request_sbfm" - PhaseGetParamsRulesetPhaseHTTPRequestSelectConfiguration PhaseGetParamsRulesetPhase = "http_request_select_configuration" - PhaseGetParamsRulesetPhaseHTTPRequestTransform PhaseGetParamsRulesetPhase = "http_request_transform" - PhaseGetParamsRulesetPhaseHTTPResponseCompression PhaseGetParamsRulesetPhase = "http_response_compression" - PhaseGetParamsRulesetPhaseHTTPResponseFirewallManaged PhaseGetParamsRulesetPhase = "http_response_firewall_managed" - PhaseGetParamsRulesetPhaseHTTPResponseHeadersTransform PhaseGetParamsRulesetPhase = "http_response_headers_transform" - PhaseGetParamsRulesetPhaseMagicTransit PhaseGetParamsRulesetPhase = "magic_transit" - PhaseGetParamsRulesetPhaseMagicTransitIDsManaged PhaseGetParamsRulesetPhase = "magic_transit_ids_managed" - PhaseGetParamsRulesetPhaseMagicTransitManaged PhaseGetParamsRulesetPhase = "magic_transit_managed" -) - -func (r PhaseGetParamsRulesetPhase) IsKnown() bool { - switch r { - case PhaseGetParamsRulesetPhaseDDoSL4, PhaseGetParamsRulesetPhaseDDoSL7, PhaseGetParamsRulesetPhaseHTTPConfigSettings, PhaseGetParamsRulesetPhaseHTTPCustomErrors, PhaseGetParamsRulesetPhaseHTTPLogCustomFields, PhaseGetParamsRulesetPhaseHTTPRatelimit, PhaseGetParamsRulesetPhaseHTTPRequestCacheSettings, PhaseGetParamsRulesetPhaseHTTPRequestDynamicRedirect, PhaseGetParamsRulesetPhaseHTTPRequestFirewallCustom, PhaseGetParamsRulesetPhaseHTTPRequestFirewallManaged, PhaseGetParamsRulesetPhaseHTTPRequestLateTransform, PhaseGetParamsRulesetPhaseHTTPRequestOrigin, PhaseGetParamsRulesetPhaseHTTPRequestRedirect, PhaseGetParamsRulesetPhaseHTTPRequestSanitize, PhaseGetParamsRulesetPhaseHTTPRequestSBFM, PhaseGetParamsRulesetPhaseHTTPRequestSelectConfiguration, PhaseGetParamsRulesetPhaseHTTPRequestTransform, PhaseGetParamsRulesetPhaseHTTPResponseCompression, PhaseGetParamsRulesetPhaseHTTPResponseFirewallManaged, PhaseGetParamsRulesetPhaseHTTPResponseHeadersTransform, PhaseGetParamsRulesetPhaseMagicTransit, PhaseGetParamsRulesetPhaseMagicTransitIDsManaged, PhaseGetParamsRulesetPhaseMagicTransitManaged: - return true - } - return false -} - // A response object. type PhaseGetResponseEnvelope struct { // A list of error messages. diff --git a/rulesets/phase_test.go b/rulesets/phase_test.go index ff5ebbabce..df14e32e1d 100644 --- a/rulesets/phase_test.go +++ b/rulesets/phase_test.go @@ -30,7 +30,7 @@ func TestPhaseUpdateWithOptionalParams(t *testing.T) { ) _, err := client.Rulesets.Phases.Update( context.TODO(), - rulesets.PhaseUpdateParamsRulesetPhaseHTTPRequestFirewallCustom, + rulesets.PhaseHTTPRequestFirewallCustom, rulesets.PhaseUpdateParams{ Rules: cloudflare.F([]rulesets.PhaseUpdateParamsRuleUnion{rulesets.BlockRuleParam{ Action: cloudflare.F(rulesets.BlockRuleActionBlock), @@ -87,9 +87,9 @@ func TestPhaseUpdateWithOptionalParams(t *testing.T) { AccountID: cloudflare.F("string"), ZoneID: cloudflare.F("string"), Description: cloudflare.F("My ruleset to execute managed rulesets"), - Kind: cloudflare.F(rulesets.PhaseUpdateParamsKindRoot), + Kind: cloudflare.F(rulesets.KindRoot), Name: cloudflare.F("My ruleset"), - Phase: cloudflare.F(rulesets.PhaseUpdateParamsPhaseHTTPRequestFirewallCustom), + Phase: cloudflare.F(rulesets.PhaseHTTPRequestFirewallCustom), }, ) if err != nil { @@ -117,7 +117,7 @@ func TestPhaseGetWithOptionalParams(t *testing.T) { ) _, err := client.Rulesets.Phases.Get( context.TODO(), - rulesets.PhaseGetParamsRulesetPhaseHTTPRequestFirewallCustom, + rulesets.PhaseHTTPRequestFirewallCustom, rulesets.PhaseGetParams{ AccountID: cloudflare.F("string"), ZoneID: cloudflare.F("string"), diff --git a/rulesets/phaseversion.go b/rulesets/phaseversion.go index 0515679216..5575db9bc8 100644 --- a/rulesets/phaseversion.go +++ b/rulesets/phaseversion.go @@ -36,7 +36,7 @@ func NewPhaseVersionService(opts ...option.RequestOption) (r *PhaseVersionServic } // Fetches the versions of an account or zone entry point ruleset. -func (r *PhaseVersionService) List(ctx context.Context, rulesetPhase PhaseVersionListParamsRulesetPhase, query PhaseVersionListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Ruleset], err error) { +func (r *PhaseVersionService) List(ctx context.Context, rulesetPhase Phase, query PhaseVersionListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Ruleset], err error) { var raw *http.Response opts = append(r.Options, opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) @@ -63,12 +63,12 @@ func (r *PhaseVersionService) List(ctx context.Context, rulesetPhase PhaseVersio } // Fetches the versions of an account or zone entry point ruleset. -func (r *PhaseVersionService) ListAutoPaging(ctx context.Context, rulesetPhase PhaseVersionListParamsRulesetPhase, query PhaseVersionListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Ruleset] { +func (r *PhaseVersionService) ListAutoPaging(ctx context.Context, rulesetPhase Phase, query PhaseVersionListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Ruleset] { return pagination.NewSinglePageAutoPager(r.List(ctx, rulesetPhase, query, opts...)) } // Fetches a specific version of an account or zone entry point ruleset. -func (r *PhaseVersionService) Get(ctx context.Context, rulesetPhase PhaseVersionGetParamsRulesetPhase, rulesetVersion string, query PhaseVersionGetParams, opts ...option.RequestOption) (res *PhaseVersionGetResponse, err error) { +func (r *PhaseVersionService) Get(ctx context.Context, rulesetPhase Phase, rulesetVersion string, query PhaseVersionGetParams, opts ...option.RequestOption) (res *PhaseVersionGetResponse, err error) { opts = append(r.Options[:], opts...) var env PhaseVersionGetResponseEnvelope var accountOrZone string @@ -94,13 +94,13 @@ type PhaseVersionGetResponse struct { // The unique ID of the ruleset. ID string `json:"id,required"` // The kind of the ruleset. - Kind PhaseVersionGetResponseKind `json:"kind,required"` + Kind Kind `json:"kind,required"` // The timestamp of when the ruleset was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The human-readable name of the ruleset. Name string `json:"name,required"` // The phase of the ruleset. - Phase PhaseVersionGetResponsePhase `json:"phase,required"` + Phase Phase `json:"phase,required"` // The list of rules in the ruleset. Rules []PhaseVersionGetResponseRule `json:"rules,required"` // The version of the ruleset. @@ -133,61 +133,6 @@ func (r phaseVersionGetResponseJSON) RawJSON() string { return r.raw } -// The kind of the ruleset. -type PhaseVersionGetResponseKind string - -const ( - PhaseVersionGetResponseKindManaged PhaseVersionGetResponseKind = "managed" - PhaseVersionGetResponseKindCustom PhaseVersionGetResponseKind = "custom" - PhaseVersionGetResponseKindRoot PhaseVersionGetResponseKind = "root" - PhaseVersionGetResponseKindZone PhaseVersionGetResponseKind = "zone" -) - -func (r PhaseVersionGetResponseKind) IsKnown() bool { - switch r { - case PhaseVersionGetResponseKindManaged, PhaseVersionGetResponseKindCustom, PhaseVersionGetResponseKindRoot, PhaseVersionGetResponseKindZone: - return true - } - return false -} - -// The phase of the ruleset. -type PhaseVersionGetResponsePhase string - -const ( - PhaseVersionGetResponsePhaseDDoSL4 PhaseVersionGetResponsePhase = "ddos_l4" - PhaseVersionGetResponsePhaseDDoSL7 PhaseVersionGetResponsePhase = "ddos_l7" - PhaseVersionGetResponsePhaseHTTPConfigSettings PhaseVersionGetResponsePhase = "http_config_settings" - PhaseVersionGetResponsePhaseHTTPCustomErrors PhaseVersionGetResponsePhase = "http_custom_errors" - PhaseVersionGetResponsePhaseHTTPLogCustomFields PhaseVersionGetResponsePhase = "http_log_custom_fields" - PhaseVersionGetResponsePhaseHTTPRatelimit PhaseVersionGetResponsePhase = "http_ratelimit" - PhaseVersionGetResponsePhaseHTTPRequestCacheSettings PhaseVersionGetResponsePhase = "http_request_cache_settings" - PhaseVersionGetResponsePhaseHTTPRequestDynamicRedirect PhaseVersionGetResponsePhase = "http_request_dynamic_redirect" - PhaseVersionGetResponsePhaseHTTPRequestFirewallCustom PhaseVersionGetResponsePhase = "http_request_firewall_custom" - PhaseVersionGetResponsePhaseHTTPRequestFirewallManaged PhaseVersionGetResponsePhase = "http_request_firewall_managed" - PhaseVersionGetResponsePhaseHTTPRequestLateTransform PhaseVersionGetResponsePhase = "http_request_late_transform" - PhaseVersionGetResponsePhaseHTTPRequestOrigin PhaseVersionGetResponsePhase = "http_request_origin" - PhaseVersionGetResponsePhaseHTTPRequestRedirect PhaseVersionGetResponsePhase = "http_request_redirect" - PhaseVersionGetResponsePhaseHTTPRequestSanitize PhaseVersionGetResponsePhase = "http_request_sanitize" - PhaseVersionGetResponsePhaseHTTPRequestSBFM PhaseVersionGetResponsePhase = "http_request_sbfm" - PhaseVersionGetResponsePhaseHTTPRequestSelectConfiguration PhaseVersionGetResponsePhase = "http_request_select_configuration" - PhaseVersionGetResponsePhaseHTTPRequestTransform PhaseVersionGetResponsePhase = "http_request_transform" - PhaseVersionGetResponsePhaseHTTPResponseCompression PhaseVersionGetResponsePhase = "http_response_compression" - PhaseVersionGetResponsePhaseHTTPResponseFirewallManaged PhaseVersionGetResponsePhase = "http_response_firewall_managed" - PhaseVersionGetResponsePhaseHTTPResponseHeadersTransform PhaseVersionGetResponsePhase = "http_response_headers_transform" - PhaseVersionGetResponsePhaseMagicTransit PhaseVersionGetResponsePhase = "magic_transit" - PhaseVersionGetResponsePhaseMagicTransitIDsManaged PhaseVersionGetResponsePhase = "magic_transit_ids_managed" - PhaseVersionGetResponsePhaseMagicTransitManaged PhaseVersionGetResponsePhase = "magic_transit_managed" -) - -func (r PhaseVersionGetResponsePhase) IsKnown() bool { - switch r { - case PhaseVersionGetResponsePhaseDDoSL4, PhaseVersionGetResponsePhaseDDoSL7, PhaseVersionGetResponsePhaseHTTPConfigSettings, PhaseVersionGetResponsePhaseHTTPCustomErrors, PhaseVersionGetResponsePhaseHTTPLogCustomFields, PhaseVersionGetResponsePhaseHTTPRatelimit, PhaseVersionGetResponsePhaseHTTPRequestCacheSettings, PhaseVersionGetResponsePhaseHTTPRequestDynamicRedirect, PhaseVersionGetResponsePhaseHTTPRequestFirewallCustom, PhaseVersionGetResponsePhaseHTTPRequestFirewallManaged, PhaseVersionGetResponsePhaseHTTPRequestLateTransform, PhaseVersionGetResponsePhaseHTTPRequestOrigin, PhaseVersionGetResponsePhaseHTTPRequestRedirect, PhaseVersionGetResponsePhaseHTTPRequestSanitize, PhaseVersionGetResponsePhaseHTTPRequestSBFM, PhaseVersionGetResponsePhaseHTTPRequestSelectConfiguration, PhaseVersionGetResponsePhaseHTTPRequestTransform, PhaseVersionGetResponsePhaseHTTPResponseCompression, PhaseVersionGetResponsePhaseHTTPResponseFirewallManaged, PhaseVersionGetResponsePhaseHTTPResponseHeadersTransform, PhaseVersionGetResponsePhaseMagicTransit, PhaseVersionGetResponsePhaseMagicTransitIDsManaged, PhaseVersionGetResponsePhaseMagicTransitManaged: - return true - } - return false -} - type PhaseVersionGetResponseRule struct { // The action to perform when the rule matches. Action PhaseVersionGetResponseRulesAction `json:"action"` @@ -375,43 +320,6 @@ type PhaseVersionListParams struct { ZoneID param.Field[string] `path:"zone_id"` } -// The phase of the ruleset. -type PhaseVersionListParamsRulesetPhase string - -const ( - PhaseVersionListParamsRulesetPhaseDDoSL4 PhaseVersionListParamsRulesetPhase = "ddos_l4" - PhaseVersionListParamsRulesetPhaseDDoSL7 PhaseVersionListParamsRulesetPhase = "ddos_l7" - PhaseVersionListParamsRulesetPhaseHTTPConfigSettings PhaseVersionListParamsRulesetPhase = "http_config_settings" - PhaseVersionListParamsRulesetPhaseHTTPCustomErrors PhaseVersionListParamsRulesetPhase = "http_custom_errors" - PhaseVersionListParamsRulesetPhaseHTTPLogCustomFields PhaseVersionListParamsRulesetPhase = "http_log_custom_fields" - PhaseVersionListParamsRulesetPhaseHTTPRatelimit PhaseVersionListParamsRulesetPhase = "http_ratelimit" - PhaseVersionListParamsRulesetPhaseHTTPRequestCacheSettings PhaseVersionListParamsRulesetPhase = "http_request_cache_settings" - PhaseVersionListParamsRulesetPhaseHTTPRequestDynamicRedirect PhaseVersionListParamsRulesetPhase = "http_request_dynamic_redirect" - PhaseVersionListParamsRulesetPhaseHTTPRequestFirewallCustom PhaseVersionListParamsRulesetPhase = "http_request_firewall_custom" - PhaseVersionListParamsRulesetPhaseHTTPRequestFirewallManaged PhaseVersionListParamsRulesetPhase = "http_request_firewall_managed" - PhaseVersionListParamsRulesetPhaseHTTPRequestLateTransform PhaseVersionListParamsRulesetPhase = "http_request_late_transform" - PhaseVersionListParamsRulesetPhaseHTTPRequestOrigin PhaseVersionListParamsRulesetPhase = "http_request_origin" - PhaseVersionListParamsRulesetPhaseHTTPRequestRedirect PhaseVersionListParamsRulesetPhase = "http_request_redirect" - PhaseVersionListParamsRulesetPhaseHTTPRequestSanitize PhaseVersionListParamsRulesetPhase = "http_request_sanitize" - PhaseVersionListParamsRulesetPhaseHTTPRequestSBFM PhaseVersionListParamsRulesetPhase = "http_request_sbfm" - PhaseVersionListParamsRulesetPhaseHTTPRequestSelectConfiguration PhaseVersionListParamsRulesetPhase = "http_request_select_configuration" - PhaseVersionListParamsRulesetPhaseHTTPRequestTransform PhaseVersionListParamsRulesetPhase = "http_request_transform" - PhaseVersionListParamsRulesetPhaseHTTPResponseCompression PhaseVersionListParamsRulesetPhase = "http_response_compression" - PhaseVersionListParamsRulesetPhaseHTTPResponseFirewallManaged PhaseVersionListParamsRulesetPhase = "http_response_firewall_managed" - PhaseVersionListParamsRulesetPhaseHTTPResponseHeadersTransform PhaseVersionListParamsRulesetPhase = "http_response_headers_transform" - PhaseVersionListParamsRulesetPhaseMagicTransit PhaseVersionListParamsRulesetPhase = "magic_transit" - PhaseVersionListParamsRulesetPhaseMagicTransitIDsManaged PhaseVersionListParamsRulesetPhase = "magic_transit_ids_managed" - PhaseVersionListParamsRulesetPhaseMagicTransitManaged PhaseVersionListParamsRulesetPhase = "magic_transit_managed" -) - -func (r PhaseVersionListParamsRulesetPhase) IsKnown() bool { - switch r { - case PhaseVersionListParamsRulesetPhaseDDoSL4, PhaseVersionListParamsRulesetPhaseDDoSL7, PhaseVersionListParamsRulesetPhaseHTTPConfigSettings, PhaseVersionListParamsRulesetPhaseHTTPCustomErrors, PhaseVersionListParamsRulesetPhaseHTTPLogCustomFields, PhaseVersionListParamsRulesetPhaseHTTPRatelimit, PhaseVersionListParamsRulesetPhaseHTTPRequestCacheSettings, PhaseVersionListParamsRulesetPhaseHTTPRequestDynamicRedirect, PhaseVersionListParamsRulesetPhaseHTTPRequestFirewallCustom, PhaseVersionListParamsRulesetPhaseHTTPRequestFirewallManaged, PhaseVersionListParamsRulesetPhaseHTTPRequestLateTransform, PhaseVersionListParamsRulesetPhaseHTTPRequestOrigin, PhaseVersionListParamsRulesetPhaseHTTPRequestRedirect, PhaseVersionListParamsRulesetPhaseHTTPRequestSanitize, PhaseVersionListParamsRulesetPhaseHTTPRequestSBFM, PhaseVersionListParamsRulesetPhaseHTTPRequestSelectConfiguration, PhaseVersionListParamsRulesetPhaseHTTPRequestTransform, PhaseVersionListParamsRulesetPhaseHTTPResponseCompression, PhaseVersionListParamsRulesetPhaseHTTPResponseFirewallManaged, PhaseVersionListParamsRulesetPhaseHTTPResponseHeadersTransform, PhaseVersionListParamsRulesetPhaseMagicTransit, PhaseVersionListParamsRulesetPhaseMagicTransitIDsManaged, PhaseVersionListParamsRulesetPhaseMagicTransitManaged: - return true - } - return false -} - type PhaseVersionGetParams struct { // The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. AccountID param.Field[string] `path:"account_id"` @@ -419,43 +327,6 @@ type PhaseVersionGetParams struct { ZoneID param.Field[string] `path:"zone_id"` } -// The phase of the ruleset. -type PhaseVersionGetParamsRulesetPhase string - -const ( - PhaseVersionGetParamsRulesetPhaseDDoSL4 PhaseVersionGetParamsRulesetPhase = "ddos_l4" - PhaseVersionGetParamsRulesetPhaseDDoSL7 PhaseVersionGetParamsRulesetPhase = "ddos_l7" - PhaseVersionGetParamsRulesetPhaseHTTPConfigSettings PhaseVersionGetParamsRulesetPhase = "http_config_settings" - PhaseVersionGetParamsRulesetPhaseHTTPCustomErrors PhaseVersionGetParamsRulesetPhase = "http_custom_errors" - PhaseVersionGetParamsRulesetPhaseHTTPLogCustomFields PhaseVersionGetParamsRulesetPhase = "http_log_custom_fields" - PhaseVersionGetParamsRulesetPhaseHTTPRatelimit PhaseVersionGetParamsRulesetPhase = "http_ratelimit" - PhaseVersionGetParamsRulesetPhaseHTTPRequestCacheSettings PhaseVersionGetParamsRulesetPhase = "http_request_cache_settings" - PhaseVersionGetParamsRulesetPhaseHTTPRequestDynamicRedirect PhaseVersionGetParamsRulesetPhase = "http_request_dynamic_redirect" - PhaseVersionGetParamsRulesetPhaseHTTPRequestFirewallCustom PhaseVersionGetParamsRulesetPhase = "http_request_firewall_custom" - PhaseVersionGetParamsRulesetPhaseHTTPRequestFirewallManaged PhaseVersionGetParamsRulesetPhase = "http_request_firewall_managed" - PhaseVersionGetParamsRulesetPhaseHTTPRequestLateTransform PhaseVersionGetParamsRulesetPhase = "http_request_late_transform" - PhaseVersionGetParamsRulesetPhaseHTTPRequestOrigin PhaseVersionGetParamsRulesetPhase = "http_request_origin" - PhaseVersionGetParamsRulesetPhaseHTTPRequestRedirect PhaseVersionGetParamsRulesetPhase = "http_request_redirect" - PhaseVersionGetParamsRulesetPhaseHTTPRequestSanitize PhaseVersionGetParamsRulesetPhase = "http_request_sanitize" - PhaseVersionGetParamsRulesetPhaseHTTPRequestSBFM PhaseVersionGetParamsRulesetPhase = "http_request_sbfm" - PhaseVersionGetParamsRulesetPhaseHTTPRequestSelectConfiguration PhaseVersionGetParamsRulesetPhase = "http_request_select_configuration" - PhaseVersionGetParamsRulesetPhaseHTTPRequestTransform PhaseVersionGetParamsRulesetPhase = "http_request_transform" - PhaseVersionGetParamsRulesetPhaseHTTPResponseCompression PhaseVersionGetParamsRulesetPhase = "http_response_compression" - PhaseVersionGetParamsRulesetPhaseHTTPResponseFirewallManaged PhaseVersionGetParamsRulesetPhase = "http_response_firewall_managed" - PhaseVersionGetParamsRulesetPhaseHTTPResponseHeadersTransform PhaseVersionGetParamsRulesetPhase = "http_response_headers_transform" - PhaseVersionGetParamsRulesetPhaseMagicTransit PhaseVersionGetParamsRulesetPhase = "magic_transit" - PhaseVersionGetParamsRulesetPhaseMagicTransitIDsManaged PhaseVersionGetParamsRulesetPhase = "magic_transit_ids_managed" - PhaseVersionGetParamsRulesetPhaseMagicTransitManaged PhaseVersionGetParamsRulesetPhase = "magic_transit_managed" -) - -func (r PhaseVersionGetParamsRulesetPhase) IsKnown() bool { - switch r { - case PhaseVersionGetParamsRulesetPhaseDDoSL4, PhaseVersionGetParamsRulesetPhaseDDoSL7, PhaseVersionGetParamsRulesetPhaseHTTPConfigSettings, PhaseVersionGetParamsRulesetPhaseHTTPCustomErrors, PhaseVersionGetParamsRulesetPhaseHTTPLogCustomFields, PhaseVersionGetParamsRulesetPhaseHTTPRatelimit, PhaseVersionGetParamsRulesetPhaseHTTPRequestCacheSettings, PhaseVersionGetParamsRulesetPhaseHTTPRequestDynamicRedirect, PhaseVersionGetParamsRulesetPhaseHTTPRequestFirewallCustom, PhaseVersionGetParamsRulesetPhaseHTTPRequestFirewallManaged, PhaseVersionGetParamsRulesetPhaseHTTPRequestLateTransform, PhaseVersionGetParamsRulesetPhaseHTTPRequestOrigin, PhaseVersionGetParamsRulesetPhaseHTTPRequestRedirect, PhaseVersionGetParamsRulesetPhaseHTTPRequestSanitize, PhaseVersionGetParamsRulesetPhaseHTTPRequestSBFM, PhaseVersionGetParamsRulesetPhaseHTTPRequestSelectConfiguration, PhaseVersionGetParamsRulesetPhaseHTTPRequestTransform, PhaseVersionGetParamsRulesetPhaseHTTPResponseCompression, PhaseVersionGetParamsRulesetPhaseHTTPResponseFirewallManaged, PhaseVersionGetParamsRulesetPhaseHTTPResponseHeadersTransform, PhaseVersionGetParamsRulesetPhaseMagicTransit, PhaseVersionGetParamsRulesetPhaseMagicTransitIDsManaged, PhaseVersionGetParamsRulesetPhaseMagicTransitManaged: - return true - } - return false -} - // A response object. type PhaseVersionGetResponseEnvelope struct { // A list of error messages. diff --git a/rulesets/phaseversion_test.go b/rulesets/phaseversion_test.go index 34f90a3b31..4a5095a983 100644 --- a/rulesets/phaseversion_test.go +++ b/rulesets/phaseversion_test.go @@ -30,7 +30,7 @@ func TestPhaseVersionListWithOptionalParams(t *testing.T) { ) _, err := client.Rulesets.Phases.Versions.List( context.TODO(), - rulesets.PhaseVersionListParamsRulesetPhaseHTTPRequestFirewallCustom, + rulesets.PhaseHTTPRequestFirewallCustom, rulesets.PhaseVersionListParams{ AccountID: cloudflare.F("string"), ZoneID: cloudflare.F("string"), @@ -61,7 +61,7 @@ func TestPhaseVersionGetWithOptionalParams(t *testing.T) { ) _, err := client.Rulesets.Phases.Versions.Get( context.TODO(), - rulesets.PhaseVersionGetParamsRulesetPhaseHTTPRequestFirewallCustom, + rulesets.PhaseHTTPRequestFirewallCustom, "1", rulesets.PhaseVersionGetParams{ AccountID: cloudflare.F("string"), diff --git a/rulesets/rule.go b/rulesets/rule.go index 3f6bb6ea59..1bbf4d3d4b 100644 --- a/rulesets/rule.go +++ b/rulesets/rule.go @@ -4336,7 +4336,7 @@ func (r SkipRuleAction) IsKnown() bool { type SkipRuleActionParameters struct { // A list of phases to skip the execution of. This option is incompatible with the // ruleset and rulesets options. - Phases []SkipRuleActionParametersPhase `json:"phases"` + Phases []Phase `json:"phases"` // A list of legacy security products to skip the execution of. Products []SkipRuleActionParametersProduct `json:"products"` // A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the @@ -4371,43 +4371,6 @@ func (r skipRuleActionParametersJSON) RawJSON() string { return r.raw } -// A phase to skip the execution of. -type SkipRuleActionParametersPhase string - -const ( - SkipRuleActionParametersPhaseDDoSL4 SkipRuleActionParametersPhase = "ddos_l4" - SkipRuleActionParametersPhaseDDoSL7 SkipRuleActionParametersPhase = "ddos_l7" - SkipRuleActionParametersPhaseHTTPConfigSettings SkipRuleActionParametersPhase = "http_config_settings" - SkipRuleActionParametersPhaseHTTPCustomErrors SkipRuleActionParametersPhase = "http_custom_errors" - SkipRuleActionParametersPhaseHTTPLogCustomFields SkipRuleActionParametersPhase = "http_log_custom_fields" - SkipRuleActionParametersPhaseHTTPRatelimit SkipRuleActionParametersPhase = "http_ratelimit" - SkipRuleActionParametersPhaseHTTPRequestCacheSettings SkipRuleActionParametersPhase = "http_request_cache_settings" - SkipRuleActionParametersPhaseHTTPRequestDynamicRedirect SkipRuleActionParametersPhase = "http_request_dynamic_redirect" - SkipRuleActionParametersPhaseHTTPRequestFirewallCustom SkipRuleActionParametersPhase = "http_request_firewall_custom" - SkipRuleActionParametersPhaseHTTPRequestFirewallManaged SkipRuleActionParametersPhase = "http_request_firewall_managed" - SkipRuleActionParametersPhaseHTTPRequestLateTransform SkipRuleActionParametersPhase = "http_request_late_transform" - SkipRuleActionParametersPhaseHTTPRequestOrigin SkipRuleActionParametersPhase = "http_request_origin" - SkipRuleActionParametersPhaseHTTPRequestRedirect SkipRuleActionParametersPhase = "http_request_redirect" - SkipRuleActionParametersPhaseHTTPRequestSanitize SkipRuleActionParametersPhase = "http_request_sanitize" - SkipRuleActionParametersPhaseHTTPRequestSBFM SkipRuleActionParametersPhase = "http_request_sbfm" - SkipRuleActionParametersPhaseHTTPRequestSelectConfiguration SkipRuleActionParametersPhase = "http_request_select_configuration" - SkipRuleActionParametersPhaseHTTPRequestTransform SkipRuleActionParametersPhase = "http_request_transform" - SkipRuleActionParametersPhaseHTTPResponseCompression SkipRuleActionParametersPhase = "http_response_compression" - SkipRuleActionParametersPhaseHTTPResponseFirewallManaged SkipRuleActionParametersPhase = "http_response_firewall_managed" - SkipRuleActionParametersPhaseHTTPResponseHeadersTransform SkipRuleActionParametersPhase = "http_response_headers_transform" - SkipRuleActionParametersPhaseMagicTransit SkipRuleActionParametersPhase = "magic_transit" - SkipRuleActionParametersPhaseMagicTransitIDsManaged SkipRuleActionParametersPhase = "magic_transit_ids_managed" - SkipRuleActionParametersPhaseMagicTransitManaged SkipRuleActionParametersPhase = "magic_transit_managed" -) - -func (r SkipRuleActionParametersPhase) IsKnown() bool { - switch r { - case SkipRuleActionParametersPhaseDDoSL4, SkipRuleActionParametersPhaseDDoSL7, SkipRuleActionParametersPhaseHTTPConfigSettings, SkipRuleActionParametersPhaseHTTPCustomErrors, SkipRuleActionParametersPhaseHTTPLogCustomFields, SkipRuleActionParametersPhaseHTTPRatelimit, SkipRuleActionParametersPhaseHTTPRequestCacheSettings, SkipRuleActionParametersPhaseHTTPRequestDynamicRedirect, SkipRuleActionParametersPhaseHTTPRequestFirewallCustom, SkipRuleActionParametersPhaseHTTPRequestFirewallManaged, SkipRuleActionParametersPhaseHTTPRequestLateTransform, SkipRuleActionParametersPhaseHTTPRequestOrigin, SkipRuleActionParametersPhaseHTTPRequestRedirect, SkipRuleActionParametersPhaseHTTPRequestSanitize, SkipRuleActionParametersPhaseHTTPRequestSBFM, SkipRuleActionParametersPhaseHTTPRequestSelectConfiguration, SkipRuleActionParametersPhaseHTTPRequestTransform, SkipRuleActionParametersPhaseHTTPResponseCompression, SkipRuleActionParametersPhaseHTTPResponseFirewallManaged, SkipRuleActionParametersPhaseHTTPResponseHeadersTransform, SkipRuleActionParametersPhaseMagicTransit, SkipRuleActionParametersPhaseMagicTransitIDsManaged, SkipRuleActionParametersPhaseMagicTransitManaged: - return true - } - return false -} - // The name of a legacy security product to skip the execution of. type SkipRuleActionParametersProduct string @@ -4478,7 +4441,7 @@ func (r SkipRuleParam) implementsRulesetsPhaseUpdateParamsRuleUnion() {} type SkipRuleActionParametersParam struct { // A list of phases to skip the execution of. This option is incompatible with the // ruleset and rulesets options. - Phases param.Field[[]SkipRuleActionParametersPhase] `json:"phases"` + Phases param.Field[[]Phase] `json:"phases"` // A list of legacy security products to skip the execution of. Products param.Field[[]SkipRuleActionParametersProduct] `json:"products"` // A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the @@ -4501,13 +4464,13 @@ type RuleNewResponse struct { // The unique ID of the ruleset. ID string `json:"id,required"` // The kind of the ruleset. - Kind RuleNewResponseKind `json:"kind,required"` + Kind Kind `json:"kind,required"` // The timestamp of when the ruleset was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The human-readable name of the ruleset. Name string `json:"name,required"` // The phase of the ruleset. - Phase RuleNewResponsePhase `json:"phase,required"` + Phase Phase `json:"phase,required"` // The list of rules in the ruleset. Rules []RuleNewResponseRule `json:"rules,required"` // The version of the ruleset. @@ -4539,61 +4502,6 @@ func (r ruleNewResponseJSON) RawJSON() string { return r.raw } -// The kind of the ruleset. -type RuleNewResponseKind string - -const ( - RuleNewResponseKindManaged RuleNewResponseKind = "managed" - RuleNewResponseKindCustom RuleNewResponseKind = "custom" - RuleNewResponseKindRoot RuleNewResponseKind = "root" - RuleNewResponseKindZone RuleNewResponseKind = "zone" -) - -func (r RuleNewResponseKind) IsKnown() bool { - switch r { - case RuleNewResponseKindManaged, RuleNewResponseKindCustom, RuleNewResponseKindRoot, RuleNewResponseKindZone: - return true - } - return false -} - -// The phase of the ruleset. -type RuleNewResponsePhase string - -const ( - RuleNewResponsePhaseDDoSL4 RuleNewResponsePhase = "ddos_l4" - RuleNewResponsePhaseDDoSL7 RuleNewResponsePhase = "ddos_l7" - RuleNewResponsePhaseHTTPConfigSettings RuleNewResponsePhase = "http_config_settings" - RuleNewResponsePhaseHTTPCustomErrors RuleNewResponsePhase = "http_custom_errors" - RuleNewResponsePhaseHTTPLogCustomFields RuleNewResponsePhase = "http_log_custom_fields" - RuleNewResponsePhaseHTTPRatelimit RuleNewResponsePhase = "http_ratelimit" - RuleNewResponsePhaseHTTPRequestCacheSettings RuleNewResponsePhase = "http_request_cache_settings" - RuleNewResponsePhaseHTTPRequestDynamicRedirect RuleNewResponsePhase = "http_request_dynamic_redirect" - RuleNewResponsePhaseHTTPRequestFirewallCustom RuleNewResponsePhase = "http_request_firewall_custom" - RuleNewResponsePhaseHTTPRequestFirewallManaged RuleNewResponsePhase = "http_request_firewall_managed" - RuleNewResponsePhaseHTTPRequestLateTransform RuleNewResponsePhase = "http_request_late_transform" - RuleNewResponsePhaseHTTPRequestOrigin RuleNewResponsePhase = "http_request_origin" - RuleNewResponsePhaseHTTPRequestRedirect RuleNewResponsePhase = "http_request_redirect" - RuleNewResponsePhaseHTTPRequestSanitize RuleNewResponsePhase = "http_request_sanitize" - RuleNewResponsePhaseHTTPRequestSBFM RuleNewResponsePhase = "http_request_sbfm" - RuleNewResponsePhaseHTTPRequestSelectConfiguration RuleNewResponsePhase = "http_request_select_configuration" - RuleNewResponsePhaseHTTPRequestTransform RuleNewResponsePhase = "http_request_transform" - RuleNewResponsePhaseHTTPResponseCompression RuleNewResponsePhase = "http_response_compression" - RuleNewResponsePhaseHTTPResponseFirewallManaged RuleNewResponsePhase = "http_response_firewall_managed" - RuleNewResponsePhaseHTTPResponseHeadersTransform RuleNewResponsePhase = "http_response_headers_transform" - RuleNewResponsePhaseMagicTransit RuleNewResponsePhase = "magic_transit" - RuleNewResponsePhaseMagicTransitIDsManaged RuleNewResponsePhase = "magic_transit_ids_managed" - RuleNewResponsePhaseMagicTransitManaged RuleNewResponsePhase = "magic_transit_managed" -) - -func (r RuleNewResponsePhase) IsKnown() bool { - switch r { - case RuleNewResponsePhaseDDoSL4, RuleNewResponsePhaseDDoSL7, RuleNewResponsePhaseHTTPConfigSettings, RuleNewResponsePhaseHTTPCustomErrors, RuleNewResponsePhaseHTTPLogCustomFields, RuleNewResponsePhaseHTTPRatelimit, RuleNewResponsePhaseHTTPRequestCacheSettings, RuleNewResponsePhaseHTTPRequestDynamicRedirect, RuleNewResponsePhaseHTTPRequestFirewallCustom, RuleNewResponsePhaseHTTPRequestFirewallManaged, RuleNewResponsePhaseHTTPRequestLateTransform, RuleNewResponsePhaseHTTPRequestOrigin, RuleNewResponsePhaseHTTPRequestRedirect, RuleNewResponsePhaseHTTPRequestSanitize, RuleNewResponsePhaseHTTPRequestSBFM, RuleNewResponsePhaseHTTPRequestSelectConfiguration, RuleNewResponsePhaseHTTPRequestTransform, RuleNewResponsePhaseHTTPResponseCompression, RuleNewResponsePhaseHTTPResponseFirewallManaged, RuleNewResponsePhaseHTTPResponseHeadersTransform, RuleNewResponsePhaseMagicTransit, RuleNewResponsePhaseMagicTransitIDsManaged, RuleNewResponsePhaseMagicTransitManaged: - return true - } - return false -} - type RuleNewResponseRule struct { // The action to perform when the rule matches. Action RuleNewResponseRulesAction `json:"action"` @@ -4779,13 +4687,13 @@ type RuleDeleteResponse struct { // The unique ID of the ruleset. ID string `json:"id,required"` // The kind of the ruleset. - Kind RuleDeleteResponseKind `json:"kind,required"` + Kind Kind `json:"kind,required"` // The timestamp of when the ruleset was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The human-readable name of the ruleset. Name string `json:"name,required"` // The phase of the ruleset. - Phase RuleDeleteResponsePhase `json:"phase,required"` + Phase Phase `json:"phase,required"` // The list of rules in the ruleset. Rules []RuleDeleteResponseRule `json:"rules,required"` // The version of the ruleset. @@ -4818,61 +4726,6 @@ func (r ruleDeleteResponseJSON) RawJSON() string { return r.raw } -// The kind of the ruleset. -type RuleDeleteResponseKind string - -const ( - RuleDeleteResponseKindManaged RuleDeleteResponseKind = "managed" - RuleDeleteResponseKindCustom RuleDeleteResponseKind = "custom" - RuleDeleteResponseKindRoot RuleDeleteResponseKind = "root" - RuleDeleteResponseKindZone RuleDeleteResponseKind = "zone" -) - -func (r RuleDeleteResponseKind) IsKnown() bool { - switch r { - case RuleDeleteResponseKindManaged, RuleDeleteResponseKindCustom, RuleDeleteResponseKindRoot, RuleDeleteResponseKindZone: - return true - } - return false -} - -// The phase of the ruleset. -type RuleDeleteResponsePhase string - -const ( - RuleDeleteResponsePhaseDDoSL4 RuleDeleteResponsePhase = "ddos_l4" - RuleDeleteResponsePhaseDDoSL7 RuleDeleteResponsePhase = "ddos_l7" - RuleDeleteResponsePhaseHTTPConfigSettings RuleDeleteResponsePhase = "http_config_settings" - RuleDeleteResponsePhaseHTTPCustomErrors RuleDeleteResponsePhase = "http_custom_errors" - RuleDeleteResponsePhaseHTTPLogCustomFields RuleDeleteResponsePhase = "http_log_custom_fields" - RuleDeleteResponsePhaseHTTPRatelimit RuleDeleteResponsePhase = "http_ratelimit" - RuleDeleteResponsePhaseHTTPRequestCacheSettings RuleDeleteResponsePhase = "http_request_cache_settings" - RuleDeleteResponsePhaseHTTPRequestDynamicRedirect RuleDeleteResponsePhase = "http_request_dynamic_redirect" - RuleDeleteResponsePhaseHTTPRequestFirewallCustom RuleDeleteResponsePhase = "http_request_firewall_custom" - RuleDeleteResponsePhaseHTTPRequestFirewallManaged RuleDeleteResponsePhase = "http_request_firewall_managed" - RuleDeleteResponsePhaseHTTPRequestLateTransform RuleDeleteResponsePhase = "http_request_late_transform" - RuleDeleteResponsePhaseHTTPRequestOrigin RuleDeleteResponsePhase = "http_request_origin" - RuleDeleteResponsePhaseHTTPRequestRedirect RuleDeleteResponsePhase = "http_request_redirect" - RuleDeleteResponsePhaseHTTPRequestSanitize RuleDeleteResponsePhase = "http_request_sanitize" - RuleDeleteResponsePhaseHTTPRequestSBFM RuleDeleteResponsePhase = "http_request_sbfm" - RuleDeleteResponsePhaseHTTPRequestSelectConfiguration RuleDeleteResponsePhase = "http_request_select_configuration" - RuleDeleteResponsePhaseHTTPRequestTransform RuleDeleteResponsePhase = "http_request_transform" - RuleDeleteResponsePhaseHTTPResponseCompression RuleDeleteResponsePhase = "http_response_compression" - RuleDeleteResponsePhaseHTTPResponseFirewallManaged RuleDeleteResponsePhase = "http_response_firewall_managed" - RuleDeleteResponsePhaseHTTPResponseHeadersTransform RuleDeleteResponsePhase = "http_response_headers_transform" - RuleDeleteResponsePhaseMagicTransit RuleDeleteResponsePhase = "magic_transit" - RuleDeleteResponsePhaseMagicTransitIDsManaged RuleDeleteResponsePhase = "magic_transit_ids_managed" - RuleDeleteResponsePhaseMagicTransitManaged RuleDeleteResponsePhase = "magic_transit_managed" -) - -func (r RuleDeleteResponsePhase) IsKnown() bool { - switch r { - case RuleDeleteResponsePhaseDDoSL4, RuleDeleteResponsePhaseDDoSL7, RuleDeleteResponsePhaseHTTPConfigSettings, RuleDeleteResponsePhaseHTTPCustomErrors, RuleDeleteResponsePhaseHTTPLogCustomFields, RuleDeleteResponsePhaseHTTPRatelimit, RuleDeleteResponsePhaseHTTPRequestCacheSettings, RuleDeleteResponsePhaseHTTPRequestDynamicRedirect, RuleDeleteResponsePhaseHTTPRequestFirewallCustom, RuleDeleteResponsePhaseHTTPRequestFirewallManaged, RuleDeleteResponsePhaseHTTPRequestLateTransform, RuleDeleteResponsePhaseHTTPRequestOrigin, RuleDeleteResponsePhaseHTTPRequestRedirect, RuleDeleteResponsePhaseHTTPRequestSanitize, RuleDeleteResponsePhaseHTTPRequestSBFM, RuleDeleteResponsePhaseHTTPRequestSelectConfiguration, RuleDeleteResponsePhaseHTTPRequestTransform, RuleDeleteResponsePhaseHTTPResponseCompression, RuleDeleteResponsePhaseHTTPResponseFirewallManaged, RuleDeleteResponsePhaseHTTPResponseHeadersTransform, RuleDeleteResponsePhaseMagicTransit, RuleDeleteResponsePhaseMagicTransitIDsManaged, RuleDeleteResponsePhaseMagicTransitManaged: - return true - } - return false -} - type RuleDeleteResponseRule struct { // The action to perform when the rule matches. Action RuleDeleteResponseRulesAction `json:"action"` @@ -5058,13 +4911,13 @@ type RuleEditResponse struct { // The unique ID of the ruleset. ID string `json:"id,required"` // The kind of the ruleset. - Kind RuleEditResponseKind `json:"kind,required"` + Kind Kind `json:"kind,required"` // The timestamp of when the ruleset was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The human-readable name of the ruleset. Name string `json:"name,required"` // The phase of the ruleset. - Phase RuleEditResponsePhase `json:"phase,required"` + Phase Phase `json:"phase,required"` // The list of rules in the ruleset. Rules []RuleEditResponseRule `json:"rules,required"` // The version of the ruleset. @@ -5097,61 +4950,6 @@ func (r ruleEditResponseJSON) RawJSON() string { return r.raw } -// The kind of the ruleset. -type RuleEditResponseKind string - -const ( - RuleEditResponseKindManaged RuleEditResponseKind = "managed" - RuleEditResponseKindCustom RuleEditResponseKind = "custom" - RuleEditResponseKindRoot RuleEditResponseKind = "root" - RuleEditResponseKindZone RuleEditResponseKind = "zone" -) - -func (r RuleEditResponseKind) IsKnown() bool { - switch r { - case RuleEditResponseKindManaged, RuleEditResponseKindCustom, RuleEditResponseKindRoot, RuleEditResponseKindZone: - return true - } - return false -} - -// The phase of the ruleset. -type RuleEditResponsePhase string - -const ( - RuleEditResponsePhaseDDoSL4 RuleEditResponsePhase = "ddos_l4" - RuleEditResponsePhaseDDoSL7 RuleEditResponsePhase = "ddos_l7" - RuleEditResponsePhaseHTTPConfigSettings RuleEditResponsePhase = "http_config_settings" - RuleEditResponsePhaseHTTPCustomErrors RuleEditResponsePhase = "http_custom_errors" - RuleEditResponsePhaseHTTPLogCustomFields RuleEditResponsePhase = "http_log_custom_fields" - RuleEditResponsePhaseHTTPRatelimit RuleEditResponsePhase = "http_ratelimit" - RuleEditResponsePhaseHTTPRequestCacheSettings RuleEditResponsePhase = "http_request_cache_settings" - RuleEditResponsePhaseHTTPRequestDynamicRedirect RuleEditResponsePhase = "http_request_dynamic_redirect" - RuleEditResponsePhaseHTTPRequestFirewallCustom RuleEditResponsePhase = "http_request_firewall_custom" - RuleEditResponsePhaseHTTPRequestFirewallManaged RuleEditResponsePhase = "http_request_firewall_managed" - RuleEditResponsePhaseHTTPRequestLateTransform RuleEditResponsePhase = "http_request_late_transform" - RuleEditResponsePhaseHTTPRequestOrigin RuleEditResponsePhase = "http_request_origin" - RuleEditResponsePhaseHTTPRequestRedirect RuleEditResponsePhase = "http_request_redirect" - RuleEditResponsePhaseHTTPRequestSanitize RuleEditResponsePhase = "http_request_sanitize" - RuleEditResponsePhaseHTTPRequestSBFM RuleEditResponsePhase = "http_request_sbfm" - RuleEditResponsePhaseHTTPRequestSelectConfiguration RuleEditResponsePhase = "http_request_select_configuration" - RuleEditResponsePhaseHTTPRequestTransform RuleEditResponsePhase = "http_request_transform" - RuleEditResponsePhaseHTTPResponseCompression RuleEditResponsePhase = "http_response_compression" - RuleEditResponsePhaseHTTPResponseFirewallManaged RuleEditResponsePhase = "http_response_firewall_managed" - RuleEditResponsePhaseHTTPResponseHeadersTransform RuleEditResponsePhase = "http_response_headers_transform" - RuleEditResponsePhaseMagicTransit RuleEditResponsePhase = "magic_transit" - RuleEditResponsePhaseMagicTransitIDsManaged RuleEditResponsePhase = "magic_transit_ids_managed" - RuleEditResponsePhaseMagicTransitManaged RuleEditResponsePhase = "magic_transit_managed" -) - -func (r RuleEditResponsePhase) IsKnown() bool { - switch r { - case RuleEditResponsePhaseDDoSL4, RuleEditResponsePhaseDDoSL7, RuleEditResponsePhaseHTTPConfigSettings, RuleEditResponsePhaseHTTPCustomErrors, RuleEditResponsePhaseHTTPLogCustomFields, RuleEditResponsePhaseHTTPRatelimit, RuleEditResponsePhaseHTTPRequestCacheSettings, RuleEditResponsePhaseHTTPRequestDynamicRedirect, RuleEditResponsePhaseHTTPRequestFirewallCustom, RuleEditResponsePhaseHTTPRequestFirewallManaged, RuleEditResponsePhaseHTTPRequestLateTransform, RuleEditResponsePhaseHTTPRequestOrigin, RuleEditResponsePhaseHTTPRequestRedirect, RuleEditResponsePhaseHTTPRequestSanitize, RuleEditResponsePhaseHTTPRequestSBFM, RuleEditResponsePhaseHTTPRequestSelectConfiguration, RuleEditResponsePhaseHTTPRequestTransform, RuleEditResponsePhaseHTTPResponseCompression, RuleEditResponsePhaseHTTPResponseFirewallManaged, RuleEditResponsePhaseHTTPResponseHeadersTransform, RuleEditResponsePhaseMagicTransit, RuleEditResponsePhaseMagicTransitIDsManaged, RuleEditResponsePhaseMagicTransitManaged: - return true - } - return false -} - type RuleEditResponseRule struct { // The action to perform when the rule matches. Action RuleEditResponseRulesAction `json:"action"` diff --git a/rulesets/ruleset.go b/rulesets/ruleset.go index 8a2364d370..262f443c13 100644 --- a/rulesets/ruleset.go +++ b/rulesets/ruleset.go @@ -156,6 +156,61 @@ func (r *RulesetService) Get(ctx context.Context, rulesetID string, query Rulese return } +// The kind of the ruleset. +type Kind string + +const ( + KindManaged Kind = "managed" + KindCustom Kind = "custom" + KindRoot Kind = "root" + KindZone Kind = "zone" +) + +func (r Kind) IsKnown() bool { + switch r { + case KindManaged, KindCustom, KindRoot, KindZone: + return true + } + return false +} + +// The phase of the ruleset. +type Phase string + +const ( + PhaseDDoSL4 Phase = "ddos_l4" + PhaseDDoSL7 Phase = "ddos_l7" + PhaseHTTPConfigSettings Phase = "http_config_settings" + PhaseHTTPCustomErrors Phase = "http_custom_errors" + PhaseHTTPLogCustomFields Phase = "http_log_custom_fields" + PhaseHTTPRatelimit Phase = "http_ratelimit" + PhaseHTTPRequestCacheSettings Phase = "http_request_cache_settings" + PhaseHTTPRequestDynamicRedirect Phase = "http_request_dynamic_redirect" + PhaseHTTPRequestFirewallCustom Phase = "http_request_firewall_custom" + PhaseHTTPRequestFirewallManaged Phase = "http_request_firewall_managed" + PhaseHTTPRequestLateTransform Phase = "http_request_late_transform" + PhaseHTTPRequestOrigin Phase = "http_request_origin" + PhaseHTTPRequestRedirect Phase = "http_request_redirect" + PhaseHTTPRequestSanitize Phase = "http_request_sanitize" + PhaseHTTPRequestSBFM Phase = "http_request_sbfm" + PhaseHTTPRequestSelectConfiguration Phase = "http_request_select_configuration" + PhaseHTTPRequestTransform Phase = "http_request_transform" + PhaseHTTPResponseCompression Phase = "http_response_compression" + PhaseHTTPResponseFirewallManaged Phase = "http_response_firewall_managed" + PhaseHTTPResponseHeadersTransform Phase = "http_response_headers_transform" + PhaseMagicTransit Phase = "magic_transit" + PhaseMagicTransitIDsManaged Phase = "magic_transit_ids_managed" + PhaseMagicTransitManaged Phase = "magic_transit_managed" +) + +func (r Phase) IsKnown() bool { + switch r { + case PhaseDDoSL4, PhaseDDoSL7, PhaseHTTPConfigSettings, PhaseHTTPCustomErrors, PhaseHTTPLogCustomFields, PhaseHTTPRatelimit, PhaseHTTPRequestCacheSettings, PhaseHTTPRequestDynamicRedirect, PhaseHTTPRequestFirewallCustom, PhaseHTTPRequestFirewallManaged, PhaseHTTPRequestLateTransform, PhaseHTTPRequestOrigin, PhaseHTTPRequestRedirect, PhaseHTTPRequestSanitize, PhaseHTTPRequestSBFM, PhaseHTTPRequestSelectConfiguration, PhaseHTTPRequestTransform, PhaseHTTPResponseCompression, PhaseHTTPResponseFirewallManaged, PhaseHTTPResponseHeadersTransform, PhaseMagicTransit, PhaseMagicTransitIDsManaged, PhaseMagicTransitManaged: + return true + } + return false +} + // A ruleset object. type Ruleset struct { // The unique ID of the ruleset. @@ -167,12 +222,12 @@ type Ruleset struct { // An informative description of the ruleset. Description string `json:"description"` // The kind of the ruleset. - Kind RulesetKind `json:"kind"` + Kind Kind `json:"kind"` // The human-readable name of the ruleset. Name string `json:"name"` // The phase of the ruleset. - Phase RulesetPhase `json:"phase"` - JSON rulesetJSON `json:"-"` + Phase Phase `json:"phase"` + JSON rulesetJSON `json:"-"` } // rulesetJSON contains the JSON metadata for the struct [Ruleset] @@ -196,73 +251,18 @@ func (r rulesetJSON) RawJSON() string { return r.raw } -// The kind of the ruleset. -type RulesetKind string - -const ( - RulesetKindManaged RulesetKind = "managed" - RulesetKindCustom RulesetKind = "custom" - RulesetKindRoot RulesetKind = "root" - RulesetKindZone RulesetKind = "zone" -) - -func (r RulesetKind) IsKnown() bool { - switch r { - case RulesetKindManaged, RulesetKindCustom, RulesetKindRoot, RulesetKindZone: - return true - } - return false -} - -// The phase of the ruleset. -type RulesetPhase string - -const ( - RulesetPhaseDDoSL4 RulesetPhase = "ddos_l4" - RulesetPhaseDDoSL7 RulesetPhase = "ddos_l7" - RulesetPhaseHTTPConfigSettings RulesetPhase = "http_config_settings" - RulesetPhaseHTTPCustomErrors RulesetPhase = "http_custom_errors" - RulesetPhaseHTTPLogCustomFields RulesetPhase = "http_log_custom_fields" - RulesetPhaseHTTPRatelimit RulesetPhase = "http_ratelimit" - RulesetPhaseHTTPRequestCacheSettings RulesetPhase = "http_request_cache_settings" - RulesetPhaseHTTPRequestDynamicRedirect RulesetPhase = "http_request_dynamic_redirect" - RulesetPhaseHTTPRequestFirewallCustom RulesetPhase = "http_request_firewall_custom" - RulesetPhaseHTTPRequestFirewallManaged RulesetPhase = "http_request_firewall_managed" - RulesetPhaseHTTPRequestLateTransform RulesetPhase = "http_request_late_transform" - RulesetPhaseHTTPRequestOrigin RulesetPhase = "http_request_origin" - RulesetPhaseHTTPRequestRedirect RulesetPhase = "http_request_redirect" - RulesetPhaseHTTPRequestSanitize RulesetPhase = "http_request_sanitize" - RulesetPhaseHTTPRequestSBFM RulesetPhase = "http_request_sbfm" - RulesetPhaseHTTPRequestSelectConfiguration RulesetPhase = "http_request_select_configuration" - RulesetPhaseHTTPRequestTransform RulesetPhase = "http_request_transform" - RulesetPhaseHTTPResponseCompression RulesetPhase = "http_response_compression" - RulesetPhaseHTTPResponseFirewallManaged RulesetPhase = "http_response_firewall_managed" - RulesetPhaseHTTPResponseHeadersTransform RulesetPhase = "http_response_headers_transform" - RulesetPhaseMagicTransit RulesetPhase = "magic_transit" - RulesetPhaseMagicTransitIDsManaged RulesetPhase = "magic_transit_ids_managed" - RulesetPhaseMagicTransitManaged RulesetPhase = "magic_transit_managed" -) - -func (r RulesetPhase) IsKnown() bool { - switch r { - case RulesetPhaseDDoSL4, RulesetPhaseDDoSL7, RulesetPhaseHTTPConfigSettings, RulesetPhaseHTTPCustomErrors, RulesetPhaseHTTPLogCustomFields, RulesetPhaseHTTPRatelimit, RulesetPhaseHTTPRequestCacheSettings, RulesetPhaseHTTPRequestDynamicRedirect, RulesetPhaseHTTPRequestFirewallCustom, RulesetPhaseHTTPRequestFirewallManaged, RulesetPhaseHTTPRequestLateTransform, RulesetPhaseHTTPRequestOrigin, RulesetPhaseHTTPRequestRedirect, RulesetPhaseHTTPRequestSanitize, RulesetPhaseHTTPRequestSBFM, RulesetPhaseHTTPRequestSelectConfiguration, RulesetPhaseHTTPRequestTransform, RulesetPhaseHTTPResponseCompression, RulesetPhaseHTTPResponseFirewallManaged, RulesetPhaseHTTPResponseHeadersTransform, RulesetPhaseMagicTransit, RulesetPhaseMagicTransitIDsManaged, RulesetPhaseMagicTransitManaged: - return true - } - return false -} - // A ruleset object. type RulesetNewResponse struct { // The unique ID of the ruleset. ID string `json:"id,required"` // The kind of the ruleset. - Kind RulesetNewResponseKind `json:"kind,required"` + Kind Kind `json:"kind,required"` // The timestamp of when the ruleset was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The human-readable name of the ruleset. Name string `json:"name,required"` // The phase of the ruleset. - Phase RulesetNewResponsePhase `json:"phase,required"` + Phase Phase `json:"phase,required"` // The list of rules in the ruleset. Rules []RulesetNewResponseRule `json:"rules,required"` // The version of the ruleset. @@ -295,61 +295,6 @@ func (r rulesetNewResponseJSON) RawJSON() string { return r.raw } -// The kind of the ruleset. -type RulesetNewResponseKind string - -const ( - RulesetNewResponseKindManaged RulesetNewResponseKind = "managed" - RulesetNewResponseKindCustom RulesetNewResponseKind = "custom" - RulesetNewResponseKindRoot RulesetNewResponseKind = "root" - RulesetNewResponseKindZone RulesetNewResponseKind = "zone" -) - -func (r RulesetNewResponseKind) IsKnown() bool { - switch r { - case RulesetNewResponseKindManaged, RulesetNewResponseKindCustom, RulesetNewResponseKindRoot, RulesetNewResponseKindZone: - return true - } - return false -} - -// The phase of the ruleset. -type RulesetNewResponsePhase string - -const ( - RulesetNewResponsePhaseDDoSL4 RulesetNewResponsePhase = "ddos_l4" - RulesetNewResponsePhaseDDoSL7 RulesetNewResponsePhase = "ddos_l7" - RulesetNewResponsePhaseHTTPConfigSettings RulesetNewResponsePhase = "http_config_settings" - RulesetNewResponsePhaseHTTPCustomErrors RulesetNewResponsePhase = "http_custom_errors" - RulesetNewResponsePhaseHTTPLogCustomFields RulesetNewResponsePhase = "http_log_custom_fields" - RulesetNewResponsePhaseHTTPRatelimit RulesetNewResponsePhase = "http_ratelimit" - RulesetNewResponsePhaseHTTPRequestCacheSettings RulesetNewResponsePhase = "http_request_cache_settings" - RulesetNewResponsePhaseHTTPRequestDynamicRedirect RulesetNewResponsePhase = "http_request_dynamic_redirect" - RulesetNewResponsePhaseHTTPRequestFirewallCustom RulesetNewResponsePhase = "http_request_firewall_custom" - RulesetNewResponsePhaseHTTPRequestFirewallManaged RulesetNewResponsePhase = "http_request_firewall_managed" - RulesetNewResponsePhaseHTTPRequestLateTransform RulesetNewResponsePhase = "http_request_late_transform" - RulesetNewResponsePhaseHTTPRequestOrigin RulesetNewResponsePhase = "http_request_origin" - RulesetNewResponsePhaseHTTPRequestRedirect RulesetNewResponsePhase = "http_request_redirect" - RulesetNewResponsePhaseHTTPRequestSanitize RulesetNewResponsePhase = "http_request_sanitize" - RulesetNewResponsePhaseHTTPRequestSBFM RulesetNewResponsePhase = "http_request_sbfm" - RulesetNewResponsePhaseHTTPRequestSelectConfiguration RulesetNewResponsePhase = "http_request_select_configuration" - RulesetNewResponsePhaseHTTPRequestTransform RulesetNewResponsePhase = "http_request_transform" - RulesetNewResponsePhaseHTTPResponseCompression RulesetNewResponsePhase = "http_response_compression" - RulesetNewResponsePhaseHTTPResponseFirewallManaged RulesetNewResponsePhase = "http_response_firewall_managed" - RulesetNewResponsePhaseHTTPResponseHeadersTransform RulesetNewResponsePhase = "http_response_headers_transform" - RulesetNewResponsePhaseMagicTransit RulesetNewResponsePhase = "magic_transit" - RulesetNewResponsePhaseMagicTransitIDsManaged RulesetNewResponsePhase = "magic_transit_ids_managed" - RulesetNewResponsePhaseMagicTransitManaged RulesetNewResponsePhase = "magic_transit_managed" -) - -func (r RulesetNewResponsePhase) IsKnown() bool { - switch r { - case RulesetNewResponsePhaseDDoSL4, RulesetNewResponsePhaseDDoSL7, RulesetNewResponsePhaseHTTPConfigSettings, RulesetNewResponsePhaseHTTPCustomErrors, RulesetNewResponsePhaseHTTPLogCustomFields, RulesetNewResponsePhaseHTTPRatelimit, RulesetNewResponsePhaseHTTPRequestCacheSettings, RulesetNewResponsePhaseHTTPRequestDynamicRedirect, RulesetNewResponsePhaseHTTPRequestFirewallCustom, RulesetNewResponsePhaseHTTPRequestFirewallManaged, RulesetNewResponsePhaseHTTPRequestLateTransform, RulesetNewResponsePhaseHTTPRequestOrigin, RulesetNewResponsePhaseHTTPRequestRedirect, RulesetNewResponsePhaseHTTPRequestSanitize, RulesetNewResponsePhaseHTTPRequestSBFM, RulesetNewResponsePhaseHTTPRequestSelectConfiguration, RulesetNewResponsePhaseHTTPRequestTransform, RulesetNewResponsePhaseHTTPResponseCompression, RulesetNewResponsePhaseHTTPResponseFirewallManaged, RulesetNewResponsePhaseHTTPResponseHeadersTransform, RulesetNewResponsePhaseMagicTransit, RulesetNewResponsePhaseMagicTransitIDsManaged, RulesetNewResponsePhaseMagicTransitManaged: - return true - } - return false -} - type RulesetNewResponseRule struct { // The action to perform when the rule matches. Action RulesetNewResponseRulesAction `json:"action"` @@ -535,13 +480,13 @@ type RulesetUpdateResponse struct { // The unique ID of the ruleset. ID string `json:"id,required"` // The kind of the ruleset. - Kind RulesetUpdateResponseKind `json:"kind,required"` + Kind Kind `json:"kind,required"` // The timestamp of when the ruleset was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The human-readable name of the ruleset. Name string `json:"name,required"` // The phase of the ruleset. - Phase RulesetUpdateResponsePhase `json:"phase,required"` + Phase Phase `json:"phase,required"` // The list of rules in the ruleset. Rules []RulesetUpdateResponseRule `json:"rules,required"` // The version of the ruleset. @@ -574,61 +519,6 @@ func (r rulesetUpdateResponseJSON) RawJSON() string { return r.raw } -// The kind of the ruleset. -type RulesetUpdateResponseKind string - -const ( - RulesetUpdateResponseKindManaged RulesetUpdateResponseKind = "managed" - RulesetUpdateResponseKindCustom RulesetUpdateResponseKind = "custom" - RulesetUpdateResponseKindRoot RulesetUpdateResponseKind = "root" - RulesetUpdateResponseKindZone RulesetUpdateResponseKind = "zone" -) - -func (r RulesetUpdateResponseKind) IsKnown() bool { - switch r { - case RulesetUpdateResponseKindManaged, RulesetUpdateResponseKindCustom, RulesetUpdateResponseKindRoot, RulesetUpdateResponseKindZone: - return true - } - return false -} - -// The phase of the ruleset. -type RulesetUpdateResponsePhase string - -const ( - RulesetUpdateResponsePhaseDDoSL4 RulesetUpdateResponsePhase = "ddos_l4" - RulesetUpdateResponsePhaseDDoSL7 RulesetUpdateResponsePhase = "ddos_l7" - RulesetUpdateResponsePhaseHTTPConfigSettings RulesetUpdateResponsePhase = "http_config_settings" - RulesetUpdateResponsePhaseHTTPCustomErrors RulesetUpdateResponsePhase = "http_custom_errors" - RulesetUpdateResponsePhaseHTTPLogCustomFields RulesetUpdateResponsePhase = "http_log_custom_fields" - RulesetUpdateResponsePhaseHTTPRatelimit RulesetUpdateResponsePhase = "http_ratelimit" - RulesetUpdateResponsePhaseHTTPRequestCacheSettings RulesetUpdateResponsePhase = "http_request_cache_settings" - RulesetUpdateResponsePhaseHTTPRequestDynamicRedirect RulesetUpdateResponsePhase = "http_request_dynamic_redirect" - RulesetUpdateResponsePhaseHTTPRequestFirewallCustom RulesetUpdateResponsePhase = "http_request_firewall_custom" - RulesetUpdateResponsePhaseHTTPRequestFirewallManaged RulesetUpdateResponsePhase = "http_request_firewall_managed" - RulesetUpdateResponsePhaseHTTPRequestLateTransform RulesetUpdateResponsePhase = "http_request_late_transform" - RulesetUpdateResponsePhaseHTTPRequestOrigin RulesetUpdateResponsePhase = "http_request_origin" - RulesetUpdateResponsePhaseHTTPRequestRedirect RulesetUpdateResponsePhase = "http_request_redirect" - RulesetUpdateResponsePhaseHTTPRequestSanitize RulesetUpdateResponsePhase = "http_request_sanitize" - RulesetUpdateResponsePhaseHTTPRequestSBFM RulesetUpdateResponsePhase = "http_request_sbfm" - RulesetUpdateResponsePhaseHTTPRequestSelectConfiguration RulesetUpdateResponsePhase = "http_request_select_configuration" - RulesetUpdateResponsePhaseHTTPRequestTransform RulesetUpdateResponsePhase = "http_request_transform" - RulesetUpdateResponsePhaseHTTPResponseCompression RulesetUpdateResponsePhase = "http_response_compression" - RulesetUpdateResponsePhaseHTTPResponseFirewallManaged RulesetUpdateResponsePhase = "http_response_firewall_managed" - RulesetUpdateResponsePhaseHTTPResponseHeadersTransform RulesetUpdateResponsePhase = "http_response_headers_transform" - RulesetUpdateResponsePhaseMagicTransit RulesetUpdateResponsePhase = "magic_transit" - RulesetUpdateResponsePhaseMagicTransitIDsManaged RulesetUpdateResponsePhase = "magic_transit_ids_managed" - RulesetUpdateResponsePhaseMagicTransitManaged RulesetUpdateResponsePhase = "magic_transit_managed" -) - -func (r RulesetUpdateResponsePhase) IsKnown() bool { - switch r { - case RulesetUpdateResponsePhaseDDoSL4, RulesetUpdateResponsePhaseDDoSL7, RulesetUpdateResponsePhaseHTTPConfigSettings, RulesetUpdateResponsePhaseHTTPCustomErrors, RulesetUpdateResponsePhaseHTTPLogCustomFields, RulesetUpdateResponsePhaseHTTPRatelimit, RulesetUpdateResponsePhaseHTTPRequestCacheSettings, RulesetUpdateResponsePhaseHTTPRequestDynamicRedirect, RulesetUpdateResponsePhaseHTTPRequestFirewallCustom, RulesetUpdateResponsePhaseHTTPRequestFirewallManaged, RulesetUpdateResponsePhaseHTTPRequestLateTransform, RulesetUpdateResponsePhaseHTTPRequestOrigin, RulesetUpdateResponsePhaseHTTPRequestRedirect, RulesetUpdateResponsePhaseHTTPRequestSanitize, RulesetUpdateResponsePhaseHTTPRequestSBFM, RulesetUpdateResponsePhaseHTTPRequestSelectConfiguration, RulesetUpdateResponsePhaseHTTPRequestTransform, RulesetUpdateResponsePhaseHTTPResponseCompression, RulesetUpdateResponsePhaseHTTPResponseFirewallManaged, RulesetUpdateResponsePhaseHTTPResponseHeadersTransform, RulesetUpdateResponsePhaseMagicTransit, RulesetUpdateResponsePhaseMagicTransitIDsManaged, RulesetUpdateResponsePhaseMagicTransitManaged: - return true - } - return false -} - type RulesetUpdateResponseRule struct { // The action to perform when the rule matches. Action RulesetUpdateResponseRulesAction `json:"action"` @@ -814,13 +704,13 @@ type RulesetGetResponse struct { // The unique ID of the ruleset. ID string `json:"id,required"` // The kind of the ruleset. - Kind RulesetGetResponseKind `json:"kind,required"` + Kind Kind `json:"kind,required"` // The timestamp of when the ruleset was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The human-readable name of the ruleset. Name string `json:"name,required"` // The phase of the ruleset. - Phase RulesetGetResponsePhase `json:"phase,required"` + Phase Phase `json:"phase,required"` // The list of rules in the ruleset. Rules []RulesetGetResponseRule `json:"rules,required"` // The version of the ruleset. @@ -853,61 +743,6 @@ func (r rulesetGetResponseJSON) RawJSON() string { return r.raw } -// The kind of the ruleset. -type RulesetGetResponseKind string - -const ( - RulesetGetResponseKindManaged RulesetGetResponseKind = "managed" - RulesetGetResponseKindCustom RulesetGetResponseKind = "custom" - RulesetGetResponseKindRoot RulesetGetResponseKind = "root" - RulesetGetResponseKindZone RulesetGetResponseKind = "zone" -) - -func (r RulesetGetResponseKind) IsKnown() bool { - switch r { - case RulesetGetResponseKindManaged, RulesetGetResponseKindCustom, RulesetGetResponseKindRoot, RulesetGetResponseKindZone: - return true - } - return false -} - -// The phase of the ruleset. -type RulesetGetResponsePhase string - -const ( - RulesetGetResponsePhaseDDoSL4 RulesetGetResponsePhase = "ddos_l4" - RulesetGetResponsePhaseDDoSL7 RulesetGetResponsePhase = "ddos_l7" - RulesetGetResponsePhaseHTTPConfigSettings RulesetGetResponsePhase = "http_config_settings" - RulesetGetResponsePhaseHTTPCustomErrors RulesetGetResponsePhase = "http_custom_errors" - RulesetGetResponsePhaseHTTPLogCustomFields RulesetGetResponsePhase = "http_log_custom_fields" - RulesetGetResponsePhaseHTTPRatelimit RulesetGetResponsePhase = "http_ratelimit" - RulesetGetResponsePhaseHTTPRequestCacheSettings RulesetGetResponsePhase = "http_request_cache_settings" - RulesetGetResponsePhaseHTTPRequestDynamicRedirect RulesetGetResponsePhase = "http_request_dynamic_redirect" - RulesetGetResponsePhaseHTTPRequestFirewallCustom RulesetGetResponsePhase = "http_request_firewall_custom" - RulesetGetResponsePhaseHTTPRequestFirewallManaged RulesetGetResponsePhase = "http_request_firewall_managed" - RulesetGetResponsePhaseHTTPRequestLateTransform RulesetGetResponsePhase = "http_request_late_transform" - RulesetGetResponsePhaseHTTPRequestOrigin RulesetGetResponsePhase = "http_request_origin" - RulesetGetResponsePhaseHTTPRequestRedirect RulesetGetResponsePhase = "http_request_redirect" - RulesetGetResponsePhaseHTTPRequestSanitize RulesetGetResponsePhase = "http_request_sanitize" - RulesetGetResponsePhaseHTTPRequestSBFM RulesetGetResponsePhase = "http_request_sbfm" - RulesetGetResponsePhaseHTTPRequestSelectConfiguration RulesetGetResponsePhase = "http_request_select_configuration" - RulesetGetResponsePhaseHTTPRequestTransform RulesetGetResponsePhase = "http_request_transform" - RulesetGetResponsePhaseHTTPResponseCompression RulesetGetResponsePhase = "http_response_compression" - RulesetGetResponsePhaseHTTPResponseFirewallManaged RulesetGetResponsePhase = "http_response_firewall_managed" - RulesetGetResponsePhaseHTTPResponseHeadersTransform RulesetGetResponsePhase = "http_response_headers_transform" - RulesetGetResponsePhaseMagicTransit RulesetGetResponsePhase = "magic_transit" - RulesetGetResponsePhaseMagicTransitIDsManaged RulesetGetResponsePhase = "magic_transit_ids_managed" - RulesetGetResponsePhaseMagicTransitManaged RulesetGetResponsePhase = "magic_transit_managed" -) - -func (r RulesetGetResponsePhase) IsKnown() bool { - switch r { - case RulesetGetResponsePhaseDDoSL4, RulesetGetResponsePhaseDDoSL7, RulesetGetResponsePhaseHTTPConfigSettings, RulesetGetResponsePhaseHTTPCustomErrors, RulesetGetResponsePhaseHTTPLogCustomFields, RulesetGetResponsePhaseHTTPRatelimit, RulesetGetResponsePhaseHTTPRequestCacheSettings, RulesetGetResponsePhaseHTTPRequestDynamicRedirect, RulesetGetResponsePhaseHTTPRequestFirewallCustom, RulesetGetResponsePhaseHTTPRequestFirewallManaged, RulesetGetResponsePhaseHTTPRequestLateTransform, RulesetGetResponsePhaseHTTPRequestOrigin, RulesetGetResponsePhaseHTTPRequestRedirect, RulesetGetResponsePhaseHTTPRequestSanitize, RulesetGetResponsePhaseHTTPRequestSBFM, RulesetGetResponsePhaseHTTPRequestSelectConfiguration, RulesetGetResponsePhaseHTTPRequestTransform, RulesetGetResponsePhaseHTTPResponseCompression, RulesetGetResponsePhaseHTTPResponseFirewallManaged, RulesetGetResponsePhaseHTTPResponseHeadersTransform, RulesetGetResponsePhaseMagicTransit, RulesetGetResponsePhaseMagicTransitIDsManaged, RulesetGetResponsePhaseMagicTransitManaged: - return true - } - return false -} - type RulesetGetResponseRule struct { // The action to perform when the rule matches. Action RulesetGetResponseRulesAction `json:"action"` @@ -1090,11 +925,11 @@ func (r RulesetGetResponseRulesAction) IsKnown() bool { type RulesetNewParams struct { // The kind of the ruleset. - Kind param.Field[RulesetNewParamsKind] `json:"kind,required"` + Kind param.Field[Kind] `json:"kind,required"` // The human-readable name of the ruleset. Name param.Field[string] `json:"name,required"` // The phase of the ruleset. - Phase param.Field[RulesetNewParamsPhase] `json:"phase,required"` + Phase param.Field[Phase] `json:"phase,required"` // The list of rules in the ruleset. Rules param.Field[[]RulesetNewParamsRuleUnion] `json:"rules,required"` // The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. @@ -1109,61 +944,6 @@ func (r RulesetNewParams) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -// The kind of the ruleset. -type RulesetNewParamsKind string - -const ( - RulesetNewParamsKindManaged RulesetNewParamsKind = "managed" - RulesetNewParamsKindCustom RulesetNewParamsKind = "custom" - RulesetNewParamsKindRoot RulesetNewParamsKind = "root" - RulesetNewParamsKindZone RulesetNewParamsKind = "zone" -) - -func (r RulesetNewParamsKind) IsKnown() bool { - switch r { - case RulesetNewParamsKindManaged, RulesetNewParamsKindCustom, RulesetNewParamsKindRoot, RulesetNewParamsKindZone: - return true - } - return false -} - -// The phase of the ruleset. -type RulesetNewParamsPhase string - -const ( - RulesetNewParamsPhaseDDoSL4 RulesetNewParamsPhase = "ddos_l4" - RulesetNewParamsPhaseDDoSL7 RulesetNewParamsPhase = "ddos_l7" - RulesetNewParamsPhaseHTTPConfigSettings RulesetNewParamsPhase = "http_config_settings" - RulesetNewParamsPhaseHTTPCustomErrors RulesetNewParamsPhase = "http_custom_errors" - RulesetNewParamsPhaseHTTPLogCustomFields RulesetNewParamsPhase = "http_log_custom_fields" - RulesetNewParamsPhaseHTTPRatelimit RulesetNewParamsPhase = "http_ratelimit" - RulesetNewParamsPhaseHTTPRequestCacheSettings RulesetNewParamsPhase = "http_request_cache_settings" - RulesetNewParamsPhaseHTTPRequestDynamicRedirect RulesetNewParamsPhase = "http_request_dynamic_redirect" - RulesetNewParamsPhaseHTTPRequestFirewallCustom RulesetNewParamsPhase = "http_request_firewall_custom" - RulesetNewParamsPhaseHTTPRequestFirewallManaged RulesetNewParamsPhase = "http_request_firewall_managed" - RulesetNewParamsPhaseHTTPRequestLateTransform RulesetNewParamsPhase = "http_request_late_transform" - RulesetNewParamsPhaseHTTPRequestOrigin RulesetNewParamsPhase = "http_request_origin" - RulesetNewParamsPhaseHTTPRequestRedirect RulesetNewParamsPhase = "http_request_redirect" - RulesetNewParamsPhaseHTTPRequestSanitize RulesetNewParamsPhase = "http_request_sanitize" - RulesetNewParamsPhaseHTTPRequestSBFM RulesetNewParamsPhase = "http_request_sbfm" - RulesetNewParamsPhaseHTTPRequestSelectConfiguration RulesetNewParamsPhase = "http_request_select_configuration" - RulesetNewParamsPhaseHTTPRequestTransform RulesetNewParamsPhase = "http_request_transform" - RulesetNewParamsPhaseHTTPResponseCompression RulesetNewParamsPhase = "http_response_compression" - RulesetNewParamsPhaseHTTPResponseFirewallManaged RulesetNewParamsPhase = "http_response_firewall_managed" - RulesetNewParamsPhaseHTTPResponseHeadersTransform RulesetNewParamsPhase = "http_response_headers_transform" - RulesetNewParamsPhaseMagicTransit RulesetNewParamsPhase = "magic_transit" - RulesetNewParamsPhaseMagicTransitIDsManaged RulesetNewParamsPhase = "magic_transit_ids_managed" - RulesetNewParamsPhaseMagicTransitManaged RulesetNewParamsPhase = "magic_transit_managed" -) - -func (r RulesetNewParamsPhase) IsKnown() bool { - switch r { - case RulesetNewParamsPhaseDDoSL4, RulesetNewParamsPhaseDDoSL7, RulesetNewParamsPhaseHTTPConfigSettings, RulesetNewParamsPhaseHTTPCustomErrors, RulesetNewParamsPhaseHTTPLogCustomFields, RulesetNewParamsPhaseHTTPRatelimit, RulesetNewParamsPhaseHTTPRequestCacheSettings, RulesetNewParamsPhaseHTTPRequestDynamicRedirect, RulesetNewParamsPhaseHTTPRequestFirewallCustom, RulesetNewParamsPhaseHTTPRequestFirewallManaged, RulesetNewParamsPhaseHTTPRequestLateTransform, RulesetNewParamsPhaseHTTPRequestOrigin, RulesetNewParamsPhaseHTTPRequestRedirect, RulesetNewParamsPhaseHTTPRequestSanitize, RulesetNewParamsPhaseHTTPRequestSBFM, RulesetNewParamsPhaseHTTPRequestSelectConfiguration, RulesetNewParamsPhaseHTTPRequestTransform, RulesetNewParamsPhaseHTTPResponseCompression, RulesetNewParamsPhaseHTTPResponseFirewallManaged, RulesetNewParamsPhaseHTTPResponseHeadersTransform, RulesetNewParamsPhaseMagicTransit, RulesetNewParamsPhaseMagicTransitIDsManaged, RulesetNewParamsPhaseMagicTransitManaged: - return true - } - return false -} - type RulesetNewParamsRule struct { // The action to perform when the rule matches. Action param.Field[RulesetNewParamsRulesAction] `json:"action"` @@ -1391,11 +1171,11 @@ type RulesetUpdateParams struct { // An informative description of the ruleset. Description param.Field[string] `json:"description"` // The kind of the ruleset. - Kind param.Field[RulesetUpdateParamsKind] `json:"kind"` + Kind param.Field[Kind] `json:"kind"` // The human-readable name of the ruleset. Name param.Field[string] `json:"name"` // The phase of the ruleset. - Phase param.Field[RulesetUpdateParamsPhase] `json:"phase"` + Phase param.Field[Phase] `json:"phase"` } func (r RulesetUpdateParams) MarshalJSON() (data []byte, err error) { @@ -1468,61 +1248,6 @@ func (r RulesetUpdateParamsRulesAction) IsKnown() bool { return false } -// The kind of the ruleset. -type RulesetUpdateParamsKind string - -const ( - RulesetUpdateParamsKindManaged RulesetUpdateParamsKind = "managed" - RulesetUpdateParamsKindCustom RulesetUpdateParamsKind = "custom" - RulesetUpdateParamsKindRoot RulesetUpdateParamsKind = "root" - RulesetUpdateParamsKindZone RulesetUpdateParamsKind = "zone" -) - -func (r RulesetUpdateParamsKind) IsKnown() bool { - switch r { - case RulesetUpdateParamsKindManaged, RulesetUpdateParamsKindCustom, RulesetUpdateParamsKindRoot, RulesetUpdateParamsKindZone: - return true - } - return false -} - -// The phase of the ruleset. -type RulesetUpdateParamsPhase string - -const ( - RulesetUpdateParamsPhaseDDoSL4 RulesetUpdateParamsPhase = "ddos_l4" - RulesetUpdateParamsPhaseDDoSL7 RulesetUpdateParamsPhase = "ddos_l7" - RulesetUpdateParamsPhaseHTTPConfigSettings RulesetUpdateParamsPhase = "http_config_settings" - RulesetUpdateParamsPhaseHTTPCustomErrors RulesetUpdateParamsPhase = "http_custom_errors" - RulesetUpdateParamsPhaseHTTPLogCustomFields RulesetUpdateParamsPhase = "http_log_custom_fields" - RulesetUpdateParamsPhaseHTTPRatelimit RulesetUpdateParamsPhase = "http_ratelimit" - RulesetUpdateParamsPhaseHTTPRequestCacheSettings RulesetUpdateParamsPhase = "http_request_cache_settings" - RulesetUpdateParamsPhaseHTTPRequestDynamicRedirect RulesetUpdateParamsPhase = "http_request_dynamic_redirect" - RulesetUpdateParamsPhaseHTTPRequestFirewallCustom RulesetUpdateParamsPhase = "http_request_firewall_custom" - RulesetUpdateParamsPhaseHTTPRequestFirewallManaged RulesetUpdateParamsPhase = "http_request_firewall_managed" - RulesetUpdateParamsPhaseHTTPRequestLateTransform RulesetUpdateParamsPhase = "http_request_late_transform" - RulesetUpdateParamsPhaseHTTPRequestOrigin RulesetUpdateParamsPhase = "http_request_origin" - RulesetUpdateParamsPhaseHTTPRequestRedirect RulesetUpdateParamsPhase = "http_request_redirect" - RulesetUpdateParamsPhaseHTTPRequestSanitize RulesetUpdateParamsPhase = "http_request_sanitize" - RulesetUpdateParamsPhaseHTTPRequestSBFM RulesetUpdateParamsPhase = "http_request_sbfm" - RulesetUpdateParamsPhaseHTTPRequestSelectConfiguration RulesetUpdateParamsPhase = "http_request_select_configuration" - RulesetUpdateParamsPhaseHTTPRequestTransform RulesetUpdateParamsPhase = "http_request_transform" - RulesetUpdateParamsPhaseHTTPResponseCompression RulesetUpdateParamsPhase = "http_response_compression" - RulesetUpdateParamsPhaseHTTPResponseFirewallManaged RulesetUpdateParamsPhase = "http_response_firewall_managed" - RulesetUpdateParamsPhaseHTTPResponseHeadersTransform RulesetUpdateParamsPhase = "http_response_headers_transform" - RulesetUpdateParamsPhaseMagicTransit RulesetUpdateParamsPhase = "magic_transit" - RulesetUpdateParamsPhaseMagicTransitIDsManaged RulesetUpdateParamsPhase = "magic_transit_ids_managed" - RulesetUpdateParamsPhaseMagicTransitManaged RulesetUpdateParamsPhase = "magic_transit_managed" -) - -func (r RulesetUpdateParamsPhase) IsKnown() bool { - switch r { - case RulesetUpdateParamsPhaseDDoSL4, RulesetUpdateParamsPhaseDDoSL7, RulesetUpdateParamsPhaseHTTPConfigSettings, RulesetUpdateParamsPhaseHTTPCustomErrors, RulesetUpdateParamsPhaseHTTPLogCustomFields, RulesetUpdateParamsPhaseHTTPRatelimit, RulesetUpdateParamsPhaseHTTPRequestCacheSettings, RulesetUpdateParamsPhaseHTTPRequestDynamicRedirect, RulesetUpdateParamsPhaseHTTPRequestFirewallCustom, RulesetUpdateParamsPhaseHTTPRequestFirewallManaged, RulesetUpdateParamsPhaseHTTPRequestLateTransform, RulesetUpdateParamsPhaseHTTPRequestOrigin, RulesetUpdateParamsPhaseHTTPRequestRedirect, RulesetUpdateParamsPhaseHTTPRequestSanitize, RulesetUpdateParamsPhaseHTTPRequestSBFM, RulesetUpdateParamsPhaseHTTPRequestSelectConfiguration, RulesetUpdateParamsPhaseHTTPRequestTransform, RulesetUpdateParamsPhaseHTTPResponseCompression, RulesetUpdateParamsPhaseHTTPResponseFirewallManaged, RulesetUpdateParamsPhaseHTTPResponseHeadersTransform, RulesetUpdateParamsPhaseMagicTransit, RulesetUpdateParamsPhaseMagicTransitIDsManaged, RulesetUpdateParamsPhaseMagicTransitManaged: - return true - } - return false -} - // A response object. type RulesetUpdateResponseEnvelope struct { // A list of error messages. diff --git a/rulesets/ruleset_test.go b/rulesets/ruleset_test.go index a58635743f..2a247ef233 100644 --- a/rulesets/ruleset_test.go +++ b/rulesets/ruleset_test.go @@ -29,9 +29,9 @@ func TestRulesetNewWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.Rulesets.New(context.TODO(), rulesets.RulesetNewParams{ - Kind: cloudflare.F(rulesets.RulesetNewParamsKindRoot), + Kind: cloudflare.F(rulesets.KindRoot), Name: cloudflare.F("My ruleset"), - Phase: cloudflare.F(rulesets.RulesetNewParamsPhaseHTTPRequestFirewallCustom), + Phase: cloudflare.F(rulesets.PhaseHTTPRequestFirewallCustom), Rules: cloudflare.F([]rulesets.RulesetNewParamsRuleUnion{rulesets.BlockRuleParam{ Action: cloudflare.F(rulesets.BlockRuleActionBlock), ActionParameters: cloudflare.F(rulesets.BlockRuleActionParametersParam{ @@ -170,9 +170,9 @@ func TestRulesetUpdateWithOptionalParams(t *testing.T) { AccountID: cloudflare.F("string"), ZoneID: cloudflare.F("string"), Description: cloudflare.F("My ruleset to execute managed rulesets"), - Kind: cloudflare.F(rulesets.RulesetUpdateParamsKindRoot), + Kind: cloudflare.F(rulesets.KindRoot), Name: cloudflare.F("My ruleset"), - Phase: cloudflare.F(rulesets.RulesetUpdateParamsPhaseHTTPRequestFirewallCustom), + Phase: cloudflare.F(rulesets.PhaseHTTPRequestFirewallCustom), }, ) if err != nil { diff --git a/rulesets/version.go b/rulesets/version.go index 3107bd4ac0..a973e83969 100644 --- a/rulesets/version.go +++ b/rulesets/version.go @@ -113,13 +113,13 @@ type VersionGetResponse struct { // The unique ID of the ruleset. ID string `json:"id,required"` // The kind of the ruleset. - Kind VersionGetResponseKind `json:"kind,required"` + Kind Kind `json:"kind,required"` // The timestamp of when the ruleset was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The human-readable name of the ruleset. Name string `json:"name,required"` // The phase of the ruleset. - Phase VersionGetResponsePhase `json:"phase,required"` + Phase Phase `json:"phase,required"` // The list of rules in the ruleset. Rules []VersionGetResponseRule `json:"rules,required"` // The version of the ruleset. @@ -152,61 +152,6 @@ func (r versionGetResponseJSON) RawJSON() string { return r.raw } -// The kind of the ruleset. -type VersionGetResponseKind string - -const ( - VersionGetResponseKindManaged VersionGetResponseKind = "managed" - VersionGetResponseKindCustom VersionGetResponseKind = "custom" - VersionGetResponseKindRoot VersionGetResponseKind = "root" - VersionGetResponseKindZone VersionGetResponseKind = "zone" -) - -func (r VersionGetResponseKind) IsKnown() bool { - switch r { - case VersionGetResponseKindManaged, VersionGetResponseKindCustom, VersionGetResponseKindRoot, VersionGetResponseKindZone: - return true - } - return false -} - -// The phase of the ruleset. -type VersionGetResponsePhase string - -const ( - VersionGetResponsePhaseDDoSL4 VersionGetResponsePhase = "ddos_l4" - VersionGetResponsePhaseDDoSL7 VersionGetResponsePhase = "ddos_l7" - VersionGetResponsePhaseHTTPConfigSettings VersionGetResponsePhase = "http_config_settings" - VersionGetResponsePhaseHTTPCustomErrors VersionGetResponsePhase = "http_custom_errors" - VersionGetResponsePhaseHTTPLogCustomFields VersionGetResponsePhase = "http_log_custom_fields" - VersionGetResponsePhaseHTTPRatelimit VersionGetResponsePhase = "http_ratelimit" - VersionGetResponsePhaseHTTPRequestCacheSettings VersionGetResponsePhase = "http_request_cache_settings" - VersionGetResponsePhaseHTTPRequestDynamicRedirect VersionGetResponsePhase = "http_request_dynamic_redirect" - VersionGetResponsePhaseHTTPRequestFirewallCustom VersionGetResponsePhase = "http_request_firewall_custom" - VersionGetResponsePhaseHTTPRequestFirewallManaged VersionGetResponsePhase = "http_request_firewall_managed" - VersionGetResponsePhaseHTTPRequestLateTransform VersionGetResponsePhase = "http_request_late_transform" - VersionGetResponsePhaseHTTPRequestOrigin VersionGetResponsePhase = "http_request_origin" - VersionGetResponsePhaseHTTPRequestRedirect VersionGetResponsePhase = "http_request_redirect" - VersionGetResponsePhaseHTTPRequestSanitize VersionGetResponsePhase = "http_request_sanitize" - VersionGetResponsePhaseHTTPRequestSBFM VersionGetResponsePhase = "http_request_sbfm" - VersionGetResponsePhaseHTTPRequestSelectConfiguration VersionGetResponsePhase = "http_request_select_configuration" - VersionGetResponsePhaseHTTPRequestTransform VersionGetResponsePhase = "http_request_transform" - VersionGetResponsePhaseHTTPResponseCompression VersionGetResponsePhase = "http_response_compression" - VersionGetResponsePhaseHTTPResponseFirewallManaged VersionGetResponsePhase = "http_response_firewall_managed" - VersionGetResponsePhaseHTTPResponseHeadersTransform VersionGetResponsePhase = "http_response_headers_transform" - VersionGetResponsePhaseMagicTransit VersionGetResponsePhase = "magic_transit" - VersionGetResponsePhaseMagicTransitIDsManaged VersionGetResponsePhase = "magic_transit_ids_managed" - VersionGetResponsePhaseMagicTransitManaged VersionGetResponsePhase = "magic_transit_managed" -) - -func (r VersionGetResponsePhase) IsKnown() bool { - switch r { - case VersionGetResponsePhaseDDoSL4, VersionGetResponsePhaseDDoSL7, VersionGetResponsePhaseHTTPConfigSettings, VersionGetResponsePhaseHTTPCustomErrors, VersionGetResponsePhaseHTTPLogCustomFields, VersionGetResponsePhaseHTTPRatelimit, VersionGetResponsePhaseHTTPRequestCacheSettings, VersionGetResponsePhaseHTTPRequestDynamicRedirect, VersionGetResponsePhaseHTTPRequestFirewallCustom, VersionGetResponsePhaseHTTPRequestFirewallManaged, VersionGetResponsePhaseHTTPRequestLateTransform, VersionGetResponsePhaseHTTPRequestOrigin, VersionGetResponsePhaseHTTPRequestRedirect, VersionGetResponsePhaseHTTPRequestSanitize, VersionGetResponsePhaseHTTPRequestSBFM, VersionGetResponsePhaseHTTPRequestSelectConfiguration, VersionGetResponsePhaseHTTPRequestTransform, VersionGetResponsePhaseHTTPResponseCompression, VersionGetResponsePhaseHTTPResponseFirewallManaged, VersionGetResponsePhaseHTTPResponseHeadersTransform, VersionGetResponsePhaseMagicTransit, VersionGetResponsePhaseMagicTransitIDsManaged, VersionGetResponsePhaseMagicTransitManaged: - return true - } - return false -} - type VersionGetResponseRule struct { // The action to perform when the rule matches. Action VersionGetResponseRulesAction `json:"action"` diff --git a/rulesets/versionbytag.go b/rulesets/versionbytag.go index 6ac3a82af3..ca5d8523da 100644 --- a/rulesets/versionbytag.go +++ b/rulesets/versionbytag.go @@ -52,13 +52,13 @@ type VersionByTagGetResponse struct { // The unique ID of the ruleset. ID string `json:"id,required"` // The kind of the ruleset. - Kind VersionByTagGetResponseKind `json:"kind,required"` + Kind Kind `json:"kind,required"` // The timestamp of when the ruleset was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The human-readable name of the ruleset. Name string `json:"name,required"` // The phase of the ruleset. - Phase VersionByTagGetResponsePhase `json:"phase,required"` + Phase Phase `json:"phase,required"` // The list of rules in the ruleset. Rules []VersionByTagGetResponseRule `json:"rules,required"` // The version of the ruleset. @@ -91,61 +91,6 @@ func (r versionByTagGetResponseJSON) RawJSON() string { return r.raw } -// The kind of the ruleset. -type VersionByTagGetResponseKind string - -const ( - VersionByTagGetResponseKindManaged VersionByTagGetResponseKind = "managed" - VersionByTagGetResponseKindCustom VersionByTagGetResponseKind = "custom" - VersionByTagGetResponseKindRoot VersionByTagGetResponseKind = "root" - VersionByTagGetResponseKindZone VersionByTagGetResponseKind = "zone" -) - -func (r VersionByTagGetResponseKind) IsKnown() bool { - switch r { - case VersionByTagGetResponseKindManaged, VersionByTagGetResponseKindCustom, VersionByTagGetResponseKindRoot, VersionByTagGetResponseKindZone: - return true - } - return false -} - -// The phase of the ruleset. -type VersionByTagGetResponsePhase string - -const ( - VersionByTagGetResponsePhaseDDoSL4 VersionByTagGetResponsePhase = "ddos_l4" - VersionByTagGetResponsePhaseDDoSL7 VersionByTagGetResponsePhase = "ddos_l7" - VersionByTagGetResponsePhaseHTTPConfigSettings VersionByTagGetResponsePhase = "http_config_settings" - VersionByTagGetResponsePhaseHTTPCustomErrors VersionByTagGetResponsePhase = "http_custom_errors" - VersionByTagGetResponsePhaseHTTPLogCustomFields VersionByTagGetResponsePhase = "http_log_custom_fields" - VersionByTagGetResponsePhaseHTTPRatelimit VersionByTagGetResponsePhase = "http_ratelimit" - VersionByTagGetResponsePhaseHTTPRequestCacheSettings VersionByTagGetResponsePhase = "http_request_cache_settings" - VersionByTagGetResponsePhaseHTTPRequestDynamicRedirect VersionByTagGetResponsePhase = "http_request_dynamic_redirect" - VersionByTagGetResponsePhaseHTTPRequestFirewallCustom VersionByTagGetResponsePhase = "http_request_firewall_custom" - VersionByTagGetResponsePhaseHTTPRequestFirewallManaged VersionByTagGetResponsePhase = "http_request_firewall_managed" - VersionByTagGetResponsePhaseHTTPRequestLateTransform VersionByTagGetResponsePhase = "http_request_late_transform" - VersionByTagGetResponsePhaseHTTPRequestOrigin VersionByTagGetResponsePhase = "http_request_origin" - VersionByTagGetResponsePhaseHTTPRequestRedirect VersionByTagGetResponsePhase = "http_request_redirect" - VersionByTagGetResponsePhaseHTTPRequestSanitize VersionByTagGetResponsePhase = "http_request_sanitize" - VersionByTagGetResponsePhaseHTTPRequestSBFM VersionByTagGetResponsePhase = "http_request_sbfm" - VersionByTagGetResponsePhaseHTTPRequestSelectConfiguration VersionByTagGetResponsePhase = "http_request_select_configuration" - VersionByTagGetResponsePhaseHTTPRequestTransform VersionByTagGetResponsePhase = "http_request_transform" - VersionByTagGetResponsePhaseHTTPResponseCompression VersionByTagGetResponsePhase = "http_response_compression" - VersionByTagGetResponsePhaseHTTPResponseFirewallManaged VersionByTagGetResponsePhase = "http_response_firewall_managed" - VersionByTagGetResponsePhaseHTTPResponseHeadersTransform VersionByTagGetResponsePhase = "http_response_headers_transform" - VersionByTagGetResponsePhaseMagicTransit VersionByTagGetResponsePhase = "magic_transit" - VersionByTagGetResponsePhaseMagicTransitIDsManaged VersionByTagGetResponsePhase = "magic_transit_ids_managed" - VersionByTagGetResponsePhaseMagicTransitManaged VersionByTagGetResponsePhase = "magic_transit_managed" -) - -func (r VersionByTagGetResponsePhase) IsKnown() bool { - switch r { - case VersionByTagGetResponsePhaseDDoSL4, VersionByTagGetResponsePhaseDDoSL7, VersionByTagGetResponsePhaseHTTPConfigSettings, VersionByTagGetResponsePhaseHTTPCustomErrors, VersionByTagGetResponsePhaseHTTPLogCustomFields, VersionByTagGetResponsePhaseHTTPRatelimit, VersionByTagGetResponsePhaseHTTPRequestCacheSettings, VersionByTagGetResponsePhaseHTTPRequestDynamicRedirect, VersionByTagGetResponsePhaseHTTPRequestFirewallCustom, VersionByTagGetResponsePhaseHTTPRequestFirewallManaged, VersionByTagGetResponsePhaseHTTPRequestLateTransform, VersionByTagGetResponsePhaseHTTPRequestOrigin, VersionByTagGetResponsePhaseHTTPRequestRedirect, VersionByTagGetResponsePhaseHTTPRequestSanitize, VersionByTagGetResponsePhaseHTTPRequestSBFM, VersionByTagGetResponsePhaseHTTPRequestSelectConfiguration, VersionByTagGetResponsePhaseHTTPRequestTransform, VersionByTagGetResponsePhaseHTTPResponseCompression, VersionByTagGetResponsePhaseHTTPResponseFirewallManaged, VersionByTagGetResponsePhaseHTTPResponseHeadersTransform, VersionByTagGetResponsePhaseMagicTransit, VersionByTagGetResponsePhaseMagicTransitIDsManaged, VersionByTagGetResponsePhaseMagicTransitManaged: - return true - } - return false -} - type VersionByTagGetResponseRule struct { // The action to perform when the rule matches. Action VersionByTagGetResponseRulesAction `json:"action"` diff --git a/rum/aliases.go b/rum/aliases.go index a2abb297fd..62d91bd1be 100644 --- a/rum/aliases.go +++ b/rum/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/secondary_dns/aliases.go b/secondary_dns/aliases.go index 788e8f5103..f1a24bdbfe 100644 --- a/secondary_dns/aliases.go +++ b/secondary_dns/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/shared/shared.go b/shared/shared.go index 483abddce0..78be75f67d 100644 --- a/shared/shared.go +++ b/shared/shared.go @@ -643,3 +643,19 @@ func (r *Role) UnmarshalJSON(data []byte) (err error) { func (r roleJSON) RawJSON() string { return r.raw } + +// Direction to order DNS records in. +type SortDirection string + +const ( + SortDirectionAsc SortDirection = "asc" + SortDirectionDesc SortDirection = "desc" +) + +func (r SortDirection) IsKnown() bool { + switch r { + case SortDirectionAsc, SortDirectionDesc: + return true + } + return false +} diff --git a/snippets/aliases.go b/snippets/aliases.go index a3f652f297..298459e47d 100644 --- a/snippets/aliases.go +++ b/snippets/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/spectrum/aliases.go b/spectrum/aliases.go index 53e9a837c1..bf743976cf 100644 --- a/spectrum/aliases.go +++ b/spectrum/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/speed/aliases.go b/speed/aliases.go index 2e9ce22734..1bbe686c1c 100644 --- a/speed/aliases.go +++ b/speed/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/ssl/aliases.go b/ssl/aliases.go index e04d4e3dbc..472b2c411a 100644 --- a/ssl/aliases.go +++ b/ssl/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/storage/aliases.go b/storage/aliases.go index 771f00c549..33d610aecd 100644 --- a/storage/aliases.go +++ b/storage/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/stream/aliases.go b/stream/aliases.go index 0cdf7f1d29..abd0ab7dd4 100644 --- a/stream/aliases.go +++ b/stream/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/subscriptions/aliases.go b/subscriptions/aliases.go index f28e9e089f..6c00368ed7 100644 --- a/subscriptions/aliases.go +++ b/subscriptions/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/url_normalization/aliases.go b/url_normalization/aliases.go index 46f97c9489..f621299449 100644 --- a/url_normalization/aliases.go +++ b/url_normalization/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/url_scanner/aliases.go b/url_scanner/aliases.go index 75bc9579e6..38a0806aec 100644 --- a/url_scanner/aliases.go +++ b/url_scanner/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/usage_test.go b/usage_test.go index 91eaa49691..0d66ec4a33 100644 --- a/usage_test.go +++ b/usage_test.go @@ -31,7 +31,7 @@ func TestUsage(t *testing.T) { ID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }), Name: cloudflare.F("example.com"), - Type: cloudflare.F(zones.ZoneNewParamsTypeFull), + Type: cloudflare.F(zones.TypeFull), }) if err != nil { t.Error(err) diff --git a/user/aliases.go b/user/aliases.go index 8dd5458e74..362ab31980 100644 --- a/user/aliases.go +++ b/user/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/vectorize/aliases.go b/vectorize/aliases.go index 1d547d2ff1..8ac7bae310 100644 --- a/vectorize/aliases.go +++ b/vectorize/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/waiting_rooms/aliases.go b/waiting_rooms/aliases.go index c8d2243b90..11e5ff0111 100644 --- a/waiting_rooms/aliases.go +++ b/waiting_rooms/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/warp_connector/aliases.go b/warp_connector/aliases.go index 5adf06aabf..beb247731f 100644 --- a/warp_connector/aliases.go +++ b/warp_connector/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/web3/aliases.go b/web3/aliases.go index ac3f7bf9f5..26f29f7a73 100644 --- a/web3/aliases.go +++ b/web3/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/workers/aliases.go b/workers/aliases.go index aa23140211..e37d47a2c0 100644 --- a/workers/aliases.go +++ b/workers/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/workers_for_platforms/aliases.go b/workers_for_platforms/aliases.go index ab9fe62cf9..16bc69b29f 100644 --- a/workers_for_platforms/aliases.go +++ b/workers_for_platforms/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/zero_trust/aliases.go b/zero_trust/aliases.go index 798a2aa2f6..d61f62238d 100644 --- a/zero_trust/aliases.go +++ b/zero_trust/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/zones/aliases.go b/zones/aliases.go index cd2bc80f06..9b52c9acf7 100644 --- a/zones/aliases.go +++ b/zones/aliases.go @@ -142,3 +142,14 @@ type ResponseInfo = shared.ResponseInfo // This is an alias to an internal type. type Role = shared.Role + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc diff --git a/zones/zone.go b/zones/zone.go index 8a385926b9..8a094c3e72 100644 --- a/zones/zone.go +++ b/zones/zone.go @@ -122,6 +122,24 @@ func (r *ZoneService) Get(ctx context.Context, query ZoneGetParams, opts ...opti return } +// A full zone implies that DNS is hosted with Cloudflare. A partial zone is +// typically a partner-hosted zone or a CNAME setup. +type Type string + +const ( + TypeFull Type = "full" + TypePartial Type = "partial" + TypeSecondary Type = "secondary" +) + +func (r Type) IsKnown() bool { + switch r { + case TypeFull, TypePartial, TypeSecondary: + return true + } + return false +} + type Zone struct { // Identifier ID string `json:"id,required"` @@ -305,7 +323,7 @@ type ZoneNewParams struct { Name param.Field[string] `json:"name,required"` // A full zone implies that DNS is hosted with Cloudflare. A partial zone is // typically a partner-hosted zone or a CNAME setup. - Type param.Field[ZoneNewParamsType] `json:"type"` + Type param.Field[Type] `json:"type"` } func (r ZoneNewParams) MarshalJSON() (data []byte, err error) { @@ -321,24 +339,6 @@ func (r ZoneNewParamsAccount) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -// A full zone implies that DNS is hosted with Cloudflare. A partial zone is -// typically a partner-hosted zone or a CNAME setup. -type ZoneNewParamsType string - -const ( - ZoneNewParamsTypeFull ZoneNewParamsType = "full" - ZoneNewParamsTypePartial ZoneNewParamsType = "partial" - ZoneNewParamsTypeSecondary ZoneNewParamsType = "secondary" -) - -func (r ZoneNewParamsType) IsKnown() bool { - switch r { - case ZoneNewParamsTypeFull, ZoneNewParamsTypePartial, ZoneNewParamsTypeSecondary: - return true - } - return false -} - type ZoneNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` diff --git a/zones/zone_test.go b/zones/zone_test.go index ce74a70244..5235fb68f8 100644 --- a/zones/zone_test.go +++ b/zones/zone_test.go @@ -32,7 +32,7 @@ func TestZoneNewWithOptionalParams(t *testing.T) { ID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }), Name: cloudflare.F("example.com"), - Type: cloudflare.F(zones.ZoneNewParamsTypeFull), + Type: cloudflare.F(zones.TypeFull), }) if err != nil { var apierr *cloudflare.Error From 3c5fbcb6d03e6b1e5f32e0b1a14fa68b0c289736 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 04:56:18 +0000 Subject: [PATCH 119/127] feat(api): update via SDK Studio (#1968) --- api.md | 26 +++--- zero_trust/accessapplication.go | 116 ++++++++++++++------------- zero_trust/accessapplication_test.go | 24 +++--- 3 files changed, 86 insertions(+), 80 deletions(-) diff --git a/api.md b/api.md index fb7649b427..5e6dffa8a0 100644 --- a/api.md +++ b/api.md @@ -4725,34 +4725,36 @@ Response Types: Params Types: -- zero_trust.AllowedHeadershParam -- zero_trust.AllowedIdpshParam -- zero_trust.AllowedMethodsh -- zero_trust.AllowedOriginshParam +- zero_trust.AllowedHeadersParam +- zero_trust.AllowedHTTPMethodsParam +- zero_trust.AllowedIdPsParam +- zero_trust.AllowedMethods +- zero_trust.AllowedOriginsParam - zero_trust.AppIDUnionParam - zero_trust.ApplicationUnionParam - zero_trust.CORSHeadersParam -- zero_trust.CustomPageshParam +- zero_trust.CustomPagesParam - zero_trust.SaaSAppNameFormat - zero_trust.SaaSAppNameIDFormat - zero_trust.SaaSAppSourceParam - zero_trust.SAMLSaaSAppParam -- zero_trust.SelfHostedDomainshParam +- zero_trust.SelfHostedDomainsParam Response Types: -- zero_trust.AllowedHeadersh -- zero_trust.AllowedIdpsh -- zero_trust.AllowedMethodsh -- zero_trust.AllowedOriginsh +- zero_trust.AllowedHeaders +- zero_trust.AllowedHTTPMethods +- zero_trust.AllowedIdPs +- zero_trust.AllowedMethods +- zero_trust.AllowedOrigins - zero_trust.Application - zero_trust.CORSHeaders -- zero_trust.CustomPagesh +- zero_trust.CustomPages - zero_trust.SaaSAppNameFormat - zero_trust.SaaSAppNameIDFormat - zero_trust.SaaSAppSource - zero_trust.SAMLSaaSApp -- zero_trust.SelfHostedDomainsh +- zero_trust.SelfHostedDomains - zero_trust.AccessApplicationDeleteResponse - zero_trust.AccessApplicationRevokeTokensResponse diff --git a/zero_trust/accessapplication.go b/zero_trust/accessapplication.go index 4fd76e6106..96d6b1ed7f 100644 --- a/zero_trust/accessapplication.go +++ b/zero_trust/accessapplication.go @@ -184,39 +184,43 @@ func (r *AccessApplicationService) RevokeTokens(ctx context.Context, appID AppID return } -type AllowedHeadersh = string +type AllowedHeaders = string -type AllowedHeadershParam = string +type AllowedHeadersParam = string -type AllowedIdpsh = string +type AllowedHTTPMethods []AllowedMethods -type AllowedIdpshParam = string +type AllowedHTTPMethodsParam []AllowedMethods -type AllowedMethodsh string +type AllowedIdPs = string + +type AllowedIdPsParam = string + +type AllowedMethods string const ( - AllowedMethodshGet AllowedMethodsh = "GET" - AllowedMethodshPost AllowedMethodsh = "POST" - AllowedMethodshHead AllowedMethodsh = "HEAD" - AllowedMethodshPut AllowedMethodsh = "PUT" - AllowedMethodshDelete AllowedMethodsh = "DELETE" - AllowedMethodshConnect AllowedMethodsh = "CONNECT" - AllowedMethodshOptions AllowedMethodsh = "OPTIONS" - AllowedMethodshTrace AllowedMethodsh = "TRACE" - AllowedMethodshPatch AllowedMethodsh = "PATCH" + AllowedMethodsGet AllowedMethods = "GET" + AllowedMethodsPost AllowedMethods = "POST" + AllowedMethodsHead AllowedMethods = "HEAD" + AllowedMethodsPut AllowedMethods = "PUT" + AllowedMethodsDelete AllowedMethods = "DELETE" + AllowedMethodsConnect AllowedMethods = "CONNECT" + AllowedMethodsOptions AllowedMethods = "OPTIONS" + AllowedMethodsTrace AllowedMethods = "TRACE" + AllowedMethodsPatch AllowedMethods = "PATCH" ) -func (r AllowedMethodsh) IsKnown() bool { +func (r AllowedMethods) IsKnown() bool { switch r { - case AllowedMethodshGet, AllowedMethodshPost, AllowedMethodshHead, AllowedMethodshPut, AllowedMethodshDelete, AllowedMethodshConnect, AllowedMethodshOptions, AllowedMethodshTrace, AllowedMethodshPatch: + case AllowedMethodsGet, AllowedMethodsPost, AllowedMethodsHead, AllowedMethodsPut, AllowedMethodsDelete, AllowedMethodsConnect, AllowedMethodsOptions, AllowedMethodsTrace, AllowedMethodsPatch: return true } return false } -type AllowedOriginsh = string +type AllowedOrigins = string -type AllowedOriginshParam = string +type AllowedOriginsParam = string // Identifier // @@ -409,7 +413,7 @@ type ApplicationSelfHostedApplication struct { AllowAuthenticateViaWARP bool `json:"allow_authenticate_via_warp"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdPs []AllowedIdpsh `json:"allowed_idps"` + AllowedIdPs []AllowedIdPs `json:"allowed_idps"` // Displays the application in the App Launcher. AppLauncherVisible bool `json:"app_launcher_visible"` // Audience tag. @@ -429,7 +433,7 @@ type ApplicationSelfHostedApplication struct { // application when failing non-identity rules. CustomNonIdentityDenyURL string `json:"custom_non_identity_deny_url"` // The custom pages that will be displayed when applicable for this application - CustomPages []CustomPagesh `json:"custom_pages"` + CustomPages []CustomPages `json:"custom_pages"` // Enables the binding cookie, which increases security against compromised // authorization tokens and CSRF attacks. EnableBindingCookie bool `json:"enable_binding_cookie"` @@ -450,7 +454,7 @@ type ApplicationSelfHostedApplication struct { // attacks. SameSiteCookieAttribute string `json:"same_site_cookie_attribute"` // List of domains that Access will secure. - SelfHostedDomains []SelfHostedDomainsh `json:"self_hosted_domains"` + SelfHostedDomains []SelfHostedDomains `json:"self_hosted_domains"` // Returns a 401 status code when the request is blocked by a Service Auth policy. ServiceAuth401Redirect bool `json:"service_auth_401_redirect"` // The amount of time that tokens issued for this application will be valid. Must @@ -515,7 +519,7 @@ type ApplicationSaaSApplication struct { ID string `json:"id"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdPs []AllowedIdpsh `json:"allowed_idps"` + AllowedIdPs []AllowedIdPs `json:"allowed_idps"` // Displays the application in the App Launcher. AppLauncherVisible bool `json:"app_launcher_visible"` // Audience tag. @@ -525,7 +529,7 @@ type ApplicationSaaSApplication struct { AutoRedirectToIdentity bool `json:"auto_redirect_to_identity"` CreatedAt time.Time `json:"created_at" format:"date-time"` // The custom pages that will be displayed when applicable for this application - CustomPages []CustomPagesh `json:"custom_pages"` + CustomPages []CustomPages `json:"custom_pages"` // The image URL for the logo shown in the App Launcher dashboard. LogoURL string `json:"logo_url"` // The name of the application. @@ -898,7 +902,7 @@ type ApplicationBrowserSSHApplication struct { AllowAuthenticateViaWARP bool `json:"allow_authenticate_via_warp"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdPs []AllowedIdpsh `json:"allowed_idps"` + AllowedIdPs []AllowedIdPs `json:"allowed_idps"` // Displays the application in the App Launcher. AppLauncherVisible bool `json:"app_launcher_visible"` // Audience tag. @@ -918,7 +922,7 @@ type ApplicationBrowserSSHApplication struct { // application when failing non-identity rules. CustomNonIdentityDenyURL string `json:"custom_non_identity_deny_url"` // The custom pages that will be displayed when applicable for this application - CustomPages []CustomPagesh `json:"custom_pages"` + CustomPages []CustomPages `json:"custom_pages"` // Enables the binding cookie, which increases security against compromised // authorization tokens and CSRF attacks. EnableBindingCookie bool `json:"enable_binding_cookie"` @@ -939,7 +943,7 @@ type ApplicationBrowserSSHApplication struct { // attacks. SameSiteCookieAttribute string `json:"same_site_cookie_attribute"` // List of domains that Access will secure. - SelfHostedDomains []SelfHostedDomainsh `json:"self_hosted_domains"` + SelfHostedDomains []SelfHostedDomains `json:"self_hosted_domains"` // Returns a 401 status code when the request is blocked by a Service Auth policy. ServiceAuth401Redirect bool `json:"service_auth_401_redirect"` // The amount of time that tokens issued for this application will be valid. Must @@ -1014,7 +1018,7 @@ type ApplicationBrowserVncApplication struct { AllowAuthenticateViaWARP bool `json:"allow_authenticate_via_warp"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdPs []AllowedIdpsh `json:"allowed_idps"` + AllowedIdPs []AllowedIdPs `json:"allowed_idps"` // Displays the application in the App Launcher. AppLauncherVisible bool `json:"app_launcher_visible"` // Audience tag. @@ -1034,7 +1038,7 @@ type ApplicationBrowserVncApplication struct { // application when failing non-identity rules. CustomNonIdentityDenyURL string `json:"custom_non_identity_deny_url"` // The custom pages that will be displayed when applicable for this application - CustomPages []CustomPagesh `json:"custom_pages"` + CustomPages []CustomPages `json:"custom_pages"` // Enables the binding cookie, which increases security against compromised // authorization tokens and CSRF attacks. EnableBindingCookie bool `json:"enable_binding_cookie"` @@ -1055,7 +1059,7 @@ type ApplicationBrowserVncApplication struct { // attacks. SameSiteCookieAttribute string `json:"same_site_cookie_attribute"` // List of domains that Access will secure. - SelfHostedDomains []SelfHostedDomainsh `json:"self_hosted_domains"` + SelfHostedDomains []SelfHostedDomains `json:"self_hosted_domains"` // Returns a 401 status code when the request is blocked by a Service Auth policy. ServiceAuth401Redirect bool `json:"service_auth_401_redirect"` // The amount of time that tokens issued for this application will be valid. Must @@ -1122,7 +1126,7 @@ type ApplicationAppLauncherApplication struct { ID string `json:"id"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdPs []AllowedIdpsh `json:"allowed_idps"` + AllowedIdPs []AllowedIdPs `json:"allowed_idps"` // Audience tag. AUD string `json:"aud"` // When set to `true`, users skip the identity provider selection step during @@ -1199,7 +1203,7 @@ type ApplicationDeviceEnrollmentPermissionsApplication struct { ID string `json:"id"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdPs []AllowedIdpsh `json:"allowed_idps"` + AllowedIdPs []AllowedIdPs `json:"allowed_idps"` // Audience tag. AUD string `json:"aud"` // When set to `true`, users skip the identity provider selection step during @@ -1276,7 +1280,7 @@ type ApplicationBrowserIsolationPermissionsApplication struct { ID string `json:"id"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdPs []AllowedIdpsh `json:"allowed_idps"` + AllowedIdPs []AllowedIdPs `json:"allowed_idps"` // Audience tag. AUD string `json:"aud"` // When set to `true`, users skip the identity provider selection step during @@ -1487,7 +1491,7 @@ type ApplicationSelfHostedApplicationParam struct { AllowAuthenticateViaWARP param.Field[bool] `json:"allow_authenticate_via_warp"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdPs param.Field[[]AllowedIdpshParam] `json:"allowed_idps"` + AllowedIdPs param.Field[[]AllowedIdPsParam] `json:"allowed_idps"` // Displays the application in the App Launcher. AppLauncherVisible param.Field[bool] `json:"app_launcher_visible"` // When set to `true`, users skip the identity provider selection step during @@ -1504,7 +1508,7 @@ type ApplicationSelfHostedApplicationParam struct { // application when failing non-identity rules. CustomNonIdentityDenyURL param.Field[string] `json:"custom_non_identity_deny_url"` // The custom pages that will be displayed when applicable for this application - CustomPages param.Field[[]CustomPageshParam] `json:"custom_pages"` + CustomPages param.Field[[]CustomPagesParam] `json:"custom_pages"` // Enables the binding cookie, which increases security against compromised // authorization tokens and CSRF attacks. EnableBindingCookie param.Field[bool] `json:"enable_binding_cookie"` @@ -1525,7 +1529,7 @@ type ApplicationSelfHostedApplicationParam struct { // attacks. SameSiteCookieAttribute param.Field[string] `json:"same_site_cookie_attribute"` // List of domains that Access will secure. - SelfHostedDomains param.Field[[]SelfHostedDomainshParam] `json:"self_hosted_domains"` + SelfHostedDomains param.Field[[]SelfHostedDomainsParam] `json:"self_hosted_domains"` // Returns a 401 status code when the request is blocked by a Service Auth policy. ServiceAuth401Redirect param.Field[bool] `json:"service_auth_401_redirect"` // The amount of time that tokens issued for this application will be valid. Must @@ -1548,14 +1552,14 @@ func (r ApplicationSelfHostedApplicationParam) implementsZeroTrustApplicationUni type ApplicationSaaSApplicationParam struct { // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdPs param.Field[[]AllowedIdpshParam] `json:"allowed_idps"` + AllowedIdPs param.Field[[]AllowedIdPsParam] `json:"allowed_idps"` // Displays the application in the App Launcher. AppLauncherVisible param.Field[bool] `json:"app_launcher_visible"` // When set to `true`, users skip the identity provider selection step during // login. You must specify only one identity provider in allowed_idps. AutoRedirectToIdentity param.Field[bool] `json:"auto_redirect_to_identity"` // The custom pages that will be displayed when applicable for this application - CustomPages param.Field[[]CustomPageshParam] `json:"custom_pages"` + CustomPages param.Field[[]CustomPagesParam] `json:"custom_pages"` // The image URL for the logo shown in the App Launcher dashboard. LogoURL param.Field[string] `json:"logo_url"` // The name of the application. @@ -1703,7 +1707,7 @@ type ApplicationBrowserSSHApplicationParam struct { AllowAuthenticateViaWARP param.Field[bool] `json:"allow_authenticate_via_warp"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdPs param.Field[[]AllowedIdpshParam] `json:"allowed_idps"` + AllowedIdPs param.Field[[]AllowedIdPsParam] `json:"allowed_idps"` // Displays the application in the App Launcher. AppLauncherVisible param.Field[bool] `json:"app_launcher_visible"` // When set to `true`, users skip the identity provider selection step during @@ -1720,7 +1724,7 @@ type ApplicationBrowserSSHApplicationParam struct { // application when failing non-identity rules. CustomNonIdentityDenyURL param.Field[string] `json:"custom_non_identity_deny_url"` // The custom pages that will be displayed when applicable for this application - CustomPages param.Field[[]CustomPageshParam] `json:"custom_pages"` + CustomPages param.Field[[]CustomPagesParam] `json:"custom_pages"` // Enables the binding cookie, which increases security against compromised // authorization tokens and CSRF attacks. EnableBindingCookie param.Field[bool] `json:"enable_binding_cookie"` @@ -1741,7 +1745,7 @@ type ApplicationBrowserSSHApplicationParam struct { // attacks. SameSiteCookieAttribute param.Field[string] `json:"same_site_cookie_attribute"` // List of domains that Access will secure. - SelfHostedDomains param.Field[[]SelfHostedDomainshParam] `json:"self_hosted_domains"` + SelfHostedDomains param.Field[[]SelfHostedDomainsParam] `json:"self_hosted_domains"` // Returns a 401 status code when the request is blocked by a Service Auth policy. ServiceAuth401Redirect param.Field[bool] `json:"service_auth_401_redirect"` // The amount of time that tokens issued for this application will be valid. Must @@ -1774,7 +1778,7 @@ type ApplicationBrowserVncApplicationParam struct { AllowAuthenticateViaWARP param.Field[bool] `json:"allow_authenticate_via_warp"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdPs param.Field[[]AllowedIdpshParam] `json:"allowed_idps"` + AllowedIdPs param.Field[[]AllowedIdPsParam] `json:"allowed_idps"` // Displays the application in the App Launcher. AppLauncherVisible param.Field[bool] `json:"app_launcher_visible"` // When set to `true`, users skip the identity provider selection step during @@ -1791,7 +1795,7 @@ type ApplicationBrowserVncApplicationParam struct { // application when failing non-identity rules. CustomNonIdentityDenyURL param.Field[string] `json:"custom_non_identity_deny_url"` // The custom pages that will be displayed when applicable for this application - CustomPages param.Field[[]CustomPageshParam] `json:"custom_pages"` + CustomPages param.Field[[]CustomPagesParam] `json:"custom_pages"` // Enables the binding cookie, which increases security against compromised // authorization tokens and CSRF attacks. EnableBindingCookie param.Field[bool] `json:"enable_binding_cookie"` @@ -1812,7 +1816,7 @@ type ApplicationBrowserVncApplicationParam struct { // attacks. SameSiteCookieAttribute param.Field[string] `json:"same_site_cookie_attribute"` // List of domains that Access will secure. - SelfHostedDomains param.Field[[]SelfHostedDomainshParam] `json:"self_hosted_domains"` + SelfHostedDomains param.Field[[]SelfHostedDomainsParam] `json:"self_hosted_domains"` // Returns a 401 status code when the request is blocked by a Service Auth policy. ServiceAuth401Redirect param.Field[bool] `json:"service_auth_401_redirect"` // The amount of time that tokens issued for this application will be valid. Must @@ -1837,7 +1841,7 @@ type ApplicationAppLauncherApplicationParam struct { Type param.Field[ApplicationAppLauncherApplicationType] `json:"type,required"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdPs param.Field[[]AllowedIdpshParam] `json:"allowed_idps"` + AllowedIdPs param.Field[[]AllowedIdPsParam] `json:"allowed_idps"` // When set to `true`, users skip the identity provider selection step during // login. You must specify only one identity provider in allowed_idps. AutoRedirectToIdentity param.Field[bool] `json:"auto_redirect_to_identity"` @@ -1858,7 +1862,7 @@ type ApplicationDeviceEnrollmentPermissionsApplicationParam struct { Type param.Field[ApplicationDeviceEnrollmentPermissionsApplicationType] `json:"type,required"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdPs param.Field[[]AllowedIdpshParam] `json:"allowed_idps"` + AllowedIdPs param.Field[[]AllowedIdPsParam] `json:"allowed_idps"` // When set to `true`, users skip the identity provider selection step during // login. You must specify only one identity provider in allowed_idps. AutoRedirectToIdentity param.Field[bool] `json:"auto_redirect_to_identity"` @@ -1880,7 +1884,7 @@ type ApplicationBrowserIsolationPermissionsApplicationParam struct { Type param.Field[ApplicationBrowserIsolationPermissionsApplicationType] `json:"type,required"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. - AllowedIdPs param.Field[[]AllowedIdpshParam] `json:"allowed_idps"` + AllowedIdPs param.Field[[]AllowedIdPsParam] `json:"allowed_idps"` // When set to `true`, users skip the identity provider selection step during // login. You must specify only one identity provider in allowed_idps. AutoRedirectToIdentity param.Field[bool] `json:"auto_redirect_to_identity"` @@ -1930,11 +1934,11 @@ type CORSHeaders struct { // client certificates) with requests. AllowCredentials bool `json:"allow_credentials"` // Allowed HTTP request headers. - AllowedHeaders []AllowedHeadersh `json:"allowed_headers"` + AllowedHeaders []AllowedHeaders `json:"allowed_headers"` // Allowed HTTP request methods. - AllowedMethods []AllowedMethodsh `json:"allowed_methods"` + AllowedMethods AllowedHTTPMethods `json:"allowed_methods"` // Allowed origins. - AllowedOrigins []AllowedOriginsh `json:"allowed_origins"` + AllowedOrigins []AllowedOrigins `json:"allowed_origins"` // The maximum number of seconds the results of a preflight request can be cached. MaxAge float64 `json:"max_age"` JSON corsHeadersJSON `json:"-"` @@ -1973,11 +1977,11 @@ type CORSHeadersParam struct { // client certificates) with requests. AllowCredentials param.Field[bool] `json:"allow_credentials"` // Allowed HTTP request headers. - AllowedHeaders param.Field[[]AllowedHeadershParam] `json:"allowed_headers"` + AllowedHeaders param.Field[[]AllowedHeadersParam] `json:"allowed_headers"` // Allowed HTTP request methods. - AllowedMethods param.Field[[]AllowedMethodsh] `json:"allowed_methods"` + AllowedMethods param.Field[AllowedHTTPMethodsParam] `json:"allowed_methods"` // Allowed origins. - AllowedOrigins param.Field[[]AllowedOriginshParam] `json:"allowed_origins"` + AllowedOrigins param.Field[[]AllowedOriginsParam] `json:"allowed_origins"` // The maximum number of seconds the results of a preflight request can be cached. MaxAge param.Field[float64] `json:"max_age"` } @@ -1986,9 +1990,9 @@ func (r CORSHeadersParam) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -type CustomPagesh = string +type CustomPages = string -type CustomPageshParam = string +type CustomPagesParam = string // A globally unique name for an identity or service provider. type SaaSAppNameFormat string @@ -2230,9 +2234,9 @@ func (r SAMLSaaSAppCustomAttributesParam) MarshalJSON() (data []byte, err error) return apijson.MarshalRoot(r) } -type SelfHostedDomainsh = string +type SelfHostedDomains = string -type SelfHostedDomainshParam = string +type SelfHostedDomainsParam = string type AccessApplicationDeleteResponse struct { // UUID diff --git a/zero_trust/accessapplication_test.go b/zero_trust/accessapplication_test.go index ec268aca79..ac7b0268f4 100644 --- a/zero_trust/accessapplication_test.go +++ b/zero_trust/accessapplication_test.go @@ -32,7 +32,7 @@ func TestAccessApplicationNewWithOptionalParams(t *testing.T) { _, err := client.ZeroTrust.Access.Applications.New(context.TODO(), zero_trust.AccessApplicationNewParams{ Application: zero_trust.ApplicationSelfHostedApplicationParam{ AllowAuthenticateViaWARP: cloudflare.F(true), - AllowedIdPs: cloudflare.F([]zero_trust.AllowedIdpshParam{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}), + AllowedIdPs: cloudflare.F([]zero_trust.AllowedIdPsParam{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}), AppLauncherVisible: cloudflare.F(true), AutoRedirectToIdentity: cloudflare.F(true), CORSHeaders: cloudflare.F(zero_trust.CORSHeadersParam{ @@ -40,15 +40,15 @@ func TestAccessApplicationNewWithOptionalParams(t *testing.T) { AllowAllMethods: cloudflare.F(true), AllowAllOrigins: cloudflare.F(true), AllowCredentials: cloudflare.F(true), - AllowedHeaders: cloudflare.F([]zero_trust.AllowedHeadershParam{"string", "string", "string"}), - AllowedMethods: cloudflare.F([]zero_trust.AllowedMethodsh{zero_trust.AllowedMethodshGet}), - AllowedOrigins: cloudflare.F([]zero_trust.AllowedOriginshParam{"https://example.com"}), + AllowedHeaders: cloudflare.F([]zero_trust.AllowedHeadersParam{"string", "string", "string"}), + AllowedMethods: cloudflare.F([]zero_trust.AllowedMethods{zero_trust.AllowedMethodsGet}), + AllowedOrigins: cloudflare.F([]zero_trust.AllowedOriginsParam{"https://example.com"}), MaxAge: cloudflare.F(-1.000000), }), CustomDenyMessage: cloudflare.F("string"), CustomDenyURL: cloudflare.F("string"), CustomNonIdentityDenyURL: cloudflare.F("string"), - CustomPages: cloudflare.F([]zero_trust.CustomPageshParam{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}), + CustomPages: cloudflare.F([]zero_trust.CustomPagesParam{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}), Domain: cloudflare.F("test.example.com/admin"), EnableBindingCookie: cloudflare.F(true), HTTPOnlyCookieAttribute: cloudflare.F(true), @@ -57,7 +57,7 @@ func TestAccessApplicationNewWithOptionalParams(t *testing.T) { OptionsPreflightBypass: cloudflare.F(true), PathCookieAttribute: cloudflare.F(true), SameSiteCookieAttribute: cloudflare.F("strict"), - SelfHostedDomains: cloudflare.F([]zero_trust.SelfHostedDomainshParam{"test.example.com/admin", "test.anotherexample.com/staff"}), + SelfHostedDomains: cloudflare.F([]zero_trust.SelfHostedDomainsParam{"test.example.com/admin", "test.anotherexample.com/staff"}), ServiceAuth401Redirect: cloudflare.F(true), SessionDuration: cloudflare.F("24h"), SkipInterstitial: cloudflare.F(true), @@ -96,7 +96,7 @@ func TestAccessApplicationUpdateWithOptionalParams(t *testing.T) { zero_trust.AccessApplicationUpdateParams{ Application: zero_trust.ApplicationSelfHostedApplicationParam{ AllowAuthenticateViaWARP: cloudflare.F(true), - AllowedIdPs: cloudflare.F([]zero_trust.AllowedIdpshParam{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}), + AllowedIdPs: cloudflare.F([]zero_trust.AllowedIdPsParam{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}), AppLauncherVisible: cloudflare.F(true), AutoRedirectToIdentity: cloudflare.F(true), CORSHeaders: cloudflare.F(zero_trust.CORSHeadersParam{ @@ -104,15 +104,15 @@ func TestAccessApplicationUpdateWithOptionalParams(t *testing.T) { AllowAllMethods: cloudflare.F(true), AllowAllOrigins: cloudflare.F(true), AllowCredentials: cloudflare.F(true), - AllowedHeaders: cloudflare.F([]zero_trust.AllowedHeadershParam{"string", "string", "string"}), - AllowedMethods: cloudflare.F([]zero_trust.AllowedMethodsh{zero_trust.AllowedMethodshGet}), - AllowedOrigins: cloudflare.F([]zero_trust.AllowedOriginshParam{"https://example.com"}), + AllowedHeaders: cloudflare.F([]zero_trust.AllowedHeadersParam{"string", "string", "string"}), + AllowedMethods: cloudflare.F([]zero_trust.AllowedMethods{zero_trust.AllowedMethodsGet}), + AllowedOrigins: cloudflare.F([]zero_trust.AllowedOriginsParam{"https://example.com"}), MaxAge: cloudflare.F(-1.000000), }), CustomDenyMessage: cloudflare.F("string"), CustomDenyURL: cloudflare.F("string"), CustomNonIdentityDenyURL: cloudflare.F("string"), - CustomPages: cloudflare.F([]zero_trust.CustomPageshParam{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}), + CustomPages: cloudflare.F([]zero_trust.CustomPagesParam{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}), Domain: cloudflare.F("test.example.com/admin"), EnableBindingCookie: cloudflare.F(true), HTTPOnlyCookieAttribute: cloudflare.F(true), @@ -121,7 +121,7 @@ func TestAccessApplicationUpdateWithOptionalParams(t *testing.T) { OptionsPreflightBypass: cloudflare.F(true), PathCookieAttribute: cloudflare.F(true), SameSiteCookieAttribute: cloudflare.F("strict"), - SelfHostedDomains: cloudflare.F([]zero_trust.SelfHostedDomainshParam{"test.example.com/admin", "test.anotherexample.com/staff"}), + SelfHostedDomains: cloudflare.F([]zero_trust.SelfHostedDomainsParam{"test.example.com/admin", "test.anotherexample.com/staff"}), ServiceAuth401Redirect: cloudflare.F(true), SessionDuration: cloudflare.F("24h"), SkipInterstitial: cloudflare.F(true), From 3c696e75a3ac72e9703125b7da1321d6ae66ec4a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 05:02:20 +0000 Subject: [PATCH 120/127] feat(api): update via SDK Studio (#1969) --- api.md | 8 +- zero_trust/accessapplication.go | 154 +++++++-------------------- zero_trust/accessapplication_test.go | 8 +- 3 files changed, 48 insertions(+), 122 deletions(-) diff --git a/api.md b/api.md index 5e6dffa8a0..cac074f9b6 100644 --- a/api.md +++ b/api.md @@ -4726,14 +4726,13 @@ Response Types: Params Types: - zero_trust.AllowedHeadersParam -- zero_trust.AllowedHTTPMethodsParam - zero_trust.AllowedIdPsParam -- zero_trust.AllowedMethods +- zero_trust.AllowedMethodsParam - zero_trust.AllowedOriginsParam - zero_trust.AppIDUnionParam - zero_trust.ApplicationUnionParam +- zero_trust.ApplicationType - zero_trust.CORSHeadersParam -- zero_trust.CustomPagesParam - zero_trust.SaaSAppNameFormat - zero_trust.SaaSAppNameIDFormat - zero_trust.SaaSAppSourceParam @@ -4743,13 +4742,12 @@ Params Types: Response Types: - zero_trust.AllowedHeaders -- zero_trust.AllowedHTTPMethods - zero_trust.AllowedIdPs - zero_trust.AllowedMethods - zero_trust.AllowedOrigins - zero_trust.Application +- zero_trust.ApplicationType - zero_trust.CORSHeaders -- zero_trust.CustomPages - zero_trust.SaaSAppNameFormat - zero_trust.SaaSAppNameIDFormat - zero_trust.SaaSAppSource diff --git a/zero_trust/accessapplication.go b/zero_trust/accessapplication.go index 96d6b1ed7f..ea683a2a1a 100644 --- a/zero_trust/accessapplication.go +++ b/zero_trust/accessapplication.go @@ -188,35 +188,13 @@ type AllowedHeaders = string type AllowedHeadersParam = string -type AllowedHTTPMethods []AllowedMethods - -type AllowedHTTPMethodsParam []AllowedMethods - type AllowedIdPs = string type AllowedIdPsParam = string -type AllowedMethods string +type AllowedMethods []AllowedMethodsItemItem -const ( - AllowedMethodsGet AllowedMethods = "GET" - AllowedMethodsPost AllowedMethods = "POST" - AllowedMethodsHead AllowedMethods = "HEAD" - AllowedMethodsPut AllowedMethods = "PUT" - AllowedMethodsDelete AllowedMethods = "DELETE" - AllowedMethodsConnect AllowedMethods = "CONNECT" - AllowedMethodsOptions AllowedMethods = "OPTIONS" - AllowedMethodsTrace AllowedMethods = "TRACE" - AllowedMethodsPatch AllowedMethods = "PATCH" -) - -func (r AllowedMethods) IsKnown() bool { - switch r { - case AllowedMethodsGet, AllowedMethodsPost, AllowedMethodsHead, AllowedMethodsPut, AllowedMethodsDelete, AllowedMethodsConnect, AllowedMethodsOptions, AllowedMethodsTrace, AllowedMethodsPatch: - return true - } - return false -} +type AllowedMethodsParam []AllowedMethodsItemItem type AllowedOrigins = string @@ -433,7 +411,7 @@ type ApplicationSelfHostedApplication struct { // application when failing non-identity rules. CustomNonIdentityDenyURL string `json:"custom_non_identity_deny_url"` // The custom pages that will be displayed when applicable for this application - CustomPages []CustomPages `json:"custom_pages"` + CustomPages []string `json:"custom_pages"` // Enables the binding cookie, which increases security against compromised // authorization tokens and CSRF attacks. EnableBindingCookie bool `json:"enable_binding_cookie"` @@ -529,7 +507,7 @@ type ApplicationSaaSApplication struct { AutoRedirectToIdentity bool `json:"auto_redirect_to_identity"` CreatedAt time.Time `json:"created_at" format:"date-time"` // The custom pages that will be displayed when applicable for this application - CustomPages []CustomPages `json:"custom_pages"` + CustomPages []string `json:"custom_pages"` // The image URL for the logo shown in the App Launcher dashboard. LogoURL string `json:"logo_url"` // The name of the application. @@ -922,7 +900,7 @@ type ApplicationBrowserSSHApplication struct { // application when failing non-identity rules. CustomNonIdentityDenyURL string `json:"custom_non_identity_deny_url"` // The custom pages that will be displayed when applicable for this application - CustomPages []CustomPages `json:"custom_pages"` + CustomPages []string `json:"custom_pages"` // Enables the binding cookie, which increases security against compromised // authorization tokens and CSRF attacks. EnableBindingCookie bool `json:"enable_binding_cookie"` @@ -1038,7 +1016,7 @@ type ApplicationBrowserVncApplication struct { // application when failing non-identity rules. CustomNonIdentityDenyURL string `json:"custom_non_identity_deny_url"` // The custom pages that will be displayed when applicable for this application - CustomPages []CustomPages `json:"custom_pages"` + CustomPages []string `json:"custom_pages"` // Enables the binding cookie, which increases security against compromised // authorization tokens and CSRF attacks. EnableBindingCookie bool `json:"enable_binding_cookie"` @@ -1121,7 +1099,7 @@ func (r ApplicationBrowserVncApplication) implementsZeroTrustApplication() {} type ApplicationAppLauncherApplication struct { // The application type. - Type ApplicationAppLauncherApplicationType `json:"type,required"` + Type ApplicationType `json:"type,required"` // UUID ID string `json:"id"` // The identity providers your users can select when connecting to this @@ -1173,32 +1151,9 @@ func (r applicationAppLauncherApplicationJSON) RawJSON() string { func (r ApplicationAppLauncherApplication) implementsZeroTrustApplication() {} -// The application type. -type ApplicationAppLauncherApplicationType string - -const ( - ApplicationAppLauncherApplicationTypeSelfHosted ApplicationAppLauncherApplicationType = "self_hosted" - ApplicationAppLauncherApplicationTypeSaaS ApplicationAppLauncherApplicationType = "saas" - ApplicationAppLauncherApplicationTypeSSH ApplicationAppLauncherApplicationType = "ssh" - ApplicationAppLauncherApplicationTypeVnc ApplicationAppLauncherApplicationType = "vnc" - ApplicationAppLauncherApplicationTypeAppLauncher ApplicationAppLauncherApplicationType = "app_launcher" - ApplicationAppLauncherApplicationTypeWARP ApplicationAppLauncherApplicationType = "warp" - ApplicationAppLauncherApplicationTypeBiso ApplicationAppLauncherApplicationType = "biso" - ApplicationAppLauncherApplicationTypeBookmark ApplicationAppLauncherApplicationType = "bookmark" - ApplicationAppLauncherApplicationTypeDashSSO ApplicationAppLauncherApplicationType = "dash_sso" -) - -func (r ApplicationAppLauncherApplicationType) IsKnown() bool { - switch r { - case ApplicationAppLauncherApplicationTypeSelfHosted, ApplicationAppLauncherApplicationTypeSaaS, ApplicationAppLauncherApplicationTypeSSH, ApplicationAppLauncherApplicationTypeVnc, ApplicationAppLauncherApplicationTypeAppLauncher, ApplicationAppLauncherApplicationTypeWARP, ApplicationAppLauncherApplicationTypeBiso, ApplicationAppLauncherApplicationTypeBookmark, ApplicationAppLauncherApplicationTypeDashSSO: - return true - } - return false -} - type ApplicationDeviceEnrollmentPermissionsApplication struct { // The application type. - Type ApplicationDeviceEnrollmentPermissionsApplicationType `json:"type,required"` + Type ApplicationType `json:"type,required"` // UUID ID string `json:"id"` // The identity providers your users can select when connecting to this @@ -1250,32 +1205,9 @@ func (r applicationDeviceEnrollmentPermissionsApplicationJSON) RawJSON() string func (r ApplicationDeviceEnrollmentPermissionsApplication) implementsZeroTrustApplication() {} -// The application type. -type ApplicationDeviceEnrollmentPermissionsApplicationType string - -const ( - ApplicationDeviceEnrollmentPermissionsApplicationTypeSelfHosted ApplicationDeviceEnrollmentPermissionsApplicationType = "self_hosted" - ApplicationDeviceEnrollmentPermissionsApplicationTypeSaaS ApplicationDeviceEnrollmentPermissionsApplicationType = "saas" - ApplicationDeviceEnrollmentPermissionsApplicationTypeSSH ApplicationDeviceEnrollmentPermissionsApplicationType = "ssh" - ApplicationDeviceEnrollmentPermissionsApplicationTypeVnc ApplicationDeviceEnrollmentPermissionsApplicationType = "vnc" - ApplicationDeviceEnrollmentPermissionsApplicationTypeAppLauncher ApplicationDeviceEnrollmentPermissionsApplicationType = "app_launcher" - ApplicationDeviceEnrollmentPermissionsApplicationTypeWARP ApplicationDeviceEnrollmentPermissionsApplicationType = "warp" - ApplicationDeviceEnrollmentPermissionsApplicationTypeBiso ApplicationDeviceEnrollmentPermissionsApplicationType = "biso" - ApplicationDeviceEnrollmentPermissionsApplicationTypeBookmark ApplicationDeviceEnrollmentPermissionsApplicationType = "bookmark" - ApplicationDeviceEnrollmentPermissionsApplicationTypeDashSSO ApplicationDeviceEnrollmentPermissionsApplicationType = "dash_sso" -) - -func (r ApplicationDeviceEnrollmentPermissionsApplicationType) IsKnown() bool { - switch r { - case ApplicationDeviceEnrollmentPermissionsApplicationTypeSelfHosted, ApplicationDeviceEnrollmentPermissionsApplicationTypeSaaS, ApplicationDeviceEnrollmentPermissionsApplicationTypeSSH, ApplicationDeviceEnrollmentPermissionsApplicationTypeVnc, ApplicationDeviceEnrollmentPermissionsApplicationTypeAppLauncher, ApplicationDeviceEnrollmentPermissionsApplicationTypeWARP, ApplicationDeviceEnrollmentPermissionsApplicationTypeBiso, ApplicationDeviceEnrollmentPermissionsApplicationTypeBookmark, ApplicationDeviceEnrollmentPermissionsApplicationTypeDashSSO: - return true - } - return false -} - type ApplicationBrowserIsolationPermissionsApplication struct { // The application type. - Type ApplicationBrowserIsolationPermissionsApplicationType `json:"type,required"` + Type ApplicationType `json:"type,required"` // UUID ID string `json:"id"` // The identity providers your users can select when connecting to this @@ -1327,29 +1259,6 @@ func (r applicationBrowserIsolationPermissionsApplicationJSON) RawJSON() string func (r ApplicationBrowserIsolationPermissionsApplication) implementsZeroTrustApplication() {} -// The application type. -type ApplicationBrowserIsolationPermissionsApplicationType string - -const ( - ApplicationBrowserIsolationPermissionsApplicationTypeSelfHosted ApplicationBrowserIsolationPermissionsApplicationType = "self_hosted" - ApplicationBrowserIsolationPermissionsApplicationTypeSaaS ApplicationBrowserIsolationPermissionsApplicationType = "saas" - ApplicationBrowserIsolationPermissionsApplicationTypeSSH ApplicationBrowserIsolationPermissionsApplicationType = "ssh" - ApplicationBrowserIsolationPermissionsApplicationTypeVnc ApplicationBrowserIsolationPermissionsApplicationType = "vnc" - ApplicationBrowserIsolationPermissionsApplicationTypeAppLauncher ApplicationBrowserIsolationPermissionsApplicationType = "app_launcher" - ApplicationBrowserIsolationPermissionsApplicationTypeWARP ApplicationBrowserIsolationPermissionsApplicationType = "warp" - ApplicationBrowserIsolationPermissionsApplicationTypeBiso ApplicationBrowserIsolationPermissionsApplicationType = "biso" - ApplicationBrowserIsolationPermissionsApplicationTypeBookmark ApplicationBrowserIsolationPermissionsApplicationType = "bookmark" - ApplicationBrowserIsolationPermissionsApplicationTypeDashSSO ApplicationBrowserIsolationPermissionsApplicationType = "dash_sso" -) - -func (r ApplicationBrowserIsolationPermissionsApplicationType) IsKnown() bool { - switch r { - case ApplicationBrowserIsolationPermissionsApplicationTypeSelfHosted, ApplicationBrowserIsolationPermissionsApplicationTypeSaaS, ApplicationBrowserIsolationPermissionsApplicationTypeSSH, ApplicationBrowserIsolationPermissionsApplicationTypeVnc, ApplicationBrowserIsolationPermissionsApplicationTypeAppLauncher, ApplicationBrowserIsolationPermissionsApplicationTypeWARP, ApplicationBrowserIsolationPermissionsApplicationTypeBiso, ApplicationBrowserIsolationPermissionsApplicationTypeBookmark, ApplicationBrowserIsolationPermissionsApplicationTypeDashSSO: - return true - } - return false -} - type ApplicationBookmarkApplication struct { // UUID ID string `json:"id"` @@ -1508,7 +1417,7 @@ type ApplicationSelfHostedApplicationParam struct { // application when failing non-identity rules. CustomNonIdentityDenyURL param.Field[string] `json:"custom_non_identity_deny_url"` // The custom pages that will be displayed when applicable for this application - CustomPages param.Field[[]CustomPagesParam] `json:"custom_pages"` + CustomPages param.Field[[]string] `json:"custom_pages"` // Enables the binding cookie, which increases security against compromised // authorization tokens and CSRF attacks. EnableBindingCookie param.Field[bool] `json:"enable_binding_cookie"` @@ -1559,7 +1468,7 @@ type ApplicationSaaSApplicationParam struct { // login. You must specify only one identity provider in allowed_idps. AutoRedirectToIdentity param.Field[bool] `json:"auto_redirect_to_identity"` // The custom pages that will be displayed when applicable for this application - CustomPages param.Field[[]CustomPagesParam] `json:"custom_pages"` + CustomPages param.Field[[]string] `json:"custom_pages"` // The image URL for the logo shown in the App Launcher dashboard. LogoURL param.Field[string] `json:"logo_url"` // The name of the application. @@ -1724,7 +1633,7 @@ type ApplicationBrowserSSHApplicationParam struct { // application when failing non-identity rules. CustomNonIdentityDenyURL param.Field[string] `json:"custom_non_identity_deny_url"` // The custom pages that will be displayed when applicable for this application - CustomPages param.Field[[]CustomPagesParam] `json:"custom_pages"` + CustomPages param.Field[[]string] `json:"custom_pages"` // Enables the binding cookie, which increases security against compromised // authorization tokens and CSRF attacks. EnableBindingCookie param.Field[bool] `json:"enable_binding_cookie"` @@ -1795,7 +1704,7 @@ type ApplicationBrowserVncApplicationParam struct { // application when failing non-identity rules. CustomNonIdentityDenyURL param.Field[string] `json:"custom_non_identity_deny_url"` // The custom pages that will be displayed when applicable for this application - CustomPages param.Field[[]CustomPagesParam] `json:"custom_pages"` + CustomPages param.Field[[]string] `json:"custom_pages"` // Enables the binding cookie, which increases security against compromised // authorization tokens and CSRF attacks. EnableBindingCookie param.Field[bool] `json:"enable_binding_cookie"` @@ -1838,7 +1747,7 @@ func (r ApplicationBrowserVncApplicationParam) implementsZeroTrustApplicationUni type ApplicationAppLauncherApplicationParam struct { // The application type. - Type param.Field[ApplicationAppLauncherApplicationType] `json:"type,required"` + Type param.Field[ApplicationType] `json:"type,required"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. AllowedIdPs param.Field[[]AllowedIdPsParam] `json:"allowed_idps"` @@ -1859,7 +1768,7 @@ func (r ApplicationAppLauncherApplicationParam) implementsZeroTrustApplicationUn type ApplicationDeviceEnrollmentPermissionsApplicationParam struct { // The application type. - Type param.Field[ApplicationDeviceEnrollmentPermissionsApplicationType] `json:"type,required"` + Type param.Field[ApplicationType] `json:"type,required"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. AllowedIdPs param.Field[[]AllowedIdPsParam] `json:"allowed_idps"` @@ -1881,7 +1790,7 @@ func (r ApplicationDeviceEnrollmentPermissionsApplicationParam) implementsZeroTr type ApplicationBrowserIsolationPermissionsApplicationParam struct { // The application type. - Type param.Field[ApplicationBrowserIsolationPermissionsApplicationType] `json:"type,required"` + Type param.Field[ApplicationType] `json:"type,required"` // The identity providers your users can select when connecting to this // application. Defaults to all IdPs configured in your account. AllowedIdPs param.Field[[]AllowedIdPsParam] `json:"allowed_idps"` @@ -1923,6 +1832,29 @@ func (r ApplicationBookmarkApplicationParam) MarshalJSON() (data []byte, err err func (r ApplicationBookmarkApplicationParam) implementsZeroTrustApplicationUnionParam() {} +// The application type. +type ApplicationType string + +const ( + ApplicationTypeSelfHosted ApplicationType = "self_hosted" + ApplicationTypeSaaS ApplicationType = "saas" + ApplicationTypeSSH ApplicationType = "ssh" + ApplicationTypeVnc ApplicationType = "vnc" + ApplicationTypeAppLauncher ApplicationType = "app_launcher" + ApplicationTypeWARP ApplicationType = "warp" + ApplicationTypeBiso ApplicationType = "biso" + ApplicationTypeBookmark ApplicationType = "bookmark" + ApplicationTypeDashSSO ApplicationType = "dash_sso" +) + +func (r ApplicationType) IsKnown() bool { + switch r { + case ApplicationTypeSelfHosted, ApplicationTypeSaaS, ApplicationTypeSSH, ApplicationTypeVnc, ApplicationTypeAppLauncher, ApplicationTypeWARP, ApplicationTypeBiso, ApplicationTypeBookmark, ApplicationTypeDashSSO: + return true + } + return false +} + type CORSHeaders struct { // Allows all HTTP request headers. AllowAllHeaders bool `json:"allow_all_headers"` @@ -1936,7 +1868,7 @@ type CORSHeaders struct { // Allowed HTTP request headers. AllowedHeaders []AllowedHeaders `json:"allowed_headers"` // Allowed HTTP request methods. - AllowedMethods AllowedHTTPMethods `json:"allowed_methods"` + AllowedMethods AllowedMethods `json:"allowed_methods"` // Allowed origins. AllowedOrigins []AllowedOrigins `json:"allowed_origins"` // The maximum number of seconds the results of a preflight request can be cached. @@ -1979,7 +1911,7 @@ type CORSHeadersParam struct { // Allowed HTTP request headers. AllowedHeaders param.Field[[]AllowedHeadersParam] `json:"allowed_headers"` // Allowed HTTP request methods. - AllowedMethods param.Field[AllowedHTTPMethodsParam] `json:"allowed_methods"` + AllowedMethods param.Field[AllowedMethodsParam] `json:"allowed_methods"` // Allowed origins. AllowedOrigins param.Field[[]AllowedOriginsParam] `json:"allowed_origins"` // The maximum number of seconds the results of a preflight request can be cached. @@ -1990,10 +1922,6 @@ func (r CORSHeadersParam) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -type CustomPages = string - -type CustomPagesParam = string - // A globally unique name for an identity or service provider. type SaaSAppNameFormat string diff --git a/zero_trust/accessapplication_test.go b/zero_trust/accessapplication_test.go index ac7b0268f4..4adba814df 100644 --- a/zero_trust/accessapplication_test.go +++ b/zero_trust/accessapplication_test.go @@ -41,14 +41,14 @@ func TestAccessApplicationNewWithOptionalParams(t *testing.T) { AllowAllOrigins: cloudflare.F(true), AllowCredentials: cloudflare.F(true), AllowedHeaders: cloudflare.F([]zero_trust.AllowedHeadersParam{"string", "string", "string"}), - AllowedMethods: cloudflare.F([]zero_trust.AllowedMethods{zero_trust.AllowedMethodsGet}), + AllowedMethods: cloudflare.F([]zero_trust.AllowedMethodsItemItem{zero_trust.AllowedMethodsItemItemGet}), AllowedOrigins: cloudflare.F([]zero_trust.AllowedOriginsParam{"https://example.com"}), MaxAge: cloudflare.F(-1.000000), }), CustomDenyMessage: cloudflare.F("string"), CustomDenyURL: cloudflare.F("string"), CustomNonIdentityDenyURL: cloudflare.F("string"), - CustomPages: cloudflare.F([]zero_trust.CustomPagesParam{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}), + CustomPages: cloudflare.F([]string{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}), Domain: cloudflare.F("test.example.com/admin"), EnableBindingCookie: cloudflare.F(true), HTTPOnlyCookieAttribute: cloudflare.F(true), @@ -105,14 +105,14 @@ func TestAccessApplicationUpdateWithOptionalParams(t *testing.T) { AllowAllOrigins: cloudflare.F(true), AllowCredentials: cloudflare.F(true), AllowedHeaders: cloudflare.F([]zero_trust.AllowedHeadersParam{"string", "string", "string"}), - AllowedMethods: cloudflare.F([]zero_trust.AllowedMethods{zero_trust.AllowedMethodsGet}), + AllowedMethods: cloudflare.F([]zero_trust.AllowedMethodsItemItem{zero_trust.AllowedMethodsItemItemGet}), AllowedOrigins: cloudflare.F([]zero_trust.AllowedOriginsParam{"https://example.com"}), MaxAge: cloudflare.F(-1.000000), }), CustomDenyMessage: cloudflare.F("string"), CustomDenyURL: cloudflare.F("string"), CustomNonIdentityDenyURL: cloudflare.F("string"), - CustomPages: cloudflare.F([]zero_trust.CustomPagesParam{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}), + CustomPages: cloudflare.F([]string{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}), Domain: cloudflare.F("test.example.com/admin"), EnableBindingCookie: cloudflare.F(true), HTTPOnlyCookieAttribute: cloudflare.F(true), From c4160d3e54622f5917bff90121b49a5e74be7814 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 05:05:43 +0000 Subject: [PATCH 121/127] feat(api): update via SDK Studio (#1970) --- api.md | 2 +- zero_trust/accessapplication.go | 26 ++++++++++++++++++++++---- zero_trust/accessapplication_test.go | 4 ++-- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/api.md b/api.md index cac074f9b6..64d993cf0c 100644 --- a/api.md +++ b/api.md @@ -4727,7 +4727,7 @@ Params Types: - zero_trust.AllowedHeadersParam - zero_trust.AllowedIdPsParam -- zero_trust.AllowedMethodsParam +- zero_trust.AllowedMethods - zero_trust.AllowedOriginsParam - zero_trust.AppIDUnionParam - zero_trust.ApplicationUnionParam diff --git a/zero_trust/accessapplication.go b/zero_trust/accessapplication.go index ea683a2a1a..44e06ea7ed 100644 --- a/zero_trust/accessapplication.go +++ b/zero_trust/accessapplication.go @@ -192,9 +192,27 @@ type AllowedIdPs = string type AllowedIdPsParam = string -type AllowedMethods []AllowedMethodsItemItem +type AllowedMethods string -type AllowedMethodsParam []AllowedMethodsItemItem +const ( + AllowedMethodsGet AllowedMethods = "GET" + AllowedMethodsPost AllowedMethods = "POST" + AllowedMethodsHead AllowedMethods = "HEAD" + AllowedMethodsPut AllowedMethods = "PUT" + AllowedMethodsDelete AllowedMethods = "DELETE" + AllowedMethodsConnect AllowedMethods = "CONNECT" + AllowedMethodsOptions AllowedMethods = "OPTIONS" + AllowedMethodsTrace AllowedMethods = "TRACE" + AllowedMethodsPatch AllowedMethods = "PATCH" +) + +func (r AllowedMethods) IsKnown() bool { + switch r { + case AllowedMethodsGet, AllowedMethodsPost, AllowedMethodsHead, AllowedMethodsPut, AllowedMethodsDelete, AllowedMethodsConnect, AllowedMethodsOptions, AllowedMethodsTrace, AllowedMethodsPatch: + return true + } + return false +} type AllowedOrigins = string @@ -1868,7 +1886,7 @@ type CORSHeaders struct { // Allowed HTTP request headers. AllowedHeaders []AllowedHeaders `json:"allowed_headers"` // Allowed HTTP request methods. - AllowedMethods AllowedMethods `json:"allowed_methods"` + AllowedMethods []AllowedMethods `json:"allowed_methods"` // Allowed origins. AllowedOrigins []AllowedOrigins `json:"allowed_origins"` // The maximum number of seconds the results of a preflight request can be cached. @@ -1911,7 +1929,7 @@ type CORSHeadersParam struct { // Allowed HTTP request headers. AllowedHeaders param.Field[[]AllowedHeadersParam] `json:"allowed_headers"` // Allowed HTTP request methods. - AllowedMethods param.Field[AllowedMethodsParam] `json:"allowed_methods"` + AllowedMethods param.Field[[]AllowedMethods] `json:"allowed_methods"` // Allowed origins. AllowedOrigins param.Field[[]AllowedOriginsParam] `json:"allowed_origins"` // The maximum number of seconds the results of a preflight request can be cached. diff --git a/zero_trust/accessapplication_test.go b/zero_trust/accessapplication_test.go index 4adba814df..6256962391 100644 --- a/zero_trust/accessapplication_test.go +++ b/zero_trust/accessapplication_test.go @@ -41,7 +41,7 @@ func TestAccessApplicationNewWithOptionalParams(t *testing.T) { AllowAllOrigins: cloudflare.F(true), AllowCredentials: cloudflare.F(true), AllowedHeaders: cloudflare.F([]zero_trust.AllowedHeadersParam{"string", "string", "string"}), - AllowedMethods: cloudflare.F([]zero_trust.AllowedMethodsItemItem{zero_trust.AllowedMethodsItemItemGet}), + AllowedMethods: cloudflare.F([]zero_trust.AllowedMethods{zero_trust.AllowedMethodsGet}), AllowedOrigins: cloudflare.F([]zero_trust.AllowedOriginsParam{"https://example.com"}), MaxAge: cloudflare.F(-1.000000), }), @@ -105,7 +105,7 @@ func TestAccessApplicationUpdateWithOptionalParams(t *testing.T) { AllowAllOrigins: cloudflare.F(true), AllowCredentials: cloudflare.F(true), AllowedHeaders: cloudflare.F([]zero_trust.AllowedHeadersParam{"string", "string", "string"}), - AllowedMethods: cloudflare.F([]zero_trust.AllowedMethodsItemItem{zero_trust.AllowedMethodsItemItemGet}), + AllowedMethods: cloudflare.F([]zero_trust.AllowedMethods{zero_trust.AllowedMethodsGet}), AllowedOrigins: cloudflare.F([]zero_trust.AllowedOriginsParam{"https://example.com"}), MaxAge: cloudflare.F(-1.000000), }), From d0005c25a5a6aed3c230ded6501327f8b9582100 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 05:15:19 +0000 Subject: [PATCH 122/127] feat(api): update via SDK Studio (#1971) --- api.md | 5 ----- load_balancers/pool.go | 8 ++++---- load_balancers/region.go | 4 ---- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/api.md b/api.md index 64d993cf0c..f48ecb7c97 100644 --- a/api.md +++ b/api.md @@ -1072,13 +1072,8 @@ Methods: ## Regions -Params Types: - -- load_balancers.RegionIDParam - Response Types: -- load_balancers.RegionID - load_balancers.RegionListResponseUnion - load_balancers.RegionGetResponseUnion diff --git a/load_balancers/pool.go b/load_balancers/pool.go index 89919c993d..baa3941080 100644 --- a/load_balancers/pool.go +++ b/load_balancers/pool.go @@ -131,8 +131,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 RegionID `json:"check_regions,nullable"` - CreatedOn time.Time `json:"created_on" format:"date-time"` + CheckRegions []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 @@ -333,7 +333,7 @@ type PoolUpdateParams struct { Origins param.Field[[]OriginParam] `json:"origins,required"` // A list of regions from which to run health checks. Null means every Cloudflare // data center. - CheckRegions param.Field[RegionIDParam] `json:"check_regions"` + CheckRegions param.Field[[]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 @@ -485,7 +485,7 @@ type PoolEditParams struct { AccountID param.Field[string] `path:"account_id,required"` // A list of regions from which to run health checks. Null means every Cloudflare // data center. - CheckRegions param.Field[RegionIDParam] `json:"check_regions"` + CheckRegions param.Field[[]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 diff --git a/load_balancers/region.go b/load_balancers/region.go index db4f3ae49c..2fbfc850f6 100644 --- a/load_balancers/region.go +++ b/load_balancers/region.go @@ -61,10 +61,6 @@ func (r *RegionService) Get(ctx context.Context, regionID RegionGetParamsRegionI return } -type RegionID []CheckRegion - -type RegionIDParam []CheckRegion - // Union satisfied by [load_balancers.RegionListResponseUnknown] or // [shared.UnionString]. type RegionListResponseUnion interface { From abb726f32974abc8780a9a8aa3f423b290915649 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 05:23:26 +0000 Subject: [PATCH 123/127] feat(api): update via SDK Studio (#1972) --- api.md | 11 +- zero_trust/identityprovider.go | 3732 ++++++++++++++++++++++----- zero_trust/identityprovider_test.go | 4 +- 3 files changed, 3157 insertions(+), 590 deletions(-) diff --git a/api.md b/api.md index f48ecb7c97..8055f0dd8b 100644 --- a/api.md +++ b/api.md @@ -4617,7 +4617,6 @@ Params Types: - zero_trust.AzureADParam - zero_trust.GenericOAuthConfigParam -- zero_trust.IdentityProviderUnionParam - zero_trust.IdentityProviderType - zero_trust.ScimConfigParam @@ -4625,19 +4624,21 @@ Response Types: - zero_trust.AzureAD - zero_trust.GenericOAuthConfig -- zero_trust.IdentityProvider - zero_trust.IdentityProviderType - zero_trust.ScimConfig +- zero_trust.IdentityProviderNewResponse +- zero_trust.IdentityProviderUpdateResponse - zero_trust.IdentityProviderListResponse - zero_trust.IdentityProviderDeleteResponse +- zero_trust.IdentityProviderGetResponse Methods: -- client.ZeroTrust.IdentityProviders.New(ctx context.Context, params zero_trust.IdentityProviderNewParams) (zero_trust.IdentityProvider, error) -- client.ZeroTrust.IdentityProviders.Update(ctx context.Context, uuid string, params zero_trust.IdentityProviderUpdateParams) (zero_trust.IdentityProvider, error) +- client.ZeroTrust.IdentityProviders.New(ctx context.Context, params zero_trust.IdentityProviderNewParams) (zero_trust.IdentityProviderNewResponse, error) +- client.ZeroTrust.IdentityProviders.Update(ctx context.Context, uuid string, params zero_trust.IdentityProviderUpdateParams) (zero_trust.IdentityProviderUpdateResponse, error) - client.ZeroTrust.IdentityProviders.List(ctx context.Context, query zero_trust.IdentityProviderListParams) (pagination.SinglePage[zero_trust.IdentityProviderListResponse], error) - client.ZeroTrust.IdentityProviders.Delete(ctx context.Context, uuid string, body zero_trust.IdentityProviderDeleteParams) (zero_trust.IdentityProviderDeleteResponse, error) -- client.ZeroTrust.IdentityProviders.Get(ctx context.Context, uuid string, query zero_trust.IdentityProviderGetParams) (zero_trust.IdentityProvider, error) +- client.ZeroTrust.IdentityProviders.Get(ctx context.Context, uuid string, query zero_trust.IdentityProviderGetParams) (zero_trust.IdentityProviderGetResponse, error) ## Organizations diff --git a/zero_trust/identityprovider.go b/zero_trust/identityprovider.go index d4f4aaaa9e..0eb7dfd968 100644 --- a/zero_trust/identityprovider.go +++ b/zero_trust/identityprovider.go @@ -36,7 +36,7 @@ func NewIdentityProviderService(opts ...option.RequestOption) (r *IdentityProvid } // Adds a new identity provider to Access. -func (r *IdentityProviderService) New(ctx context.Context, params IdentityProviderNewParams, opts ...option.RequestOption) (res *IdentityProvider, err error) { +func (r *IdentityProviderService) New(ctx context.Context, params IdentityProviderNewParams, opts ...option.RequestOption) (res *IdentityProviderNewResponse, err error) { opts = append(r.Options[:], opts...) var env IdentityProviderNewResponseEnvelope var accountOrZone string @@ -58,7 +58,7 @@ func (r *IdentityProviderService) New(ctx context.Context, params IdentityProvid } // Updates a configured identity provider. -func (r *IdentityProviderService) Update(ctx context.Context, uuid string, params IdentityProviderUpdateParams, opts ...option.RequestOption) (res *IdentityProvider, err error) { +func (r *IdentityProviderService) Update(ctx context.Context, uuid string, params IdentityProviderUpdateParams, opts ...option.RequestOption) (res *IdentityProviderUpdateResponse, err error) { opts = append(r.Options[:], opts...) var env IdentityProviderUpdateResponseEnvelope var accountOrZone string @@ -134,7 +134,7 @@ func (r *IdentityProviderService) Delete(ctx context.Context, uuid string, body } // Fetches a configured identity provider. -func (r *IdentityProviderService) Get(ctx context.Context, uuid string, query IdentityProviderGetParams, opts ...option.RequestOption) (res *IdentityProvider, err error) { +func (r *IdentityProviderService) Get(ctx context.Context, uuid string, query IdentityProviderGetParams, opts ...option.RequestOption) (res *IdentityProviderGetResponse, err error) { opts = append(r.Options[:], opts...) var env IdentityProviderGetResponseEnvelope var accountOrZone string @@ -193,10 +193,14 @@ func (r azureADJSON) RawJSON() string { return r.raw } -func (r AzureAD) implementsZeroTrustIdentityProvider() {} +func (r AzureAD) implementsZeroTrustIdentityProviderNewResponse() {} + +func (r AzureAD) implementsZeroTrustIdentityProviderUpdateResponse() {} func (r AzureAD) implementsZeroTrustIdentityProviderListResponse() {} +func (r AzureAD) implementsZeroTrustIdentityProviderGetResponse() {} + // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). @@ -293,7 +297,9 @@ func (r AzureADParam) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -func (r AzureADParam) implementsZeroTrustIdentityProviderUnionParam() {} +func (r AzureADParam) implementsZeroTrustIdentityProviderNewParamsBodyUnion() {} + +func (r AzureADParam) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() {} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our @@ -364,7 +370,105 @@ func (r GenericOAuthConfigParam) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -type IdentityProvider struct { +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type IdentityProviderType string + +const ( + IdentityProviderTypeOnetimepin IdentityProviderType = "onetimepin" + IdentityProviderTypeAzureAD IdentityProviderType = "azureAD" + IdentityProviderTypeSAML IdentityProviderType = "saml" + IdentityProviderTypeCentrify IdentityProviderType = "centrify" + IdentityProviderTypeFacebook IdentityProviderType = "facebook" + IdentityProviderTypeGitHub IdentityProviderType = "github" + IdentityProviderTypeGoogleApps IdentityProviderType = "google-apps" + IdentityProviderTypeGoogle IdentityProviderType = "google" + IdentityProviderTypeLinkedin IdentityProviderType = "linkedin" + IdentityProviderTypeOIDC IdentityProviderType = "oidc" + IdentityProviderTypeOkta IdentityProviderType = "okta" + IdentityProviderTypeOnelogin IdentityProviderType = "onelogin" + IdentityProviderTypePingone IdentityProviderType = "pingone" + IdentityProviderTypeYandex IdentityProviderType = "yandex" +) + +func (r IdentityProviderType) IsKnown() bool { + switch r { + case IdentityProviderTypeOnetimepin, IdentityProviderTypeAzureAD, IdentityProviderTypeSAML, IdentityProviderTypeCentrify, IdentityProviderTypeFacebook, IdentityProviderTypeGitHub, IdentityProviderTypeGoogleApps, IdentityProviderTypeGoogle, IdentityProviderTypeLinkedin, IdentityProviderTypeOIDC, IdentityProviderTypeOkta, IdentityProviderTypeOnelogin, IdentityProviderTypePingone, IdentityProviderTypeYandex: + return true + } + return false +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type ScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON scimConfigJSON `json:"-"` +} + +// scimConfigJSON contains the JSON metadata for the struct [ScimConfig] +type scimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r scimConfigJSON) RawJSON() string { + return r.raw +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type ScimConfigParam struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r ScimConfigParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type IdentityProviderNewResponse struct { Config interface{} `json:"config"` // UUID ID string `json:"id"` @@ -376,14 +480,14 @@ type IdentityProvider struct { // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - JSON identityProviderJSON `json:"-"` - union IdentityProviderUnion + Type IdentityProviderType `json:"type,required"` + JSON identityProviderNewResponseJSON `json:"-"` + union IdentityProviderNewResponseUnion } -// identityProviderJSON contains the JSON metadata for the struct -// [IdentityProvider] -type identityProviderJSON struct { +// identityProviderNewResponseJSON contains the JSON metadata for the struct +// [IdentityProviderNewResponse] +type identityProviderNewResponseJSON struct { Config apijson.Field ID apijson.Field Name apijson.Field @@ -393,11 +497,11 @@ type identityProviderJSON struct { ExtraFields map[string]apijson.Field } -func (r identityProviderJSON) RawJSON() string { +func (r identityProviderNewResponseJSON) RawJSON() string { return r.raw } -func (r *IdentityProvider) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderNewResponse) UnmarshalJSON(data []byte) (err error) { err = apijson.UnmarshalRoot(data, &r.union) if err != nil { return err @@ -405,31 +509,31 @@ func (r *IdentityProvider) UnmarshalJSON(data []byte) (err error) { return apijson.Port(r.union, &r) } -func (r IdentityProvider) AsUnion() IdentityProviderUnion { +func (r IdentityProviderNewResponse) AsUnion() IdentityProviderNewResponseUnion { return r.union } // Union satisfied by [zero_trust.AzureAD], -// [zero_trust.IdentityProviderAccessCentrify], -// [zero_trust.IdentityProviderAccessFacebook], -// [zero_trust.IdentityProviderAccessGitHub], -// [zero_trust.IdentityProviderAccessGoogle], -// [zero_trust.IdentityProviderAccessGoogleApps], -// [zero_trust.IdentityProviderAccessLinkedin], -// [zero_trust.IdentityProviderAccessOIDC], -// [zero_trust.IdentityProviderAccessOkta], -// [zero_trust.IdentityProviderAccessOnelogin], -// [zero_trust.IdentityProviderAccessPingone], -// [zero_trust.IdentityProviderAccessSAML], -// [zero_trust.IdentityProviderAccessYandex] or -// [zero_trust.IdentityProviderAccessOnetimepin]. -type IdentityProviderUnion interface { - implementsZeroTrustIdentityProvider() +// [zero_trust.IdentityProviderNewResponseAccessCentrify], +// [zero_trust.IdentityProviderNewResponseAccessFacebook], +// [zero_trust.IdentityProviderNewResponseAccessGitHub], +// [zero_trust.IdentityProviderNewResponseAccessGoogle], +// [zero_trust.IdentityProviderNewResponseAccessGoogleApps], +// [zero_trust.IdentityProviderNewResponseAccessLinkedin], +// [zero_trust.IdentityProviderNewResponseAccessOIDC], +// [zero_trust.IdentityProviderNewResponseAccessOkta], +// [zero_trust.IdentityProviderNewResponseAccessOnelogin], +// [zero_trust.IdentityProviderNewResponseAccessPingone], +// [zero_trust.IdentityProviderNewResponseAccessSAML], +// [zero_trust.IdentityProviderNewResponseAccessYandex] or +// [zero_trust.IdentityProviderNewResponseAccessOnetimepin]. +type IdentityProviderNewResponseUnion interface { + implementsZeroTrustIdentityProviderNewResponse() } func init() { apijson.RegisterUnion( - reflect.TypeOf((*IdentityProviderUnion)(nil)).Elem(), + reflect.TypeOf((*IdentityProviderNewResponseUnion)(nil)).Elem(), "", apijson.UnionVariant{ TypeFilter: gjson.JSON, @@ -437,64 +541,64 @@ func init() { }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderAccessCentrify{}), + Type: reflect.TypeOf(IdentityProviderNewResponseAccessCentrify{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderAccessFacebook{}), + Type: reflect.TypeOf(IdentityProviderNewResponseAccessFacebook{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderAccessGitHub{}), + Type: reflect.TypeOf(IdentityProviderNewResponseAccessGitHub{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderAccessGoogle{}), + Type: reflect.TypeOf(IdentityProviderNewResponseAccessGoogle{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderAccessGoogleApps{}), + Type: reflect.TypeOf(IdentityProviderNewResponseAccessGoogleApps{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderAccessLinkedin{}), + Type: reflect.TypeOf(IdentityProviderNewResponseAccessLinkedin{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderAccessOIDC{}), + Type: reflect.TypeOf(IdentityProviderNewResponseAccessOIDC{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderAccessOkta{}), + Type: reflect.TypeOf(IdentityProviderNewResponseAccessOkta{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderAccessOnelogin{}), + Type: reflect.TypeOf(IdentityProviderNewResponseAccessOnelogin{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderAccessPingone{}), + Type: reflect.TypeOf(IdentityProviderNewResponseAccessPingone{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderAccessSAML{}), + Type: reflect.TypeOf(IdentityProviderNewResponseAccessSAML{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderAccessYandex{}), + Type: reflect.TypeOf(IdentityProviderNewResponseAccessYandex{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderAccessOnetimepin{}), + Type: reflect.TypeOf(IdentityProviderNewResponseAccessOnetimepin{}), }, ) } -type IdentityProviderAccessCentrify struct { +type IdentityProviderNewResponseAccessCentrify struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderAccessCentrifyConfig `json:"config,required"` + Config IdentityProviderNewResponseAccessCentrifyConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, @@ -505,13 +609,13 @@ type IdentityProviderAccessCentrify struct { ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderAccessCentrifyJSON `json:"-"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderNewResponseAccessCentrifyJSON `json:"-"` } -// identityProviderAccessCentrifyJSON contains the JSON metadata for the struct -// [IdentityProviderAccessCentrify] -type identityProviderAccessCentrifyJSON struct { +// identityProviderNewResponseAccessCentrifyJSON contains the JSON metadata for the +// struct [IdentityProviderNewResponseAccessCentrify] +type identityProviderNewResponseAccessCentrifyJSON struct { Config apijson.Field Name apijson.Field Type apijson.Field @@ -521,20 +625,20 @@ type identityProviderAccessCentrifyJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderAccessCentrify) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderNewResponseAccessCentrify) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderAccessCentrifyJSON) RawJSON() string { +func (r identityProviderNewResponseAccessCentrifyJSON) RawJSON() string { return r.raw } -func (r IdentityProviderAccessCentrify) implementsZeroTrustIdentityProvider() {} +func (r IdentityProviderNewResponseAccessCentrify) implementsZeroTrustIdentityProviderNewResponse() {} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderAccessCentrifyConfig struct { +type IdentityProviderNewResponseAccessCentrifyConfig struct { // Your centrify account url CentrifyAccount string `json:"centrify_account"` // Your centrify app id @@ -546,13 +650,13 @@ type IdentityProviderAccessCentrifyConfig struct { // Your OAuth Client Secret ClientSecret string `json:"client_secret"` // The claim name for email in the id_token response. - EmailClaimName string `json:"email_claim_name"` - JSON identityProviderAccessCentrifyConfigJSON `json:"-"` + EmailClaimName string `json:"email_claim_name"` + JSON identityProviderNewResponseAccessCentrifyConfigJSON `json:"-"` } -// identityProviderAccessCentrifyConfigJSON contains the JSON metadata for the -// struct [IdentityProviderAccessCentrifyConfig] -type identityProviderAccessCentrifyConfigJSON struct { +// identityProviderNewResponseAccessCentrifyConfigJSON contains the JSON metadata +// for the struct [IdentityProviderNewResponseAccessCentrifyConfig] +type identityProviderNewResponseAccessCentrifyConfigJSON struct { CentrifyAccount apijson.Field CentrifyAppID apijson.Field Claims apijson.Field @@ -563,15 +667,15 @@ type identityProviderAccessCentrifyConfigJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderAccessCentrifyConfig) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderNewResponseAccessCentrifyConfig) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderAccessCentrifyConfigJSON) RawJSON() string { +func (r identityProviderNewResponseAccessCentrifyConfigJSON) RawJSON() string { return r.raw } -type IdentityProviderAccessFacebook struct { +type IdentityProviderNewResponseAccessFacebook struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). @@ -586,13 +690,13 @@ type IdentityProviderAccessFacebook struct { ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderAccessFacebookJSON `json:"-"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderNewResponseAccessFacebookJSON `json:"-"` } -// identityProviderAccessFacebookJSON contains the JSON metadata for the struct -// [IdentityProviderAccessFacebook] -type identityProviderAccessFacebookJSON struct { +// identityProviderNewResponseAccessFacebookJSON contains the JSON metadata for the +// struct [IdentityProviderNewResponseAccessFacebook] +type identityProviderNewResponseAccessFacebookJSON struct { Config apijson.Field Name apijson.Field Type apijson.Field @@ -602,17 +706,17 @@ type identityProviderAccessFacebookJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderAccessFacebook) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderNewResponseAccessFacebook) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderAccessFacebookJSON) RawJSON() string { +func (r identityProviderNewResponseAccessFacebookJSON) RawJSON() string { return r.raw } -func (r IdentityProviderAccessFacebook) implementsZeroTrustIdentityProvider() {} +func (r IdentityProviderNewResponseAccessFacebook) implementsZeroTrustIdentityProviderNewResponse() {} -type IdentityProviderAccessGitHub struct { +type IdentityProviderNewResponseAccessGitHub struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). @@ -627,13 +731,13 @@ type IdentityProviderAccessGitHub struct { ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderAccessGitHubJSON `json:"-"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderNewResponseAccessGitHubJSON `json:"-"` } -// identityProviderAccessGitHubJSON contains the JSON metadata for the struct -// [IdentityProviderAccessGitHub] -type identityProviderAccessGitHubJSON struct { +// identityProviderNewResponseAccessGitHubJSON contains the JSON metadata for the +// struct [IdentityProviderNewResponseAccessGitHub] +type identityProviderNewResponseAccessGitHubJSON struct { Config apijson.Field Name apijson.Field Type apijson.Field @@ -643,21 +747,21 @@ type identityProviderAccessGitHubJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderAccessGitHub) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderNewResponseAccessGitHub) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderAccessGitHubJSON) RawJSON() string { +func (r identityProviderNewResponseAccessGitHubJSON) RawJSON() string { return r.raw } -func (r IdentityProviderAccessGitHub) implementsZeroTrustIdentityProvider() {} +func (r IdentityProviderNewResponseAccessGitHub) implementsZeroTrustIdentityProviderNewResponse() {} -type IdentityProviderAccessGoogle struct { +type IdentityProviderNewResponseAccessGoogle struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderAccessGoogleConfig `json:"config,required"` + Config IdentityProviderNewResponseAccessGoogleConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, @@ -668,13 +772,13 @@ type IdentityProviderAccessGoogle struct { ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderAccessGoogleJSON `json:"-"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderNewResponseAccessGoogleJSON `json:"-"` } -// identityProviderAccessGoogleJSON contains the JSON metadata for the struct -// [IdentityProviderAccessGoogle] -type identityProviderAccessGoogleJSON struct { +// identityProviderNewResponseAccessGoogleJSON contains the JSON metadata for the +// struct [IdentityProviderNewResponseAccessGoogle] +type identityProviderNewResponseAccessGoogleJSON struct { Config apijson.Field Name apijson.Field Type apijson.Field @@ -684,20 +788,20 @@ type identityProviderAccessGoogleJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderAccessGoogle) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderNewResponseAccessGoogle) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderAccessGoogleJSON) RawJSON() string { +func (r identityProviderNewResponseAccessGoogleJSON) RawJSON() string { return r.raw } -func (r IdentityProviderAccessGoogle) implementsZeroTrustIdentityProvider() {} +func (r IdentityProviderNewResponseAccessGoogle) implementsZeroTrustIdentityProviderNewResponse() {} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderAccessGoogleConfig struct { +type IdentityProviderNewResponseAccessGoogleConfig struct { // Custom claims Claims []string `json:"claims"` // Your OAuth Client ID @@ -705,13 +809,13 @@ type IdentityProviderAccessGoogleConfig struct { // Your OAuth Client Secret ClientSecret string `json:"client_secret"` // The claim name for email in the id_token response. - EmailClaimName string `json:"email_claim_name"` - JSON identityProviderAccessGoogleConfigJSON `json:"-"` + EmailClaimName string `json:"email_claim_name"` + JSON identityProviderNewResponseAccessGoogleConfigJSON `json:"-"` } -// identityProviderAccessGoogleConfigJSON contains the JSON metadata for the struct -// [IdentityProviderAccessGoogleConfig] -type identityProviderAccessGoogleConfigJSON struct { +// identityProviderNewResponseAccessGoogleConfigJSON contains the JSON metadata for +// the struct [IdentityProviderNewResponseAccessGoogleConfig] +type identityProviderNewResponseAccessGoogleConfigJSON struct { Claims apijson.Field ClientID apijson.Field ClientSecret apijson.Field @@ -720,19 +824,19 @@ type identityProviderAccessGoogleConfigJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderAccessGoogleConfig) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderNewResponseAccessGoogleConfig) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderAccessGoogleConfigJSON) RawJSON() string { +func (r identityProviderNewResponseAccessGoogleConfigJSON) RawJSON() string { return r.raw } -type IdentityProviderAccessGoogleApps struct { +type IdentityProviderNewResponseAccessGoogleApps struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderAccessGoogleAppsConfig `json:"config,required"` + Config IdentityProviderNewResponseAccessGoogleAppsConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, @@ -743,13 +847,13 @@ type IdentityProviderAccessGoogleApps struct { ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderAccessGoogleAppsJSON `json:"-"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderNewResponseAccessGoogleAppsJSON `json:"-"` } -// identityProviderAccessGoogleAppsJSON contains the JSON metadata for the struct -// [IdentityProviderAccessGoogleApps] -type identityProviderAccessGoogleAppsJSON struct { +// identityProviderNewResponseAccessGoogleAppsJSON contains the JSON metadata for +// the struct [IdentityProviderNewResponseAccessGoogleApps] +type identityProviderNewResponseAccessGoogleAppsJSON struct { Config apijson.Field Name apijson.Field Type apijson.Field @@ -759,20 +863,21 @@ type identityProviderAccessGoogleAppsJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderAccessGoogleApps) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderNewResponseAccessGoogleApps) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderAccessGoogleAppsJSON) RawJSON() string { +func (r identityProviderNewResponseAccessGoogleAppsJSON) RawJSON() string { return r.raw } -func (r IdentityProviderAccessGoogleApps) implementsZeroTrustIdentityProvider() {} +func (r IdentityProviderNewResponseAccessGoogleApps) implementsZeroTrustIdentityProviderNewResponse() { +} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderAccessGoogleAppsConfig struct { +type IdentityProviderNewResponseAccessGoogleAppsConfig struct { // Your companies TLD AppsDomain string `json:"apps_domain"` // Custom claims @@ -782,13 +887,13 @@ type IdentityProviderAccessGoogleAppsConfig struct { // Your OAuth Client Secret ClientSecret string `json:"client_secret"` // The claim name for email in the id_token response. - EmailClaimName string `json:"email_claim_name"` - JSON identityProviderAccessGoogleAppsConfigJSON `json:"-"` + EmailClaimName string `json:"email_claim_name"` + JSON identityProviderNewResponseAccessGoogleAppsConfigJSON `json:"-"` } -// identityProviderAccessGoogleAppsConfigJSON contains the JSON metadata for the -// struct [IdentityProviderAccessGoogleAppsConfig] -type identityProviderAccessGoogleAppsConfigJSON struct { +// identityProviderNewResponseAccessGoogleAppsConfigJSON contains the JSON metadata +// for the struct [IdentityProviderNewResponseAccessGoogleAppsConfig] +type identityProviderNewResponseAccessGoogleAppsConfigJSON struct { AppsDomain apijson.Field Claims apijson.Field ClientID apijson.Field @@ -798,15 +903,15 @@ type identityProviderAccessGoogleAppsConfigJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderAccessGoogleAppsConfig) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderNewResponseAccessGoogleAppsConfig) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderAccessGoogleAppsConfigJSON) RawJSON() string { +func (r identityProviderNewResponseAccessGoogleAppsConfigJSON) RawJSON() string { return r.raw } -type IdentityProviderAccessLinkedin struct { +type IdentityProviderNewResponseAccessLinkedin struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). @@ -821,13 +926,13 @@ type IdentityProviderAccessLinkedin struct { ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderAccessLinkedinJSON `json:"-"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderNewResponseAccessLinkedinJSON `json:"-"` } -// identityProviderAccessLinkedinJSON contains the JSON metadata for the struct -// [IdentityProviderAccessLinkedin] -type identityProviderAccessLinkedinJSON struct { +// identityProviderNewResponseAccessLinkedinJSON contains the JSON metadata for the +// struct [IdentityProviderNewResponseAccessLinkedin] +type identityProviderNewResponseAccessLinkedinJSON struct { Config apijson.Field Name apijson.Field Type apijson.Field @@ -837,21 +942,21 @@ type identityProviderAccessLinkedinJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderAccessLinkedin) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderNewResponseAccessLinkedin) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderAccessLinkedinJSON) RawJSON() string { +func (r identityProviderNewResponseAccessLinkedinJSON) RawJSON() string { return r.raw } -func (r IdentityProviderAccessLinkedin) implementsZeroTrustIdentityProvider() {} +func (r IdentityProviderNewResponseAccessLinkedin) implementsZeroTrustIdentityProviderNewResponse() {} -type IdentityProviderAccessOIDC struct { +type IdentityProviderNewResponseAccessOIDC struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderAccessOIDCConfig `json:"config,required"` + Config IdentityProviderNewResponseAccessOIDCConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, @@ -862,13 +967,13 @@ type IdentityProviderAccessOIDC struct { ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderAccessOIDCJSON `json:"-"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderNewResponseAccessOIDCJSON `json:"-"` } -// identityProviderAccessOIDCJSON contains the JSON metadata for the struct -// [IdentityProviderAccessOIDC] -type identityProviderAccessOIDCJSON struct { +// identityProviderNewResponseAccessOIDCJSON contains the JSON metadata for the +// struct [IdentityProviderNewResponseAccessOIDC] +type identityProviderNewResponseAccessOIDCJSON struct { Config apijson.Field Name apijson.Field Type apijson.Field @@ -878,20 +983,20 @@ type identityProviderAccessOIDCJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderAccessOIDC) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderNewResponseAccessOIDC) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderAccessOIDCJSON) RawJSON() string { +func (r identityProviderNewResponseAccessOIDCJSON) RawJSON() string { return r.raw } -func (r IdentityProviderAccessOIDC) implementsZeroTrustIdentityProvider() {} +func (r IdentityProviderNewResponseAccessOIDC) implementsZeroTrustIdentityProviderNewResponse() {} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderAccessOIDCConfig struct { +type IdentityProviderNewResponseAccessOIDCConfig struct { // The authorization_endpoint URL of your IdP AuthURL string `json:"auth_url"` // The jwks_uri endpoint of your IdP to allow the IdP keys to sign the tokens @@ -907,13 +1012,13 @@ type IdentityProviderAccessOIDCConfig struct { // OAuth scopes Scopes []string `json:"scopes"` // The token_endpoint URL of your IdP - TokenURL string `json:"token_url"` - JSON identityProviderAccessOIDCConfigJSON `json:"-"` + TokenURL string `json:"token_url"` + JSON identityProviderNewResponseAccessOIDCConfigJSON `json:"-"` } -// identityProviderAccessOIDCConfigJSON contains the JSON metadata for the struct -// [IdentityProviderAccessOIDCConfig] -type identityProviderAccessOIDCConfigJSON struct { +// identityProviderNewResponseAccessOIDCConfigJSON contains the JSON metadata for +// the struct [IdentityProviderNewResponseAccessOIDCConfig] +type identityProviderNewResponseAccessOIDCConfigJSON struct { AuthURL apijson.Field CERTsURL apijson.Field Claims apijson.Field @@ -926,19 +1031,19 @@ type identityProviderAccessOIDCConfigJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderAccessOIDCConfig) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderNewResponseAccessOIDCConfig) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderAccessOIDCConfigJSON) RawJSON() string { +func (r identityProviderNewResponseAccessOIDCConfigJSON) RawJSON() string { return r.raw } -type IdentityProviderAccessOkta struct { +type IdentityProviderNewResponseAccessOkta struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderAccessOktaConfig `json:"config,required"` + Config IdentityProviderNewResponseAccessOktaConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, @@ -949,13 +1054,13 @@ type IdentityProviderAccessOkta struct { ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderAccessOktaJSON `json:"-"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderNewResponseAccessOktaJSON `json:"-"` } -// identityProviderAccessOktaJSON contains the JSON metadata for the struct -// [IdentityProviderAccessOkta] -type identityProviderAccessOktaJSON struct { +// identityProviderNewResponseAccessOktaJSON contains the JSON metadata for the +// struct [IdentityProviderNewResponseAccessOkta] +type identityProviderNewResponseAccessOktaJSON struct { Config apijson.Field Name apijson.Field Type apijson.Field @@ -965,20 +1070,20 @@ type identityProviderAccessOktaJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderAccessOkta) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderNewResponseAccessOkta) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderAccessOktaJSON) RawJSON() string { +func (r identityProviderNewResponseAccessOktaJSON) RawJSON() string { return r.raw } -func (r IdentityProviderAccessOkta) implementsZeroTrustIdentityProvider() {} +func (r IdentityProviderNewResponseAccessOkta) implementsZeroTrustIdentityProviderNewResponse() {} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderAccessOktaConfig struct { +type IdentityProviderNewResponseAccessOktaConfig struct { // Your okta authorization server id AuthorizationServerID string `json:"authorization_server_id"` // Custom claims @@ -990,13 +1095,13 @@ type IdentityProviderAccessOktaConfig struct { // The claim name for email in the id_token response. EmailClaimName string `json:"email_claim_name"` // Your okta account url - OktaAccount string `json:"okta_account"` - JSON identityProviderAccessOktaConfigJSON `json:"-"` + OktaAccount string `json:"okta_account"` + JSON identityProviderNewResponseAccessOktaConfigJSON `json:"-"` } -// identityProviderAccessOktaConfigJSON contains the JSON metadata for the struct -// [IdentityProviderAccessOktaConfig] -type identityProviderAccessOktaConfigJSON struct { +// identityProviderNewResponseAccessOktaConfigJSON contains the JSON metadata for +// the struct [IdentityProviderNewResponseAccessOktaConfig] +type identityProviderNewResponseAccessOktaConfigJSON struct { AuthorizationServerID apijson.Field Claims apijson.Field ClientID apijson.Field @@ -1007,19 +1112,19 @@ type identityProviderAccessOktaConfigJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderAccessOktaConfig) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderNewResponseAccessOktaConfig) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderAccessOktaConfigJSON) RawJSON() string { +func (r identityProviderNewResponseAccessOktaConfigJSON) RawJSON() string { return r.raw } -type IdentityProviderAccessOnelogin struct { +type IdentityProviderNewResponseAccessOnelogin struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderAccessOneloginConfig `json:"config,required"` + Config IdentityProviderNewResponseAccessOneloginConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, @@ -1030,13 +1135,13 @@ type IdentityProviderAccessOnelogin struct { ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderAccessOneloginJSON `json:"-"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderNewResponseAccessOneloginJSON `json:"-"` } -// identityProviderAccessOneloginJSON contains the JSON metadata for the struct -// [IdentityProviderAccessOnelogin] -type identityProviderAccessOneloginJSON struct { +// identityProviderNewResponseAccessOneloginJSON contains the JSON metadata for the +// struct [IdentityProviderNewResponseAccessOnelogin] +type identityProviderNewResponseAccessOneloginJSON struct { Config apijson.Field Name apijson.Field Type apijson.Field @@ -1046,20 +1151,20 @@ type identityProviderAccessOneloginJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderAccessOnelogin) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderNewResponseAccessOnelogin) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderAccessOneloginJSON) RawJSON() string { +func (r identityProviderNewResponseAccessOneloginJSON) RawJSON() string { return r.raw } -func (r IdentityProviderAccessOnelogin) implementsZeroTrustIdentityProvider() {} +func (r IdentityProviderNewResponseAccessOnelogin) implementsZeroTrustIdentityProviderNewResponse() {} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderAccessOneloginConfig struct { +type IdentityProviderNewResponseAccessOneloginConfig struct { // Custom claims Claims []string `json:"claims"` // Your OAuth Client ID @@ -1069,13 +1174,13 @@ type IdentityProviderAccessOneloginConfig struct { // The claim name for email in the id_token response. EmailClaimName string `json:"email_claim_name"` // Your OneLogin account url - OneloginAccount string `json:"onelogin_account"` - JSON identityProviderAccessOneloginConfigJSON `json:"-"` + OneloginAccount string `json:"onelogin_account"` + JSON identityProviderNewResponseAccessOneloginConfigJSON `json:"-"` } -// identityProviderAccessOneloginConfigJSON contains the JSON metadata for the -// struct [IdentityProviderAccessOneloginConfig] -type identityProviderAccessOneloginConfigJSON struct { +// identityProviderNewResponseAccessOneloginConfigJSON contains the JSON metadata +// for the struct [IdentityProviderNewResponseAccessOneloginConfig] +type identityProviderNewResponseAccessOneloginConfigJSON struct { Claims apijson.Field ClientID apijson.Field ClientSecret apijson.Field @@ -1085,19 +1190,19 @@ type identityProviderAccessOneloginConfigJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderAccessOneloginConfig) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderNewResponseAccessOneloginConfig) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderAccessOneloginConfigJSON) RawJSON() string { +func (r identityProviderNewResponseAccessOneloginConfigJSON) RawJSON() string { return r.raw } -type IdentityProviderAccessPingone struct { +type IdentityProviderNewResponseAccessPingone struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderAccessPingoneConfig `json:"config,required"` + Config IdentityProviderNewResponseAccessPingoneConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, @@ -1108,13 +1213,13 @@ type IdentityProviderAccessPingone struct { ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderAccessPingoneJSON `json:"-"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderNewResponseAccessPingoneJSON `json:"-"` } -// identityProviderAccessPingoneJSON contains the JSON metadata for the struct -// [IdentityProviderAccessPingone] -type identityProviderAccessPingoneJSON struct { +// identityProviderNewResponseAccessPingoneJSON contains the JSON metadata for the +// struct [IdentityProviderNewResponseAccessPingone] +type identityProviderNewResponseAccessPingoneJSON struct { Config apijson.Field Name apijson.Field Type apijson.Field @@ -1124,20 +1229,20 @@ type identityProviderAccessPingoneJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderAccessPingone) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderNewResponseAccessPingone) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderAccessPingoneJSON) RawJSON() string { +func (r identityProviderNewResponseAccessPingoneJSON) RawJSON() string { return r.raw } -func (r IdentityProviderAccessPingone) implementsZeroTrustIdentityProvider() {} +func (r IdentityProviderNewResponseAccessPingone) implementsZeroTrustIdentityProviderNewResponse() {} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderAccessPingoneConfig struct { +type IdentityProviderNewResponseAccessPingoneConfig struct { // Custom claims Claims []string `json:"claims"` // Your OAuth Client ID @@ -1147,13 +1252,13 @@ type IdentityProviderAccessPingoneConfig struct { // The claim name for email in the id_token response. EmailClaimName string `json:"email_claim_name"` // Your PingOne environment identifier - PingEnvID string `json:"ping_env_id"` - JSON identityProviderAccessPingoneConfigJSON `json:"-"` + PingEnvID string `json:"ping_env_id"` + JSON identityProviderNewResponseAccessPingoneConfigJSON `json:"-"` } -// identityProviderAccessPingoneConfigJSON contains the JSON metadata for the -// struct [IdentityProviderAccessPingoneConfig] -type identityProviderAccessPingoneConfigJSON struct { +// identityProviderNewResponseAccessPingoneConfigJSON contains the JSON metadata +// for the struct [IdentityProviderNewResponseAccessPingoneConfig] +type identityProviderNewResponseAccessPingoneConfigJSON struct { Claims apijson.Field ClientID apijson.Field ClientSecret apijson.Field @@ -1163,19 +1268,19 @@ type identityProviderAccessPingoneConfigJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderAccessPingoneConfig) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderNewResponseAccessPingoneConfig) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderAccessPingoneConfigJSON) RawJSON() string { +func (r identityProviderNewResponseAccessPingoneConfigJSON) RawJSON() string { return r.raw } -type IdentityProviderAccessSAML struct { +type IdentityProviderNewResponseAccessSAML struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderAccessSAMLConfig `json:"config,required"` + Config IdentityProviderNewResponseAccessSAMLConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, @@ -1186,13 +1291,13 @@ type IdentityProviderAccessSAML struct { ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderAccessSAMLJSON `json:"-"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderNewResponseAccessSAMLJSON `json:"-"` } -// identityProviderAccessSAMLJSON contains the JSON metadata for the struct -// [IdentityProviderAccessSAML] -type identityProviderAccessSAMLJSON struct { +// identityProviderNewResponseAccessSAMLJSON contains the JSON metadata for the +// struct [IdentityProviderNewResponseAccessSAML] +type identityProviderNewResponseAccessSAMLJSON struct { Config apijson.Field Name apijson.Field Type apijson.Field @@ -1202,20 +1307,20 @@ type identityProviderAccessSAMLJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderAccessSAML) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderNewResponseAccessSAML) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderAccessSAMLJSON) RawJSON() string { +func (r identityProviderNewResponseAccessSAMLJSON) RawJSON() string { return r.raw } -func (r IdentityProviderAccessSAML) implementsZeroTrustIdentityProvider() {} +func (r IdentityProviderNewResponseAccessSAML) implementsZeroTrustIdentityProviderNewResponse() {} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderAccessSAMLConfig struct { +type IdentityProviderNewResponseAccessSAMLConfig struct { // A list of SAML attribute names that will be added to your signed JWT token and // can be used in SAML policy rules. Attributes []string `json:"attributes"` @@ -1223,7 +1328,7 @@ type IdentityProviderAccessSAMLConfig struct { EmailAttributeName string `json:"email_attribute_name"` // Add a list of attribute names that will be returned in the response header from // the Access callback. - HeaderAttributes []IdentityProviderAccessSAMLConfigHeaderAttribute `json:"header_attributes"` + HeaderAttributes []IdentityProviderNewResponseAccessSAMLConfigHeaderAttribute `json:"header_attributes"` // X509 certificate to verify the signature in the SAML authentication response IdPPublicCERTs []string `json:"idp_public_certs"` // IdP Entity ID or Issuer URL @@ -1232,13 +1337,13 @@ type IdentityProviderAccessSAMLConfig struct { // signature, use the public key from the Access certs endpoints. SignRequest bool `json:"sign_request"` // URL to send the SAML authentication requests to - SSOTargetURL string `json:"sso_target_url"` - JSON identityProviderAccessSAMLConfigJSON `json:"-"` + SSOTargetURL string `json:"sso_target_url"` + JSON identityProviderNewResponseAccessSAMLConfigJSON `json:"-"` } -// identityProviderAccessSAMLConfigJSON contains the JSON metadata for the struct -// [IdentityProviderAccessSAMLConfig] -type identityProviderAccessSAMLConfigJSON struct { +// identityProviderNewResponseAccessSAMLConfigJSON contains the JSON metadata for +// the struct [IdentityProviderNewResponseAccessSAMLConfig] +type identityProviderNewResponseAccessSAMLConfigJSON struct { Attributes apijson.Field EmailAttributeName apijson.Field HeaderAttributes apijson.Field @@ -1250,40 +1355,41 @@ type identityProviderAccessSAMLConfigJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderAccessSAMLConfig) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderNewResponseAccessSAMLConfig) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderAccessSAMLConfigJSON) RawJSON() string { +func (r identityProviderNewResponseAccessSAMLConfigJSON) RawJSON() string { return r.raw } -type IdentityProviderAccessSAMLConfigHeaderAttribute struct { +type IdentityProviderNewResponseAccessSAMLConfigHeaderAttribute struct { // attribute name from the IDP AttributeName string `json:"attribute_name"` // header that will be added on the request to the origin - HeaderName string `json:"header_name"` - JSON identityProviderAccessSAMLConfigHeaderAttributeJSON `json:"-"` + HeaderName string `json:"header_name"` + JSON identityProviderNewResponseAccessSAMLConfigHeaderAttributeJSON `json:"-"` } -// identityProviderAccessSAMLConfigHeaderAttributeJSON contains the JSON metadata -// for the struct [IdentityProviderAccessSAMLConfigHeaderAttribute] -type identityProviderAccessSAMLConfigHeaderAttributeJSON struct { +// identityProviderNewResponseAccessSAMLConfigHeaderAttributeJSON contains the JSON +// metadata for the struct +// [IdentityProviderNewResponseAccessSAMLConfigHeaderAttribute] +type identityProviderNewResponseAccessSAMLConfigHeaderAttributeJSON struct { AttributeName apijson.Field HeaderName apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *IdentityProviderAccessSAMLConfigHeaderAttribute) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderNewResponseAccessSAMLConfigHeaderAttribute) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderAccessSAMLConfigHeaderAttributeJSON) RawJSON() string { +func (r identityProviderNewResponseAccessSAMLConfigHeaderAttributeJSON) RawJSON() string { return r.raw } -type IdentityProviderAccessYandex struct { +type IdentityProviderNewResponseAccessYandex struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). @@ -1298,13 +1404,13 @@ type IdentityProviderAccessYandex struct { ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderAccessYandexJSON `json:"-"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderNewResponseAccessYandexJSON `json:"-"` } -// identityProviderAccessYandexJSON contains the JSON metadata for the struct -// [IdentityProviderAccessYandex] -type identityProviderAccessYandexJSON struct { +// identityProviderNewResponseAccessYandexJSON contains the JSON metadata for the +// struct [IdentityProviderNewResponseAccessYandex] +type identityProviderNewResponseAccessYandexJSON struct { Config apijson.Field Name apijson.Field Type apijson.Field @@ -1314,17 +1420,17 @@ type identityProviderAccessYandexJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderAccessYandex) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderNewResponseAccessYandex) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderAccessYandexJSON) RawJSON() string { +func (r identityProviderNewResponseAccessYandexJSON) RawJSON() string { return r.raw } -func (r IdentityProviderAccessYandex) implementsZeroTrustIdentityProvider() {} +func (r IdentityProviderNewResponseAccessYandex) implementsZeroTrustIdentityProviderNewResponse() {} -type IdentityProviderAccessOnetimepin struct { +type IdentityProviderNewResponseAccessOnetimepin struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). @@ -1339,13 +1445,13 @@ type IdentityProviderAccessOnetimepin struct { ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderAccessOnetimepinJSON `json:"-"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderNewResponseAccessOnetimepinJSON `json:"-"` } -// identityProviderAccessOnetimepinJSON contains the JSON metadata for the struct -// [IdentityProviderAccessOnetimepin] -type identityProviderAccessOnetimepinJSON struct { +// identityProviderNewResponseAccessOnetimepinJSON contains the JSON metadata for +// the struct [IdentityProviderNewResponseAccessOnetimepin] +type identityProviderNewResponseAccessOnetimepinJSON struct { Config apijson.Field Name apijson.Field Type apijson.Field @@ -1355,621 +1461,1030 @@ type identityProviderAccessOnetimepinJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderAccessOnetimepin) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderNewResponseAccessOnetimepin) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderAccessOnetimepinJSON) RawJSON() string { +func (r identityProviderNewResponseAccessOnetimepinJSON) RawJSON() string { return r.raw } -func (r IdentityProviderAccessOnetimepin) implementsZeroTrustIdentityProvider() {} +func (r IdentityProviderNewResponseAccessOnetimepin) implementsZeroTrustIdentityProviderNewResponse() { +} -type IdentityProviderParam struct { - Config param.Field[interface{}] `json:"config"` +type IdentityProviderUpdateResponse struct { + Config interface{} `json:"config"` + // UUID + ID string `json:"id"` // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` + Name string `json:"name,required"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` + ScimConfig ScimConfig `json:"scim_config"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` + Type IdentityProviderType `json:"type,required"` + JSON identityProviderUpdateResponseJSON `json:"-"` + union IdentityProviderUpdateResponseUnion } -func (r IdentityProviderParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// identityProviderUpdateResponseJSON contains the JSON metadata for the struct +// [IdentityProviderUpdateResponse] +type identityProviderUpdateResponseJSON struct { + Config apijson.Field + ID apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field } -func (r IdentityProviderParam) implementsZeroTrustIdentityProviderUnionParam() {} +func (r identityProviderUpdateResponseJSON) RawJSON() string { + return r.raw +} -// Satisfied by [zero_trust.AzureADParam], -// [zero_trust.IdentityProviderAccessCentrifyParam], -// [zero_trust.IdentityProviderAccessFacebookParam], -// [zero_trust.IdentityProviderAccessGitHubParam], -// [zero_trust.IdentityProviderAccessGoogleParam], -// [zero_trust.IdentityProviderAccessGoogleAppsParam], -// [zero_trust.IdentityProviderAccessLinkedinParam], -// [zero_trust.IdentityProviderAccessOIDCParam], -// [zero_trust.IdentityProviderAccessOktaParam], -// [zero_trust.IdentityProviderAccessOneloginParam], -// [zero_trust.IdentityProviderAccessPingoneParam], -// [zero_trust.IdentityProviderAccessSAMLParam], -// [zero_trust.IdentityProviderAccessYandexParam], -// [zero_trust.IdentityProviderAccessOnetimepinParam], [IdentityProviderParam]. -type IdentityProviderUnionParam interface { - implementsZeroTrustIdentityProviderUnionParam() +func (r *IdentityProviderUpdateResponse) UnmarshalJSON(data []byte) (err error) { + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +func (r IdentityProviderUpdateResponse) AsUnion() IdentityProviderUpdateResponseUnion { + return r.union +} + +// Union satisfied by [zero_trust.AzureAD], +// [zero_trust.IdentityProviderUpdateResponseAccessCentrify], +// [zero_trust.IdentityProviderUpdateResponseAccessFacebook], +// [zero_trust.IdentityProviderUpdateResponseAccessGitHub], +// [zero_trust.IdentityProviderUpdateResponseAccessGoogle], +// [zero_trust.IdentityProviderUpdateResponseAccessGoogleApps], +// [zero_trust.IdentityProviderUpdateResponseAccessLinkedin], +// [zero_trust.IdentityProviderUpdateResponseAccessOIDC], +// [zero_trust.IdentityProviderUpdateResponseAccessOkta], +// [zero_trust.IdentityProviderUpdateResponseAccessOnelogin], +// [zero_trust.IdentityProviderUpdateResponseAccessPingone], +// [zero_trust.IdentityProviderUpdateResponseAccessSAML], +// [zero_trust.IdentityProviderUpdateResponseAccessYandex] or +// [zero_trust.IdentityProviderUpdateResponseAccessOnetimepin]. +type IdentityProviderUpdateResponseUnion interface { + implementsZeroTrustIdentityProviderUpdateResponse() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*IdentityProviderUpdateResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(AzureAD{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(IdentityProviderUpdateResponseAccessCentrify{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(IdentityProviderUpdateResponseAccessFacebook{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(IdentityProviderUpdateResponseAccessGitHub{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(IdentityProviderUpdateResponseAccessGoogle{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(IdentityProviderUpdateResponseAccessGoogleApps{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(IdentityProviderUpdateResponseAccessLinkedin{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(IdentityProviderUpdateResponseAccessOIDC{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(IdentityProviderUpdateResponseAccessOkta{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(IdentityProviderUpdateResponseAccessOnelogin{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(IdentityProviderUpdateResponseAccessPingone{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(IdentityProviderUpdateResponseAccessSAML{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(IdentityProviderUpdateResponseAccessYandex{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(IdentityProviderUpdateResponseAccessOnetimepin{}), + }, + ) } -type IdentityProviderAccessCentrifyParam struct { +type IdentityProviderUpdateResponseAccessCentrify struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[IdentityProviderAccessCentrifyConfigParam] `json:"config,required"` + Config IdentityProviderUpdateResponseAccessCentrifyConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` + Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` + Type IdentityProviderType `json:"type,required"` + // UUID + ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderUpdateResponseAccessCentrifyJSON `json:"-"` } -func (r IdentityProviderAccessCentrifyParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// identityProviderUpdateResponseAccessCentrifyJSON contains the JSON metadata for +// the struct [IdentityProviderUpdateResponseAccessCentrify] +type identityProviderUpdateResponseAccessCentrifyJSON struct { + Config apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + ScimConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderUpdateResponseAccessCentrify) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderUpdateResponseAccessCentrifyJSON) RawJSON() string { + return r.raw } -func (r IdentityProviderAccessCentrifyParam) implementsZeroTrustIdentityProviderUnionParam() {} +func (r IdentityProviderUpdateResponseAccessCentrify) implementsZeroTrustIdentityProviderUpdateResponse() { +} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderAccessCentrifyConfigParam struct { +type IdentityProviderUpdateResponseAccessCentrifyConfig struct { // Your centrify account url - CentrifyAccount param.Field[string] `json:"centrify_account"` + CentrifyAccount string `json:"centrify_account"` // Your centrify app id - CentrifyAppID param.Field[string] `json:"centrify_app_id"` + CentrifyAppID string `json:"centrify_app_id"` // Custom claims - Claims param.Field[[]string] `json:"claims"` + Claims []string `json:"claims"` // Your OAuth Client ID - ClientID param.Field[string] `json:"client_id"` + ClientID string `json:"client_id"` // Your OAuth Client Secret - ClientSecret param.Field[string] `json:"client_secret"` + ClientSecret string `json:"client_secret"` // The claim name for email in the id_token response. - EmailClaimName param.Field[string] `json:"email_claim_name"` + EmailClaimName string `json:"email_claim_name"` + JSON identityProviderUpdateResponseAccessCentrifyConfigJSON `json:"-"` } -func (r IdentityProviderAccessCentrifyConfigParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// identityProviderUpdateResponseAccessCentrifyConfigJSON contains the JSON +// metadata for the struct [IdentityProviderUpdateResponseAccessCentrifyConfig] +type identityProviderUpdateResponseAccessCentrifyConfigJSON struct { + CentrifyAccount apijson.Field + CentrifyAppID apijson.Field + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + raw string + ExtraFields map[string]apijson.Field } -type IdentityProviderAccessFacebookParam struct { +func (r *IdentityProviderUpdateResponseAccessCentrifyConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderUpdateResponseAccessCentrifyConfigJSON) RawJSON() string { + return r.raw +} + +type IdentityProviderUpdateResponseAccessFacebook struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[GenericOAuthConfigParam] `json:"config,required"` + Config GenericOAuthConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` + Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` + Type IdentityProviderType `json:"type,required"` + // UUID + ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderUpdateResponseAccessFacebookJSON `json:"-"` } -func (r IdentityProviderAccessFacebookParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// identityProviderUpdateResponseAccessFacebookJSON contains the JSON metadata for +// the struct [IdentityProviderUpdateResponseAccessFacebook] +type identityProviderUpdateResponseAccessFacebookJSON struct { + Config apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + ScimConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field } -func (r IdentityProviderAccessFacebookParam) implementsZeroTrustIdentityProviderUnionParam() {} +func (r *IdentityProviderUpdateResponseAccessFacebook) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderUpdateResponseAccessFacebookJSON) RawJSON() string { + return r.raw +} + +func (r IdentityProviderUpdateResponseAccessFacebook) implementsZeroTrustIdentityProviderUpdateResponse() { +} -type IdentityProviderAccessGitHubParam struct { +type IdentityProviderUpdateResponseAccessGitHub struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[GenericOAuthConfigParam] `json:"config,required"` + Config GenericOAuthConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` + Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` + Type IdentityProviderType `json:"type,required"` + // UUID + ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderUpdateResponseAccessGitHubJSON `json:"-"` } -func (r IdentityProviderAccessGitHubParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// identityProviderUpdateResponseAccessGitHubJSON contains the JSON metadata for +// the struct [IdentityProviderUpdateResponseAccessGitHub] +type identityProviderUpdateResponseAccessGitHubJSON struct { + Config apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + ScimConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderUpdateResponseAccessGitHub) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -func (r IdentityProviderAccessGitHubParam) implementsZeroTrustIdentityProviderUnionParam() {} +func (r identityProviderUpdateResponseAccessGitHubJSON) RawJSON() string { + return r.raw +} + +func (r IdentityProviderUpdateResponseAccessGitHub) implementsZeroTrustIdentityProviderUpdateResponse() { +} -type IdentityProviderAccessGoogleParam struct { +type IdentityProviderUpdateResponseAccessGoogle struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[IdentityProviderAccessGoogleConfigParam] `json:"config,required"` + Config IdentityProviderUpdateResponseAccessGoogleConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` + Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` + Type IdentityProviderType `json:"type,required"` + // UUID + ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderUpdateResponseAccessGoogleJSON `json:"-"` } -func (r IdentityProviderAccessGoogleParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// identityProviderUpdateResponseAccessGoogleJSON contains the JSON metadata for +// the struct [IdentityProviderUpdateResponseAccessGoogle] +type identityProviderUpdateResponseAccessGoogleJSON struct { + Config apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + ScimConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field } -func (r IdentityProviderAccessGoogleParam) implementsZeroTrustIdentityProviderUnionParam() {} +func (r *IdentityProviderUpdateResponseAccessGoogle) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderUpdateResponseAccessGoogleJSON) RawJSON() string { + return r.raw +} + +func (r IdentityProviderUpdateResponseAccessGoogle) implementsZeroTrustIdentityProviderUpdateResponse() { +} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderAccessGoogleConfigParam struct { +type IdentityProviderUpdateResponseAccessGoogleConfig struct { // Custom claims - Claims param.Field[[]string] `json:"claims"` + Claims []string `json:"claims"` // Your OAuth Client ID - ClientID param.Field[string] `json:"client_id"` + ClientID string `json:"client_id"` // Your OAuth Client Secret - ClientSecret param.Field[string] `json:"client_secret"` + ClientSecret string `json:"client_secret"` // The claim name for email in the id_token response. - EmailClaimName param.Field[string] `json:"email_claim_name"` + EmailClaimName string `json:"email_claim_name"` + JSON identityProviderUpdateResponseAccessGoogleConfigJSON `json:"-"` } -func (r IdentityProviderAccessGoogleConfigParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// identityProviderUpdateResponseAccessGoogleConfigJSON contains the JSON metadata +// for the struct [IdentityProviderUpdateResponseAccessGoogleConfig] +type identityProviderUpdateResponseAccessGoogleConfigJSON struct { + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderUpdateResponseAccessGoogleConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderUpdateResponseAccessGoogleConfigJSON) RawJSON() string { + return r.raw } -type IdentityProviderAccessGoogleAppsParam struct { +type IdentityProviderUpdateResponseAccessGoogleApps struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[IdentityProviderAccessGoogleAppsConfigParam] `json:"config,required"` + Config IdentityProviderUpdateResponseAccessGoogleAppsConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` + Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` + Type IdentityProviderType `json:"type,required"` + // UUID + ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderUpdateResponseAccessGoogleAppsJSON `json:"-"` } -func (r IdentityProviderAccessGoogleAppsParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// identityProviderUpdateResponseAccessGoogleAppsJSON contains the JSON metadata +// for the struct [IdentityProviderUpdateResponseAccessGoogleApps] +type identityProviderUpdateResponseAccessGoogleAppsJSON struct { + Config apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + ScimConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderUpdateResponseAccessGoogleApps) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderUpdateResponseAccessGoogleAppsJSON) RawJSON() string { + return r.raw } -func (r IdentityProviderAccessGoogleAppsParam) implementsZeroTrustIdentityProviderUnionParam() {} +func (r IdentityProviderUpdateResponseAccessGoogleApps) implementsZeroTrustIdentityProviderUpdateResponse() { +} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderAccessGoogleAppsConfigParam struct { +type IdentityProviderUpdateResponseAccessGoogleAppsConfig struct { // Your companies TLD - AppsDomain param.Field[string] `json:"apps_domain"` + AppsDomain string `json:"apps_domain"` // Custom claims - Claims param.Field[[]string] `json:"claims"` + Claims []string `json:"claims"` // Your OAuth Client ID - ClientID param.Field[string] `json:"client_id"` + ClientID string `json:"client_id"` // Your OAuth Client Secret - ClientSecret param.Field[string] `json:"client_secret"` + ClientSecret string `json:"client_secret"` // The claim name for email in the id_token response. - EmailClaimName param.Field[string] `json:"email_claim_name"` + EmailClaimName string `json:"email_claim_name"` + JSON identityProviderUpdateResponseAccessGoogleAppsConfigJSON `json:"-"` } -func (r IdentityProviderAccessGoogleAppsConfigParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// identityProviderUpdateResponseAccessGoogleAppsConfigJSON contains the JSON +// metadata for the struct [IdentityProviderUpdateResponseAccessGoogleAppsConfig] +type identityProviderUpdateResponseAccessGoogleAppsConfigJSON struct { + AppsDomain apijson.Field + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderUpdateResponseAccessGoogleAppsConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderUpdateResponseAccessGoogleAppsConfigJSON) RawJSON() string { + return r.raw } -type IdentityProviderAccessLinkedinParam struct { +type IdentityProviderUpdateResponseAccessLinkedin struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[GenericOAuthConfigParam] `json:"config,required"` + Config GenericOAuthConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` + Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` + Type IdentityProviderType `json:"type,required"` + // UUID + ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderUpdateResponseAccessLinkedinJSON `json:"-"` } -func (r IdentityProviderAccessLinkedinParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// identityProviderUpdateResponseAccessLinkedinJSON contains the JSON metadata for +// the struct [IdentityProviderUpdateResponseAccessLinkedin] +type identityProviderUpdateResponseAccessLinkedinJSON struct { + Config apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + ScimConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderUpdateResponseAccessLinkedin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderUpdateResponseAccessLinkedinJSON) RawJSON() string { + return r.raw } -func (r IdentityProviderAccessLinkedinParam) implementsZeroTrustIdentityProviderUnionParam() {} +func (r IdentityProviderUpdateResponseAccessLinkedin) implementsZeroTrustIdentityProviderUpdateResponse() { +} -type IdentityProviderAccessOIDCParam struct { +type IdentityProviderUpdateResponseAccessOIDC struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[IdentityProviderAccessOIDCConfigParam] `json:"config,required"` + Config IdentityProviderUpdateResponseAccessOIDCConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` + Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` + Type IdentityProviderType `json:"type,required"` + // UUID + ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderUpdateResponseAccessOIDCJSON `json:"-"` } -func (r IdentityProviderAccessOIDCParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// identityProviderUpdateResponseAccessOIDCJSON contains the JSON metadata for the +// struct [IdentityProviderUpdateResponseAccessOIDC] +type identityProviderUpdateResponseAccessOIDCJSON struct { + Config apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + ScimConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderUpdateResponseAccessOIDC) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderUpdateResponseAccessOIDCJSON) RawJSON() string { + return r.raw } -func (r IdentityProviderAccessOIDCParam) implementsZeroTrustIdentityProviderUnionParam() {} +func (r IdentityProviderUpdateResponseAccessOIDC) implementsZeroTrustIdentityProviderUpdateResponse() { +} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderAccessOIDCConfigParam struct { +type IdentityProviderUpdateResponseAccessOIDCConfig struct { // The authorization_endpoint URL of your IdP - AuthURL param.Field[string] `json:"auth_url"` + AuthURL string `json:"auth_url"` // The jwks_uri endpoint of your IdP to allow the IdP keys to sign the tokens - CERTsURL param.Field[string] `json:"certs_url"` + CERTsURL string `json:"certs_url"` // Custom claims - Claims param.Field[[]string] `json:"claims"` + Claims []string `json:"claims"` // Your OAuth Client ID - ClientID param.Field[string] `json:"client_id"` + ClientID string `json:"client_id"` // Your OAuth Client Secret - ClientSecret param.Field[string] `json:"client_secret"` + ClientSecret string `json:"client_secret"` // The claim name for email in the id_token response. - EmailClaimName param.Field[string] `json:"email_claim_name"` + EmailClaimName string `json:"email_claim_name"` // OAuth scopes - Scopes param.Field[[]string] `json:"scopes"` + Scopes []string `json:"scopes"` // The token_endpoint URL of your IdP - TokenURL param.Field[string] `json:"token_url"` + TokenURL string `json:"token_url"` + JSON identityProviderUpdateResponseAccessOIDCConfigJSON `json:"-"` } -func (r IdentityProviderAccessOIDCConfigParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// identityProviderUpdateResponseAccessOIDCConfigJSON contains the JSON metadata +// for the struct [IdentityProviderUpdateResponseAccessOIDCConfig] +type identityProviderUpdateResponseAccessOIDCConfigJSON struct { + AuthURL apijson.Field + CERTsURL apijson.Field + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + Scopes apijson.Field + TokenURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderUpdateResponseAccessOIDCConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderUpdateResponseAccessOIDCConfigJSON) RawJSON() string { + return r.raw } -type IdentityProviderAccessOktaParam struct { +type IdentityProviderUpdateResponseAccessOkta struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[IdentityProviderAccessOktaConfigParam] `json:"config,required"` + Config IdentityProviderUpdateResponseAccessOktaConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` + Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` + Type IdentityProviderType `json:"type,required"` + // UUID + ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderUpdateResponseAccessOktaJSON `json:"-"` } -func (r IdentityProviderAccessOktaParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// identityProviderUpdateResponseAccessOktaJSON contains the JSON metadata for the +// struct [IdentityProviderUpdateResponseAccessOkta] +type identityProviderUpdateResponseAccessOktaJSON struct { + Config apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + ScimConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderUpdateResponseAccessOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -func (r IdentityProviderAccessOktaParam) implementsZeroTrustIdentityProviderUnionParam() {} +func (r identityProviderUpdateResponseAccessOktaJSON) RawJSON() string { + return r.raw +} + +func (r IdentityProviderUpdateResponseAccessOkta) implementsZeroTrustIdentityProviderUpdateResponse() { +} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderAccessOktaConfigParam struct { +type IdentityProviderUpdateResponseAccessOktaConfig struct { // Your okta authorization server id - AuthorizationServerID param.Field[string] `json:"authorization_server_id"` + AuthorizationServerID string `json:"authorization_server_id"` // Custom claims - Claims param.Field[[]string] `json:"claims"` + Claims []string `json:"claims"` // Your OAuth Client ID - ClientID param.Field[string] `json:"client_id"` + ClientID string `json:"client_id"` // Your OAuth Client Secret - ClientSecret param.Field[string] `json:"client_secret"` + ClientSecret string `json:"client_secret"` // The claim name for email in the id_token response. - EmailClaimName param.Field[string] `json:"email_claim_name"` + EmailClaimName string `json:"email_claim_name"` // Your okta account url - OktaAccount param.Field[string] `json:"okta_account"` + OktaAccount string `json:"okta_account"` + JSON identityProviderUpdateResponseAccessOktaConfigJSON `json:"-"` } -func (r IdentityProviderAccessOktaConfigParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// identityProviderUpdateResponseAccessOktaConfigJSON contains the JSON metadata +// for the struct [IdentityProviderUpdateResponseAccessOktaConfig] +type identityProviderUpdateResponseAccessOktaConfigJSON struct { + AuthorizationServerID apijson.Field + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + OktaAccount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderUpdateResponseAccessOktaConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderUpdateResponseAccessOktaConfigJSON) RawJSON() string { + return r.raw } -type IdentityProviderAccessOneloginParam struct { +type IdentityProviderUpdateResponseAccessOnelogin struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[IdentityProviderAccessOneloginConfigParam] `json:"config,required"` + Config IdentityProviderUpdateResponseAccessOneloginConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` + Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` + Type IdentityProviderType `json:"type,required"` + // UUID + ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderUpdateResponseAccessOneloginJSON `json:"-"` } -func (r IdentityProviderAccessOneloginParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// identityProviderUpdateResponseAccessOneloginJSON contains the JSON metadata for +// the struct [IdentityProviderUpdateResponseAccessOnelogin] +type identityProviderUpdateResponseAccessOneloginJSON struct { + Config apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + ScimConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderUpdateResponseAccessOnelogin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderUpdateResponseAccessOneloginJSON) RawJSON() string { + return r.raw } -func (r IdentityProviderAccessOneloginParam) implementsZeroTrustIdentityProviderUnionParam() {} +func (r IdentityProviderUpdateResponseAccessOnelogin) implementsZeroTrustIdentityProviderUpdateResponse() { +} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderAccessOneloginConfigParam struct { +type IdentityProviderUpdateResponseAccessOneloginConfig struct { // Custom claims - Claims param.Field[[]string] `json:"claims"` + Claims []string `json:"claims"` // Your OAuth Client ID - ClientID param.Field[string] `json:"client_id"` + ClientID string `json:"client_id"` // Your OAuth Client Secret - ClientSecret param.Field[string] `json:"client_secret"` + ClientSecret string `json:"client_secret"` // The claim name for email in the id_token response. - EmailClaimName param.Field[string] `json:"email_claim_name"` + EmailClaimName string `json:"email_claim_name"` // Your OneLogin account url - OneloginAccount param.Field[string] `json:"onelogin_account"` + OneloginAccount string `json:"onelogin_account"` + JSON identityProviderUpdateResponseAccessOneloginConfigJSON `json:"-"` } -func (r IdentityProviderAccessOneloginConfigParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// identityProviderUpdateResponseAccessOneloginConfigJSON contains the JSON +// metadata for the struct [IdentityProviderUpdateResponseAccessOneloginConfig] +type identityProviderUpdateResponseAccessOneloginConfigJSON struct { + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + OneloginAccount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderUpdateResponseAccessOneloginConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderUpdateResponseAccessOneloginConfigJSON) RawJSON() string { + return r.raw } -type IdentityProviderAccessPingoneParam struct { +type IdentityProviderUpdateResponseAccessPingone struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[IdentityProviderAccessPingoneConfigParam] `json:"config,required"` + Config IdentityProviderUpdateResponseAccessPingoneConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` + Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` + Type IdentityProviderType `json:"type,required"` + // UUID + ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderUpdateResponseAccessPingoneJSON `json:"-"` } -func (r IdentityProviderAccessPingoneParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// identityProviderUpdateResponseAccessPingoneJSON contains the JSON metadata for +// the struct [IdentityProviderUpdateResponseAccessPingone] +type identityProviderUpdateResponseAccessPingoneJSON struct { + Config apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + ScimConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderUpdateResponseAccessPingone) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderUpdateResponseAccessPingoneJSON) RawJSON() string { + return r.raw } -func (r IdentityProviderAccessPingoneParam) implementsZeroTrustIdentityProviderUnionParam() {} +func (r IdentityProviderUpdateResponseAccessPingone) implementsZeroTrustIdentityProviderUpdateResponse() { +} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderAccessPingoneConfigParam struct { +type IdentityProviderUpdateResponseAccessPingoneConfig struct { // Custom claims - Claims param.Field[[]string] `json:"claims"` + Claims []string `json:"claims"` // Your OAuth Client ID - ClientID param.Field[string] `json:"client_id"` + ClientID string `json:"client_id"` // Your OAuth Client Secret - ClientSecret param.Field[string] `json:"client_secret"` + ClientSecret string `json:"client_secret"` // The claim name for email in the id_token response. - EmailClaimName param.Field[string] `json:"email_claim_name"` + EmailClaimName string `json:"email_claim_name"` // Your PingOne environment identifier - PingEnvID param.Field[string] `json:"ping_env_id"` + PingEnvID string `json:"ping_env_id"` + JSON identityProviderUpdateResponseAccessPingoneConfigJSON `json:"-"` } -func (r IdentityProviderAccessPingoneConfigParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// identityProviderUpdateResponseAccessPingoneConfigJSON contains the JSON metadata +// for the struct [IdentityProviderUpdateResponseAccessPingoneConfig] +type identityProviderUpdateResponseAccessPingoneConfigJSON struct { + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + PingEnvID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderUpdateResponseAccessPingoneConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderUpdateResponseAccessPingoneConfigJSON) RawJSON() string { + return r.raw } -type IdentityProviderAccessSAMLParam struct { +type IdentityProviderUpdateResponseAccessSAML struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[IdentityProviderAccessSAMLConfigParam] `json:"config,required"` + Config IdentityProviderUpdateResponseAccessSAMLConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` + Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` + Type IdentityProviderType `json:"type,required"` + // UUID + ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderUpdateResponseAccessSAMLJSON `json:"-"` } -func (r IdentityProviderAccessSAMLParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// identityProviderUpdateResponseAccessSAMLJSON contains the JSON metadata for the +// struct [IdentityProviderUpdateResponseAccessSAML] +type identityProviderUpdateResponseAccessSAMLJSON struct { + Config apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + ScimConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderUpdateResponseAccessSAML) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -func (r IdentityProviderAccessSAMLParam) implementsZeroTrustIdentityProviderUnionParam() {} +func (r identityProviderUpdateResponseAccessSAMLJSON) RawJSON() string { + return r.raw +} + +func (r IdentityProviderUpdateResponseAccessSAML) implementsZeroTrustIdentityProviderUpdateResponse() { +} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderAccessSAMLConfigParam struct { +type IdentityProviderUpdateResponseAccessSAMLConfig struct { // A list of SAML attribute names that will be added to your signed JWT token and // can be used in SAML policy rules. - Attributes param.Field[[]string] `json:"attributes"` + Attributes []string `json:"attributes"` // The attribute name for email in the SAML response. - EmailAttributeName param.Field[string] `json:"email_attribute_name"` + EmailAttributeName string `json:"email_attribute_name"` // Add a list of attribute names that will be returned in the response header from // the Access callback. - HeaderAttributes param.Field[[]IdentityProviderAccessSAMLConfigHeaderAttributeParam] `json:"header_attributes"` + HeaderAttributes []IdentityProviderUpdateResponseAccessSAMLConfigHeaderAttribute `json:"header_attributes"` // X509 certificate to verify the signature in the SAML authentication response - IdPPublicCERTs param.Field[[]string] `json:"idp_public_certs"` + IdPPublicCERTs []string `json:"idp_public_certs"` // IdP Entity ID or Issuer URL - IssuerURL param.Field[string] `json:"issuer_url"` + IssuerURL string `json:"issuer_url"` // Sign the SAML authentication request with Access credentials. To verify the // signature, use the public key from the Access certs endpoints. - SignRequest param.Field[bool] `json:"sign_request"` + SignRequest bool `json:"sign_request"` // URL to send the SAML authentication requests to - SSOTargetURL param.Field[string] `json:"sso_target_url"` + SSOTargetURL string `json:"sso_target_url"` + JSON identityProviderUpdateResponseAccessSAMLConfigJSON `json:"-"` } -func (r IdentityProviderAccessSAMLConfigParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// identityProviderUpdateResponseAccessSAMLConfigJSON contains the JSON metadata +// for the struct [IdentityProviderUpdateResponseAccessSAMLConfig] +type identityProviderUpdateResponseAccessSAMLConfigJSON struct { + Attributes apijson.Field + EmailAttributeName apijson.Field + HeaderAttributes apijson.Field + IdPPublicCERTs apijson.Field + IssuerURL apijson.Field + SignRequest apijson.Field + SSOTargetURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderUpdateResponseAccessSAMLConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -type IdentityProviderAccessSAMLConfigHeaderAttributeParam struct { +func (r identityProviderUpdateResponseAccessSAMLConfigJSON) RawJSON() string { + return r.raw +} + +type IdentityProviderUpdateResponseAccessSAMLConfigHeaderAttribute struct { // attribute name from the IDP - AttributeName param.Field[string] `json:"attribute_name"` + AttributeName string `json:"attribute_name"` // header that will be added on the request to the origin - HeaderName param.Field[string] `json:"header_name"` + HeaderName string `json:"header_name"` + JSON identityProviderUpdateResponseAccessSAMLConfigHeaderAttributeJSON `json:"-"` } -func (r IdentityProviderAccessSAMLConfigHeaderAttributeParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// identityProviderUpdateResponseAccessSAMLConfigHeaderAttributeJSON contains the +// JSON metadata for the struct +// [IdentityProviderUpdateResponseAccessSAMLConfigHeaderAttribute] +type identityProviderUpdateResponseAccessSAMLConfigHeaderAttributeJSON struct { + AttributeName apijson.Field + HeaderName apijson.Field + raw string + ExtraFields map[string]apijson.Field } -type IdentityProviderAccessYandexParam struct { +func (r *IdentityProviderUpdateResponseAccessSAMLConfigHeaderAttribute) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderUpdateResponseAccessSAMLConfigHeaderAttributeJSON) RawJSON() string { + return r.raw +} + +type IdentityProviderUpdateResponseAccessYandex struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[GenericOAuthConfigParam] `json:"config,required"` + Config GenericOAuthConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` + Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` + Type IdentityProviderType `json:"type,required"` + // UUID + ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderUpdateResponseAccessYandexJSON `json:"-"` } -func (r IdentityProviderAccessYandexParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// identityProviderUpdateResponseAccessYandexJSON contains the JSON metadata for +// the struct [IdentityProviderUpdateResponseAccessYandex] +type identityProviderUpdateResponseAccessYandexJSON struct { + Config apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + ScimConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field } -func (r IdentityProviderAccessYandexParam) implementsZeroTrustIdentityProviderUnionParam() {} +func (r *IdentityProviderUpdateResponseAccessYandex) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderUpdateResponseAccessYandexJSON) RawJSON() string { + return r.raw +} + +func (r IdentityProviderUpdateResponseAccessYandex) implementsZeroTrustIdentityProviderUpdateResponse() { +} -type IdentityProviderAccessOnetimepinParam struct { +type IdentityProviderUpdateResponseAccessOnetimepin struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[interface{}] `json:"config,required"` + Config interface{} `json:"config,required"` // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` + Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` + Type IdentityProviderType `json:"type,required"` + // UUID + ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderUpdateResponseAccessOnetimepinJSON `json:"-"` } -func (r IdentityProviderAccessOnetimepinParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// identityProviderUpdateResponseAccessOnetimepinJSON contains the JSON metadata +// for the struct [IdentityProviderUpdateResponseAccessOnetimepin] +type identityProviderUpdateResponseAccessOnetimepinJSON struct { + Config apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + ScimConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field } -func (r IdentityProviderAccessOnetimepinParam) implementsZeroTrustIdentityProviderUnionParam() {} - -// The type of identity provider. To determine the value for a specific provider, -// refer to our -// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderType string - -const ( - IdentityProviderTypeOnetimepin IdentityProviderType = "onetimepin" - IdentityProviderTypeAzureAD IdentityProviderType = "azureAD" - IdentityProviderTypeSAML IdentityProviderType = "saml" - IdentityProviderTypeCentrify IdentityProviderType = "centrify" - IdentityProviderTypeFacebook IdentityProviderType = "facebook" - IdentityProviderTypeGitHub IdentityProviderType = "github" - IdentityProviderTypeGoogleApps IdentityProviderType = "google-apps" - IdentityProviderTypeGoogle IdentityProviderType = "google" - IdentityProviderTypeLinkedin IdentityProviderType = "linkedin" - IdentityProviderTypeOIDC IdentityProviderType = "oidc" - IdentityProviderTypeOkta IdentityProviderType = "okta" - IdentityProviderTypeOnelogin IdentityProviderType = "onelogin" - IdentityProviderTypePingone IdentityProviderType = "pingone" - IdentityProviderTypeYandex IdentityProviderType = "yandex" -) - -func (r IdentityProviderType) IsKnown() bool { - switch r { - case IdentityProviderTypeOnetimepin, IdentityProviderTypeAzureAD, IdentityProviderTypeSAML, IdentityProviderTypeCentrify, IdentityProviderTypeFacebook, IdentityProviderTypeGitHub, IdentityProviderTypeGoogleApps, IdentityProviderTypeGoogle, IdentityProviderTypeLinkedin, IdentityProviderTypeOIDC, IdentityProviderTypeOkta, IdentityProviderTypeOnelogin, IdentityProviderTypePingone, IdentityProviderTypeYandex: - return true - } - return false +func (r *IdentityProviderUpdateResponseAccessOnetimepin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -// The configuration settings for enabling a System for Cross-Domain Identity -// Management (SCIM) with the identity provider. -type ScimConfig struct { - // A flag to enable or disable SCIM for the identity provider. - Enabled bool `json:"enabled"` - // A flag to revoke a user's session in Access and force a reauthentication on the - // user's Gateway session when they have been added or removed from a group in the - // Identity Provider. - GroupMemberDeprovision bool `json:"group_member_deprovision"` - // A flag to remove a user's seat in Zero Trust when they have been deprovisioned - // in the Identity Provider. This cannot be enabled unless user_deprovision is also - // enabled. - SeatDeprovision bool `json:"seat_deprovision"` - // A read-only token generated when the SCIM integration is enabled for the first - // time. It is redacted on subsequent requests. If you lose this you will need to - // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - Secret string `json:"secret"` - // A flag to enable revoking a user's session in Access and Gateway when they have - // been deprovisioned in the Identity Provider. - UserDeprovision bool `json:"user_deprovision"` - JSON scimConfigJSON `json:"-"` +func (r identityProviderUpdateResponseAccessOnetimepinJSON) RawJSON() string { + return r.raw } -// scimConfigJSON contains the JSON metadata for the struct [ScimConfig] -type scimConfigJSON struct { - Enabled apijson.Field - GroupMemberDeprovision apijson.Field - SeatDeprovision apijson.Field - Secret apijson.Field - UserDeprovision apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ScimConfig) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r scimConfigJSON) RawJSON() string { - return r.raw -} - -// The configuration settings for enabling a System for Cross-Domain Identity -// Management (SCIM) with the identity provider. -type ScimConfigParam struct { - // A flag to enable or disable SCIM for the identity provider. - Enabled param.Field[bool] `json:"enabled"` - // A flag to revoke a user's session in Access and force a reauthentication on the - // user's Gateway session when they have been added or removed from a group in the - // Identity Provider. - GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` - // A flag to remove a user's seat in Zero Trust when they have been deprovisioned - // in the Identity Provider. This cannot be enabled unless user_deprovision is also - // enabled. - SeatDeprovision param.Field[bool] `json:"seat_deprovision"` - // A read-only token generated when the SCIM integration is enabled for the first - // time. It is redacted on subsequent requests. If you lose this you will need to - // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - Secret param.Field[string] `json:"secret"` - // A flag to enable revoking a user's session in Access and Gateway when they have - // been deprovisioned in the Identity Provider. - UserDeprovision param.Field[bool] `json:"user_deprovision"` -} - -func (r ScimConfigParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +func (r IdentityProviderUpdateResponseAccessOnetimepin) implementsZeroTrustIdentityProviderUpdateResponse() { } type IdentityProviderListResponse struct { @@ -2956,71 +3471,2122 @@ func (r identityProviderDeleteResponseJSON) RawJSON() string { return r.raw } -type IdentityProviderNewParams struct { - IdentityProvider IdentityProviderUnionParam `json:"identity_provider,required"` - // The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. - AccountID param.Field[string] `path:"account_id"` - // The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. - ZoneID param.Field[string] `path:"zone_id"` +type IdentityProviderGetResponse struct { + Config interface{} `json:"config"` + // UUID + ID string `json:"id"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig ScimConfig `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type IdentityProviderType `json:"type,required"` + JSON identityProviderGetResponseJSON `json:"-"` + union IdentityProviderGetResponseUnion } -func (r IdentityProviderNewParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.IdentityProvider) +// identityProviderGetResponseJSON contains the JSON metadata for the struct +// [IdentityProviderGetResponse] +type identityProviderGetResponseJSON struct { + Config apijson.Field + ID apijson.Field + Name apijson.Field + ScimConfig apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field } -type IdentityProviderNewResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success IdentityProviderNewResponseEnvelopeSuccess `json:"success,required"` - Result IdentityProvider `json:"result"` - JSON identityProviderNewResponseEnvelopeJSON `json:"-"` +func (r identityProviderGetResponseJSON) RawJSON() string { + return r.raw } -// identityProviderNewResponseEnvelopeJSON contains the JSON metadata for the -// struct [IdentityProviderNewResponseEnvelope] -type identityProviderNewResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - Result apijson.Field +func (r *IdentityProviderGetResponse) UnmarshalJSON(data []byte) (err error) { + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +func (r IdentityProviderGetResponse) AsUnion() IdentityProviderGetResponseUnion { + return r.union +} + +// Union satisfied by [zero_trust.AzureAD], +// [zero_trust.IdentityProviderGetResponseAccessCentrify], +// [zero_trust.IdentityProviderGetResponseAccessFacebook], +// [zero_trust.IdentityProviderGetResponseAccessGitHub], +// [zero_trust.IdentityProviderGetResponseAccessGoogle], +// [zero_trust.IdentityProviderGetResponseAccessGoogleApps], +// [zero_trust.IdentityProviderGetResponseAccessLinkedin], +// [zero_trust.IdentityProviderGetResponseAccessOIDC], +// [zero_trust.IdentityProviderGetResponseAccessOkta], +// [zero_trust.IdentityProviderGetResponseAccessOnelogin], +// [zero_trust.IdentityProviderGetResponseAccessPingone], +// [zero_trust.IdentityProviderGetResponseAccessSAML], +// [zero_trust.IdentityProviderGetResponseAccessYandex] or +// [zero_trust.IdentityProviderGetResponseAccessOnetimepin]. +type IdentityProviderGetResponseUnion interface { + implementsZeroTrustIdentityProviderGetResponse() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*IdentityProviderGetResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(AzureAD{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(IdentityProviderGetResponseAccessCentrify{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(IdentityProviderGetResponseAccessFacebook{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(IdentityProviderGetResponseAccessGitHub{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(IdentityProviderGetResponseAccessGoogle{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(IdentityProviderGetResponseAccessGoogleApps{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(IdentityProviderGetResponseAccessLinkedin{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(IdentityProviderGetResponseAccessOIDC{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(IdentityProviderGetResponseAccessOkta{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(IdentityProviderGetResponseAccessOnelogin{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(IdentityProviderGetResponseAccessPingone{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(IdentityProviderGetResponseAccessSAML{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(IdentityProviderGetResponseAccessYandex{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(IdentityProviderGetResponseAccessOnetimepin{}), + }, + ) +} + +type IdentityProviderGetResponseAccessCentrify struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config IdentityProviderGetResponseAccessCentrifyConfig `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type IdentityProviderType `json:"type,required"` + // UUID + ID string `json:"id"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderGetResponseAccessCentrifyJSON `json:"-"` +} + +// identityProviderGetResponseAccessCentrifyJSON contains the JSON metadata for the +// struct [IdentityProviderGetResponseAccessCentrify] +type identityProviderGetResponseAccessCentrifyJSON struct { + Config apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + ScimConfig apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *IdentityProviderNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderGetResponseAccessCentrify) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderNewResponseEnvelopeJSON) RawJSON() string { +func (r identityProviderGetResponseAccessCentrifyJSON) RawJSON() string { return r.raw } -// Whether the API call was successful -type IdentityProviderNewResponseEnvelopeSuccess bool +func (r IdentityProviderGetResponseAccessCentrify) implementsZeroTrustIdentityProviderGetResponse() {} -const ( - IdentityProviderNewResponseEnvelopeSuccessTrue IdentityProviderNewResponseEnvelopeSuccess = true -) +// The configuration parameters for the identity provider. To view the required +// parameters for a specific provider, refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type IdentityProviderGetResponseAccessCentrifyConfig struct { + // Your centrify account url + CentrifyAccount string `json:"centrify_account"` + // Your centrify app id + CentrifyAppID string `json:"centrify_app_id"` + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + JSON identityProviderGetResponseAccessCentrifyConfigJSON `json:"-"` +} -func (r IdentityProviderNewResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case IdentityProviderNewResponseEnvelopeSuccessTrue: - return true - } - return false +// identityProviderGetResponseAccessCentrifyConfigJSON contains the JSON metadata +// for the struct [IdentityProviderGetResponseAccessCentrifyConfig] +type identityProviderGetResponseAccessCentrifyConfigJSON struct { + CentrifyAccount apijson.Field + CentrifyAppID apijson.Field + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + raw string + ExtraFields map[string]apijson.Field } -type IdentityProviderUpdateParams struct { - IdentityProvider IdentityProviderUnionParam `json:"identity_provider,required"` - // The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. - AccountID param.Field[string] `path:"account_id"` - // The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. - ZoneID param.Field[string] `path:"zone_id"` +func (r *IdentityProviderGetResponseAccessCentrifyConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -func (r IdentityProviderUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.IdentityProvider) +func (r identityProviderGetResponseAccessCentrifyConfigJSON) RawJSON() string { + return r.raw +} + +type IdentityProviderGetResponseAccessFacebook struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config GenericOAuthConfig `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type IdentityProviderType `json:"type,required"` + // UUID + ID string `json:"id"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderGetResponseAccessFacebookJSON `json:"-"` +} + +// identityProviderGetResponseAccessFacebookJSON contains the JSON metadata for the +// struct [IdentityProviderGetResponseAccessFacebook] +type identityProviderGetResponseAccessFacebookJSON struct { + Config apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + ScimConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderGetResponseAccessFacebook) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderGetResponseAccessFacebookJSON) RawJSON() string { + return r.raw +} + +func (r IdentityProviderGetResponseAccessFacebook) implementsZeroTrustIdentityProviderGetResponse() {} + +type IdentityProviderGetResponseAccessGitHub struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config GenericOAuthConfig `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type IdentityProviderType `json:"type,required"` + // UUID + ID string `json:"id"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderGetResponseAccessGitHubJSON `json:"-"` +} + +// identityProviderGetResponseAccessGitHubJSON contains the JSON metadata for the +// struct [IdentityProviderGetResponseAccessGitHub] +type identityProviderGetResponseAccessGitHubJSON struct { + Config apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + ScimConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderGetResponseAccessGitHub) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderGetResponseAccessGitHubJSON) RawJSON() string { + return r.raw +} + +func (r IdentityProviderGetResponseAccessGitHub) implementsZeroTrustIdentityProviderGetResponse() {} + +type IdentityProviderGetResponseAccessGoogle struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config IdentityProviderGetResponseAccessGoogleConfig `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type IdentityProviderType `json:"type,required"` + // UUID + ID string `json:"id"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderGetResponseAccessGoogleJSON `json:"-"` +} + +// identityProviderGetResponseAccessGoogleJSON contains the JSON metadata for the +// struct [IdentityProviderGetResponseAccessGoogle] +type identityProviderGetResponseAccessGoogleJSON struct { + Config apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + ScimConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderGetResponseAccessGoogle) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderGetResponseAccessGoogleJSON) RawJSON() string { + return r.raw +} + +func (r IdentityProviderGetResponseAccessGoogle) implementsZeroTrustIdentityProviderGetResponse() {} + +// The configuration parameters for the identity provider. To view the required +// parameters for a specific provider, refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type IdentityProviderGetResponseAccessGoogleConfig struct { + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + JSON identityProviderGetResponseAccessGoogleConfigJSON `json:"-"` +} + +// identityProviderGetResponseAccessGoogleConfigJSON contains the JSON metadata for +// the struct [IdentityProviderGetResponseAccessGoogleConfig] +type identityProviderGetResponseAccessGoogleConfigJSON struct { + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderGetResponseAccessGoogleConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderGetResponseAccessGoogleConfigJSON) RawJSON() string { + return r.raw +} + +type IdentityProviderGetResponseAccessGoogleApps struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config IdentityProviderGetResponseAccessGoogleAppsConfig `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type IdentityProviderType `json:"type,required"` + // UUID + ID string `json:"id"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderGetResponseAccessGoogleAppsJSON `json:"-"` +} + +// identityProviderGetResponseAccessGoogleAppsJSON contains the JSON metadata for +// the struct [IdentityProviderGetResponseAccessGoogleApps] +type identityProviderGetResponseAccessGoogleAppsJSON struct { + Config apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + ScimConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderGetResponseAccessGoogleApps) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderGetResponseAccessGoogleAppsJSON) RawJSON() string { + return r.raw +} + +func (r IdentityProviderGetResponseAccessGoogleApps) implementsZeroTrustIdentityProviderGetResponse() { +} + +// The configuration parameters for the identity provider. To view the required +// parameters for a specific provider, refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type IdentityProviderGetResponseAccessGoogleAppsConfig struct { + // Your companies TLD + AppsDomain string `json:"apps_domain"` + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + JSON identityProviderGetResponseAccessGoogleAppsConfigJSON `json:"-"` +} + +// identityProviderGetResponseAccessGoogleAppsConfigJSON contains the JSON metadata +// for the struct [IdentityProviderGetResponseAccessGoogleAppsConfig] +type identityProviderGetResponseAccessGoogleAppsConfigJSON struct { + AppsDomain apijson.Field + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderGetResponseAccessGoogleAppsConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderGetResponseAccessGoogleAppsConfigJSON) RawJSON() string { + return r.raw +} + +type IdentityProviderGetResponseAccessLinkedin struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config GenericOAuthConfig `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type IdentityProviderType `json:"type,required"` + // UUID + ID string `json:"id"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderGetResponseAccessLinkedinJSON `json:"-"` +} + +// identityProviderGetResponseAccessLinkedinJSON contains the JSON metadata for the +// struct [IdentityProviderGetResponseAccessLinkedin] +type identityProviderGetResponseAccessLinkedinJSON struct { + Config apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + ScimConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderGetResponseAccessLinkedin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderGetResponseAccessLinkedinJSON) RawJSON() string { + return r.raw +} + +func (r IdentityProviderGetResponseAccessLinkedin) implementsZeroTrustIdentityProviderGetResponse() {} + +type IdentityProviderGetResponseAccessOIDC struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config IdentityProviderGetResponseAccessOIDCConfig `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type IdentityProviderType `json:"type,required"` + // UUID + ID string `json:"id"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderGetResponseAccessOIDCJSON `json:"-"` +} + +// identityProviderGetResponseAccessOIDCJSON contains the JSON metadata for the +// struct [IdentityProviderGetResponseAccessOIDC] +type identityProviderGetResponseAccessOIDCJSON struct { + Config apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + ScimConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderGetResponseAccessOIDC) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderGetResponseAccessOIDCJSON) RawJSON() string { + return r.raw +} + +func (r IdentityProviderGetResponseAccessOIDC) implementsZeroTrustIdentityProviderGetResponse() {} + +// The configuration parameters for the identity provider. To view the required +// parameters for a specific provider, refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type IdentityProviderGetResponseAccessOIDCConfig struct { + // The authorization_endpoint URL of your IdP + AuthURL string `json:"auth_url"` + // The jwks_uri endpoint of your IdP to allow the IdP keys to sign the tokens + CERTsURL string `json:"certs_url"` + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + // OAuth scopes + Scopes []string `json:"scopes"` + // The token_endpoint URL of your IdP + TokenURL string `json:"token_url"` + JSON identityProviderGetResponseAccessOIDCConfigJSON `json:"-"` +} + +// identityProviderGetResponseAccessOIDCConfigJSON contains the JSON metadata for +// the struct [IdentityProviderGetResponseAccessOIDCConfig] +type identityProviderGetResponseAccessOIDCConfigJSON struct { + AuthURL apijson.Field + CERTsURL apijson.Field + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + Scopes apijson.Field + TokenURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderGetResponseAccessOIDCConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderGetResponseAccessOIDCConfigJSON) RawJSON() string { + return r.raw +} + +type IdentityProviderGetResponseAccessOkta struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config IdentityProviderGetResponseAccessOktaConfig `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type IdentityProviderType `json:"type,required"` + // UUID + ID string `json:"id"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderGetResponseAccessOktaJSON `json:"-"` +} + +// identityProviderGetResponseAccessOktaJSON contains the JSON metadata for the +// struct [IdentityProviderGetResponseAccessOkta] +type identityProviderGetResponseAccessOktaJSON struct { + Config apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + ScimConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderGetResponseAccessOkta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderGetResponseAccessOktaJSON) RawJSON() string { + return r.raw +} + +func (r IdentityProviderGetResponseAccessOkta) implementsZeroTrustIdentityProviderGetResponse() {} + +// The configuration parameters for the identity provider. To view the required +// parameters for a specific provider, refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type IdentityProviderGetResponseAccessOktaConfig struct { + // Your okta authorization server id + AuthorizationServerID string `json:"authorization_server_id"` + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + // Your okta account url + OktaAccount string `json:"okta_account"` + JSON identityProviderGetResponseAccessOktaConfigJSON `json:"-"` +} + +// identityProviderGetResponseAccessOktaConfigJSON contains the JSON metadata for +// the struct [IdentityProviderGetResponseAccessOktaConfig] +type identityProviderGetResponseAccessOktaConfigJSON struct { + AuthorizationServerID apijson.Field + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + OktaAccount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderGetResponseAccessOktaConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderGetResponseAccessOktaConfigJSON) RawJSON() string { + return r.raw +} + +type IdentityProviderGetResponseAccessOnelogin struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config IdentityProviderGetResponseAccessOneloginConfig `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type IdentityProviderType `json:"type,required"` + // UUID + ID string `json:"id"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderGetResponseAccessOneloginJSON `json:"-"` +} + +// identityProviderGetResponseAccessOneloginJSON contains the JSON metadata for the +// struct [IdentityProviderGetResponseAccessOnelogin] +type identityProviderGetResponseAccessOneloginJSON struct { + Config apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + ScimConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderGetResponseAccessOnelogin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderGetResponseAccessOneloginJSON) RawJSON() string { + return r.raw +} + +func (r IdentityProviderGetResponseAccessOnelogin) implementsZeroTrustIdentityProviderGetResponse() {} + +// The configuration parameters for the identity provider. To view the required +// parameters for a specific provider, refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type IdentityProviderGetResponseAccessOneloginConfig struct { + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + // Your OneLogin account url + OneloginAccount string `json:"onelogin_account"` + JSON identityProviderGetResponseAccessOneloginConfigJSON `json:"-"` +} + +// identityProviderGetResponseAccessOneloginConfigJSON contains the JSON metadata +// for the struct [IdentityProviderGetResponseAccessOneloginConfig] +type identityProviderGetResponseAccessOneloginConfigJSON struct { + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + OneloginAccount apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderGetResponseAccessOneloginConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderGetResponseAccessOneloginConfigJSON) RawJSON() string { + return r.raw +} + +type IdentityProviderGetResponseAccessPingone struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config IdentityProviderGetResponseAccessPingoneConfig `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type IdentityProviderType `json:"type,required"` + // UUID + ID string `json:"id"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderGetResponseAccessPingoneJSON `json:"-"` +} + +// identityProviderGetResponseAccessPingoneJSON contains the JSON metadata for the +// struct [IdentityProviderGetResponseAccessPingone] +type identityProviderGetResponseAccessPingoneJSON struct { + Config apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + ScimConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderGetResponseAccessPingone) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderGetResponseAccessPingoneJSON) RawJSON() string { + return r.raw +} + +func (r IdentityProviderGetResponseAccessPingone) implementsZeroTrustIdentityProviderGetResponse() {} + +// The configuration parameters for the identity provider. To view the required +// parameters for a specific provider, refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type IdentityProviderGetResponseAccessPingoneConfig struct { + // Custom claims + Claims []string `json:"claims"` + // Your OAuth Client ID + ClientID string `json:"client_id"` + // Your OAuth Client Secret + ClientSecret string `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName string `json:"email_claim_name"` + // Your PingOne environment identifier + PingEnvID string `json:"ping_env_id"` + JSON identityProviderGetResponseAccessPingoneConfigJSON `json:"-"` +} + +// identityProviderGetResponseAccessPingoneConfigJSON contains the JSON metadata +// for the struct [IdentityProviderGetResponseAccessPingoneConfig] +type identityProviderGetResponseAccessPingoneConfigJSON struct { + Claims apijson.Field + ClientID apijson.Field + ClientSecret apijson.Field + EmailClaimName apijson.Field + PingEnvID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderGetResponseAccessPingoneConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderGetResponseAccessPingoneConfigJSON) RawJSON() string { + return r.raw +} + +type IdentityProviderGetResponseAccessSAML struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config IdentityProviderGetResponseAccessSAMLConfig `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type IdentityProviderType `json:"type,required"` + // UUID + ID string `json:"id"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderGetResponseAccessSAMLJSON `json:"-"` +} + +// identityProviderGetResponseAccessSAMLJSON contains the JSON metadata for the +// struct [IdentityProviderGetResponseAccessSAML] +type identityProviderGetResponseAccessSAMLJSON struct { + Config apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + ScimConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderGetResponseAccessSAML) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderGetResponseAccessSAMLJSON) RawJSON() string { + return r.raw +} + +func (r IdentityProviderGetResponseAccessSAML) implementsZeroTrustIdentityProviderGetResponse() {} + +// The configuration parameters for the identity provider. To view the required +// parameters for a specific provider, refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type IdentityProviderGetResponseAccessSAMLConfig struct { + // A list of SAML attribute names that will be added to your signed JWT token and + // can be used in SAML policy rules. + Attributes []string `json:"attributes"` + // The attribute name for email in the SAML response. + EmailAttributeName string `json:"email_attribute_name"` + // Add a list of attribute names that will be returned in the response header from + // the Access callback. + HeaderAttributes []IdentityProviderGetResponseAccessSAMLConfigHeaderAttribute `json:"header_attributes"` + // X509 certificate to verify the signature in the SAML authentication response + IdPPublicCERTs []string `json:"idp_public_certs"` + // IdP Entity ID or Issuer URL + IssuerURL string `json:"issuer_url"` + // Sign the SAML authentication request with Access credentials. To verify the + // signature, use the public key from the Access certs endpoints. + SignRequest bool `json:"sign_request"` + // URL to send the SAML authentication requests to + SSOTargetURL string `json:"sso_target_url"` + JSON identityProviderGetResponseAccessSAMLConfigJSON `json:"-"` +} + +// identityProviderGetResponseAccessSAMLConfigJSON contains the JSON metadata for +// the struct [IdentityProviderGetResponseAccessSAMLConfig] +type identityProviderGetResponseAccessSAMLConfigJSON struct { + Attributes apijson.Field + EmailAttributeName apijson.Field + HeaderAttributes apijson.Field + IdPPublicCERTs apijson.Field + IssuerURL apijson.Field + SignRequest apijson.Field + SSOTargetURL apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderGetResponseAccessSAMLConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderGetResponseAccessSAMLConfigJSON) RawJSON() string { + return r.raw +} + +type IdentityProviderGetResponseAccessSAMLConfigHeaderAttribute struct { + // attribute name from the IDP + AttributeName string `json:"attribute_name"` + // header that will be added on the request to the origin + HeaderName string `json:"header_name"` + JSON identityProviderGetResponseAccessSAMLConfigHeaderAttributeJSON `json:"-"` +} + +// identityProviderGetResponseAccessSAMLConfigHeaderAttributeJSON contains the JSON +// metadata for the struct +// [IdentityProviderGetResponseAccessSAMLConfigHeaderAttribute] +type identityProviderGetResponseAccessSAMLConfigHeaderAttributeJSON struct { + AttributeName apijson.Field + HeaderName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderGetResponseAccessSAMLConfigHeaderAttribute) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderGetResponseAccessSAMLConfigHeaderAttributeJSON) RawJSON() string { + return r.raw +} + +type IdentityProviderGetResponseAccessYandex struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config GenericOAuthConfig `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type IdentityProviderType `json:"type,required"` + // UUID + ID string `json:"id"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderGetResponseAccessYandexJSON `json:"-"` +} + +// identityProviderGetResponseAccessYandexJSON contains the JSON metadata for the +// struct [IdentityProviderGetResponseAccessYandex] +type identityProviderGetResponseAccessYandexJSON struct { + Config apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + ScimConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderGetResponseAccessYandex) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderGetResponseAccessYandexJSON) RawJSON() string { + return r.raw +} + +func (r IdentityProviderGetResponseAccessYandex) implementsZeroTrustIdentityProviderGetResponse() {} + +type IdentityProviderGetResponseAccessOnetimepin struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config interface{} `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name string `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type IdentityProviderType `json:"type,required"` + // UUID + ID string `json:"id"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderGetResponseAccessOnetimepinJSON `json:"-"` +} + +// identityProviderGetResponseAccessOnetimepinJSON contains the JSON metadata for +// the struct [IdentityProviderGetResponseAccessOnetimepin] +type identityProviderGetResponseAccessOnetimepinJSON struct { + Config apijson.Field + Name apijson.Field + Type apijson.Field + ID apijson.Field + ScimConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderGetResponseAccessOnetimepin) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderGetResponseAccessOnetimepinJSON) RawJSON() string { + return r.raw +} + +func (r IdentityProviderGetResponseAccessOnetimepin) implementsZeroTrustIdentityProviderGetResponse() { +} + +type IdentityProviderNewParams struct { + Body IdentityProviderNewParamsBodyUnion `json:"body,required"` + // The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. + AccountID param.Field[string] `path:"account_id"` + // The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + ZoneID param.Field[string] `path:"zone_id"` +} + +func (r IdentityProviderNewParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r.Body) +} + +type IdentityProviderNewParamsBody struct { + Config param.Field[interface{}] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` +} + +func (r IdentityProviderNewParamsBody) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderNewParamsBody) implementsZeroTrustIdentityProviderNewParamsBodyUnion() {} + +// Satisfied by [zero_trust.AzureADParam], +// [zero_trust.IdentityProviderNewParamsBodyAccessCentrify], +// [zero_trust.IdentityProviderNewParamsBodyAccessFacebook], +// [zero_trust.IdentityProviderNewParamsBodyAccessGitHub], +// [zero_trust.IdentityProviderNewParamsBodyAccessGoogle], +// [zero_trust.IdentityProviderNewParamsBodyAccessGoogleApps], +// [zero_trust.IdentityProviderNewParamsBodyAccessLinkedin], +// [zero_trust.IdentityProviderNewParamsBodyAccessOIDC], +// [zero_trust.IdentityProviderNewParamsBodyAccessOkta], +// [zero_trust.IdentityProviderNewParamsBodyAccessOnelogin], +// [zero_trust.IdentityProviderNewParamsBodyAccessPingone], +// [zero_trust.IdentityProviderNewParamsBodyAccessSAML], +// [zero_trust.IdentityProviderNewParamsBodyAccessYandex], +// [zero_trust.IdentityProviderNewParamsBodyAccessOnetimepin], +// [IdentityProviderNewParamsBody]. +type IdentityProviderNewParamsBodyUnion interface { + implementsZeroTrustIdentityProviderNewParamsBodyUnion() +} + +type IdentityProviderNewParamsBodyAccessCentrify struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config param.Field[IdentityProviderNewParamsBodyAccessCentrifyConfig] `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` +} + +func (r IdentityProviderNewParamsBodyAccessCentrify) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderNewParamsBodyAccessCentrify) implementsZeroTrustIdentityProviderNewParamsBodyUnion() { +} + +// The configuration parameters for the identity provider. To view the required +// parameters for a specific provider, refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type IdentityProviderNewParamsBodyAccessCentrifyConfig struct { + // Your centrify account url + CentrifyAccount param.Field[string] `json:"centrify_account"` + // Your centrify app id + CentrifyAppID param.Field[string] `json:"centrify_app_id"` + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` +} + +func (r IdentityProviderNewParamsBodyAccessCentrifyConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type IdentityProviderNewParamsBodyAccessFacebook struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config param.Field[GenericOAuthConfigParam] `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` +} + +func (r IdentityProviderNewParamsBodyAccessFacebook) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderNewParamsBodyAccessFacebook) implementsZeroTrustIdentityProviderNewParamsBodyUnion() { +} + +type IdentityProviderNewParamsBodyAccessGitHub struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config param.Field[GenericOAuthConfigParam] `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` +} + +func (r IdentityProviderNewParamsBodyAccessGitHub) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderNewParamsBodyAccessGitHub) implementsZeroTrustIdentityProviderNewParamsBodyUnion() { +} + +type IdentityProviderNewParamsBodyAccessGoogle struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config param.Field[IdentityProviderNewParamsBodyAccessGoogleConfig] `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` +} + +func (r IdentityProviderNewParamsBodyAccessGoogle) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderNewParamsBodyAccessGoogle) implementsZeroTrustIdentityProviderNewParamsBodyUnion() { +} + +// The configuration parameters for the identity provider. To view the required +// parameters for a specific provider, refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type IdentityProviderNewParamsBodyAccessGoogleConfig struct { + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` +} + +func (r IdentityProviderNewParamsBodyAccessGoogleConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type IdentityProviderNewParamsBodyAccessGoogleApps struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config param.Field[IdentityProviderNewParamsBodyAccessGoogleAppsConfig] `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` +} + +func (r IdentityProviderNewParamsBodyAccessGoogleApps) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderNewParamsBodyAccessGoogleApps) implementsZeroTrustIdentityProviderNewParamsBodyUnion() { +} + +// The configuration parameters for the identity provider. To view the required +// parameters for a specific provider, refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type IdentityProviderNewParamsBodyAccessGoogleAppsConfig struct { + // Your companies TLD + AppsDomain param.Field[string] `json:"apps_domain"` + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` +} + +func (r IdentityProviderNewParamsBodyAccessGoogleAppsConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type IdentityProviderNewParamsBodyAccessLinkedin struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config param.Field[GenericOAuthConfigParam] `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` +} + +func (r IdentityProviderNewParamsBodyAccessLinkedin) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderNewParamsBodyAccessLinkedin) implementsZeroTrustIdentityProviderNewParamsBodyUnion() { +} + +type IdentityProviderNewParamsBodyAccessOIDC struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config param.Field[IdentityProviderNewParamsBodyAccessOIDCConfig] `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` +} + +func (r IdentityProviderNewParamsBodyAccessOIDC) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderNewParamsBodyAccessOIDC) implementsZeroTrustIdentityProviderNewParamsBodyUnion() { +} + +// The configuration parameters for the identity provider. To view the required +// parameters for a specific provider, refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type IdentityProviderNewParamsBodyAccessOIDCConfig struct { + // The authorization_endpoint URL of your IdP + AuthURL param.Field[string] `json:"auth_url"` + // The jwks_uri endpoint of your IdP to allow the IdP keys to sign the tokens + CERTsURL param.Field[string] `json:"certs_url"` + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` + // OAuth scopes + Scopes param.Field[[]string] `json:"scopes"` + // The token_endpoint URL of your IdP + TokenURL param.Field[string] `json:"token_url"` +} + +func (r IdentityProviderNewParamsBodyAccessOIDCConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type IdentityProviderNewParamsBodyAccessOkta struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config param.Field[IdentityProviderNewParamsBodyAccessOktaConfig] `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` +} + +func (r IdentityProviderNewParamsBodyAccessOkta) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderNewParamsBodyAccessOkta) implementsZeroTrustIdentityProviderNewParamsBodyUnion() { +} + +// The configuration parameters for the identity provider. To view the required +// parameters for a specific provider, refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type IdentityProviderNewParamsBodyAccessOktaConfig struct { + // Your okta authorization server id + AuthorizationServerID param.Field[string] `json:"authorization_server_id"` + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` + // Your okta account url + OktaAccount param.Field[string] `json:"okta_account"` +} + +func (r IdentityProviderNewParamsBodyAccessOktaConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type IdentityProviderNewParamsBodyAccessOnelogin struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config param.Field[IdentityProviderNewParamsBodyAccessOneloginConfig] `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` +} + +func (r IdentityProviderNewParamsBodyAccessOnelogin) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderNewParamsBodyAccessOnelogin) implementsZeroTrustIdentityProviderNewParamsBodyUnion() { +} + +// The configuration parameters for the identity provider. To view the required +// parameters for a specific provider, refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type IdentityProviderNewParamsBodyAccessOneloginConfig struct { + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` + // Your OneLogin account url + OneloginAccount param.Field[string] `json:"onelogin_account"` +} + +func (r IdentityProviderNewParamsBodyAccessOneloginConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type IdentityProviderNewParamsBodyAccessPingone struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config param.Field[IdentityProviderNewParamsBodyAccessPingoneConfig] `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` +} + +func (r IdentityProviderNewParamsBodyAccessPingone) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderNewParamsBodyAccessPingone) implementsZeroTrustIdentityProviderNewParamsBodyUnion() { +} + +// The configuration parameters for the identity provider. To view the required +// parameters for a specific provider, refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type IdentityProviderNewParamsBodyAccessPingoneConfig struct { + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` + // Your PingOne environment identifier + PingEnvID param.Field[string] `json:"ping_env_id"` +} + +func (r IdentityProviderNewParamsBodyAccessPingoneConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type IdentityProviderNewParamsBodyAccessSAML struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config param.Field[IdentityProviderNewParamsBodyAccessSAMLConfig] `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` +} + +func (r IdentityProviderNewParamsBodyAccessSAML) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderNewParamsBodyAccessSAML) implementsZeroTrustIdentityProviderNewParamsBodyUnion() { +} + +// The configuration parameters for the identity provider. To view the required +// parameters for a specific provider, refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type IdentityProviderNewParamsBodyAccessSAMLConfig struct { + // A list of SAML attribute names that will be added to your signed JWT token and + // can be used in SAML policy rules. + Attributes param.Field[[]string] `json:"attributes"` + // The attribute name for email in the SAML response. + EmailAttributeName param.Field[string] `json:"email_attribute_name"` + // Add a list of attribute names that will be returned in the response header from + // the Access callback. + HeaderAttributes param.Field[[]IdentityProviderNewParamsBodyAccessSAMLConfigHeaderAttribute] `json:"header_attributes"` + // X509 certificate to verify the signature in the SAML authentication response + IdPPublicCERTs param.Field[[]string] `json:"idp_public_certs"` + // IdP Entity ID or Issuer URL + IssuerURL param.Field[string] `json:"issuer_url"` + // Sign the SAML authentication request with Access credentials. To verify the + // signature, use the public key from the Access certs endpoints. + SignRequest param.Field[bool] `json:"sign_request"` + // URL to send the SAML authentication requests to + SSOTargetURL param.Field[string] `json:"sso_target_url"` +} + +func (r IdentityProviderNewParamsBodyAccessSAMLConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type IdentityProviderNewParamsBodyAccessSAMLConfigHeaderAttribute struct { + // attribute name from the IDP + AttributeName param.Field[string] `json:"attribute_name"` + // header that will be added on the request to the origin + HeaderName param.Field[string] `json:"header_name"` +} + +func (r IdentityProviderNewParamsBodyAccessSAMLConfigHeaderAttribute) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type IdentityProviderNewParamsBodyAccessYandex struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config param.Field[GenericOAuthConfigParam] `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` +} + +func (r IdentityProviderNewParamsBodyAccessYandex) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderNewParamsBodyAccessYandex) implementsZeroTrustIdentityProviderNewParamsBodyUnion() { +} + +type IdentityProviderNewParamsBodyAccessOnetimepin struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config param.Field[interface{}] `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` +} + +func (r IdentityProviderNewParamsBodyAccessOnetimepin) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderNewParamsBodyAccessOnetimepin) implementsZeroTrustIdentityProviderNewParamsBodyUnion() { +} + +type IdentityProviderNewResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success IdentityProviderNewResponseEnvelopeSuccess `json:"success,required"` + Result IdentityProviderNewResponse `json:"result"` + JSON identityProviderNewResponseEnvelopeJSON `json:"-"` +} + +// identityProviderNewResponseEnvelopeJSON contains the JSON metadata for the +// struct [IdentityProviderNewResponseEnvelope] +type identityProviderNewResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *IdentityProviderNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r identityProviderNewResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type IdentityProviderNewResponseEnvelopeSuccess bool + +const ( + IdentityProviderNewResponseEnvelopeSuccessTrue IdentityProviderNewResponseEnvelopeSuccess = true +) + +func (r IdentityProviderNewResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case IdentityProviderNewResponseEnvelopeSuccessTrue: + return true + } + return false +} + +type IdentityProviderUpdateParams struct { + Body IdentityProviderUpdateParamsBodyUnion `json:"body,required"` + // The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. + AccountID param.Field[string] `path:"account_id"` + // The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + ZoneID param.Field[string] `path:"zone_id"` +} + +func (r IdentityProviderUpdateParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r.Body) +} + +type IdentityProviderUpdateParamsBody struct { + Config param.Field[interface{}] `json:"config"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` +} + +func (r IdentityProviderUpdateParamsBody) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderUpdateParamsBody) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { +} + +// Satisfied by [zero_trust.AzureADParam], +// [zero_trust.IdentityProviderUpdateParamsBodyAccessCentrify], +// [zero_trust.IdentityProviderUpdateParamsBodyAccessFacebook], +// [zero_trust.IdentityProviderUpdateParamsBodyAccessGitHub], +// [zero_trust.IdentityProviderUpdateParamsBodyAccessGoogle], +// [zero_trust.IdentityProviderUpdateParamsBodyAccessGoogleApps], +// [zero_trust.IdentityProviderUpdateParamsBodyAccessLinkedin], +// [zero_trust.IdentityProviderUpdateParamsBodyAccessOIDC], +// [zero_trust.IdentityProviderUpdateParamsBodyAccessOkta], +// [zero_trust.IdentityProviderUpdateParamsBodyAccessOnelogin], +// [zero_trust.IdentityProviderUpdateParamsBodyAccessPingone], +// [zero_trust.IdentityProviderUpdateParamsBodyAccessSAML], +// [zero_trust.IdentityProviderUpdateParamsBodyAccessYandex], +// [zero_trust.IdentityProviderUpdateParamsBodyAccessOnetimepin], +// [IdentityProviderUpdateParamsBody]. +type IdentityProviderUpdateParamsBodyUnion interface { + implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() +} + +type IdentityProviderUpdateParamsBodyAccessCentrify struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config param.Field[IdentityProviderUpdateParamsBodyAccessCentrifyConfig] `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` +} + +func (r IdentityProviderUpdateParamsBodyAccessCentrify) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderUpdateParamsBodyAccessCentrify) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { +} + +// The configuration parameters for the identity provider. To view the required +// parameters for a specific provider, refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type IdentityProviderUpdateParamsBodyAccessCentrifyConfig struct { + // Your centrify account url + CentrifyAccount param.Field[string] `json:"centrify_account"` + // Your centrify app id + CentrifyAppID param.Field[string] `json:"centrify_app_id"` + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` +} + +func (r IdentityProviderUpdateParamsBodyAccessCentrifyConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type IdentityProviderUpdateParamsBodyAccessFacebook struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config param.Field[GenericOAuthConfigParam] `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` +} + +func (r IdentityProviderUpdateParamsBodyAccessFacebook) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderUpdateParamsBodyAccessFacebook) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { +} + +type IdentityProviderUpdateParamsBodyAccessGitHub struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config param.Field[GenericOAuthConfigParam] `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` +} + +func (r IdentityProviderUpdateParamsBodyAccessGitHub) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderUpdateParamsBodyAccessGitHub) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { +} + +type IdentityProviderUpdateParamsBodyAccessGoogle struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config param.Field[IdentityProviderUpdateParamsBodyAccessGoogleConfig] `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` +} + +func (r IdentityProviderUpdateParamsBodyAccessGoogle) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderUpdateParamsBodyAccessGoogle) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { +} + +// The configuration parameters for the identity provider. To view the required +// parameters for a specific provider, refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type IdentityProviderUpdateParamsBodyAccessGoogleConfig struct { + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` +} + +func (r IdentityProviderUpdateParamsBodyAccessGoogleConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type IdentityProviderUpdateParamsBodyAccessGoogleApps struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config param.Field[IdentityProviderUpdateParamsBodyAccessGoogleAppsConfig] `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` +} + +func (r IdentityProviderUpdateParamsBodyAccessGoogleApps) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderUpdateParamsBodyAccessGoogleApps) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { +} + +// The configuration parameters for the identity provider. To view the required +// parameters for a specific provider, refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type IdentityProviderUpdateParamsBodyAccessGoogleAppsConfig struct { + // Your companies TLD + AppsDomain param.Field[string] `json:"apps_domain"` + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` +} + +func (r IdentityProviderUpdateParamsBodyAccessGoogleAppsConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type IdentityProviderUpdateParamsBodyAccessLinkedin struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config param.Field[GenericOAuthConfigParam] `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` +} + +func (r IdentityProviderUpdateParamsBodyAccessLinkedin) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderUpdateParamsBodyAccessLinkedin) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { +} + +type IdentityProviderUpdateParamsBodyAccessOIDC struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config param.Field[IdentityProviderUpdateParamsBodyAccessOIDCConfig] `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` +} + +func (r IdentityProviderUpdateParamsBodyAccessOIDC) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderUpdateParamsBodyAccessOIDC) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { +} + +// The configuration parameters for the identity provider. To view the required +// parameters for a specific provider, refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type IdentityProviderUpdateParamsBodyAccessOIDCConfig struct { + // The authorization_endpoint URL of your IdP + AuthURL param.Field[string] `json:"auth_url"` + // The jwks_uri endpoint of your IdP to allow the IdP keys to sign the tokens + CERTsURL param.Field[string] `json:"certs_url"` + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` + // OAuth scopes + Scopes param.Field[[]string] `json:"scopes"` + // The token_endpoint URL of your IdP + TokenURL param.Field[string] `json:"token_url"` +} + +func (r IdentityProviderUpdateParamsBodyAccessOIDCConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type IdentityProviderUpdateParamsBodyAccessOkta struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config param.Field[IdentityProviderUpdateParamsBodyAccessOktaConfig] `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` +} + +func (r IdentityProviderUpdateParamsBodyAccessOkta) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderUpdateParamsBodyAccessOkta) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { +} + +// The configuration parameters for the identity provider. To view the required +// parameters for a specific provider, refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type IdentityProviderUpdateParamsBodyAccessOktaConfig struct { + // Your okta authorization server id + AuthorizationServerID param.Field[string] `json:"authorization_server_id"` + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` + // Your okta account url + OktaAccount param.Field[string] `json:"okta_account"` +} + +func (r IdentityProviderUpdateParamsBodyAccessOktaConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type IdentityProviderUpdateParamsBodyAccessOnelogin struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config param.Field[IdentityProviderUpdateParamsBodyAccessOneloginConfig] `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` +} + +func (r IdentityProviderUpdateParamsBodyAccessOnelogin) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderUpdateParamsBodyAccessOnelogin) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { +} + +// The configuration parameters for the identity provider. To view the required +// parameters for a specific provider, refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type IdentityProviderUpdateParamsBodyAccessOneloginConfig struct { + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` + // Your OneLogin account url + OneloginAccount param.Field[string] `json:"onelogin_account"` +} + +func (r IdentityProviderUpdateParamsBodyAccessOneloginConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type IdentityProviderUpdateParamsBodyAccessPingone struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config param.Field[IdentityProviderUpdateParamsBodyAccessPingoneConfig] `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` +} + +func (r IdentityProviderUpdateParamsBodyAccessPingone) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderUpdateParamsBodyAccessPingone) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { +} + +// The configuration parameters for the identity provider. To view the required +// parameters for a specific provider, refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type IdentityProviderUpdateParamsBodyAccessPingoneConfig struct { + // Custom claims + Claims param.Field[[]string] `json:"claims"` + // Your OAuth Client ID + ClientID param.Field[string] `json:"client_id"` + // Your OAuth Client Secret + ClientSecret param.Field[string] `json:"client_secret"` + // The claim name for email in the id_token response. + EmailClaimName param.Field[string] `json:"email_claim_name"` + // Your PingOne environment identifier + PingEnvID param.Field[string] `json:"ping_env_id"` +} + +func (r IdentityProviderUpdateParamsBodyAccessPingoneConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type IdentityProviderUpdateParamsBodyAccessSAML struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config param.Field[IdentityProviderUpdateParamsBodyAccessSAMLConfig] `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` +} + +func (r IdentityProviderUpdateParamsBodyAccessSAML) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderUpdateParamsBodyAccessSAML) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { +} + +// The configuration parameters for the identity provider. To view the required +// parameters for a specific provider, refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type IdentityProviderUpdateParamsBodyAccessSAMLConfig struct { + // A list of SAML attribute names that will be added to your signed JWT token and + // can be used in SAML policy rules. + Attributes param.Field[[]string] `json:"attributes"` + // The attribute name for email in the SAML response. + EmailAttributeName param.Field[string] `json:"email_attribute_name"` + // Add a list of attribute names that will be returned in the response header from + // the Access callback. + HeaderAttributes param.Field[[]IdentityProviderUpdateParamsBodyAccessSAMLConfigHeaderAttribute] `json:"header_attributes"` + // X509 certificate to verify the signature in the SAML authentication response + IdPPublicCERTs param.Field[[]string] `json:"idp_public_certs"` + // IdP Entity ID or Issuer URL + IssuerURL param.Field[string] `json:"issuer_url"` + // Sign the SAML authentication request with Access credentials. To verify the + // signature, use the public key from the Access certs endpoints. + SignRequest param.Field[bool] `json:"sign_request"` + // URL to send the SAML authentication requests to + SSOTargetURL param.Field[string] `json:"sso_target_url"` +} + +func (r IdentityProviderUpdateParamsBodyAccessSAMLConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type IdentityProviderUpdateParamsBodyAccessSAMLConfigHeaderAttribute struct { + // attribute name from the IDP + AttributeName param.Field[string] `json:"attribute_name"` + // header that will be added on the request to the origin + HeaderName param.Field[string] `json:"header_name"` +} + +func (r IdentityProviderUpdateParamsBodyAccessSAMLConfigHeaderAttribute) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type IdentityProviderUpdateParamsBodyAccessYandex struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config param.Field[GenericOAuthConfigParam] `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` +} + +func (r IdentityProviderUpdateParamsBodyAccessYandex) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderUpdateParamsBodyAccessYandex) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { +} + +type IdentityProviderUpdateParamsBodyAccessOnetimepin struct { + // The configuration parameters for the identity provider. To view the required + // parameters for a specific provider, refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Config param.Field[interface{}] `json:"config,required"` + // The name of the identity provider, shown to users on the login page. + Name param.Field[string] `json:"name,required"` + // The type of identity provider. To determine the value for a specific provider, + // refer to our + // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). + Type param.Field[IdentityProviderType] `json:"type,required"` + // The configuration settings for enabling a System for Cross-Domain Identity + // Management (SCIM) with the identity provider. + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` +} + +func (r IdentityProviderUpdateParamsBodyAccessOnetimepin) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r IdentityProviderUpdateParamsBodyAccessOnetimepin) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { } type IdentityProviderUpdateResponseEnvelope struct { @@ -3028,7 +5594,7 @@ type IdentityProviderUpdateResponseEnvelope struct { Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success IdentityProviderUpdateResponseEnvelopeSuccess `json:"success,required"` - Result IdentityProvider `json:"result"` + Result IdentityProviderUpdateResponse `json:"result"` JSON identityProviderUpdateResponseEnvelopeJSON `json:"-"` } @@ -3135,7 +5701,7 @@ type IdentityProviderGetResponseEnvelope struct { Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success IdentityProviderGetResponseEnvelopeSuccess `json:"success,required"` - Result IdentityProvider `json:"result"` + Result IdentityProviderGetResponse `json:"result"` JSON identityProviderGetResponseEnvelopeJSON `json:"-"` } diff --git a/zero_trust/identityprovider_test.go b/zero_trust/identityprovider_test.go index d2ac722814..527a6d5cc6 100644 --- a/zero_trust/identityprovider_test.go +++ b/zero_trust/identityprovider_test.go @@ -29,7 +29,7 @@ func TestIdentityProviderNewWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.IdentityProviders.New(context.TODO(), zero_trust.IdentityProviderNewParams{ - IdentityProvider: zero_trust.AzureADParam{ + Body: zero_trust.AzureADParam{ Config: cloudflare.F(zero_trust.AzureADConfigParam{ ClientID: cloudflare.F(""), ClientSecret: cloudflare.F(""), @@ -80,7 +80,7 @@ func TestIdentityProviderUpdateWithOptionalParams(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.IdentityProviderUpdateParams{ - IdentityProvider: zero_trust.AzureADParam{ + Body: zero_trust.AzureADParam{ Config: cloudflare.F(zero_trust.AzureADConfigParam{ ClientID: cloudflare.F(""), ClientSecret: cloudflare.F(""), From 3789b4c159b264b859e37a1559bb8d948b929d4c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 05:28:24 +0000 Subject: [PATCH 124/127] feat(api): update via SDK Studio (#1973) --- api.md | 11 +- snippets/snippet_test.go | 1 + zero_trust/identityprovider.go | 3738 +++++---------------------- zero_trust/identityprovider_test.go | 4 +- 4 files changed, 594 insertions(+), 3160 deletions(-) diff --git a/api.md b/api.md index 8055f0dd8b..f48ecb7c97 100644 --- a/api.md +++ b/api.md @@ -4617,6 +4617,7 @@ Params Types: - zero_trust.AzureADParam - zero_trust.GenericOAuthConfigParam +- zero_trust.IdentityProviderUnionParam - zero_trust.IdentityProviderType - zero_trust.ScimConfigParam @@ -4624,21 +4625,19 @@ Response Types: - zero_trust.AzureAD - zero_trust.GenericOAuthConfig +- zero_trust.IdentityProvider - zero_trust.IdentityProviderType - zero_trust.ScimConfig -- zero_trust.IdentityProviderNewResponse -- zero_trust.IdentityProviderUpdateResponse - zero_trust.IdentityProviderListResponse - zero_trust.IdentityProviderDeleteResponse -- zero_trust.IdentityProviderGetResponse Methods: -- client.ZeroTrust.IdentityProviders.New(ctx context.Context, params zero_trust.IdentityProviderNewParams) (zero_trust.IdentityProviderNewResponse, error) -- client.ZeroTrust.IdentityProviders.Update(ctx context.Context, uuid string, params zero_trust.IdentityProviderUpdateParams) (zero_trust.IdentityProviderUpdateResponse, error) +- client.ZeroTrust.IdentityProviders.New(ctx context.Context, params zero_trust.IdentityProviderNewParams) (zero_trust.IdentityProvider, error) +- client.ZeroTrust.IdentityProviders.Update(ctx context.Context, uuid string, params zero_trust.IdentityProviderUpdateParams) (zero_trust.IdentityProvider, error) - client.ZeroTrust.IdentityProviders.List(ctx context.Context, query zero_trust.IdentityProviderListParams) (pagination.SinglePage[zero_trust.IdentityProviderListResponse], error) - client.ZeroTrust.IdentityProviders.Delete(ctx context.Context, uuid string, body zero_trust.IdentityProviderDeleteParams) (zero_trust.IdentityProviderDeleteResponse, error) -- client.ZeroTrust.IdentityProviders.Get(ctx context.Context, uuid string, query zero_trust.IdentityProviderGetParams) (zero_trust.IdentityProviderGetResponse, error) +- client.ZeroTrust.IdentityProviders.Get(ctx context.Context, uuid string, query zero_trust.IdentityProviderGetParams) (zero_trust.IdentityProvider, error) ## Organizations diff --git a/snippets/snippet_test.go b/snippets/snippet_test.go index 568d017b55..25dd01fcfa 100644 --- a/snippets/snippet_test.go +++ b/snippets/snippet_test.go @@ -15,6 +15,7 @@ import ( ) func TestSnippetUpdateWithOptionalParams(t *testing.T) { + t.Skip("throwing HTTP 415") baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL diff --git a/zero_trust/identityprovider.go b/zero_trust/identityprovider.go index 0eb7dfd968..d4f4aaaa9e 100644 --- a/zero_trust/identityprovider.go +++ b/zero_trust/identityprovider.go @@ -36,7 +36,7 @@ func NewIdentityProviderService(opts ...option.RequestOption) (r *IdentityProvid } // Adds a new identity provider to Access. -func (r *IdentityProviderService) New(ctx context.Context, params IdentityProviderNewParams, opts ...option.RequestOption) (res *IdentityProviderNewResponse, err error) { +func (r *IdentityProviderService) New(ctx context.Context, params IdentityProviderNewParams, opts ...option.RequestOption) (res *IdentityProvider, err error) { opts = append(r.Options[:], opts...) var env IdentityProviderNewResponseEnvelope var accountOrZone string @@ -58,7 +58,7 @@ func (r *IdentityProviderService) New(ctx context.Context, params IdentityProvid } // Updates a configured identity provider. -func (r *IdentityProviderService) Update(ctx context.Context, uuid string, params IdentityProviderUpdateParams, opts ...option.RequestOption) (res *IdentityProviderUpdateResponse, err error) { +func (r *IdentityProviderService) Update(ctx context.Context, uuid string, params IdentityProviderUpdateParams, opts ...option.RequestOption) (res *IdentityProvider, err error) { opts = append(r.Options[:], opts...) var env IdentityProviderUpdateResponseEnvelope var accountOrZone string @@ -134,7 +134,7 @@ func (r *IdentityProviderService) Delete(ctx context.Context, uuid string, body } // Fetches a configured identity provider. -func (r *IdentityProviderService) Get(ctx context.Context, uuid string, query IdentityProviderGetParams, opts ...option.RequestOption) (res *IdentityProviderGetResponse, err error) { +func (r *IdentityProviderService) Get(ctx context.Context, uuid string, query IdentityProviderGetParams, opts ...option.RequestOption) (res *IdentityProvider, err error) { opts = append(r.Options[:], opts...) var env IdentityProviderGetResponseEnvelope var accountOrZone string @@ -193,14 +193,10 @@ func (r azureADJSON) RawJSON() string { return r.raw } -func (r AzureAD) implementsZeroTrustIdentityProviderNewResponse() {} - -func (r AzureAD) implementsZeroTrustIdentityProviderUpdateResponse() {} +func (r AzureAD) implementsZeroTrustIdentityProvider() {} func (r AzureAD) implementsZeroTrustIdentityProviderListResponse() {} -func (r AzureAD) implementsZeroTrustIdentityProviderGetResponse() {} - // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). @@ -297,9 +293,7 @@ func (r AzureADParam) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -func (r AzureADParam) implementsZeroTrustIdentityProviderNewParamsBodyUnion() {} - -func (r AzureADParam) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() {} +func (r AzureADParam) implementsZeroTrustIdentityProviderUnionParam() {} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our @@ -370,105 +364,7 @@ func (r GenericOAuthConfigParam) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -// The type of identity provider. To determine the value for a specific provider, -// refer to our -// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderType string - -const ( - IdentityProviderTypeOnetimepin IdentityProviderType = "onetimepin" - IdentityProviderTypeAzureAD IdentityProviderType = "azureAD" - IdentityProviderTypeSAML IdentityProviderType = "saml" - IdentityProviderTypeCentrify IdentityProviderType = "centrify" - IdentityProviderTypeFacebook IdentityProviderType = "facebook" - IdentityProviderTypeGitHub IdentityProviderType = "github" - IdentityProviderTypeGoogleApps IdentityProviderType = "google-apps" - IdentityProviderTypeGoogle IdentityProviderType = "google" - IdentityProviderTypeLinkedin IdentityProviderType = "linkedin" - IdentityProviderTypeOIDC IdentityProviderType = "oidc" - IdentityProviderTypeOkta IdentityProviderType = "okta" - IdentityProviderTypeOnelogin IdentityProviderType = "onelogin" - IdentityProviderTypePingone IdentityProviderType = "pingone" - IdentityProviderTypeYandex IdentityProviderType = "yandex" -) - -func (r IdentityProviderType) IsKnown() bool { - switch r { - case IdentityProviderTypeOnetimepin, IdentityProviderTypeAzureAD, IdentityProviderTypeSAML, IdentityProviderTypeCentrify, IdentityProviderTypeFacebook, IdentityProviderTypeGitHub, IdentityProviderTypeGoogleApps, IdentityProviderTypeGoogle, IdentityProviderTypeLinkedin, IdentityProviderTypeOIDC, IdentityProviderTypeOkta, IdentityProviderTypeOnelogin, IdentityProviderTypePingone, IdentityProviderTypeYandex: - return true - } - return false -} - -// The configuration settings for enabling a System for Cross-Domain Identity -// Management (SCIM) with the identity provider. -type ScimConfig struct { - // A flag to enable or disable SCIM for the identity provider. - Enabled bool `json:"enabled"` - // A flag to revoke a user's session in Access and force a reauthentication on the - // user's Gateway session when they have been added or removed from a group in the - // Identity Provider. - GroupMemberDeprovision bool `json:"group_member_deprovision"` - // A flag to remove a user's seat in Zero Trust when they have been deprovisioned - // in the Identity Provider. This cannot be enabled unless user_deprovision is also - // enabled. - SeatDeprovision bool `json:"seat_deprovision"` - // A read-only token generated when the SCIM integration is enabled for the first - // time. It is redacted on subsequent requests. If you lose this you will need to - // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - Secret string `json:"secret"` - // A flag to enable revoking a user's session in Access and Gateway when they have - // been deprovisioned in the Identity Provider. - UserDeprovision bool `json:"user_deprovision"` - JSON scimConfigJSON `json:"-"` -} - -// scimConfigJSON contains the JSON metadata for the struct [ScimConfig] -type scimConfigJSON struct { - Enabled apijson.Field - GroupMemberDeprovision apijson.Field - SeatDeprovision apijson.Field - Secret apijson.Field - UserDeprovision apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ScimConfig) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r scimConfigJSON) RawJSON() string { - return r.raw -} - -// The configuration settings for enabling a System for Cross-Domain Identity -// Management (SCIM) with the identity provider. -type ScimConfigParam struct { - // A flag to enable or disable SCIM for the identity provider. - Enabled param.Field[bool] `json:"enabled"` - // A flag to revoke a user's session in Access and force a reauthentication on the - // user's Gateway session when they have been added or removed from a group in the - // Identity Provider. - GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` - // A flag to remove a user's seat in Zero Trust when they have been deprovisioned - // in the Identity Provider. This cannot be enabled unless user_deprovision is also - // enabled. - SeatDeprovision param.Field[bool] `json:"seat_deprovision"` - // A read-only token generated when the SCIM integration is enabled for the first - // time. It is redacted on subsequent requests. If you lose this you will need to - // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. - Secret param.Field[string] `json:"secret"` - // A flag to enable revoking a user's session in Access and Gateway when they have - // been deprovisioned in the Identity Provider. - UserDeprovision param.Field[bool] `json:"user_deprovision"` -} - -func (r ScimConfigParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type IdentityProviderNewResponse struct { +type IdentityProvider struct { Config interface{} `json:"config"` // UUID ID string `json:"id"` @@ -480,14 +376,14 @@ type IdentityProviderNewResponse struct { // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - JSON identityProviderNewResponseJSON `json:"-"` - union IdentityProviderNewResponseUnion + Type IdentityProviderType `json:"type,required"` + JSON identityProviderJSON `json:"-"` + union IdentityProviderUnion } -// identityProviderNewResponseJSON contains the JSON metadata for the struct -// [IdentityProviderNewResponse] -type identityProviderNewResponseJSON struct { +// identityProviderJSON contains the JSON metadata for the struct +// [IdentityProvider] +type identityProviderJSON struct { Config apijson.Field ID apijson.Field Name apijson.Field @@ -497,11 +393,11 @@ type identityProviderNewResponseJSON struct { ExtraFields map[string]apijson.Field } -func (r identityProviderNewResponseJSON) RawJSON() string { +func (r identityProviderJSON) RawJSON() string { return r.raw } -func (r *IdentityProviderNewResponse) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProvider) UnmarshalJSON(data []byte) (err error) { err = apijson.UnmarshalRoot(data, &r.union) if err != nil { return err @@ -509,31 +405,31 @@ func (r *IdentityProviderNewResponse) UnmarshalJSON(data []byte) (err error) { return apijson.Port(r.union, &r) } -func (r IdentityProviderNewResponse) AsUnion() IdentityProviderNewResponseUnion { +func (r IdentityProvider) AsUnion() IdentityProviderUnion { return r.union } // Union satisfied by [zero_trust.AzureAD], -// [zero_trust.IdentityProviderNewResponseAccessCentrify], -// [zero_trust.IdentityProviderNewResponseAccessFacebook], -// [zero_trust.IdentityProviderNewResponseAccessGitHub], -// [zero_trust.IdentityProviderNewResponseAccessGoogle], -// [zero_trust.IdentityProviderNewResponseAccessGoogleApps], -// [zero_trust.IdentityProviderNewResponseAccessLinkedin], -// [zero_trust.IdentityProviderNewResponseAccessOIDC], -// [zero_trust.IdentityProviderNewResponseAccessOkta], -// [zero_trust.IdentityProviderNewResponseAccessOnelogin], -// [zero_trust.IdentityProviderNewResponseAccessPingone], -// [zero_trust.IdentityProviderNewResponseAccessSAML], -// [zero_trust.IdentityProviderNewResponseAccessYandex] or -// [zero_trust.IdentityProviderNewResponseAccessOnetimepin]. -type IdentityProviderNewResponseUnion interface { - implementsZeroTrustIdentityProviderNewResponse() +// [zero_trust.IdentityProviderAccessCentrify], +// [zero_trust.IdentityProviderAccessFacebook], +// [zero_trust.IdentityProviderAccessGitHub], +// [zero_trust.IdentityProviderAccessGoogle], +// [zero_trust.IdentityProviderAccessGoogleApps], +// [zero_trust.IdentityProviderAccessLinkedin], +// [zero_trust.IdentityProviderAccessOIDC], +// [zero_trust.IdentityProviderAccessOkta], +// [zero_trust.IdentityProviderAccessOnelogin], +// [zero_trust.IdentityProviderAccessPingone], +// [zero_trust.IdentityProviderAccessSAML], +// [zero_trust.IdentityProviderAccessYandex] or +// [zero_trust.IdentityProviderAccessOnetimepin]. +type IdentityProviderUnion interface { + implementsZeroTrustIdentityProvider() } func init() { apijson.RegisterUnion( - reflect.TypeOf((*IdentityProviderNewResponseUnion)(nil)).Elem(), + reflect.TypeOf((*IdentityProviderUnion)(nil)).Elem(), "", apijson.UnionVariant{ TypeFilter: gjson.JSON, @@ -541,64 +437,64 @@ func init() { }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderNewResponseAccessCentrify{}), + Type: reflect.TypeOf(IdentityProviderAccessCentrify{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderNewResponseAccessFacebook{}), + Type: reflect.TypeOf(IdentityProviderAccessFacebook{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderNewResponseAccessGitHub{}), + Type: reflect.TypeOf(IdentityProviderAccessGitHub{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderNewResponseAccessGoogle{}), + Type: reflect.TypeOf(IdentityProviderAccessGoogle{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderNewResponseAccessGoogleApps{}), + Type: reflect.TypeOf(IdentityProviderAccessGoogleApps{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderNewResponseAccessLinkedin{}), + Type: reflect.TypeOf(IdentityProviderAccessLinkedin{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderNewResponseAccessOIDC{}), + Type: reflect.TypeOf(IdentityProviderAccessOIDC{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderNewResponseAccessOkta{}), + Type: reflect.TypeOf(IdentityProviderAccessOkta{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderNewResponseAccessOnelogin{}), + Type: reflect.TypeOf(IdentityProviderAccessOnelogin{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderNewResponseAccessPingone{}), + Type: reflect.TypeOf(IdentityProviderAccessPingone{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderNewResponseAccessSAML{}), + Type: reflect.TypeOf(IdentityProviderAccessSAML{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderNewResponseAccessYandex{}), + Type: reflect.TypeOf(IdentityProviderAccessYandex{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderNewResponseAccessOnetimepin{}), + Type: reflect.TypeOf(IdentityProviderAccessOnetimepin{}), }, ) } -type IdentityProviderNewResponseAccessCentrify struct { +type IdentityProviderAccessCentrify struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderNewResponseAccessCentrifyConfig `json:"config,required"` + Config IdentityProviderAccessCentrifyConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, @@ -609,13 +505,13 @@ type IdentityProviderNewResponseAccessCentrify struct { ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderNewResponseAccessCentrifyJSON `json:"-"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderAccessCentrifyJSON `json:"-"` } -// identityProviderNewResponseAccessCentrifyJSON contains the JSON metadata for the -// struct [IdentityProviderNewResponseAccessCentrify] -type identityProviderNewResponseAccessCentrifyJSON struct { +// identityProviderAccessCentrifyJSON contains the JSON metadata for the struct +// [IdentityProviderAccessCentrify] +type identityProviderAccessCentrifyJSON struct { Config apijson.Field Name apijson.Field Type apijson.Field @@ -625,20 +521,20 @@ type identityProviderNewResponseAccessCentrifyJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderNewResponseAccessCentrify) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderAccessCentrify) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderNewResponseAccessCentrifyJSON) RawJSON() string { +func (r identityProviderAccessCentrifyJSON) RawJSON() string { return r.raw } -func (r IdentityProviderNewResponseAccessCentrify) implementsZeroTrustIdentityProviderNewResponse() {} +func (r IdentityProviderAccessCentrify) implementsZeroTrustIdentityProvider() {} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderNewResponseAccessCentrifyConfig struct { +type IdentityProviderAccessCentrifyConfig struct { // Your centrify account url CentrifyAccount string `json:"centrify_account"` // Your centrify app id @@ -650,13 +546,13 @@ type IdentityProviderNewResponseAccessCentrifyConfig struct { // Your OAuth Client Secret ClientSecret string `json:"client_secret"` // The claim name for email in the id_token response. - EmailClaimName string `json:"email_claim_name"` - JSON identityProviderNewResponseAccessCentrifyConfigJSON `json:"-"` + EmailClaimName string `json:"email_claim_name"` + JSON identityProviderAccessCentrifyConfigJSON `json:"-"` } -// identityProviderNewResponseAccessCentrifyConfigJSON contains the JSON metadata -// for the struct [IdentityProviderNewResponseAccessCentrifyConfig] -type identityProviderNewResponseAccessCentrifyConfigJSON struct { +// identityProviderAccessCentrifyConfigJSON contains the JSON metadata for the +// struct [IdentityProviderAccessCentrifyConfig] +type identityProviderAccessCentrifyConfigJSON struct { CentrifyAccount apijson.Field CentrifyAppID apijson.Field Claims apijson.Field @@ -667,15 +563,15 @@ type identityProviderNewResponseAccessCentrifyConfigJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderNewResponseAccessCentrifyConfig) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderAccessCentrifyConfig) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderNewResponseAccessCentrifyConfigJSON) RawJSON() string { +func (r identityProviderAccessCentrifyConfigJSON) RawJSON() string { return r.raw } -type IdentityProviderNewResponseAccessFacebook struct { +type IdentityProviderAccessFacebook struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). @@ -690,13 +586,13 @@ type IdentityProviderNewResponseAccessFacebook struct { ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderNewResponseAccessFacebookJSON `json:"-"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderAccessFacebookJSON `json:"-"` } -// identityProviderNewResponseAccessFacebookJSON contains the JSON metadata for the -// struct [IdentityProviderNewResponseAccessFacebook] -type identityProviderNewResponseAccessFacebookJSON struct { +// identityProviderAccessFacebookJSON contains the JSON metadata for the struct +// [IdentityProviderAccessFacebook] +type identityProviderAccessFacebookJSON struct { Config apijson.Field Name apijson.Field Type apijson.Field @@ -706,17 +602,17 @@ type identityProviderNewResponseAccessFacebookJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderNewResponseAccessFacebook) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderAccessFacebook) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderNewResponseAccessFacebookJSON) RawJSON() string { +func (r identityProviderAccessFacebookJSON) RawJSON() string { return r.raw } -func (r IdentityProviderNewResponseAccessFacebook) implementsZeroTrustIdentityProviderNewResponse() {} +func (r IdentityProviderAccessFacebook) implementsZeroTrustIdentityProvider() {} -type IdentityProviderNewResponseAccessGitHub struct { +type IdentityProviderAccessGitHub struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). @@ -731,13 +627,13 @@ type IdentityProviderNewResponseAccessGitHub struct { ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderNewResponseAccessGitHubJSON `json:"-"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderAccessGitHubJSON `json:"-"` } -// identityProviderNewResponseAccessGitHubJSON contains the JSON metadata for the -// struct [IdentityProviderNewResponseAccessGitHub] -type identityProviderNewResponseAccessGitHubJSON struct { +// identityProviderAccessGitHubJSON contains the JSON metadata for the struct +// [IdentityProviderAccessGitHub] +type identityProviderAccessGitHubJSON struct { Config apijson.Field Name apijson.Field Type apijson.Field @@ -747,21 +643,21 @@ type identityProviderNewResponseAccessGitHubJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderNewResponseAccessGitHub) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderAccessGitHub) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderNewResponseAccessGitHubJSON) RawJSON() string { +func (r identityProviderAccessGitHubJSON) RawJSON() string { return r.raw } -func (r IdentityProviderNewResponseAccessGitHub) implementsZeroTrustIdentityProviderNewResponse() {} +func (r IdentityProviderAccessGitHub) implementsZeroTrustIdentityProvider() {} -type IdentityProviderNewResponseAccessGoogle struct { +type IdentityProviderAccessGoogle struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderNewResponseAccessGoogleConfig `json:"config,required"` + Config IdentityProviderAccessGoogleConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, @@ -772,13 +668,13 @@ type IdentityProviderNewResponseAccessGoogle struct { ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderNewResponseAccessGoogleJSON `json:"-"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderAccessGoogleJSON `json:"-"` } -// identityProviderNewResponseAccessGoogleJSON contains the JSON metadata for the -// struct [IdentityProviderNewResponseAccessGoogle] -type identityProviderNewResponseAccessGoogleJSON struct { +// identityProviderAccessGoogleJSON contains the JSON metadata for the struct +// [IdentityProviderAccessGoogle] +type identityProviderAccessGoogleJSON struct { Config apijson.Field Name apijson.Field Type apijson.Field @@ -788,20 +684,20 @@ type identityProviderNewResponseAccessGoogleJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderNewResponseAccessGoogle) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderAccessGoogle) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderNewResponseAccessGoogleJSON) RawJSON() string { +func (r identityProviderAccessGoogleJSON) RawJSON() string { return r.raw } -func (r IdentityProviderNewResponseAccessGoogle) implementsZeroTrustIdentityProviderNewResponse() {} +func (r IdentityProviderAccessGoogle) implementsZeroTrustIdentityProvider() {} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderNewResponseAccessGoogleConfig struct { +type IdentityProviderAccessGoogleConfig struct { // Custom claims Claims []string `json:"claims"` // Your OAuth Client ID @@ -809,13 +705,13 @@ type IdentityProviderNewResponseAccessGoogleConfig struct { // Your OAuth Client Secret ClientSecret string `json:"client_secret"` // The claim name for email in the id_token response. - EmailClaimName string `json:"email_claim_name"` - JSON identityProviderNewResponseAccessGoogleConfigJSON `json:"-"` + EmailClaimName string `json:"email_claim_name"` + JSON identityProviderAccessGoogleConfigJSON `json:"-"` } -// identityProviderNewResponseAccessGoogleConfigJSON contains the JSON metadata for -// the struct [IdentityProviderNewResponseAccessGoogleConfig] -type identityProviderNewResponseAccessGoogleConfigJSON struct { +// identityProviderAccessGoogleConfigJSON contains the JSON metadata for the struct +// [IdentityProviderAccessGoogleConfig] +type identityProviderAccessGoogleConfigJSON struct { Claims apijson.Field ClientID apijson.Field ClientSecret apijson.Field @@ -824,19 +720,19 @@ type identityProviderNewResponseAccessGoogleConfigJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderNewResponseAccessGoogleConfig) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderAccessGoogleConfig) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderNewResponseAccessGoogleConfigJSON) RawJSON() string { +func (r identityProviderAccessGoogleConfigJSON) RawJSON() string { return r.raw } -type IdentityProviderNewResponseAccessGoogleApps struct { +type IdentityProviderAccessGoogleApps struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderNewResponseAccessGoogleAppsConfig `json:"config,required"` + Config IdentityProviderAccessGoogleAppsConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, @@ -847,13 +743,13 @@ type IdentityProviderNewResponseAccessGoogleApps struct { ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderNewResponseAccessGoogleAppsJSON `json:"-"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderAccessGoogleAppsJSON `json:"-"` } -// identityProviderNewResponseAccessGoogleAppsJSON contains the JSON metadata for -// the struct [IdentityProviderNewResponseAccessGoogleApps] -type identityProviderNewResponseAccessGoogleAppsJSON struct { +// identityProviderAccessGoogleAppsJSON contains the JSON metadata for the struct +// [IdentityProviderAccessGoogleApps] +type identityProviderAccessGoogleAppsJSON struct { Config apijson.Field Name apijson.Field Type apijson.Field @@ -863,21 +759,20 @@ type identityProviderNewResponseAccessGoogleAppsJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderNewResponseAccessGoogleApps) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderAccessGoogleApps) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderNewResponseAccessGoogleAppsJSON) RawJSON() string { +func (r identityProviderAccessGoogleAppsJSON) RawJSON() string { return r.raw } -func (r IdentityProviderNewResponseAccessGoogleApps) implementsZeroTrustIdentityProviderNewResponse() { -} +func (r IdentityProviderAccessGoogleApps) implementsZeroTrustIdentityProvider() {} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderNewResponseAccessGoogleAppsConfig struct { +type IdentityProviderAccessGoogleAppsConfig struct { // Your companies TLD AppsDomain string `json:"apps_domain"` // Custom claims @@ -887,13 +782,13 @@ type IdentityProviderNewResponseAccessGoogleAppsConfig struct { // Your OAuth Client Secret ClientSecret string `json:"client_secret"` // The claim name for email in the id_token response. - EmailClaimName string `json:"email_claim_name"` - JSON identityProviderNewResponseAccessGoogleAppsConfigJSON `json:"-"` + EmailClaimName string `json:"email_claim_name"` + JSON identityProviderAccessGoogleAppsConfigJSON `json:"-"` } -// identityProviderNewResponseAccessGoogleAppsConfigJSON contains the JSON metadata -// for the struct [IdentityProviderNewResponseAccessGoogleAppsConfig] -type identityProviderNewResponseAccessGoogleAppsConfigJSON struct { +// identityProviderAccessGoogleAppsConfigJSON contains the JSON metadata for the +// struct [IdentityProviderAccessGoogleAppsConfig] +type identityProviderAccessGoogleAppsConfigJSON struct { AppsDomain apijson.Field Claims apijson.Field ClientID apijson.Field @@ -903,15 +798,15 @@ type identityProviderNewResponseAccessGoogleAppsConfigJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderNewResponseAccessGoogleAppsConfig) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderAccessGoogleAppsConfig) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderNewResponseAccessGoogleAppsConfigJSON) RawJSON() string { +func (r identityProviderAccessGoogleAppsConfigJSON) RawJSON() string { return r.raw } -type IdentityProviderNewResponseAccessLinkedin struct { +type IdentityProviderAccessLinkedin struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). @@ -926,13 +821,13 @@ type IdentityProviderNewResponseAccessLinkedin struct { ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderNewResponseAccessLinkedinJSON `json:"-"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderAccessLinkedinJSON `json:"-"` } -// identityProviderNewResponseAccessLinkedinJSON contains the JSON metadata for the -// struct [IdentityProviderNewResponseAccessLinkedin] -type identityProviderNewResponseAccessLinkedinJSON struct { +// identityProviderAccessLinkedinJSON contains the JSON metadata for the struct +// [IdentityProviderAccessLinkedin] +type identityProviderAccessLinkedinJSON struct { Config apijson.Field Name apijson.Field Type apijson.Field @@ -942,21 +837,21 @@ type identityProviderNewResponseAccessLinkedinJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderNewResponseAccessLinkedin) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderAccessLinkedin) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderNewResponseAccessLinkedinJSON) RawJSON() string { +func (r identityProviderAccessLinkedinJSON) RawJSON() string { return r.raw } -func (r IdentityProviderNewResponseAccessLinkedin) implementsZeroTrustIdentityProviderNewResponse() {} +func (r IdentityProviderAccessLinkedin) implementsZeroTrustIdentityProvider() {} -type IdentityProviderNewResponseAccessOIDC struct { +type IdentityProviderAccessOIDC struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderNewResponseAccessOIDCConfig `json:"config,required"` + Config IdentityProviderAccessOIDCConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, @@ -967,13 +862,13 @@ type IdentityProviderNewResponseAccessOIDC struct { ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderNewResponseAccessOIDCJSON `json:"-"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderAccessOIDCJSON `json:"-"` } -// identityProviderNewResponseAccessOIDCJSON contains the JSON metadata for the -// struct [IdentityProviderNewResponseAccessOIDC] -type identityProviderNewResponseAccessOIDCJSON struct { +// identityProviderAccessOIDCJSON contains the JSON metadata for the struct +// [IdentityProviderAccessOIDC] +type identityProviderAccessOIDCJSON struct { Config apijson.Field Name apijson.Field Type apijson.Field @@ -983,20 +878,20 @@ type identityProviderNewResponseAccessOIDCJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderNewResponseAccessOIDC) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderAccessOIDC) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderNewResponseAccessOIDCJSON) RawJSON() string { +func (r identityProviderAccessOIDCJSON) RawJSON() string { return r.raw } -func (r IdentityProviderNewResponseAccessOIDC) implementsZeroTrustIdentityProviderNewResponse() {} +func (r IdentityProviderAccessOIDC) implementsZeroTrustIdentityProvider() {} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderNewResponseAccessOIDCConfig struct { +type IdentityProviderAccessOIDCConfig struct { // The authorization_endpoint URL of your IdP AuthURL string `json:"auth_url"` // The jwks_uri endpoint of your IdP to allow the IdP keys to sign the tokens @@ -1012,13 +907,13 @@ type IdentityProviderNewResponseAccessOIDCConfig struct { // OAuth scopes Scopes []string `json:"scopes"` // The token_endpoint URL of your IdP - TokenURL string `json:"token_url"` - JSON identityProviderNewResponseAccessOIDCConfigJSON `json:"-"` + TokenURL string `json:"token_url"` + JSON identityProviderAccessOIDCConfigJSON `json:"-"` } -// identityProviderNewResponseAccessOIDCConfigJSON contains the JSON metadata for -// the struct [IdentityProviderNewResponseAccessOIDCConfig] -type identityProviderNewResponseAccessOIDCConfigJSON struct { +// identityProviderAccessOIDCConfigJSON contains the JSON metadata for the struct +// [IdentityProviderAccessOIDCConfig] +type identityProviderAccessOIDCConfigJSON struct { AuthURL apijson.Field CERTsURL apijson.Field Claims apijson.Field @@ -1031,19 +926,19 @@ type identityProviderNewResponseAccessOIDCConfigJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderNewResponseAccessOIDCConfig) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderAccessOIDCConfig) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderNewResponseAccessOIDCConfigJSON) RawJSON() string { +func (r identityProviderAccessOIDCConfigJSON) RawJSON() string { return r.raw } -type IdentityProviderNewResponseAccessOkta struct { +type IdentityProviderAccessOkta struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderNewResponseAccessOktaConfig `json:"config,required"` + Config IdentityProviderAccessOktaConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, @@ -1054,13 +949,13 @@ type IdentityProviderNewResponseAccessOkta struct { ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderNewResponseAccessOktaJSON `json:"-"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderAccessOktaJSON `json:"-"` } -// identityProviderNewResponseAccessOktaJSON contains the JSON metadata for the -// struct [IdentityProviderNewResponseAccessOkta] -type identityProviderNewResponseAccessOktaJSON struct { +// identityProviderAccessOktaJSON contains the JSON metadata for the struct +// [IdentityProviderAccessOkta] +type identityProviderAccessOktaJSON struct { Config apijson.Field Name apijson.Field Type apijson.Field @@ -1070,20 +965,20 @@ type identityProviderNewResponseAccessOktaJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderNewResponseAccessOkta) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderAccessOkta) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderNewResponseAccessOktaJSON) RawJSON() string { +func (r identityProviderAccessOktaJSON) RawJSON() string { return r.raw } -func (r IdentityProviderNewResponseAccessOkta) implementsZeroTrustIdentityProviderNewResponse() {} +func (r IdentityProviderAccessOkta) implementsZeroTrustIdentityProvider() {} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderNewResponseAccessOktaConfig struct { +type IdentityProviderAccessOktaConfig struct { // Your okta authorization server id AuthorizationServerID string `json:"authorization_server_id"` // Custom claims @@ -1095,13 +990,13 @@ type IdentityProviderNewResponseAccessOktaConfig struct { // The claim name for email in the id_token response. EmailClaimName string `json:"email_claim_name"` // Your okta account url - OktaAccount string `json:"okta_account"` - JSON identityProviderNewResponseAccessOktaConfigJSON `json:"-"` + OktaAccount string `json:"okta_account"` + JSON identityProviderAccessOktaConfigJSON `json:"-"` } -// identityProviderNewResponseAccessOktaConfigJSON contains the JSON metadata for -// the struct [IdentityProviderNewResponseAccessOktaConfig] -type identityProviderNewResponseAccessOktaConfigJSON struct { +// identityProviderAccessOktaConfigJSON contains the JSON metadata for the struct +// [IdentityProviderAccessOktaConfig] +type identityProviderAccessOktaConfigJSON struct { AuthorizationServerID apijson.Field Claims apijson.Field ClientID apijson.Field @@ -1112,19 +1007,19 @@ type identityProviderNewResponseAccessOktaConfigJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderNewResponseAccessOktaConfig) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderAccessOktaConfig) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderNewResponseAccessOktaConfigJSON) RawJSON() string { +func (r identityProviderAccessOktaConfigJSON) RawJSON() string { return r.raw } -type IdentityProviderNewResponseAccessOnelogin struct { +type IdentityProviderAccessOnelogin struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderNewResponseAccessOneloginConfig `json:"config,required"` + Config IdentityProviderAccessOneloginConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, @@ -1135,13 +1030,13 @@ type IdentityProviderNewResponseAccessOnelogin struct { ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderNewResponseAccessOneloginJSON `json:"-"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderAccessOneloginJSON `json:"-"` } -// identityProviderNewResponseAccessOneloginJSON contains the JSON metadata for the -// struct [IdentityProviderNewResponseAccessOnelogin] -type identityProviderNewResponseAccessOneloginJSON struct { +// identityProviderAccessOneloginJSON contains the JSON metadata for the struct +// [IdentityProviderAccessOnelogin] +type identityProviderAccessOneloginJSON struct { Config apijson.Field Name apijson.Field Type apijson.Field @@ -1151,20 +1046,20 @@ type identityProviderNewResponseAccessOneloginJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderNewResponseAccessOnelogin) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderAccessOnelogin) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderNewResponseAccessOneloginJSON) RawJSON() string { +func (r identityProviderAccessOneloginJSON) RawJSON() string { return r.raw } -func (r IdentityProviderNewResponseAccessOnelogin) implementsZeroTrustIdentityProviderNewResponse() {} +func (r IdentityProviderAccessOnelogin) implementsZeroTrustIdentityProvider() {} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderNewResponseAccessOneloginConfig struct { +type IdentityProviderAccessOneloginConfig struct { // Custom claims Claims []string `json:"claims"` // Your OAuth Client ID @@ -1174,13 +1069,13 @@ type IdentityProviderNewResponseAccessOneloginConfig struct { // The claim name for email in the id_token response. EmailClaimName string `json:"email_claim_name"` // Your OneLogin account url - OneloginAccount string `json:"onelogin_account"` - JSON identityProviderNewResponseAccessOneloginConfigJSON `json:"-"` + OneloginAccount string `json:"onelogin_account"` + JSON identityProviderAccessOneloginConfigJSON `json:"-"` } -// identityProviderNewResponseAccessOneloginConfigJSON contains the JSON metadata -// for the struct [IdentityProviderNewResponseAccessOneloginConfig] -type identityProviderNewResponseAccessOneloginConfigJSON struct { +// identityProviderAccessOneloginConfigJSON contains the JSON metadata for the +// struct [IdentityProviderAccessOneloginConfig] +type identityProviderAccessOneloginConfigJSON struct { Claims apijson.Field ClientID apijson.Field ClientSecret apijson.Field @@ -1190,19 +1085,19 @@ type identityProviderNewResponseAccessOneloginConfigJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderNewResponseAccessOneloginConfig) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderAccessOneloginConfig) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderNewResponseAccessOneloginConfigJSON) RawJSON() string { +func (r identityProviderAccessOneloginConfigJSON) RawJSON() string { return r.raw } -type IdentityProviderNewResponseAccessPingone struct { +type IdentityProviderAccessPingone struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderNewResponseAccessPingoneConfig `json:"config,required"` + Config IdentityProviderAccessPingoneConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, @@ -1213,13 +1108,13 @@ type IdentityProviderNewResponseAccessPingone struct { ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderNewResponseAccessPingoneJSON `json:"-"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderAccessPingoneJSON `json:"-"` } -// identityProviderNewResponseAccessPingoneJSON contains the JSON metadata for the -// struct [IdentityProviderNewResponseAccessPingone] -type identityProviderNewResponseAccessPingoneJSON struct { +// identityProviderAccessPingoneJSON contains the JSON metadata for the struct +// [IdentityProviderAccessPingone] +type identityProviderAccessPingoneJSON struct { Config apijson.Field Name apijson.Field Type apijson.Field @@ -1229,20 +1124,20 @@ type identityProviderNewResponseAccessPingoneJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderNewResponseAccessPingone) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderAccessPingone) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderNewResponseAccessPingoneJSON) RawJSON() string { +func (r identityProviderAccessPingoneJSON) RawJSON() string { return r.raw } -func (r IdentityProviderNewResponseAccessPingone) implementsZeroTrustIdentityProviderNewResponse() {} +func (r IdentityProviderAccessPingone) implementsZeroTrustIdentityProvider() {} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderNewResponseAccessPingoneConfig struct { +type IdentityProviderAccessPingoneConfig struct { // Custom claims Claims []string `json:"claims"` // Your OAuth Client ID @@ -1252,13 +1147,13 @@ type IdentityProviderNewResponseAccessPingoneConfig struct { // The claim name for email in the id_token response. EmailClaimName string `json:"email_claim_name"` // Your PingOne environment identifier - PingEnvID string `json:"ping_env_id"` - JSON identityProviderNewResponseAccessPingoneConfigJSON `json:"-"` + PingEnvID string `json:"ping_env_id"` + JSON identityProviderAccessPingoneConfigJSON `json:"-"` } -// identityProviderNewResponseAccessPingoneConfigJSON contains the JSON metadata -// for the struct [IdentityProviderNewResponseAccessPingoneConfig] -type identityProviderNewResponseAccessPingoneConfigJSON struct { +// identityProviderAccessPingoneConfigJSON contains the JSON metadata for the +// struct [IdentityProviderAccessPingoneConfig] +type identityProviderAccessPingoneConfigJSON struct { Claims apijson.Field ClientID apijson.Field ClientSecret apijson.Field @@ -1268,19 +1163,19 @@ type identityProviderNewResponseAccessPingoneConfigJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderNewResponseAccessPingoneConfig) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderAccessPingoneConfig) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderNewResponseAccessPingoneConfigJSON) RawJSON() string { +func (r identityProviderAccessPingoneConfigJSON) RawJSON() string { return r.raw } -type IdentityProviderNewResponseAccessSAML struct { +type IdentityProviderAccessSAML struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderNewResponseAccessSAMLConfig `json:"config,required"` + Config IdentityProviderAccessSAMLConfig `json:"config,required"` // The name of the identity provider, shown to users on the login page. Name string `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, @@ -1291,13 +1186,13 @@ type IdentityProviderNewResponseAccessSAML struct { ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderNewResponseAccessSAMLJSON `json:"-"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderAccessSAMLJSON `json:"-"` } -// identityProviderNewResponseAccessSAMLJSON contains the JSON metadata for the -// struct [IdentityProviderNewResponseAccessSAML] -type identityProviderNewResponseAccessSAMLJSON struct { +// identityProviderAccessSAMLJSON contains the JSON metadata for the struct +// [IdentityProviderAccessSAML] +type identityProviderAccessSAMLJSON struct { Config apijson.Field Name apijson.Field Type apijson.Field @@ -1307,20 +1202,20 @@ type identityProviderNewResponseAccessSAMLJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderNewResponseAccessSAML) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderAccessSAML) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderNewResponseAccessSAMLJSON) RawJSON() string { +func (r identityProviderAccessSAMLJSON) RawJSON() string { return r.raw } -func (r IdentityProviderNewResponseAccessSAML) implementsZeroTrustIdentityProviderNewResponse() {} +func (r IdentityProviderAccessSAML) implementsZeroTrustIdentityProvider() {} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderNewResponseAccessSAMLConfig struct { +type IdentityProviderAccessSAMLConfig struct { // A list of SAML attribute names that will be added to your signed JWT token and // can be used in SAML policy rules. Attributes []string `json:"attributes"` @@ -1328,7 +1223,7 @@ type IdentityProviderNewResponseAccessSAMLConfig struct { EmailAttributeName string `json:"email_attribute_name"` // Add a list of attribute names that will be returned in the response header from // the Access callback. - HeaderAttributes []IdentityProviderNewResponseAccessSAMLConfigHeaderAttribute `json:"header_attributes"` + HeaderAttributes []IdentityProviderAccessSAMLConfigHeaderAttribute `json:"header_attributes"` // X509 certificate to verify the signature in the SAML authentication response IdPPublicCERTs []string `json:"idp_public_certs"` // IdP Entity ID or Issuer URL @@ -1337,13 +1232,13 @@ type IdentityProviderNewResponseAccessSAMLConfig struct { // signature, use the public key from the Access certs endpoints. SignRequest bool `json:"sign_request"` // URL to send the SAML authentication requests to - SSOTargetURL string `json:"sso_target_url"` - JSON identityProviderNewResponseAccessSAMLConfigJSON `json:"-"` + SSOTargetURL string `json:"sso_target_url"` + JSON identityProviderAccessSAMLConfigJSON `json:"-"` } -// identityProviderNewResponseAccessSAMLConfigJSON contains the JSON metadata for -// the struct [IdentityProviderNewResponseAccessSAMLConfig] -type identityProviderNewResponseAccessSAMLConfigJSON struct { +// identityProviderAccessSAMLConfigJSON contains the JSON metadata for the struct +// [IdentityProviderAccessSAMLConfig] +type identityProviderAccessSAMLConfigJSON struct { Attributes apijson.Field EmailAttributeName apijson.Field HeaderAttributes apijson.Field @@ -1355,41 +1250,40 @@ type identityProviderNewResponseAccessSAMLConfigJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderNewResponseAccessSAMLConfig) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderAccessSAMLConfig) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderNewResponseAccessSAMLConfigJSON) RawJSON() string { +func (r identityProviderAccessSAMLConfigJSON) RawJSON() string { return r.raw } -type IdentityProviderNewResponseAccessSAMLConfigHeaderAttribute struct { +type IdentityProviderAccessSAMLConfigHeaderAttribute struct { // attribute name from the IDP AttributeName string `json:"attribute_name"` // header that will be added on the request to the origin - HeaderName string `json:"header_name"` - JSON identityProviderNewResponseAccessSAMLConfigHeaderAttributeJSON `json:"-"` + HeaderName string `json:"header_name"` + JSON identityProviderAccessSAMLConfigHeaderAttributeJSON `json:"-"` } -// identityProviderNewResponseAccessSAMLConfigHeaderAttributeJSON contains the JSON -// metadata for the struct -// [IdentityProviderNewResponseAccessSAMLConfigHeaderAttribute] -type identityProviderNewResponseAccessSAMLConfigHeaderAttributeJSON struct { +// identityProviderAccessSAMLConfigHeaderAttributeJSON contains the JSON metadata +// for the struct [IdentityProviderAccessSAMLConfigHeaderAttribute] +type identityProviderAccessSAMLConfigHeaderAttributeJSON struct { AttributeName apijson.Field HeaderName apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *IdentityProviderNewResponseAccessSAMLConfigHeaderAttribute) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderAccessSAMLConfigHeaderAttribute) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderNewResponseAccessSAMLConfigHeaderAttributeJSON) RawJSON() string { +func (r identityProviderAccessSAMLConfigHeaderAttributeJSON) RawJSON() string { return r.raw } -type IdentityProviderNewResponseAccessYandex struct { +type IdentityProviderAccessYandex struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). @@ -1404,13 +1298,13 @@ type IdentityProviderNewResponseAccessYandex struct { ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderNewResponseAccessYandexJSON `json:"-"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderAccessYandexJSON `json:"-"` } -// identityProviderNewResponseAccessYandexJSON contains the JSON metadata for the -// struct [IdentityProviderNewResponseAccessYandex] -type identityProviderNewResponseAccessYandexJSON struct { +// identityProviderAccessYandexJSON contains the JSON metadata for the struct +// [IdentityProviderAccessYandex] +type identityProviderAccessYandexJSON struct { Config apijson.Field Name apijson.Field Type apijson.Field @@ -1420,17 +1314,17 @@ type identityProviderNewResponseAccessYandexJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderNewResponseAccessYandex) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderAccessYandex) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderNewResponseAccessYandexJSON) RawJSON() string { +func (r identityProviderAccessYandexJSON) RawJSON() string { return r.raw } -func (r IdentityProviderNewResponseAccessYandex) implementsZeroTrustIdentityProviderNewResponse() {} +func (r IdentityProviderAccessYandex) implementsZeroTrustIdentityProvider() {} -type IdentityProviderNewResponseAccessOnetimepin struct { +type IdentityProviderAccessOnetimepin struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). @@ -1445,13 +1339,13 @@ type IdentityProviderNewResponseAccessOnetimepin struct { ID string `json:"id"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderNewResponseAccessOnetimepinJSON `json:"-"` + ScimConfig ScimConfig `json:"scim_config"` + JSON identityProviderAccessOnetimepinJSON `json:"-"` } -// identityProviderNewResponseAccessOnetimepinJSON contains the JSON metadata for -// the struct [IdentityProviderNewResponseAccessOnetimepin] -type identityProviderNewResponseAccessOnetimepinJSON struct { +// identityProviderAccessOnetimepinJSON contains the JSON metadata for the struct +// [IdentityProviderAccessOnetimepin] +type identityProviderAccessOnetimepinJSON struct { Config apijson.Field Name apijson.Field Type apijson.Field @@ -1461,1035 +1355,626 @@ type identityProviderNewResponseAccessOnetimepinJSON struct { ExtraFields map[string]apijson.Field } -func (r *IdentityProviderNewResponseAccessOnetimepin) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderAccessOnetimepin) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderNewResponseAccessOnetimepinJSON) RawJSON() string { +func (r identityProviderAccessOnetimepinJSON) RawJSON() string { return r.raw } -func (r IdentityProviderNewResponseAccessOnetimepin) implementsZeroTrustIdentityProviderNewResponse() { -} +func (r IdentityProviderAccessOnetimepin) implementsZeroTrustIdentityProvider() {} -type IdentityProviderUpdateResponse struct { - Config interface{} `json:"config"` - // UUID - ID string `json:"id"` +type IdentityProviderParam struct { + Config param.Field[interface{}] `json:"config"` // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` + Name param.Field[string] `json:"name,required"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - JSON identityProviderUpdateResponseJSON `json:"-"` - union IdentityProviderUpdateResponseUnion -} - -// identityProviderUpdateResponseJSON contains the JSON metadata for the struct -// [IdentityProviderUpdateResponse] -type identityProviderUpdateResponseJSON struct { - Config apijson.Field - ID apijson.Field - Name apijson.Field - ScimConfig apijson.Field - Type apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r identityProviderUpdateResponseJSON) RawJSON() string { - return r.raw -} - -func (r *IdentityProviderUpdateResponse) UnmarshalJSON(data []byte) (err error) { - err = apijson.UnmarshalRoot(data, &r.union) - if err != nil { - return err - } - return apijson.Port(r.union, &r) + Type param.Field[IdentityProviderType] `json:"type,required"` } -func (r IdentityProviderUpdateResponse) AsUnion() IdentityProviderUpdateResponseUnion { - return r.union +func (r IdentityProviderParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) } -// Union satisfied by [zero_trust.AzureAD], -// [zero_trust.IdentityProviderUpdateResponseAccessCentrify], -// [zero_trust.IdentityProviderUpdateResponseAccessFacebook], -// [zero_trust.IdentityProviderUpdateResponseAccessGitHub], -// [zero_trust.IdentityProviderUpdateResponseAccessGoogle], -// [zero_trust.IdentityProviderUpdateResponseAccessGoogleApps], -// [zero_trust.IdentityProviderUpdateResponseAccessLinkedin], -// [zero_trust.IdentityProviderUpdateResponseAccessOIDC], -// [zero_trust.IdentityProviderUpdateResponseAccessOkta], -// [zero_trust.IdentityProviderUpdateResponseAccessOnelogin], -// [zero_trust.IdentityProviderUpdateResponseAccessPingone], -// [zero_trust.IdentityProviderUpdateResponseAccessSAML], -// [zero_trust.IdentityProviderUpdateResponseAccessYandex] or -// [zero_trust.IdentityProviderUpdateResponseAccessOnetimepin]. -type IdentityProviderUpdateResponseUnion interface { - implementsZeroTrustIdentityProviderUpdateResponse() -} +func (r IdentityProviderParam) implementsZeroTrustIdentityProviderUnionParam() {} -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*IdentityProviderUpdateResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(AzureAD{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderUpdateResponseAccessCentrify{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderUpdateResponseAccessFacebook{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderUpdateResponseAccessGitHub{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderUpdateResponseAccessGoogle{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderUpdateResponseAccessGoogleApps{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderUpdateResponseAccessLinkedin{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderUpdateResponseAccessOIDC{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderUpdateResponseAccessOkta{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderUpdateResponseAccessOnelogin{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderUpdateResponseAccessPingone{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderUpdateResponseAccessSAML{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderUpdateResponseAccessYandex{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderUpdateResponseAccessOnetimepin{}), - }, - ) +// Satisfied by [zero_trust.AzureADParam], +// [zero_trust.IdentityProviderAccessCentrifyParam], +// [zero_trust.IdentityProviderAccessFacebookParam], +// [zero_trust.IdentityProviderAccessGitHubParam], +// [zero_trust.IdentityProviderAccessGoogleParam], +// [zero_trust.IdentityProviderAccessGoogleAppsParam], +// [zero_trust.IdentityProviderAccessLinkedinParam], +// [zero_trust.IdentityProviderAccessOIDCParam], +// [zero_trust.IdentityProviderAccessOktaParam], +// [zero_trust.IdentityProviderAccessOneloginParam], +// [zero_trust.IdentityProviderAccessPingoneParam], +// [zero_trust.IdentityProviderAccessSAMLParam], +// [zero_trust.IdentityProviderAccessYandexParam], +// [zero_trust.IdentityProviderAccessOnetimepinParam], [IdentityProviderParam]. +type IdentityProviderUnionParam interface { + implementsZeroTrustIdentityProviderUnionParam() } -type IdentityProviderUpdateResponseAccessCentrify struct { +type IdentityProviderAccessCentrifyParam struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderUpdateResponseAccessCentrifyConfig `json:"config,required"` + Config param.Field[IdentityProviderAccessCentrifyConfigParam] `json:"config,required"` // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` + Name param.Field[string] `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - // UUID - ID string `json:"id"` + Type param.Field[IdentityProviderType] `json:"type,required"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderUpdateResponseAccessCentrifyJSON `json:"-"` -} - -// identityProviderUpdateResponseAccessCentrifyJSON contains the JSON metadata for -// the struct [IdentityProviderUpdateResponseAccessCentrify] -type identityProviderUpdateResponseAccessCentrifyJSON struct { - Config apijson.Field - Name apijson.Field - Type apijson.Field - ID apijson.Field - ScimConfig apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderUpdateResponseAccessCentrify) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` } -func (r identityProviderUpdateResponseAccessCentrifyJSON) RawJSON() string { - return r.raw +func (r IdentityProviderAccessCentrifyParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) } -func (r IdentityProviderUpdateResponseAccessCentrify) implementsZeroTrustIdentityProviderUpdateResponse() { -} +func (r IdentityProviderAccessCentrifyParam) implementsZeroTrustIdentityProviderUnionParam() {} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderUpdateResponseAccessCentrifyConfig struct { +type IdentityProviderAccessCentrifyConfigParam struct { // Your centrify account url - CentrifyAccount string `json:"centrify_account"` + CentrifyAccount param.Field[string] `json:"centrify_account"` // Your centrify app id - CentrifyAppID string `json:"centrify_app_id"` + CentrifyAppID param.Field[string] `json:"centrify_app_id"` // Custom claims - Claims []string `json:"claims"` + Claims param.Field[[]string] `json:"claims"` // Your OAuth Client ID - ClientID string `json:"client_id"` + ClientID param.Field[string] `json:"client_id"` // Your OAuth Client Secret - ClientSecret string `json:"client_secret"` + ClientSecret param.Field[string] `json:"client_secret"` // The claim name for email in the id_token response. - EmailClaimName string `json:"email_claim_name"` - JSON identityProviderUpdateResponseAccessCentrifyConfigJSON `json:"-"` -} - -// identityProviderUpdateResponseAccessCentrifyConfigJSON contains the JSON -// metadata for the struct [IdentityProviderUpdateResponseAccessCentrifyConfig] -type identityProviderUpdateResponseAccessCentrifyConfigJSON struct { - CentrifyAccount apijson.Field - CentrifyAppID apijson.Field - Claims apijson.Field - ClientID apijson.Field - ClientSecret apijson.Field - EmailClaimName apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderUpdateResponseAccessCentrifyConfig) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) + EmailClaimName param.Field[string] `json:"email_claim_name"` } -func (r identityProviderUpdateResponseAccessCentrifyConfigJSON) RawJSON() string { - return r.raw +func (r IdentityProviderAccessCentrifyConfigParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) } -type IdentityProviderUpdateResponseAccessFacebook struct { +type IdentityProviderAccessFacebookParam struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config GenericOAuthConfig `json:"config,required"` + Config param.Field[GenericOAuthConfigParam] `json:"config,required"` // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` + Name param.Field[string] `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - // UUID - ID string `json:"id"` + Type param.Field[IdentityProviderType] `json:"type,required"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderUpdateResponseAccessFacebookJSON `json:"-"` + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` } -// identityProviderUpdateResponseAccessFacebookJSON contains the JSON metadata for -// the struct [IdentityProviderUpdateResponseAccessFacebook] -type identityProviderUpdateResponseAccessFacebookJSON struct { - Config apijson.Field - Name apijson.Field - Type apijson.Field - ID apijson.Field - ScimConfig apijson.Field - raw string - ExtraFields map[string]apijson.Field +func (r IdentityProviderAccessFacebookParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) } -func (r *IdentityProviderUpdateResponseAccessFacebook) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r identityProviderUpdateResponseAccessFacebookJSON) RawJSON() string { - return r.raw -} - -func (r IdentityProviderUpdateResponseAccessFacebook) implementsZeroTrustIdentityProviderUpdateResponse() { -} +func (r IdentityProviderAccessFacebookParam) implementsZeroTrustIdentityProviderUnionParam() {} -type IdentityProviderUpdateResponseAccessGitHub struct { +type IdentityProviderAccessGitHubParam struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config GenericOAuthConfig `json:"config,required"` + Config param.Field[GenericOAuthConfigParam] `json:"config,required"` // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` + Name param.Field[string] `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - // UUID - ID string `json:"id"` + Type param.Field[IdentityProviderType] `json:"type,required"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderUpdateResponseAccessGitHubJSON `json:"-"` -} - -// identityProviderUpdateResponseAccessGitHubJSON contains the JSON metadata for -// the struct [IdentityProviderUpdateResponseAccessGitHub] -type identityProviderUpdateResponseAccessGitHubJSON struct { - Config apijson.Field - Name apijson.Field - Type apijson.Field - ID apijson.Field - ScimConfig apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderUpdateResponseAccessGitHub) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` } -func (r identityProviderUpdateResponseAccessGitHubJSON) RawJSON() string { - return r.raw +func (r IdentityProviderAccessGitHubParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) } -func (r IdentityProviderUpdateResponseAccessGitHub) implementsZeroTrustIdentityProviderUpdateResponse() { -} +func (r IdentityProviderAccessGitHubParam) implementsZeroTrustIdentityProviderUnionParam() {} -type IdentityProviderUpdateResponseAccessGoogle struct { +type IdentityProviderAccessGoogleParam struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderUpdateResponseAccessGoogleConfig `json:"config,required"` + Config param.Field[IdentityProviderAccessGoogleConfigParam] `json:"config,required"` // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` + Name param.Field[string] `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - // UUID - ID string `json:"id"` + Type param.Field[IdentityProviderType] `json:"type,required"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderUpdateResponseAccessGoogleJSON `json:"-"` -} - -// identityProviderUpdateResponseAccessGoogleJSON contains the JSON metadata for -// the struct [IdentityProviderUpdateResponseAccessGoogle] -type identityProviderUpdateResponseAccessGoogleJSON struct { - Config apijson.Field - Name apijson.Field - Type apijson.Field - ID apijson.Field - ScimConfig apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderUpdateResponseAccessGoogle) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` } -func (r identityProviderUpdateResponseAccessGoogleJSON) RawJSON() string { - return r.raw +func (r IdentityProviderAccessGoogleParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) } -func (r IdentityProviderUpdateResponseAccessGoogle) implementsZeroTrustIdentityProviderUpdateResponse() { -} +func (r IdentityProviderAccessGoogleParam) implementsZeroTrustIdentityProviderUnionParam() {} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderUpdateResponseAccessGoogleConfig struct { +type IdentityProviderAccessGoogleConfigParam struct { // Custom claims - Claims []string `json:"claims"` + Claims param.Field[[]string] `json:"claims"` // Your OAuth Client ID - ClientID string `json:"client_id"` + ClientID param.Field[string] `json:"client_id"` // Your OAuth Client Secret - ClientSecret string `json:"client_secret"` + ClientSecret param.Field[string] `json:"client_secret"` // The claim name for email in the id_token response. - EmailClaimName string `json:"email_claim_name"` - JSON identityProviderUpdateResponseAccessGoogleConfigJSON `json:"-"` -} - -// identityProviderUpdateResponseAccessGoogleConfigJSON contains the JSON metadata -// for the struct [IdentityProviderUpdateResponseAccessGoogleConfig] -type identityProviderUpdateResponseAccessGoogleConfigJSON struct { - Claims apijson.Field - ClientID apijson.Field - ClientSecret apijson.Field - EmailClaimName apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderUpdateResponseAccessGoogleConfig) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) + EmailClaimName param.Field[string] `json:"email_claim_name"` } -func (r identityProviderUpdateResponseAccessGoogleConfigJSON) RawJSON() string { - return r.raw +func (r IdentityProviderAccessGoogleConfigParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) } -type IdentityProviderUpdateResponseAccessGoogleApps struct { +type IdentityProviderAccessGoogleAppsParam struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderUpdateResponseAccessGoogleAppsConfig `json:"config,required"` + Config param.Field[IdentityProviderAccessGoogleAppsConfigParam] `json:"config,required"` // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` + Name param.Field[string] `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - // UUID - ID string `json:"id"` + Type param.Field[IdentityProviderType] `json:"type,required"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderUpdateResponseAccessGoogleAppsJSON `json:"-"` -} - -// identityProviderUpdateResponseAccessGoogleAppsJSON contains the JSON metadata -// for the struct [IdentityProviderUpdateResponseAccessGoogleApps] -type identityProviderUpdateResponseAccessGoogleAppsJSON struct { - Config apijson.Field - Name apijson.Field - Type apijson.Field - ID apijson.Field - ScimConfig apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderUpdateResponseAccessGoogleApps) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` } -func (r identityProviderUpdateResponseAccessGoogleAppsJSON) RawJSON() string { - return r.raw +func (r IdentityProviderAccessGoogleAppsParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) } -func (r IdentityProviderUpdateResponseAccessGoogleApps) implementsZeroTrustIdentityProviderUpdateResponse() { -} +func (r IdentityProviderAccessGoogleAppsParam) implementsZeroTrustIdentityProviderUnionParam() {} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderUpdateResponseAccessGoogleAppsConfig struct { +type IdentityProviderAccessGoogleAppsConfigParam struct { // Your companies TLD - AppsDomain string `json:"apps_domain"` + AppsDomain param.Field[string] `json:"apps_domain"` // Custom claims - Claims []string `json:"claims"` + Claims param.Field[[]string] `json:"claims"` // Your OAuth Client ID - ClientID string `json:"client_id"` + ClientID param.Field[string] `json:"client_id"` // Your OAuth Client Secret - ClientSecret string `json:"client_secret"` + ClientSecret param.Field[string] `json:"client_secret"` // The claim name for email in the id_token response. - EmailClaimName string `json:"email_claim_name"` - JSON identityProviderUpdateResponseAccessGoogleAppsConfigJSON `json:"-"` -} - -// identityProviderUpdateResponseAccessGoogleAppsConfigJSON contains the JSON -// metadata for the struct [IdentityProviderUpdateResponseAccessGoogleAppsConfig] -type identityProviderUpdateResponseAccessGoogleAppsConfigJSON struct { - AppsDomain apijson.Field - Claims apijson.Field - ClientID apijson.Field - ClientSecret apijson.Field - EmailClaimName apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderUpdateResponseAccessGoogleAppsConfig) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) + EmailClaimName param.Field[string] `json:"email_claim_name"` } -func (r identityProviderUpdateResponseAccessGoogleAppsConfigJSON) RawJSON() string { - return r.raw +func (r IdentityProviderAccessGoogleAppsConfigParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) } -type IdentityProviderUpdateResponseAccessLinkedin struct { +type IdentityProviderAccessLinkedinParam struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config GenericOAuthConfig `json:"config,required"` + Config param.Field[GenericOAuthConfigParam] `json:"config,required"` // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` + Name param.Field[string] `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - // UUID - ID string `json:"id"` + Type param.Field[IdentityProviderType] `json:"type,required"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderUpdateResponseAccessLinkedinJSON `json:"-"` -} - -// identityProviderUpdateResponseAccessLinkedinJSON contains the JSON metadata for -// the struct [IdentityProviderUpdateResponseAccessLinkedin] -type identityProviderUpdateResponseAccessLinkedinJSON struct { - Config apijson.Field - Name apijson.Field - Type apijson.Field - ID apijson.Field - ScimConfig apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderUpdateResponseAccessLinkedin) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` } -func (r identityProviderUpdateResponseAccessLinkedinJSON) RawJSON() string { - return r.raw +func (r IdentityProviderAccessLinkedinParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) } -func (r IdentityProviderUpdateResponseAccessLinkedin) implementsZeroTrustIdentityProviderUpdateResponse() { -} +func (r IdentityProviderAccessLinkedinParam) implementsZeroTrustIdentityProviderUnionParam() {} -type IdentityProviderUpdateResponseAccessOIDC struct { +type IdentityProviderAccessOIDCParam struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderUpdateResponseAccessOIDCConfig `json:"config,required"` + Config param.Field[IdentityProviderAccessOIDCConfigParam] `json:"config,required"` // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` + Name param.Field[string] `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - // UUID - ID string `json:"id"` + Type param.Field[IdentityProviderType] `json:"type,required"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderUpdateResponseAccessOIDCJSON `json:"-"` -} - -// identityProviderUpdateResponseAccessOIDCJSON contains the JSON metadata for the -// struct [IdentityProviderUpdateResponseAccessOIDC] -type identityProviderUpdateResponseAccessOIDCJSON struct { - Config apijson.Field - Name apijson.Field - Type apijson.Field - ID apijson.Field - ScimConfig apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderUpdateResponseAccessOIDC) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` } -func (r identityProviderUpdateResponseAccessOIDCJSON) RawJSON() string { - return r.raw +func (r IdentityProviderAccessOIDCParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) } -func (r IdentityProviderUpdateResponseAccessOIDC) implementsZeroTrustIdentityProviderUpdateResponse() { -} +func (r IdentityProviderAccessOIDCParam) implementsZeroTrustIdentityProviderUnionParam() {} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderUpdateResponseAccessOIDCConfig struct { +type IdentityProviderAccessOIDCConfigParam struct { // The authorization_endpoint URL of your IdP - AuthURL string `json:"auth_url"` + AuthURL param.Field[string] `json:"auth_url"` // The jwks_uri endpoint of your IdP to allow the IdP keys to sign the tokens - CERTsURL string `json:"certs_url"` + CERTsURL param.Field[string] `json:"certs_url"` // Custom claims - Claims []string `json:"claims"` + Claims param.Field[[]string] `json:"claims"` // Your OAuth Client ID - ClientID string `json:"client_id"` + ClientID param.Field[string] `json:"client_id"` // Your OAuth Client Secret - ClientSecret string `json:"client_secret"` + ClientSecret param.Field[string] `json:"client_secret"` // The claim name for email in the id_token response. - EmailClaimName string `json:"email_claim_name"` + EmailClaimName param.Field[string] `json:"email_claim_name"` // OAuth scopes - Scopes []string `json:"scopes"` + Scopes param.Field[[]string] `json:"scopes"` // The token_endpoint URL of your IdP - TokenURL string `json:"token_url"` - JSON identityProviderUpdateResponseAccessOIDCConfigJSON `json:"-"` -} - -// identityProviderUpdateResponseAccessOIDCConfigJSON contains the JSON metadata -// for the struct [IdentityProviderUpdateResponseAccessOIDCConfig] -type identityProviderUpdateResponseAccessOIDCConfigJSON struct { - AuthURL apijson.Field - CERTsURL apijson.Field - Claims apijson.Field - ClientID apijson.Field - ClientSecret apijson.Field - EmailClaimName apijson.Field - Scopes apijson.Field - TokenURL apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderUpdateResponseAccessOIDCConfig) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) + TokenURL param.Field[string] `json:"token_url"` } -func (r identityProviderUpdateResponseAccessOIDCConfigJSON) RawJSON() string { - return r.raw +func (r IdentityProviderAccessOIDCConfigParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) } -type IdentityProviderUpdateResponseAccessOkta struct { +type IdentityProviderAccessOktaParam struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderUpdateResponseAccessOktaConfig `json:"config,required"` + Config param.Field[IdentityProviderAccessOktaConfigParam] `json:"config,required"` // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` + Name param.Field[string] `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - // UUID - ID string `json:"id"` + Type param.Field[IdentityProviderType] `json:"type,required"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderUpdateResponseAccessOktaJSON `json:"-"` -} - -// identityProviderUpdateResponseAccessOktaJSON contains the JSON metadata for the -// struct [IdentityProviderUpdateResponseAccessOkta] -type identityProviderUpdateResponseAccessOktaJSON struct { - Config apijson.Field - Name apijson.Field - Type apijson.Field - ID apijson.Field - ScimConfig apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderUpdateResponseAccessOkta) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` } -func (r identityProviderUpdateResponseAccessOktaJSON) RawJSON() string { - return r.raw +func (r IdentityProviderAccessOktaParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) } -func (r IdentityProviderUpdateResponseAccessOkta) implementsZeroTrustIdentityProviderUpdateResponse() { -} +func (r IdentityProviderAccessOktaParam) implementsZeroTrustIdentityProviderUnionParam() {} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderUpdateResponseAccessOktaConfig struct { +type IdentityProviderAccessOktaConfigParam struct { // Your okta authorization server id - AuthorizationServerID string `json:"authorization_server_id"` + AuthorizationServerID param.Field[string] `json:"authorization_server_id"` // Custom claims - Claims []string `json:"claims"` + Claims param.Field[[]string] `json:"claims"` // Your OAuth Client ID - ClientID string `json:"client_id"` + ClientID param.Field[string] `json:"client_id"` // Your OAuth Client Secret - ClientSecret string `json:"client_secret"` + ClientSecret param.Field[string] `json:"client_secret"` // The claim name for email in the id_token response. - EmailClaimName string `json:"email_claim_name"` + EmailClaimName param.Field[string] `json:"email_claim_name"` // Your okta account url - OktaAccount string `json:"okta_account"` - JSON identityProviderUpdateResponseAccessOktaConfigJSON `json:"-"` -} - -// identityProviderUpdateResponseAccessOktaConfigJSON contains the JSON metadata -// for the struct [IdentityProviderUpdateResponseAccessOktaConfig] -type identityProviderUpdateResponseAccessOktaConfigJSON struct { - AuthorizationServerID apijson.Field - Claims apijson.Field - ClientID apijson.Field - ClientSecret apijson.Field - EmailClaimName apijson.Field - OktaAccount apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderUpdateResponseAccessOktaConfig) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) + OktaAccount param.Field[string] `json:"okta_account"` } -func (r identityProviderUpdateResponseAccessOktaConfigJSON) RawJSON() string { - return r.raw +func (r IdentityProviderAccessOktaConfigParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) } -type IdentityProviderUpdateResponseAccessOnelogin struct { +type IdentityProviderAccessOneloginParam struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderUpdateResponseAccessOneloginConfig `json:"config,required"` + Config param.Field[IdentityProviderAccessOneloginConfigParam] `json:"config,required"` // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` + Name param.Field[string] `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - // UUID - ID string `json:"id"` + Type param.Field[IdentityProviderType] `json:"type,required"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderUpdateResponseAccessOneloginJSON `json:"-"` -} - -// identityProviderUpdateResponseAccessOneloginJSON contains the JSON metadata for -// the struct [IdentityProviderUpdateResponseAccessOnelogin] -type identityProviderUpdateResponseAccessOneloginJSON struct { - Config apijson.Field - Name apijson.Field - Type apijson.Field - ID apijson.Field - ScimConfig apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderUpdateResponseAccessOnelogin) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` } -func (r identityProviderUpdateResponseAccessOneloginJSON) RawJSON() string { - return r.raw +func (r IdentityProviderAccessOneloginParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) } -func (r IdentityProviderUpdateResponseAccessOnelogin) implementsZeroTrustIdentityProviderUpdateResponse() { -} +func (r IdentityProviderAccessOneloginParam) implementsZeroTrustIdentityProviderUnionParam() {} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderUpdateResponseAccessOneloginConfig struct { +type IdentityProviderAccessOneloginConfigParam struct { // Custom claims - Claims []string `json:"claims"` + Claims param.Field[[]string] `json:"claims"` // Your OAuth Client ID - ClientID string `json:"client_id"` + ClientID param.Field[string] `json:"client_id"` // Your OAuth Client Secret - ClientSecret string `json:"client_secret"` + ClientSecret param.Field[string] `json:"client_secret"` // The claim name for email in the id_token response. - EmailClaimName string `json:"email_claim_name"` + EmailClaimName param.Field[string] `json:"email_claim_name"` // Your OneLogin account url - OneloginAccount string `json:"onelogin_account"` - JSON identityProviderUpdateResponseAccessOneloginConfigJSON `json:"-"` -} - -// identityProviderUpdateResponseAccessOneloginConfigJSON contains the JSON -// metadata for the struct [IdentityProviderUpdateResponseAccessOneloginConfig] -type identityProviderUpdateResponseAccessOneloginConfigJSON struct { - Claims apijson.Field - ClientID apijson.Field - ClientSecret apijson.Field - EmailClaimName apijson.Field - OneloginAccount apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderUpdateResponseAccessOneloginConfig) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) + OneloginAccount param.Field[string] `json:"onelogin_account"` } -func (r identityProviderUpdateResponseAccessOneloginConfigJSON) RawJSON() string { - return r.raw +func (r IdentityProviderAccessOneloginConfigParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) } -type IdentityProviderUpdateResponseAccessPingone struct { +type IdentityProviderAccessPingoneParam struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderUpdateResponseAccessPingoneConfig `json:"config,required"` + Config param.Field[IdentityProviderAccessPingoneConfigParam] `json:"config,required"` // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` + Name param.Field[string] `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - // UUID - ID string `json:"id"` + Type param.Field[IdentityProviderType] `json:"type,required"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderUpdateResponseAccessPingoneJSON `json:"-"` -} - -// identityProviderUpdateResponseAccessPingoneJSON contains the JSON metadata for -// the struct [IdentityProviderUpdateResponseAccessPingone] -type identityProviderUpdateResponseAccessPingoneJSON struct { - Config apijson.Field - Name apijson.Field - Type apijson.Field - ID apijson.Field - ScimConfig apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderUpdateResponseAccessPingone) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` } -func (r identityProviderUpdateResponseAccessPingoneJSON) RawJSON() string { - return r.raw +func (r IdentityProviderAccessPingoneParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) } -func (r IdentityProviderUpdateResponseAccessPingone) implementsZeroTrustIdentityProviderUpdateResponse() { -} +func (r IdentityProviderAccessPingoneParam) implementsZeroTrustIdentityProviderUnionParam() {} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderUpdateResponseAccessPingoneConfig struct { +type IdentityProviderAccessPingoneConfigParam struct { // Custom claims - Claims []string `json:"claims"` + Claims param.Field[[]string] `json:"claims"` // Your OAuth Client ID - ClientID string `json:"client_id"` + ClientID param.Field[string] `json:"client_id"` // Your OAuth Client Secret - ClientSecret string `json:"client_secret"` + ClientSecret param.Field[string] `json:"client_secret"` // The claim name for email in the id_token response. - EmailClaimName string `json:"email_claim_name"` + EmailClaimName param.Field[string] `json:"email_claim_name"` // Your PingOne environment identifier - PingEnvID string `json:"ping_env_id"` - JSON identityProviderUpdateResponseAccessPingoneConfigJSON `json:"-"` -} - -// identityProviderUpdateResponseAccessPingoneConfigJSON contains the JSON metadata -// for the struct [IdentityProviderUpdateResponseAccessPingoneConfig] -type identityProviderUpdateResponseAccessPingoneConfigJSON struct { - Claims apijson.Field - ClientID apijson.Field - ClientSecret apijson.Field - EmailClaimName apijson.Field - PingEnvID apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderUpdateResponseAccessPingoneConfig) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) + PingEnvID param.Field[string] `json:"ping_env_id"` } -func (r identityProviderUpdateResponseAccessPingoneConfigJSON) RawJSON() string { - return r.raw +func (r IdentityProviderAccessPingoneConfigParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) } -type IdentityProviderUpdateResponseAccessSAML struct { +type IdentityProviderAccessSAMLParam struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderUpdateResponseAccessSAMLConfig `json:"config,required"` + Config param.Field[IdentityProviderAccessSAMLConfigParam] `json:"config,required"` // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` + Name param.Field[string] `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - // UUID - ID string `json:"id"` + Type param.Field[IdentityProviderType] `json:"type,required"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderUpdateResponseAccessSAMLJSON `json:"-"` -} - -// identityProviderUpdateResponseAccessSAMLJSON contains the JSON metadata for the -// struct [IdentityProviderUpdateResponseAccessSAML] -type identityProviderUpdateResponseAccessSAMLJSON struct { - Config apijson.Field - Name apijson.Field - Type apijson.Field - ID apijson.Field - ScimConfig apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderUpdateResponseAccessSAML) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` } -func (r identityProviderUpdateResponseAccessSAMLJSON) RawJSON() string { - return r.raw +func (r IdentityProviderAccessSAMLParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) } -func (r IdentityProviderUpdateResponseAccessSAML) implementsZeroTrustIdentityProviderUpdateResponse() { -} +func (r IdentityProviderAccessSAMLParam) implementsZeroTrustIdentityProviderUnionParam() {} // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderUpdateResponseAccessSAMLConfig struct { +type IdentityProviderAccessSAMLConfigParam struct { // A list of SAML attribute names that will be added to your signed JWT token and // can be used in SAML policy rules. - Attributes []string `json:"attributes"` + Attributes param.Field[[]string] `json:"attributes"` // The attribute name for email in the SAML response. - EmailAttributeName string `json:"email_attribute_name"` + EmailAttributeName param.Field[string] `json:"email_attribute_name"` // Add a list of attribute names that will be returned in the response header from // the Access callback. - HeaderAttributes []IdentityProviderUpdateResponseAccessSAMLConfigHeaderAttribute `json:"header_attributes"` + HeaderAttributes param.Field[[]IdentityProviderAccessSAMLConfigHeaderAttributeParam] `json:"header_attributes"` // X509 certificate to verify the signature in the SAML authentication response - IdPPublicCERTs []string `json:"idp_public_certs"` + IdPPublicCERTs param.Field[[]string] `json:"idp_public_certs"` // IdP Entity ID or Issuer URL - IssuerURL string `json:"issuer_url"` + IssuerURL param.Field[string] `json:"issuer_url"` // Sign the SAML authentication request with Access credentials. To verify the // signature, use the public key from the Access certs endpoints. - SignRequest bool `json:"sign_request"` + SignRequest param.Field[bool] `json:"sign_request"` // URL to send the SAML authentication requests to - SSOTargetURL string `json:"sso_target_url"` - JSON identityProviderUpdateResponseAccessSAMLConfigJSON `json:"-"` -} - -// identityProviderUpdateResponseAccessSAMLConfigJSON contains the JSON metadata -// for the struct [IdentityProviderUpdateResponseAccessSAMLConfig] -type identityProviderUpdateResponseAccessSAMLConfigJSON struct { - Attributes apijson.Field - EmailAttributeName apijson.Field - HeaderAttributes apijson.Field - IdPPublicCERTs apijson.Field - IssuerURL apijson.Field - SignRequest apijson.Field - SSOTargetURL apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderUpdateResponseAccessSAMLConfig) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) + SSOTargetURL param.Field[string] `json:"sso_target_url"` } -func (r identityProviderUpdateResponseAccessSAMLConfigJSON) RawJSON() string { - return r.raw +func (r IdentityProviderAccessSAMLConfigParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) } -type IdentityProviderUpdateResponseAccessSAMLConfigHeaderAttribute struct { +type IdentityProviderAccessSAMLConfigHeaderAttributeParam struct { // attribute name from the IDP - AttributeName string `json:"attribute_name"` + AttributeName param.Field[string] `json:"attribute_name"` // header that will be added on the request to the origin - HeaderName string `json:"header_name"` - JSON identityProviderUpdateResponseAccessSAMLConfigHeaderAttributeJSON `json:"-"` -} - -// identityProviderUpdateResponseAccessSAMLConfigHeaderAttributeJSON contains the -// JSON metadata for the struct -// [IdentityProviderUpdateResponseAccessSAMLConfigHeaderAttribute] -type identityProviderUpdateResponseAccessSAMLConfigHeaderAttributeJSON struct { - AttributeName apijson.Field - HeaderName apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderUpdateResponseAccessSAMLConfigHeaderAttribute) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) + HeaderName param.Field[string] `json:"header_name"` } -func (r identityProviderUpdateResponseAccessSAMLConfigHeaderAttributeJSON) RawJSON() string { - return r.raw +func (r IdentityProviderAccessSAMLConfigHeaderAttributeParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) } -type IdentityProviderUpdateResponseAccessYandex struct { +type IdentityProviderAccessYandexParam struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config GenericOAuthConfig `json:"config,required"` + Config param.Field[GenericOAuthConfigParam] `json:"config,required"` // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` + Name param.Field[string] `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - // UUID - ID string `json:"id"` + Type param.Field[IdentityProviderType] `json:"type,required"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderUpdateResponseAccessYandexJSON `json:"-"` -} - -// identityProviderUpdateResponseAccessYandexJSON contains the JSON metadata for -// the struct [IdentityProviderUpdateResponseAccessYandex] -type identityProviderUpdateResponseAccessYandexJSON struct { - Config apijson.Field - Name apijson.Field - Type apijson.Field - ID apijson.Field - ScimConfig apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderUpdateResponseAccessYandex) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` } -func (r identityProviderUpdateResponseAccessYandexJSON) RawJSON() string { - return r.raw +func (r IdentityProviderAccessYandexParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) } -func (r IdentityProviderUpdateResponseAccessYandex) implementsZeroTrustIdentityProviderUpdateResponse() { -} +func (r IdentityProviderAccessYandexParam) implementsZeroTrustIdentityProviderUnionParam() {} -type IdentityProviderUpdateResponseAccessOnetimepin struct { +type IdentityProviderAccessOnetimepinParam struct { // The configuration parameters for the identity provider. To view the required // parameters for a specific provider, refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config interface{} `json:"config,required"` + Config param.Field[interface{}] `json:"config,required"` // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` + Name param.Field[string] `json:"name,required"` // The type of identity provider. To determine the value for a specific provider, // refer to our // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - // UUID - ID string `json:"id"` + Type param.Field[IdentityProviderType] `json:"type,required"` // The configuration settings for enabling a System for Cross-Domain Identity // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderUpdateResponseAccessOnetimepinJSON `json:"-"` + ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` } -// identityProviderUpdateResponseAccessOnetimepinJSON contains the JSON metadata -// for the struct [IdentityProviderUpdateResponseAccessOnetimepin] -type identityProviderUpdateResponseAccessOnetimepinJSON struct { - Config apijson.Field - Name apijson.Field - Type apijson.Field - ID apijson.Field - ScimConfig apijson.Field - raw string - ExtraFields map[string]apijson.Field +func (r IdentityProviderAccessOnetimepinParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) } -func (r *IdentityProviderUpdateResponseAccessOnetimepin) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) +func (r IdentityProviderAccessOnetimepinParam) implementsZeroTrustIdentityProviderUnionParam() {} + +// The type of identity provider. To determine the value for a specific provider, +// refer to our +// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). +type IdentityProviderType string + +const ( + IdentityProviderTypeOnetimepin IdentityProviderType = "onetimepin" + IdentityProviderTypeAzureAD IdentityProviderType = "azureAD" + IdentityProviderTypeSAML IdentityProviderType = "saml" + IdentityProviderTypeCentrify IdentityProviderType = "centrify" + IdentityProviderTypeFacebook IdentityProviderType = "facebook" + IdentityProviderTypeGitHub IdentityProviderType = "github" + IdentityProviderTypeGoogleApps IdentityProviderType = "google-apps" + IdentityProviderTypeGoogle IdentityProviderType = "google" + IdentityProviderTypeLinkedin IdentityProviderType = "linkedin" + IdentityProviderTypeOIDC IdentityProviderType = "oidc" + IdentityProviderTypeOkta IdentityProviderType = "okta" + IdentityProviderTypeOnelogin IdentityProviderType = "onelogin" + IdentityProviderTypePingone IdentityProviderType = "pingone" + IdentityProviderTypeYandex IdentityProviderType = "yandex" +) + +func (r IdentityProviderType) IsKnown() bool { + switch r { + case IdentityProviderTypeOnetimepin, IdentityProviderTypeAzureAD, IdentityProviderTypeSAML, IdentityProviderTypeCentrify, IdentityProviderTypeFacebook, IdentityProviderTypeGitHub, IdentityProviderTypeGoogleApps, IdentityProviderTypeGoogle, IdentityProviderTypeLinkedin, IdentityProviderTypeOIDC, IdentityProviderTypeOkta, IdentityProviderTypeOnelogin, IdentityProviderTypePingone, IdentityProviderTypeYandex: + return true + } + return false } -func (r identityProviderUpdateResponseAccessOnetimepinJSON) RawJSON() string { - return r.raw +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type ScimConfig struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled bool `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision bool `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision bool `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret string `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision bool `json:"user_deprovision"` + JSON scimConfigJSON `json:"-"` } -func (r IdentityProviderUpdateResponseAccessOnetimepin) implementsZeroTrustIdentityProviderUpdateResponse() { +// scimConfigJSON contains the JSON metadata for the struct [ScimConfig] +type scimConfigJSON struct { + Enabled apijson.Field + GroupMemberDeprovision apijson.Field + SeatDeprovision apijson.Field + Secret apijson.Field + UserDeprovision apijson.Field + raw string + ExtraFields map[string]apijson.Field } -type IdentityProviderListResponse struct { - Config interface{} `json:"config"` - // UUID +func (r *ScimConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r scimConfigJSON) RawJSON() string { + return r.raw +} + +// The configuration settings for enabling a System for Cross-Domain Identity +// Management (SCIM) with the identity provider. +type ScimConfigParam struct { + // A flag to enable or disable SCIM for the identity provider. + Enabled param.Field[bool] `json:"enabled"` + // A flag to revoke a user's session in Access and force a reauthentication on the + // user's Gateway session when they have been added or removed from a group in the + // Identity Provider. + GroupMemberDeprovision param.Field[bool] `json:"group_member_deprovision"` + // A flag to remove a user's seat in Zero Trust when they have been deprovisioned + // in the Identity Provider. This cannot be enabled unless user_deprovision is also + // enabled. + SeatDeprovision param.Field[bool] `json:"seat_deprovision"` + // A read-only token generated when the SCIM integration is enabled for the first + // time. It is redacted on subsequent requests. If you lose this you will need to + // refresh it token at /access/identity_providers/:idpID/refresh_scim_secret. + Secret param.Field[string] `json:"secret"` + // A flag to enable revoking a user's session in Access and Gateway when they have + // been deprovisioned in the Identity Provider. + UserDeprovision param.Field[bool] `json:"user_deprovision"` +} + +func (r ScimConfigParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type IdentityProviderListResponse struct { + Config interface{} `json:"config"` + // UUID ID string `json:"id"` // The name of the identity provider, shown to users on the login page. Name string `json:"name,required"` @@ -3471,2122 +2956,71 @@ func (r identityProviderDeleteResponseJSON) RawJSON() string { return r.raw } -type IdentityProviderGetResponse struct { - Config interface{} `json:"config"` - // UUID - ID string `json:"id"` - // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - JSON identityProviderGetResponseJSON `json:"-"` - union IdentityProviderGetResponseUnion -} - -// identityProviderGetResponseJSON contains the JSON metadata for the struct -// [IdentityProviderGetResponse] -type identityProviderGetResponseJSON struct { - Config apijson.Field - ID apijson.Field - Name apijson.Field - ScimConfig apijson.Field - Type apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r identityProviderGetResponseJSON) RawJSON() string { - return r.raw -} - -func (r *IdentityProviderGetResponse) UnmarshalJSON(data []byte) (err error) { - err = apijson.UnmarshalRoot(data, &r.union) - if err != nil { - return err - } - return apijson.Port(r.union, &r) -} - -func (r IdentityProviderGetResponse) AsUnion() IdentityProviderGetResponseUnion { - return r.union -} - -// Union satisfied by [zero_trust.AzureAD], -// [zero_trust.IdentityProviderGetResponseAccessCentrify], -// [zero_trust.IdentityProviderGetResponseAccessFacebook], -// [zero_trust.IdentityProviderGetResponseAccessGitHub], -// [zero_trust.IdentityProviderGetResponseAccessGoogle], -// [zero_trust.IdentityProviderGetResponseAccessGoogleApps], -// [zero_trust.IdentityProviderGetResponseAccessLinkedin], -// [zero_trust.IdentityProviderGetResponseAccessOIDC], -// [zero_trust.IdentityProviderGetResponseAccessOkta], -// [zero_trust.IdentityProviderGetResponseAccessOnelogin], -// [zero_trust.IdentityProviderGetResponseAccessPingone], -// [zero_trust.IdentityProviderGetResponseAccessSAML], -// [zero_trust.IdentityProviderGetResponseAccessYandex] or -// [zero_trust.IdentityProviderGetResponseAccessOnetimepin]. -type IdentityProviderGetResponseUnion interface { - implementsZeroTrustIdentityProviderGetResponse() +type IdentityProviderNewParams struct { + IdentityProvider IdentityProviderUnionParam `json:"identity_provider,required"` + // The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. + AccountID param.Field[string] `path:"account_id"` + // The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + ZoneID param.Field[string] `path:"zone_id"` } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*IdentityProviderGetResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(AzureAD{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderGetResponseAccessCentrify{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderGetResponseAccessFacebook{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderGetResponseAccessGitHub{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderGetResponseAccessGoogle{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderGetResponseAccessGoogleApps{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderGetResponseAccessLinkedin{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderGetResponseAccessOIDC{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderGetResponseAccessOkta{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderGetResponseAccessOnelogin{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderGetResponseAccessPingone{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderGetResponseAccessSAML{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderGetResponseAccessYandex{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(IdentityProviderGetResponseAccessOnetimepin{}), - }, - ) +func (r IdentityProviderNewParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r.IdentityProvider) } -type IdentityProviderGetResponseAccessCentrify struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderGetResponseAccessCentrifyConfig `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - // UUID - ID string `json:"id"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderGetResponseAccessCentrifyJSON `json:"-"` +type IdentityProviderNewResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + // Whether the API call was successful + Success IdentityProviderNewResponseEnvelopeSuccess `json:"success,required"` + Result IdentityProvider `json:"result"` + JSON identityProviderNewResponseEnvelopeJSON `json:"-"` } -// identityProviderGetResponseAccessCentrifyJSON contains the JSON metadata for the -// struct [IdentityProviderGetResponseAccessCentrify] -type identityProviderGetResponseAccessCentrifyJSON struct { - Config apijson.Field - Name apijson.Field - Type apijson.Field - ID apijson.Field - ScimConfig apijson.Field +// identityProviderNewResponseEnvelopeJSON contains the JSON metadata for the +// struct [IdentityProviderNewResponseEnvelope] +type identityProviderNewResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *IdentityProviderGetResponseAccessCentrify) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r identityProviderGetResponseAccessCentrifyJSON) RawJSON() string { - return r.raw -} - -func (r IdentityProviderGetResponseAccessCentrify) implementsZeroTrustIdentityProviderGetResponse() {} - -// The configuration parameters for the identity provider. To view the required -// parameters for a specific provider, refer to our -// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderGetResponseAccessCentrifyConfig struct { - // Your centrify account url - CentrifyAccount string `json:"centrify_account"` - // Your centrify app id - CentrifyAppID string `json:"centrify_app_id"` - // Custom claims - Claims []string `json:"claims"` - // Your OAuth Client ID - ClientID string `json:"client_id"` - // Your OAuth Client Secret - ClientSecret string `json:"client_secret"` - // The claim name for email in the id_token response. - EmailClaimName string `json:"email_claim_name"` - JSON identityProviderGetResponseAccessCentrifyConfigJSON `json:"-"` -} - -// identityProviderGetResponseAccessCentrifyConfigJSON contains the JSON metadata -// for the struct [IdentityProviderGetResponseAccessCentrifyConfig] -type identityProviderGetResponseAccessCentrifyConfigJSON struct { - CentrifyAccount apijson.Field - CentrifyAppID apijson.Field - Claims apijson.Field - ClientID apijson.Field - ClientSecret apijson.Field - EmailClaimName apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderGetResponseAccessCentrifyConfig) UnmarshalJSON(data []byte) (err error) { +func (r *IdentityProviderNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r identityProviderGetResponseAccessCentrifyConfigJSON) RawJSON() string { +func (r identityProviderNewResponseEnvelopeJSON) RawJSON() string { return r.raw } -type IdentityProviderGetResponseAccessFacebook struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config GenericOAuthConfig `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - // UUID - ID string `json:"id"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderGetResponseAccessFacebookJSON `json:"-"` -} - -// identityProviderGetResponseAccessFacebookJSON contains the JSON metadata for the -// struct [IdentityProviderGetResponseAccessFacebook] -type identityProviderGetResponseAccessFacebookJSON struct { - Config apijson.Field - Name apijson.Field - Type apijson.Field - ID apijson.Field - ScimConfig apijson.Field - raw string - ExtraFields map[string]apijson.Field -} +// Whether the API call was successful +type IdentityProviderNewResponseEnvelopeSuccess bool -func (r *IdentityProviderGetResponseAccessFacebook) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} +const ( + IdentityProviderNewResponseEnvelopeSuccessTrue IdentityProviderNewResponseEnvelopeSuccess = true +) -func (r identityProviderGetResponseAccessFacebookJSON) RawJSON() string { - return r.raw +func (r IdentityProviderNewResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case IdentityProviderNewResponseEnvelopeSuccessTrue: + return true + } + return false } -func (r IdentityProviderGetResponseAccessFacebook) implementsZeroTrustIdentityProviderGetResponse() {} - -type IdentityProviderGetResponseAccessGitHub struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config GenericOAuthConfig `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - // UUID - ID string `json:"id"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderGetResponseAccessGitHubJSON `json:"-"` +type IdentityProviderUpdateParams struct { + IdentityProvider IdentityProviderUnionParam `json:"identity_provider,required"` + // The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. + AccountID param.Field[string] `path:"account_id"` + // The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + ZoneID param.Field[string] `path:"zone_id"` } -// identityProviderGetResponseAccessGitHubJSON contains the JSON metadata for the -// struct [IdentityProviderGetResponseAccessGitHub] -type identityProviderGetResponseAccessGitHubJSON struct { - Config apijson.Field - Name apijson.Field - Type apijson.Field - ID apijson.Field - ScimConfig apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderGetResponseAccessGitHub) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r identityProviderGetResponseAccessGitHubJSON) RawJSON() string { - return r.raw -} - -func (r IdentityProviderGetResponseAccessGitHub) implementsZeroTrustIdentityProviderGetResponse() {} - -type IdentityProviderGetResponseAccessGoogle struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderGetResponseAccessGoogleConfig `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - // UUID - ID string `json:"id"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderGetResponseAccessGoogleJSON `json:"-"` -} - -// identityProviderGetResponseAccessGoogleJSON contains the JSON metadata for the -// struct [IdentityProviderGetResponseAccessGoogle] -type identityProviderGetResponseAccessGoogleJSON struct { - Config apijson.Field - Name apijson.Field - Type apijson.Field - ID apijson.Field - ScimConfig apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderGetResponseAccessGoogle) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r identityProviderGetResponseAccessGoogleJSON) RawJSON() string { - return r.raw -} - -func (r IdentityProviderGetResponseAccessGoogle) implementsZeroTrustIdentityProviderGetResponse() {} - -// The configuration parameters for the identity provider. To view the required -// parameters for a specific provider, refer to our -// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderGetResponseAccessGoogleConfig struct { - // Custom claims - Claims []string `json:"claims"` - // Your OAuth Client ID - ClientID string `json:"client_id"` - // Your OAuth Client Secret - ClientSecret string `json:"client_secret"` - // The claim name for email in the id_token response. - EmailClaimName string `json:"email_claim_name"` - JSON identityProviderGetResponseAccessGoogleConfigJSON `json:"-"` -} - -// identityProviderGetResponseAccessGoogleConfigJSON contains the JSON metadata for -// the struct [IdentityProviderGetResponseAccessGoogleConfig] -type identityProviderGetResponseAccessGoogleConfigJSON struct { - Claims apijson.Field - ClientID apijson.Field - ClientSecret apijson.Field - EmailClaimName apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderGetResponseAccessGoogleConfig) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r identityProviderGetResponseAccessGoogleConfigJSON) RawJSON() string { - return r.raw -} - -type IdentityProviderGetResponseAccessGoogleApps struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderGetResponseAccessGoogleAppsConfig `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - // UUID - ID string `json:"id"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderGetResponseAccessGoogleAppsJSON `json:"-"` -} - -// identityProviderGetResponseAccessGoogleAppsJSON contains the JSON metadata for -// the struct [IdentityProviderGetResponseAccessGoogleApps] -type identityProviderGetResponseAccessGoogleAppsJSON struct { - Config apijson.Field - Name apijson.Field - Type apijson.Field - ID apijson.Field - ScimConfig apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderGetResponseAccessGoogleApps) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r identityProviderGetResponseAccessGoogleAppsJSON) RawJSON() string { - return r.raw -} - -func (r IdentityProviderGetResponseAccessGoogleApps) implementsZeroTrustIdentityProviderGetResponse() { -} - -// The configuration parameters for the identity provider. To view the required -// parameters for a specific provider, refer to our -// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderGetResponseAccessGoogleAppsConfig struct { - // Your companies TLD - AppsDomain string `json:"apps_domain"` - // Custom claims - Claims []string `json:"claims"` - // Your OAuth Client ID - ClientID string `json:"client_id"` - // Your OAuth Client Secret - ClientSecret string `json:"client_secret"` - // The claim name for email in the id_token response. - EmailClaimName string `json:"email_claim_name"` - JSON identityProviderGetResponseAccessGoogleAppsConfigJSON `json:"-"` -} - -// identityProviderGetResponseAccessGoogleAppsConfigJSON contains the JSON metadata -// for the struct [IdentityProviderGetResponseAccessGoogleAppsConfig] -type identityProviderGetResponseAccessGoogleAppsConfigJSON struct { - AppsDomain apijson.Field - Claims apijson.Field - ClientID apijson.Field - ClientSecret apijson.Field - EmailClaimName apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderGetResponseAccessGoogleAppsConfig) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r identityProviderGetResponseAccessGoogleAppsConfigJSON) RawJSON() string { - return r.raw -} - -type IdentityProviderGetResponseAccessLinkedin struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config GenericOAuthConfig `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - // UUID - ID string `json:"id"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderGetResponseAccessLinkedinJSON `json:"-"` -} - -// identityProviderGetResponseAccessLinkedinJSON contains the JSON metadata for the -// struct [IdentityProviderGetResponseAccessLinkedin] -type identityProviderGetResponseAccessLinkedinJSON struct { - Config apijson.Field - Name apijson.Field - Type apijson.Field - ID apijson.Field - ScimConfig apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderGetResponseAccessLinkedin) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r identityProviderGetResponseAccessLinkedinJSON) RawJSON() string { - return r.raw -} - -func (r IdentityProviderGetResponseAccessLinkedin) implementsZeroTrustIdentityProviderGetResponse() {} - -type IdentityProviderGetResponseAccessOIDC struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderGetResponseAccessOIDCConfig `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - // UUID - ID string `json:"id"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderGetResponseAccessOIDCJSON `json:"-"` -} - -// identityProviderGetResponseAccessOIDCJSON contains the JSON metadata for the -// struct [IdentityProviderGetResponseAccessOIDC] -type identityProviderGetResponseAccessOIDCJSON struct { - Config apijson.Field - Name apijson.Field - Type apijson.Field - ID apijson.Field - ScimConfig apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderGetResponseAccessOIDC) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r identityProviderGetResponseAccessOIDCJSON) RawJSON() string { - return r.raw -} - -func (r IdentityProviderGetResponseAccessOIDC) implementsZeroTrustIdentityProviderGetResponse() {} - -// The configuration parameters for the identity provider. To view the required -// parameters for a specific provider, refer to our -// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderGetResponseAccessOIDCConfig struct { - // The authorization_endpoint URL of your IdP - AuthURL string `json:"auth_url"` - // The jwks_uri endpoint of your IdP to allow the IdP keys to sign the tokens - CERTsURL string `json:"certs_url"` - // Custom claims - Claims []string `json:"claims"` - // Your OAuth Client ID - ClientID string `json:"client_id"` - // Your OAuth Client Secret - ClientSecret string `json:"client_secret"` - // The claim name for email in the id_token response. - EmailClaimName string `json:"email_claim_name"` - // OAuth scopes - Scopes []string `json:"scopes"` - // The token_endpoint URL of your IdP - TokenURL string `json:"token_url"` - JSON identityProviderGetResponseAccessOIDCConfigJSON `json:"-"` -} - -// identityProviderGetResponseAccessOIDCConfigJSON contains the JSON metadata for -// the struct [IdentityProviderGetResponseAccessOIDCConfig] -type identityProviderGetResponseAccessOIDCConfigJSON struct { - AuthURL apijson.Field - CERTsURL apijson.Field - Claims apijson.Field - ClientID apijson.Field - ClientSecret apijson.Field - EmailClaimName apijson.Field - Scopes apijson.Field - TokenURL apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderGetResponseAccessOIDCConfig) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r identityProviderGetResponseAccessOIDCConfigJSON) RawJSON() string { - return r.raw -} - -type IdentityProviderGetResponseAccessOkta struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderGetResponseAccessOktaConfig `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - // UUID - ID string `json:"id"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderGetResponseAccessOktaJSON `json:"-"` -} - -// identityProviderGetResponseAccessOktaJSON contains the JSON metadata for the -// struct [IdentityProviderGetResponseAccessOkta] -type identityProviderGetResponseAccessOktaJSON struct { - Config apijson.Field - Name apijson.Field - Type apijson.Field - ID apijson.Field - ScimConfig apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderGetResponseAccessOkta) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r identityProviderGetResponseAccessOktaJSON) RawJSON() string { - return r.raw -} - -func (r IdentityProviderGetResponseAccessOkta) implementsZeroTrustIdentityProviderGetResponse() {} - -// The configuration parameters for the identity provider. To view the required -// parameters for a specific provider, refer to our -// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderGetResponseAccessOktaConfig struct { - // Your okta authorization server id - AuthorizationServerID string `json:"authorization_server_id"` - // Custom claims - Claims []string `json:"claims"` - // Your OAuth Client ID - ClientID string `json:"client_id"` - // Your OAuth Client Secret - ClientSecret string `json:"client_secret"` - // The claim name for email in the id_token response. - EmailClaimName string `json:"email_claim_name"` - // Your okta account url - OktaAccount string `json:"okta_account"` - JSON identityProviderGetResponseAccessOktaConfigJSON `json:"-"` -} - -// identityProviderGetResponseAccessOktaConfigJSON contains the JSON metadata for -// the struct [IdentityProviderGetResponseAccessOktaConfig] -type identityProviderGetResponseAccessOktaConfigJSON struct { - AuthorizationServerID apijson.Field - Claims apijson.Field - ClientID apijson.Field - ClientSecret apijson.Field - EmailClaimName apijson.Field - OktaAccount apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderGetResponseAccessOktaConfig) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r identityProviderGetResponseAccessOktaConfigJSON) RawJSON() string { - return r.raw -} - -type IdentityProviderGetResponseAccessOnelogin struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderGetResponseAccessOneloginConfig `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - // UUID - ID string `json:"id"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderGetResponseAccessOneloginJSON `json:"-"` -} - -// identityProviderGetResponseAccessOneloginJSON contains the JSON metadata for the -// struct [IdentityProviderGetResponseAccessOnelogin] -type identityProviderGetResponseAccessOneloginJSON struct { - Config apijson.Field - Name apijson.Field - Type apijson.Field - ID apijson.Field - ScimConfig apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderGetResponseAccessOnelogin) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r identityProviderGetResponseAccessOneloginJSON) RawJSON() string { - return r.raw -} - -func (r IdentityProviderGetResponseAccessOnelogin) implementsZeroTrustIdentityProviderGetResponse() {} - -// The configuration parameters for the identity provider. To view the required -// parameters for a specific provider, refer to our -// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderGetResponseAccessOneloginConfig struct { - // Custom claims - Claims []string `json:"claims"` - // Your OAuth Client ID - ClientID string `json:"client_id"` - // Your OAuth Client Secret - ClientSecret string `json:"client_secret"` - // The claim name for email in the id_token response. - EmailClaimName string `json:"email_claim_name"` - // Your OneLogin account url - OneloginAccount string `json:"onelogin_account"` - JSON identityProviderGetResponseAccessOneloginConfigJSON `json:"-"` -} - -// identityProviderGetResponseAccessOneloginConfigJSON contains the JSON metadata -// for the struct [IdentityProviderGetResponseAccessOneloginConfig] -type identityProviderGetResponseAccessOneloginConfigJSON struct { - Claims apijson.Field - ClientID apijson.Field - ClientSecret apijson.Field - EmailClaimName apijson.Field - OneloginAccount apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderGetResponseAccessOneloginConfig) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r identityProviderGetResponseAccessOneloginConfigJSON) RawJSON() string { - return r.raw -} - -type IdentityProviderGetResponseAccessPingone struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderGetResponseAccessPingoneConfig `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - // UUID - ID string `json:"id"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderGetResponseAccessPingoneJSON `json:"-"` -} - -// identityProviderGetResponseAccessPingoneJSON contains the JSON metadata for the -// struct [IdentityProviderGetResponseAccessPingone] -type identityProviderGetResponseAccessPingoneJSON struct { - Config apijson.Field - Name apijson.Field - Type apijson.Field - ID apijson.Field - ScimConfig apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderGetResponseAccessPingone) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r identityProviderGetResponseAccessPingoneJSON) RawJSON() string { - return r.raw -} - -func (r IdentityProviderGetResponseAccessPingone) implementsZeroTrustIdentityProviderGetResponse() {} - -// The configuration parameters for the identity provider. To view the required -// parameters for a specific provider, refer to our -// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderGetResponseAccessPingoneConfig struct { - // Custom claims - Claims []string `json:"claims"` - // Your OAuth Client ID - ClientID string `json:"client_id"` - // Your OAuth Client Secret - ClientSecret string `json:"client_secret"` - // The claim name for email in the id_token response. - EmailClaimName string `json:"email_claim_name"` - // Your PingOne environment identifier - PingEnvID string `json:"ping_env_id"` - JSON identityProviderGetResponseAccessPingoneConfigJSON `json:"-"` -} - -// identityProviderGetResponseAccessPingoneConfigJSON contains the JSON metadata -// for the struct [IdentityProviderGetResponseAccessPingoneConfig] -type identityProviderGetResponseAccessPingoneConfigJSON struct { - Claims apijson.Field - ClientID apijson.Field - ClientSecret apijson.Field - EmailClaimName apijson.Field - PingEnvID apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderGetResponseAccessPingoneConfig) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r identityProviderGetResponseAccessPingoneConfigJSON) RawJSON() string { - return r.raw -} - -type IdentityProviderGetResponseAccessSAML struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config IdentityProviderGetResponseAccessSAMLConfig `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - // UUID - ID string `json:"id"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderGetResponseAccessSAMLJSON `json:"-"` -} - -// identityProviderGetResponseAccessSAMLJSON contains the JSON metadata for the -// struct [IdentityProviderGetResponseAccessSAML] -type identityProviderGetResponseAccessSAMLJSON struct { - Config apijson.Field - Name apijson.Field - Type apijson.Field - ID apijson.Field - ScimConfig apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderGetResponseAccessSAML) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r identityProviderGetResponseAccessSAMLJSON) RawJSON() string { - return r.raw -} - -func (r IdentityProviderGetResponseAccessSAML) implementsZeroTrustIdentityProviderGetResponse() {} - -// The configuration parameters for the identity provider. To view the required -// parameters for a specific provider, refer to our -// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderGetResponseAccessSAMLConfig struct { - // A list of SAML attribute names that will be added to your signed JWT token and - // can be used in SAML policy rules. - Attributes []string `json:"attributes"` - // The attribute name for email in the SAML response. - EmailAttributeName string `json:"email_attribute_name"` - // Add a list of attribute names that will be returned in the response header from - // the Access callback. - HeaderAttributes []IdentityProviderGetResponseAccessSAMLConfigHeaderAttribute `json:"header_attributes"` - // X509 certificate to verify the signature in the SAML authentication response - IdPPublicCERTs []string `json:"idp_public_certs"` - // IdP Entity ID or Issuer URL - IssuerURL string `json:"issuer_url"` - // Sign the SAML authentication request with Access credentials. To verify the - // signature, use the public key from the Access certs endpoints. - SignRequest bool `json:"sign_request"` - // URL to send the SAML authentication requests to - SSOTargetURL string `json:"sso_target_url"` - JSON identityProviderGetResponseAccessSAMLConfigJSON `json:"-"` -} - -// identityProviderGetResponseAccessSAMLConfigJSON contains the JSON metadata for -// the struct [IdentityProviderGetResponseAccessSAMLConfig] -type identityProviderGetResponseAccessSAMLConfigJSON struct { - Attributes apijson.Field - EmailAttributeName apijson.Field - HeaderAttributes apijson.Field - IdPPublicCERTs apijson.Field - IssuerURL apijson.Field - SignRequest apijson.Field - SSOTargetURL apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderGetResponseAccessSAMLConfig) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r identityProviderGetResponseAccessSAMLConfigJSON) RawJSON() string { - return r.raw -} - -type IdentityProviderGetResponseAccessSAMLConfigHeaderAttribute struct { - // attribute name from the IDP - AttributeName string `json:"attribute_name"` - // header that will be added on the request to the origin - HeaderName string `json:"header_name"` - JSON identityProviderGetResponseAccessSAMLConfigHeaderAttributeJSON `json:"-"` -} - -// identityProviderGetResponseAccessSAMLConfigHeaderAttributeJSON contains the JSON -// metadata for the struct -// [IdentityProviderGetResponseAccessSAMLConfigHeaderAttribute] -type identityProviderGetResponseAccessSAMLConfigHeaderAttributeJSON struct { - AttributeName apijson.Field - HeaderName apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderGetResponseAccessSAMLConfigHeaderAttribute) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r identityProviderGetResponseAccessSAMLConfigHeaderAttributeJSON) RawJSON() string { - return r.raw -} - -type IdentityProviderGetResponseAccessYandex struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config GenericOAuthConfig `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - // UUID - ID string `json:"id"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderGetResponseAccessYandexJSON `json:"-"` -} - -// identityProviderGetResponseAccessYandexJSON contains the JSON metadata for the -// struct [IdentityProviderGetResponseAccessYandex] -type identityProviderGetResponseAccessYandexJSON struct { - Config apijson.Field - Name apijson.Field - Type apijson.Field - ID apijson.Field - ScimConfig apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderGetResponseAccessYandex) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r identityProviderGetResponseAccessYandexJSON) RawJSON() string { - return r.raw -} - -func (r IdentityProviderGetResponseAccessYandex) implementsZeroTrustIdentityProviderGetResponse() {} - -type IdentityProviderGetResponseAccessOnetimepin struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config interface{} `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name string `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type IdentityProviderType `json:"type,required"` - // UUID - ID string `json:"id"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig ScimConfig `json:"scim_config"` - JSON identityProviderGetResponseAccessOnetimepinJSON `json:"-"` -} - -// identityProviderGetResponseAccessOnetimepinJSON contains the JSON metadata for -// the struct [IdentityProviderGetResponseAccessOnetimepin] -type identityProviderGetResponseAccessOnetimepinJSON struct { - Config apijson.Field - Name apijson.Field - Type apijson.Field - ID apijson.Field - ScimConfig apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderGetResponseAccessOnetimepin) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r identityProviderGetResponseAccessOnetimepinJSON) RawJSON() string { - return r.raw -} - -func (r IdentityProviderGetResponseAccessOnetimepin) implementsZeroTrustIdentityProviderGetResponse() { -} - -type IdentityProviderNewParams struct { - Body IdentityProviderNewParamsBodyUnion `json:"body,required"` - // The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. - AccountID param.Field[string] `path:"account_id"` - // The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. - ZoneID param.Field[string] `path:"zone_id"` -} - -func (r IdentityProviderNewParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) -} - -type IdentityProviderNewParamsBody struct { - Config param.Field[interface{}] `json:"config"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` -} - -func (r IdentityProviderNewParamsBody) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderNewParamsBody) implementsZeroTrustIdentityProviderNewParamsBodyUnion() {} - -// Satisfied by [zero_trust.AzureADParam], -// [zero_trust.IdentityProviderNewParamsBodyAccessCentrify], -// [zero_trust.IdentityProviderNewParamsBodyAccessFacebook], -// [zero_trust.IdentityProviderNewParamsBodyAccessGitHub], -// [zero_trust.IdentityProviderNewParamsBodyAccessGoogle], -// [zero_trust.IdentityProviderNewParamsBodyAccessGoogleApps], -// [zero_trust.IdentityProviderNewParamsBodyAccessLinkedin], -// [zero_trust.IdentityProviderNewParamsBodyAccessOIDC], -// [zero_trust.IdentityProviderNewParamsBodyAccessOkta], -// [zero_trust.IdentityProviderNewParamsBodyAccessOnelogin], -// [zero_trust.IdentityProviderNewParamsBodyAccessPingone], -// [zero_trust.IdentityProviderNewParamsBodyAccessSAML], -// [zero_trust.IdentityProviderNewParamsBodyAccessYandex], -// [zero_trust.IdentityProviderNewParamsBodyAccessOnetimepin], -// [IdentityProviderNewParamsBody]. -type IdentityProviderNewParamsBodyUnion interface { - implementsZeroTrustIdentityProviderNewParamsBodyUnion() -} - -type IdentityProviderNewParamsBodyAccessCentrify struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[IdentityProviderNewParamsBodyAccessCentrifyConfig] `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` -} - -func (r IdentityProviderNewParamsBodyAccessCentrify) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderNewParamsBodyAccessCentrify) implementsZeroTrustIdentityProviderNewParamsBodyUnion() { -} - -// The configuration parameters for the identity provider. To view the required -// parameters for a specific provider, refer to our -// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderNewParamsBodyAccessCentrifyConfig struct { - // Your centrify account url - CentrifyAccount param.Field[string] `json:"centrify_account"` - // Your centrify app id - CentrifyAppID param.Field[string] `json:"centrify_app_id"` - // Custom claims - Claims param.Field[[]string] `json:"claims"` - // Your OAuth Client ID - ClientID param.Field[string] `json:"client_id"` - // Your OAuth Client Secret - ClientSecret param.Field[string] `json:"client_secret"` - // The claim name for email in the id_token response. - EmailClaimName param.Field[string] `json:"email_claim_name"` -} - -func (r IdentityProviderNewParamsBodyAccessCentrifyConfig) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type IdentityProviderNewParamsBodyAccessFacebook struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[GenericOAuthConfigParam] `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` -} - -func (r IdentityProviderNewParamsBodyAccessFacebook) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderNewParamsBodyAccessFacebook) implementsZeroTrustIdentityProviderNewParamsBodyUnion() { -} - -type IdentityProviderNewParamsBodyAccessGitHub struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[GenericOAuthConfigParam] `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` -} - -func (r IdentityProviderNewParamsBodyAccessGitHub) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderNewParamsBodyAccessGitHub) implementsZeroTrustIdentityProviderNewParamsBodyUnion() { -} - -type IdentityProviderNewParamsBodyAccessGoogle struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[IdentityProviderNewParamsBodyAccessGoogleConfig] `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` -} - -func (r IdentityProviderNewParamsBodyAccessGoogle) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderNewParamsBodyAccessGoogle) implementsZeroTrustIdentityProviderNewParamsBodyUnion() { -} - -// The configuration parameters for the identity provider. To view the required -// parameters for a specific provider, refer to our -// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderNewParamsBodyAccessGoogleConfig struct { - // Custom claims - Claims param.Field[[]string] `json:"claims"` - // Your OAuth Client ID - ClientID param.Field[string] `json:"client_id"` - // Your OAuth Client Secret - ClientSecret param.Field[string] `json:"client_secret"` - // The claim name for email in the id_token response. - EmailClaimName param.Field[string] `json:"email_claim_name"` -} - -func (r IdentityProviderNewParamsBodyAccessGoogleConfig) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type IdentityProviderNewParamsBodyAccessGoogleApps struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[IdentityProviderNewParamsBodyAccessGoogleAppsConfig] `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` -} - -func (r IdentityProviderNewParamsBodyAccessGoogleApps) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderNewParamsBodyAccessGoogleApps) implementsZeroTrustIdentityProviderNewParamsBodyUnion() { -} - -// The configuration parameters for the identity provider. To view the required -// parameters for a specific provider, refer to our -// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderNewParamsBodyAccessGoogleAppsConfig struct { - // Your companies TLD - AppsDomain param.Field[string] `json:"apps_domain"` - // Custom claims - Claims param.Field[[]string] `json:"claims"` - // Your OAuth Client ID - ClientID param.Field[string] `json:"client_id"` - // Your OAuth Client Secret - ClientSecret param.Field[string] `json:"client_secret"` - // The claim name for email in the id_token response. - EmailClaimName param.Field[string] `json:"email_claim_name"` -} - -func (r IdentityProviderNewParamsBodyAccessGoogleAppsConfig) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type IdentityProviderNewParamsBodyAccessLinkedin struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[GenericOAuthConfigParam] `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` -} - -func (r IdentityProviderNewParamsBodyAccessLinkedin) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderNewParamsBodyAccessLinkedin) implementsZeroTrustIdentityProviderNewParamsBodyUnion() { -} - -type IdentityProviderNewParamsBodyAccessOIDC struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[IdentityProviderNewParamsBodyAccessOIDCConfig] `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` -} - -func (r IdentityProviderNewParamsBodyAccessOIDC) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderNewParamsBodyAccessOIDC) implementsZeroTrustIdentityProviderNewParamsBodyUnion() { -} - -// The configuration parameters for the identity provider. To view the required -// parameters for a specific provider, refer to our -// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderNewParamsBodyAccessOIDCConfig struct { - // The authorization_endpoint URL of your IdP - AuthURL param.Field[string] `json:"auth_url"` - // The jwks_uri endpoint of your IdP to allow the IdP keys to sign the tokens - CERTsURL param.Field[string] `json:"certs_url"` - // Custom claims - Claims param.Field[[]string] `json:"claims"` - // Your OAuth Client ID - ClientID param.Field[string] `json:"client_id"` - // Your OAuth Client Secret - ClientSecret param.Field[string] `json:"client_secret"` - // The claim name for email in the id_token response. - EmailClaimName param.Field[string] `json:"email_claim_name"` - // OAuth scopes - Scopes param.Field[[]string] `json:"scopes"` - // The token_endpoint URL of your IdP - TokenURL param.Field[string] `json:"token_url"` -} - -func (r IdentityProviderNewParamsBodyAccessOIDCConfig) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type IdentityProviderNewParamsBodyAccessOkta struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[IdentityProviderNewParamsBodyAccessOktaConfig] `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` -} - -func (r IdentityProviderNewParamsBodyAccessOkta) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderNewParamsBodyAccessOkta) implementsZeroTrustIdentityProviderNewParamsBodyUnion() { -} - -// The configuration parameters for the identity provider. To view the required -// parameters for a specific provider, refer to our -// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderNewParamsBodyAccessOktaConfig struct { - // Your okta authorization server id - AuthorizationServerID param.Field[string] `json:"authorization_server_id"` - // Custom claims - Claims param.Field[[]string] `json:"claims"` - // Your OAuth Client ID - ClientID param.Field[string] `json:"client_id"` - // Your OAuth Client Secret - ClientSecret param.Field[string] `json:"client_secret"` - // The claim name for email in the id_token response. - EmailClaimName param.Field[string] `json:"email_claim_name"` - // Your okta account url - OktaAccount param.Field[string] `json:"okta_account"` -} - -func (r IdentityProviderNewParamsBodyAccessOktaConfig) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type IdentityProviderNewParamsBodyAccessOnelogin struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[IdentityProviderNewParamsBodyAccessOneloginConfig] `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` -} - -func (r IdentityProviderNewParamsBodyAccessOnelogin) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderNewParamsBodyAccessOnelogin) implementsZeroTrustIdentityProviderNewParamsBodyUnion() { -} - -// The configuration parameters for the identity provider. To view the required -// parameters for a specific provider, refer to our -// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderNewParamsBodyAccessOneloginConfig struct { - // Custom claims - Claims param.Field[[]string] `json:"claims"` - // Your OAuth Client ID - ClientID param.Field[string] `json:"client_id"` - // Your OAuth Client Secret - ClientSecret param.Field[string] `json:"client_secret"` - // The claim name for email in the id_token response. - EmailClaimName param.Field[string] `json:"email_claim_name"` - // Your OneLogin account url - OneloginAccount param.Field[string] `json:"onelogin_account"` -} - -func (r IdentityProviderNewParamsBodyAccessOneloginConfig) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type IdentityProviderNewParamsBodyAccessPingone struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[IdentityProviderNewParamsBodyAccessPingoneConfig] `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` -} - -func (r IdentityProviderNewParamsBodyAccessPingone) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderNewParamsBodyAccessPingone) implementsZeroTrustIdentityProviderNewParamsBodyUnion() { -} - -// The configuration parameters for the identity provider. To view the required -// parameters for a specific provider, refer to our -// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderNewParamsBodyAccessPingoneConfig struct { - // Custom claims - Claims param.Field[[]string] `json:"claims"` - // Your OAuth Client ID - ClientID param.Field[string] `json:"client_id"` - // Your OAuth Client Secret - ClientSecret param.Field[string] `json:"client_secret"` - // The claim name for email in the id_token response. - EmailClaimName param.Field[string] `json:"email_claim_name"` - // Your PingOne environment identifier - PingEnvID param.Field[string] `json:"ping_env_id"` -} - -func (r IdentityProviderNewParamsBodyAccessPingoneConfig) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type IdentityProviderNewParamsBodyAccessSAML struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[IdentityProviderNewParamsBodyAccessSAMLConfig] `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` -} - -func (r IdentityProviderNewParamsBodyAccessSAML) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderNewParamsBodyAccessSAML) implementsZeroTrustIdentityProviderNewParamsBodyUnion() { -} - -// The configuration parameters for the identity provider. To view the required -// parameters for a specific provider, refer to our -// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderNewParamsBodyAccessSAMLConfig struct { - // A list of SAML attribute names that will be added to your signed JWT token and - // can be used in SAML policy rules. - Attributes param.Field[[]string] `json:"attributes"` - // The attribute name for email in the SAML response. - EmailAttributeName param.Field[string] `json:"email_attribute_name"` - // Add a list of attribute names that will be returned in the response header from - // the Access callback. - HeaderAttributes param.Field[[]IdentityProviderNewParamsBodyAccessSAMLConfigHeaderAttribute] `json:"header_attributes"` - // X509 certificate to verify the signature in the SAML authentication response - IdPPublicCERTs param.Field[[]string] `json:"idp_public_certs"` - // IdP Entity ID or Issuer URL - IssuerURL param.Field[string] `json:"issuer_url"` - // Sign the SAML authentication request with Access credentials. To verify the - // signature, use the public key from the Access certs endpoints. - SignRequest param.Field[bool] `json:"sign_request"` - // URL to send the SAML authentication requests to - SSOTargetURL param.Field[string] `json:"sso_target_url"` -} - -func (r IdentityProviderNewParamsBodyAccessSAMLConfig) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type IdentityProviderNewParamsBodyAccessSAMLConfigHeaderAttribute struct { - // attribute name from the IDP - AttributeName param.Field[string] `json:"attribute_name"` - // header that will be added on the request to the origin - HeaderName param.Field[string] `json:"header_name"` -} - -func (r IdentityProviderNewParamsBodyAccessSAMLConfigHeaderAttribute) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type IdentityProviderNewParamsBodyAccessYandex struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[GenericOAuthConfigParam] `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` -} - -func (r IdentityProviderNewParamsBodyAccessYandex) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderNewParamsBodyAccessYandex) implementsZeroTrustIdentityProviderNewParamsBodyUnion() { -} - -type IdentityProviderNewParamsBodyAccessOnetimepin struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[interface{}] `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` -} - -func (r IdentityProviderNewParamsBodyAccessOnetimepin) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderNewParamsBodyAccessOnetimepin) implementsZeroTrustIdentityProviderNewParamsBodyUnion() { -} - -type IdentityProviderNewResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - // Whether the API call was successful - Success IdentityProviderNewResponseEnvelopeSuccess `json:"success,required"` - Result IdentityProviderNewResponse `json:"result"` - JSON identityProviderNewResponseEnvelopeJSON `json:"-"` -} - -// identityProviderNewResponseEnvelopeJSON contains the JSON metadata for the -// struct [IdentityProviderNewResponseEnvelope] -type identityProviderNewResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field - Result apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *IdentityProviderNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r identityProviderNewResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -// Whether the API call was successful -type IdentityProviderNewResponseEnvelopeSuccess bool - -const ( - IdentityProviderNewResponseEnvelopeSuccessTrue IdentityProviderNewResponseEnvelopeSuccess = true -) - -func (r IdentityProviderNewResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case IdentityProviderNewResponseEnvelopeSuccessTrue: - return true - } - return false -} - -type IdentityProviderUpdateParams struct { - Body IdentityProviderUpdateParamsBodyUnion `json:"body,required"` - // The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. - AccountID param.Field[string] `path:"account_id"` - // The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. - ZoneID param.Field[string] `path:"zone_id"` -} - -func (r IdentityProviderUpdateParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) -} - -type IdentityProviderUpdateParamsBody struct { - Config param.Field[interface{}] `json:"config"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` -} - -func (r IdentityProviderUpdateParamsBody) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderUpdateParamsBody) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { -} - -// Satisfied by [zero_trust.AzureADParam], -// [zero_trust.IdentityProviderUpdateParamsBodyAccessCentrify], -// [zero_trust.IdentityProviderUpdateParamsBodyAccessFacebook], -// [zero_trust.IdentityProviderUpdateParamsBodyAccessGitHub], -// [zero_trust.IdentityProviderUpdateParamsBodyAccessGoogle], -// [zero_trust.IdentityProviderUpdateParamsBodyAccessGoogleApps], -// [zero_trust.IdentityProviderUpdateParamsBodyAccessLinkedin], -// [zero_trust.IdentityProviderUpdateParamsBodyAccessOIDC], -// [zero_trust.IdentityProviderUpdateParamsBodyAccessOkta], -// [zero_trust.IdentityProviderUpdateParamsBodyAccessOnelogin], -// [zero_trust.IdentityProviderUpdateParamsBodyAccessPingone], -// [zero_trust.IdentityProviderUpdateParamsBodyAccessSAML], -// [zero_trust.IdentityProviderUpdateParamsBodyAccessYandex], -// [zero_trust.IdentityProviderUpdateParamsBodyAccessOnetimepin], -// [IdentityProviderUpdateParamsBody]. -type IdentityProviderUpdateParamsBodyUnion interface { - implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() -} - -type IdentityProviderUpdateParamsBodyAccessCentrify struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[IdentityProviderUpdateParamsBodyAccessCentrifyConfig] `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` -} - -func (r IdentityProviderUpdateParamsBodyAccessCentrify) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderUpdateParamsBodyAccessCentrify) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { -} - -// The configuration parameters for the identity provider. To view the required -// parameters for a specific provider, refer to our -// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderUpdateParamsBodyAccessCentrifyConfig struct { - // Your centrify account url - CentrifyAccount param.Field[string] `json:"centrify_account"` - // Your centrify app id - CentrifyAppID param.Field[string] `json:"centrify_app_id"` - // Custom claims - Claims param.Field[[]string] `json:"claims"` - // Your OAuth Client ID - ClientID param.Field[string] `json:"client_id"` - // Your OAuth Client Secret - ClientSecret param.Field[string] `json:"client_secret"` - // The claim name for email in the id_token response. - EmailClaimName param.Field[string] `json:"email_claim_name"` -} - -func (r IdentityProviderUpdateParamsBodyAccessCentrifyConfig) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type IdentityProviderUpdateParamsBodyAccessFacebook struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[GenericOAuthConfigParam] `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` -} - -func (r IdentityProviderUpdateParamsBodyAccessFacebook) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderUpdateParamsBodyAccessFacebook) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { -} - -type IdentityProviderUpdateParamsBodyAccessGitHub struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[GenericOAuthConfigParam] `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` -} - -func (r IdentityProviderUpdateParamsBodyAccessGitHub) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderUpdateParamsBodyAccessGitHub) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { -} - -type IdentityProviderUpdateParamsBodyAccessGoogle struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[IdentityProviderUpdateParamsBodyAccessGoogleConfig] `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` -} - -func (r IdentityProviderUpdateParamsBodyAccessGoogle) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderUpdateParamsBodyAccessGoogle) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { -} - -// The configuration parameters for the identity provider. To view the required -// parameters for a specific provider, refer to our -// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderUpdateParamsBodyAccessGoogleConfig struct { - // Custom claims - Claims param.Field[[]string] `json:"claims"` - // Your OAuth Client ID - ClientID param.Field[string] `json:"client_id"` - // Your OAuth Client Secret - ClientSecret param.Field[string] `json:"client_secret"` - // The claim name for email in the id_token response. - EmailClaimName param.Field[string] `json:"email_claim_name"` -} - -func (r IdentityProviderUpdateParamsBodyAccessGoogleConfig) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type IdentityProviderUpdateParamsBodyAccessGoogleApps struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[IdentityProviderUpdateParamsBodyAccessGoogleAppsConfig] `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` -} - -func (r IdentityProviderUpdateParamsBodyAccessGoogleApps) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderUpdateParamsBodyAccessGoogleApps) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { -} - -// The configuration parameters for the identity provider. To view the required -// parameters for a specific provider, refer to our -// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderUpdateParamsBodyAccessGoogleAppsConfig struct { - // Your companies TLD - AppsDomain param.Field[string] `json:"apps_domain"` - // Custom claims - Claims param.Field[[]string] `json:"claims"` - // Your OAuth Client ID - ClientID param.Field[string] `json:"client_id"` - // Your OAuth Client Secret - ClientSecret param.Field[string] `json:"client_secret"` - // The claim name for email in the id_token response. - EmailClaimName param.Field[string] `json:"email_claim_name"` -} - -func (r IdentityProviderUpdateParamsBodyAccessGoogleAppsConfig) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type IdentityProviderUpdateParamsBodyAccessLinkedin struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[GenericOAuthConfigParam] `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` -} - -func (r IdentityProviderUpdateParamsBodyAccessLinkedin) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderUpdateParamsBodyAccessLinkedin) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { -} - -type IdentityProviderUpdateParamsBodyAccessOIDC struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[IdentityProviderUpdateParamsBodyAccessOIDCConfig] `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` -} - -func (r IdentityProviderUpdateParamsBodyAccessOIDC) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderUpdateParamsBodyAccessOIDC) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { -} - -// The configuration parameters for the identity provider. To view the required -// parameters for a specific provider, refer to our -// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderUpdateParamsBodyAccessOIDCConfig struct { - // The authorization_endpoint URL of your IdP - AuthURL param.Field[string] `json:"auth_url"` - // The jwks_uri endpoint of your IdP to allow the IdP keys to sign the tokens - CERTsURL param.Field[string] `json:"certs_url"` - // Custom claims - Claims param.Field[[]string] `json:"claims"` - // Your OAuth Client ID - ClientID param.Field[string] `json:"client_id"` - // Your OAuth Client Secret - ClientSecret param.Field[string] `json:"client_secret"` - // The claim name for email in the id_token response. - EmailClaimName param.Field[string] `json:"email_claim_name"` - // OAuth scopes - Scopes param.Field[[]string] `json:"scopes"` - // The token_endpoint URL of your IdP - TokenURL param.Field[string] `json:"token_url"` -} - -func (r IdentityProviderUpdateParamsBodyAccessOIDCConfig) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type IdentityProviderUpdateParamsBodyAccessOkta struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[IdentityProviderUpdateParamsBodyAccessOktaConfig] `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` -} - -func (r IdentityProviderUpdateParamsBodyAccessOkta) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderUpdateParamsBodyAccessOkta) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { -} - -// The configuration parameters for the identity provider. To view the required -// parameters for a specific provider, refer to our -// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderUpdateParamsBodyAccessOktaConfig struct { - // Your okta authorization server id - AuthorizationServerID param.Field[string] `json:"authorization_server_id"` - // Custom claims - Claims param.Field[[]string] `json:"claims"` - // Your OAuth Client ID - ClientID param.Field[string] `json:"client_id"` - // Your OAuth Client Secret - ClientSecret param.Field[string] `json:"client_secret"` - // The claim name for email in the id_token response. - EmailClaimName param.Field[string] `json:"email_claim_name"` - // Your okta account url - OktaAccount param.Field[string] `json:"okta_account"` -} - -func (r IdentityProviderUpdateParamsBodyAccessOktaConfig) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type IdentityProviderUpdateParamsBodyAccessOnelogin struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[IdentityProviderUpdateParamsBodyAccessOneloginConfig] `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` -} - -func (r IdentityProviderUpdateParamsBodyAccessOnelogin) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderUpdateParamsBodyAccessOnelogin) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { -} - -// The configuration parameters for the identity provider. To view the required -// parameters for a specific provider, refer to our -// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderUpdateParamsBodyAccessOneloginConfig struct { - // Custom claims - Claims param.Field[[]string] `json:"claims"` - // Your OAuth Client ID - ClientID param.Field[string] `json:"client_id"` - // Your OAuth Client Secret - ClientSecret param.Field[string] `json:"client_secret"` - // The claim name for email in the id_token response. - EmailClaimName param.Field[string] `json:"email_claim_name"` - // Your OneLogin account url - OneloginAccount param.Field[string] `json:"onelogin_account"` -} - -func (r IdentityProviderUpdateParamsBodyAccessOneloginConfig) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type IdentityProviderUpdateParamsBodyAccessPingone struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[IdentityProviderUpdateParamsBodyAccessPingoneConfig] `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` -} - -func (r IdentityProviderUpdateParamsBodyAccessPingone) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderUpdateParamsBodyAccessPingone) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { -} - -// The configuration parameters for the identity provider. To view the required -// parameters for a specific provider, refer to our -// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderUpdateParamsBodyAccessPingoneConfig struct { - // Custom claims - Claims param.Field[[]string] `json:"claims"` - // Your OAuth Client ID - ClientID param.Field[string] `json:"client_id"` - // Your OAuth Client Secret - ClientSecret param.Field[string] `json:"client_secret"` - // The claim name for email in the id_token response. - EmailClaimName param.Field[string] `json:"email_claim_name"` - // Your PingOne environment identifier - PingEnvID param.Field[string] `json:"ping_env_id"` -} - -func (r IdentityProviderUpdateParamsBodyAccessPingoneConfig) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type IdentityProviderUpdateParamsBodyAccessSAML struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[IdentityProviderUpdateParamsBodyAccessSAMLConfig] `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` -} - -func (r IdentityProviderUpdateParamsBodyAccessSAML) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderUpdateParamsBodyAccessSAML) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { -} - -// The configuration parameters for the identity provider. To view the required -// parameters for a specific provider, refer to our -// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). -type IdentityProviderUpdateParamsBodyAccessSAMLConfig struct { - // A list of SAML attribute names that will be added to your signed JWT token and - // can be used in SAML policy rules. - Attributes param.Field[[]string] `json:"attributes"` - // The attribute name for email in the SAML response. - EmailAttributeName param.Field[string] `json:"email_attribute_name"` - // Add a list of attribute names that will be returned in the response header from - // the Access callback. - HeaderAttributes param.Field[[]IdentityProviderUpdateParamsBodyAccessSAMLConfigHeaderAttribute] `json:"header_attributes"` - // X509 certificate to verify the signature in the SAML authentication response - IdPPublicCERTs param.Field[[]string] `json:"idp_public_certs"` - // IdP Entity ID or Issuer URL - IssuerURL param.Field[string] `json:"issuer_url"` - // Sign the SAML authentication request with Access credentials. To verify the - // signature, use the public key from the Access certs endpoints. - SignRequest param.Field[bool] `json:"sign_request"` - // URL to send the SAML authentication requests to - SSOTargetURL param.Field[string] `json:"sso_target_url"` -} - -func (r IdentityProviderUpdateParamsBodyAccessSAMLConfig) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type IdentityProviderUpdateParamsBodyAccessSAMLConfigHeaderAttribute struct { - // attribute name from the IDP - AttributeName param.Field[string] `json:"attribute_name"` - // header that will be added on the request to the origin - HeaderName param.Field[string] `json:"header_name"` -} - -func (r IdentityProviderUpdateParamsBodyAccessSAMLConfigHeaderAttribute) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type IdentityProviderUpdateParamsBodyAccessYandex struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[GenericOAuthConfigParam] `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` -} - -func (r IdentityProviderUpdateParamsBodyAccessYandex) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderUpdateParamsBodyAccessYandex) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { -} - -type IdentityProviderUpdateParamsBodyAccessOnetimepin struct { - // The configuration parameters for the identity provider. To view the required - // parameters for a specific provider, refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Config param.Field[interface{}] `json:"config,required"` - // The name of the identity provider, shown to users on the login page. - Name param.Field[string] `json:"name,required"` - // The type of identity provider. To determine the value for a specific provider, - // refer to our - // [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). - Type param.Field[IdentityProviderType] `json:"type,required"` - // The configuration settings for enabling a System for Cross-Domain Identity - // Management (SCIM) with the identity provider. - ScimConfig param.Field[ScimConfigParam] `json:"scim_config"` -} - -func (r IdentityProviderUpdateParamsBodyAccessOnetimepin) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r IdentityProviderUpdateParamsBodyAccessOnetimepin) implementsZeroTrustIdentityProviderUpdateParamsBodyUnion() { +func (r IdentityProviderUpdateParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r.IdentityProvider) } type IdentityProviderUpdateResponseEnvelope struct { @@ -5594,7 +3028,7 @@ type IdentityProviderUpdateResponseEnvelope struct { Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success IdentityProviderUpdateResponseEnvelopeSuccess `json:"success,required"` - Result IdentityProviderUpdateResponse `json:"result"` + Result IdentityProvider `json:"result"` JSON identityProviderUpdateResponseEnvelopeJSON `json:"-"` } @@ -5701,7 +3135,7 @@ type IdentityProviderGetResponseEnvelope struct { Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success IdentityProviderGetResponseEnvelopeSuccess `json:"success,required"` - Result IdentityProviderGetResponse `json:"result"` + Result IdentityProvider `json:"result"` JSON identityProviderGetResponseEnvelopeJSON `json:"-"` } diff --git a/zero_trust/identityprovider_test.go b/zero_trust/identityprovider_test.go index 527a6d5cc6..d2ac722814 100644 --- a/zero_trust/identityprovider_test.go +++ b/zero_trust/identityprovider_test.go @@ -29,7 +29,7 @@ func TestIdentityProviderNewWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.IdentityProviders.New(context.TODO(), zero_trust.IdentityProviderNewParams{ - Body: zero_trust.AzureADParam{ + IdentityProvider: zero_trust.AzureADParam{ Config: cloudflare.F(zero_trust.AzureADConfigParam{ ClientID: cloudflare.F(""), ClientSecret: cloudflare.F(""), @@ -80,7 +80,7 @@ func TestIdentityProviderUpdateWithOptionalParams(t *testing.T) { context.TODO(), "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zero_trust.IdentityProviderUpdateParams{ - Body: zero_trust.AzureADParam{ + IdentityProvider: zero_trust.AzureADParam{ Config: cloudflare.F(zero_trust.AzureADConfigParam{ ClientID: cloudflare.F(""), ClientSecret: cloudflare.F(""), From 95f5df84be86634d9b2942a5692ba24e65b99736 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 May 2024 03:28:13 +0000 Subject: [PATCH 125/127] feat(api): update via SDK Studio (#1976) --- firewall/wafpackagerule.go | 54 +++++++++++++++++----- intel/whois.go | 2 - queues/consumer.go | 72 ++++++++++-------------------- queues/queue.go | 42 ++++------------- rum/rule.go | 40 ++++------------- rum/siteinfo.go | 40 ++++------------- speed/availability.go | 10 +---- speed/page.go | 10 +---- speed/pagetest.go | 30 +++---------- speed/schedule.go | 26 ++--------- waiting_rooms/event.go | 50 +++++---------------- waiting_rooms/eventdetail.go | 10 +---- waiting_rooms/page.go | 10 +---- waiting_rooms/setting.go | 30 +++---------- waiting_rooms/status.go | 10 +---- waiting_rooms/waitingroom.go | 50 +++++---------------- workers/worker.go | 8 +--- zero_trust/dexfleetstatusdevice.go | 8 +--- zones/dnssetting.go | 48 +++++++------------- 19 files changed, 157 insertions(+), 393 deletions(-) diff --git a/firewall/wafpackagerule.go b/firewall/wafpackagerule.go index e182908ad7..845612f6f2 100644 --- a/firewall/wafpackagerule.go +++ b/firewall/wafpackagerule.go @@ -158,9 +158,10 @@ type WAFPackageRuleListResponse struct { AllowedModes interface{} `json:"allowed_modes"` // When set to `on`, the current WAF rule will be used when evaluating the request. // Applies to anomaly detection WAF rules. - Mode AllowedModesAnomaly `json:"mode,required"` - DefaultMode interface{} `json:"default_mode,required"` - JSON wafPackageRuleListResponseJSON `json:"-"` + Mode AllowedModesAnomaly `json:"mode,required"` + // The default action/mode of a rule. + DefaultMode WAFPackageRuleListResponseDefaultMode `json:"default_mode"` + JSON wafPackageRuleListResponseJSON `json:"-"` union WAFPackageRuleListResponseUnion } @@ -394,7 +395,6 @@ type WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRule struct { ID string `json:"id,required"` // Defines the available modes for the current WAF rule. AllowedModes []WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRuleAllowedMode `json:"allowed_modes,required"` - DefaultMode interface{} `json:"default_mode,required"` // The public description of the WAF rule. Description string `json:"description,required"` // The rule group to which the current WAF rule belongs. @@ -415,7 +415,6 @@ type WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRule struct { type wafPackageRuleListResponseWAFManagedRulesTraditionalAllowRuleJSON struct { ID apijson.Field AllowedModes apijson.Field - DefaultMode apijson.Field Description apijson.Field Group apijson.Field Mode apijson.Field @@ -470,6 +469,24 @@ func (r WAFPackageRuleListResponseWAFManagedRulesTraditionalAllowRuleMode) IsKno return false } +// The default action/mode of a rule. +type WAFPackageRuleListResponseDefaultMode string + +const ( + WAFPackageRuleListResponseDefaultModeDisable WAFPackageRuleListResponseDefaultMode = "disable" + WAFPackageRuleListResponseDefaultModeSimulate WAFPackageRuleListResponseDefaultMode = "simulate" + WAFPackageRuleListResponseDefaultModeBlock WAFPackageRuleListResponseDefaultMode = "block" + WAFPackageRuleListResponseDefaultModeChallenge WAFPackageRuleListResponseDefaultMode = "challenge" +) + +func (r WAFPackageRuleListResponseDefaultMode) IsKnown() bool { + switch r { + case WAFPackageRuleListResponseDefaultModeDisable, WAFPackageRuleListResponseDefaultModeSimulate, WAFPackageRuleListResponseDefaultModeBlock, WAFPackageRuleListResponseDefaultModeChallenge: + return true + } + return false +} + // When triggered, anomaly detection WAF rules contribute to an overall threat // score that will determine if a request is considered malicious. You can // configure the total scoring threshold through the 'sensitivity' property of the @@ -488,9 +505,10 @@ type WAFPackageRuleEditResponse struct { AllowedModes interface{} `json:"allowed_modes"` // When set to `on`, the current WAF rule will be used when evaluating the request. // Applies to anomaly detection WAF rules. - Mode AllowedModesAnomaly `json:"mode,required"` - DefaultMode interface{} `json:"default_mode,required"` - JSON wafPackageRuleEditResponseJSON `json:"-"` + Mode AllowedModesAnomaly `json:"mode,required"` + // The default action/mode of a rule. + DefaultMode WAFPackageRuleEditResponseDefaultMode `json:"default_mode"` + JSON wafPackageRuleEditResponseJSON `json:"-"` union WAFPackageRuleEditResponseUnion } @@ -724,7 +742,6 @@ type WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRule struct { ID string `json:"id,required"` // Defines the available modes for the current WAF rule. AllowedModes []WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleAllowedMode `json:"allowed_modes,required"` - DefaultMode interface{} `json:"default_mode,required"` // The public description of the WAF rule. Description string `json:"description,required"` // The rule group to which the current WAF rule belongs. @@ -745,7 +762,6 @@ type WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRule struct { type wafPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleJSON struct { ID apijson.Field AllowedModes apijson.Field - DefaultMode apijson.Field Description apijson.Field Group apijson.Field Mode apijson.Field @@ -800,6 +816,24 @@ func (r WAFPackageRuleEditResponseWAFManagedRulesTraditionalAllowRuleMode) IsKno return false } +// The default action/mode of a rule. +type WAFPackageRuleEditResponseDefaultMode string + +const ( + WAFPackageRuleEditResponseDefaultModeDisable WAFPackageRuleEditResponseDefaultMode = "disable" + WAFPackageRuleEditResponseDefaultModeSimulate WAFPackageRuleEditResponseDefaultMode = "simulate" + WAFPackageRuleEditResponseDefaultModeBlock WAFPackageRuleEditResponseDefaultMode = "block" + WAFPackageRuleEditResponseDefaultModeChallenge WAFPackageRuleEditResponseDefaultMode = "challenge" +) + +func (r WAFPackageRuleEditResponseDefaultMode) IsKnown() bool { + switch r { + case WAFPackageRuleEditResponseDefaultModeDisable, WAFPackageRuleEditResponseDefaultModeSimulate, WAFPackageRuleEditResponseDefaultModeBlock, WAFPackageRuleEditResponseDefaultModeChallenge: + return true + } + return false +} + // Union satisfied by [firewall.WAFPackageRuleGetResponseUnknown] or // [shared.UnionString]. type WAFPackageRuleGetResponseUnion interface { diff --git a/intel/whois.go b/intel/whois.go index 5655c7c1a8..0f25671e56 100644 --- a/intel/whois.go +++ b/intel/whois.go @@ -48,7 +48,6 @@ func (r *WhoisService) Get(ctx context.Context, params WhoisGetParams, opts ...o } type WhoisGetResponse struct { - Dnnsec interface{} `json:"dnnsec,required"` Domain string `json:"domain,required"` Extension string `json:"extension,required"` Found bool `json:"found,required"` @@ -142,7 +141,6 @@ type WhoisGetResponse struct { // whoisGetResponseJSON contains the JSON metadata for the struct // [WhoisGetResponse] type whoisGetResponseJSON struct { - Dnnsec apijson.Field Domain apijson.Field Extension apijson.Field Found apijson.Field diff --git a/queues/consumer.go b/queues/consumer.go index 1682d7ca03..294d849ef7 100644 --- a/queues/consumer.go +++ b/queues/consumer.go @@ -288,14 +288,9 @@ func (r ConsumerNewParams) MarshalJSON() (data []byte, err error) { } type ConsumerNewResponseEnvelope struct { - CreatedOn interface{} `json:"created_on,required"` - DeadLetterQueue interface{} `json:"dead_letter_queue,required"` - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - QueueName interface{} `json:"queue_name,required"` - Result ConsumerNewResponse `json:"result,required,nullable"` - ScriptName interface{} `json:"script_name,required"` - Settings interface{} `json:"settings,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result ConsumerNewResponse `json:"result,required,nullable"` // Whether the API call was successful Success ConsumerNewResponseEnvelopeSuccess `json:"success,required"` ResultInfo ConsumerNewResponseEnvelopeResultInfo `json:"result_info"` @@ -305,18 +300,13 @@ type ConsumerNewResponseEnvelope struct { // consumerNewResponseEnvelopeJSON contains the JSON metadata for the struct // [ConsumerNewResponseEnvelope] type consumerNewResponseEnvelopeJSON struct { - CreatedOn apijson.Field - DeadLetterQueue apijson.Field - Errors apijson.Field - Messages apijson.Field - QueueName apijson.Field - Result apijson.Field - ScriptName apijson.Field - Settings apijson.Field - Success apijson.Field - ResultInfo apijson.Field - raw string - ExtraFields map[string]apijson.Field + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + ResultInfo apijson.Field + raw string + ExtraFields map[string]apijson.Field } func (r *ConsumerNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { @@ -384,14 +374,9 @@ func (r ConsumerUpdateParams) MarshalJSON() (data []byte, err error) { } type ConsumerUpdateResponseEnvelope struct { - CreatedOn interface{} `json:"created_on,required"` - DeadLetterQueue interface{} `json:"dead_letter_queue,required"` - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - QueueName interface{} `json:"queue_name,required"` - Result ConsumerUpdateResponse `json:"result,required,nullable"` - ScriptName interface{} `json:"script_name,required"` - Settings interface{} `json:"settings,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result ConsumerUpdateResponse `json:"result,required,nullable"` // Whether the API call was successful Success ConsumerUpdateResponseEnvelopeSuccess `json:"success,required"` ResultInfo ConsumerUpdateResponseEnvelopeResultInfo `json:"result_info"` @@ -401,18 +386,13 @@ type ConsumerUpdateResponseEnvelope struct { // consumerUpdateResponseEnvelopeJSON contains the JSON metadata for the struct // [ConsumerUpdateResponseEnvelope] type consumerUpdateResponseEnvelopeJSON struct { - CreatedOn apijson.Field - DeadLetterQueue apijson.Field - Errors apijson.Field - Messages apijson.Field - QueueName apijson.Field - Result apijson.Field - ScriptName apijson.Field - Settings apijson.Field - Success apijson.Field - ResultInfo apijson.Field - raw string - ExtraFields map[string]apijson.Field + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + ResultInfo apijson.Field + raw string + ExtraFields map[string]apijson.Field } func (r *ConsumerUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error) { @@ -556,12 +536,9 @@ type ConsumerGetParams struct { } type ConsumerGetResponseEnvelope struct { - CreatedOn interface{} `json:"created_on,required"` - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - QueueName interface{} `json:"queue_name,required"` - Result []Consumer `json:"result,required,nullable"` - Settings interface{} `json:"settings,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result []Consumer `json:"result,required,nullable"` // Whether the API call was successful Success ConsumerGetResponseEnvelopeSuccess `json:"success,required"` ResultInfo ConsumerGetResponseEnvelopeResultInfo `json:"result_info"` @@ -571,12 +548,9 @@ type ConsumerGetResponseEnvelope struct { // consumerGetResponseEnvelopeJSON contains the JSON metadata for the struct // [ConsumerGetResponseEnvelope] type consumerGetResponseEnvelopeJSON struct { - CreatedOn apijson.Field Errors apijson.Field Messages apijson.Field - QueueName apijson.Field Result apijson.Field - Settings apijson.Field Success apijson.Field ResultInfo apijson.Field raw string diff --git a/queues/queue.go b/queues/queue.go index 260484b5a8..d8549e3e20 100644 --- a/queues/queue.go +++ b/queues/queue.go @@ -235,13 +235,9 @@ func (r QueueNewParams) MarshalJSON() (data []byte, err error) { } type QueueNewResponseEnvelope struct { - CreatedOn interface{} `json:"created_on,required"` - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - ModifiedOn interface{} `json:"modified_on,required"` - QueueID interface{} `json:"queue_id,required"` - QueueName interface{} `json:"queue_name,required"` - Result QueueCreated `json:"result,required,nullable"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result QueueCreated `json:"result,required,nullable"` // Whether the API call was successful Success QueueNewResponseEnvelopeSuccess `json:"success,required"` ResultInfo QueueNewResponseEnvelopeResultInfo `json:"result_info"` @@ -251,12 +247,8 @@ type QueueNewResponseEnvelope struct { // queueNewResponseEnvelopeJSON contains the JSON metadata for the struct // [QueueNewResponseEnvelope] type queueNewResponseEnvelopeJSON struct { - CreatedOn apijson.Field Errors apijson.Field Messages apijson.Field - ModifiedOn apijson.Field - QueueID apijson.Field - QueueName apijson.Field Result apijson.Field Success apijson.Field ResultInfo apijson.Field @@ -329,13 +321,9 @@ func (r QueueUpdateParams) MarshalJSON() (data []byte, err error) { } type QueueUpdateResponseEnvelope struct { - CreatedOn interface{} `json:"created_on,required"` - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - ModifiedOn interface{} `json:"modified_on,required"` - QueueID interface{} `json:"queue_id,required"` - QueueName interface{} `json:"queue_name,required"` - Result QueueUpdated `json:"result,required,nullable"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result QueueUpdated `json:"result,required,nullable"` // Whether the API call was successful Success QueueUpdateResponseEnvelopeSuccess `json:"success,required"` ResultInfo QueueUpdateResponseEnvelopeResultInfo `json:"result_info"` @@ -345,12 +333,8 @@ type QueueUpdateResponseEnvelope struct { // queueUpdateResponseEnvelopeJSON contains the JSON metadata for the struct // [QueueUpdateResponseEnvelope] type queueUpdateResponseEnvelopeJSON struct { - CreatedOn apijson.Field Errors apijson.Field Messages apijson.Field - ModifiedOn apijson.Field - QueueID apijson.Field - QueueName apijson.Field Result apijson.Field Success apijson.Field ResultInfo apijson.Field @@ -504,13 +488,9 @@ type QueueGetParams struct { } type QueueGetResponseEnvelope struct { - CreatedOn interface{} `json:"created_on,required"` - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - ModifiedOn interface{} `json:"modified_on,required"` - QueueID interface{} `json:"queue_id,required"` - QueueName interface{} `json:"queue_name,required"` - Result Queue `json:"result,required,nullable"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result Queue `json:"result,required,nullable"` // Whether the API call was successful Success QueueGetResponseEnvelopeSuccess `json:"success,required"` ResultInfo QueueGetResponseEnvelopeResultInfo `json:"result_info"` @@ -520,12 +500,8 @@ type QueueGetResponseEnvelope struct { // queueGetResponseEnvelopeJSON contains the JSON metadata for the struct // [QueueGetResponseEnvelope] type queueGetResponseEnvelopeJSON struct { - CreatedOn apijson.Field Errors apijson.Field Messages apijson.Field - ModifiedOn apijson.Field - QueueID apijson.Field - QueueName apijson.Field Result apijson.Field Success apijson.Field ResultInfo apijson.Field diff --git a/rum/rule.go b/rum/rule.go index c23f7b26c2..def79fb845 100644 --- a/rum/rule.go +++ b/rum/rule.go @@ -212,19 +212,13 @@ func (r RuleNewParams) MarshalJSON() (data []byte, err error) { } type RuleNewResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Success interface{} `json:"success,required"` - Result RUMRule `json:"result"` - JSON ruleNewResponseEnvelopeJSON `json:"-"` + Result RUMRule `json:"result"` + JSON ruleNewResponseEnvelopeJSON `json:"-"` } // ruleNewResponseEnvelopeJSON contains the JSON metadata for the struct // [RuleNewResponseEnvelope] type ruleNewResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field Result apijson.Field raw string ExtraFields map[string]apijson.Field @@ -254,19 +248,13 @@ func (r RuleUpdateParams) MarshalJSON() (data []byte, err error) { } type RuleUpdateResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Success interface{} `json:"success,required"` - Result RUMRule `json:"result"` - JSON ruleUpdateResponseEnvelopeJSON `json:"-"` + Result RUMRule `json:"result"` + JSON ruleUpdateResponseEnvelopeJSON `json:"-"` } // ruleUpdateResponseEnvelopeJSON contains the JSON metadata for the struct // [RuleUpdateResponseEnvelope] type ruleUpdateResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field Result apijson.Field raw string ExtraFields map[string]apijson.Field @@ -286,19 +274,13 @@ type RuleListParams struct { } type RuleListResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Success interface{} `json:"success,required"` - Result RuleListResponse `json:"result"` - JSON ruleListResponseEnvelopeJSON `json:"-"` + Result RuleListResponse `json:"result"` + JSON ruleListResponseEnvelopeJSON `json:"-"` } // ruleListResponseEnvelopeJSON contains the JSON metadata for the struct // [RuleListResponseEnvelope] type ruleListResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field Result apijson.Field raw string ExtraFields map[string]apijson.Field @@ -318,19 +300,13 @@ type RuleDeleteParams struct { } type RuleDeleteResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Success interface{} `json:"success,required"` - Result RuleDeleteResponse `json:"result"` - JSON ruleDeleteResponseEnvelopeJSON `json:"-"` + Result RuleDeleteResponse `json:"result"` + JSON ruleDeleteResponseEnvelopeJSON `json:"-"` } // ruleDeleteResponseEnvelopeJSON contains the JSON metadata for the struct // [RuleDeleteResponseEnvelope] type ruleDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field Result apijson.Field raw string ExtraFields map[string]apijson.Field diff --git a/rum/siteinfo.go b/rum/siteinfo.go index 75f1180511..321d8ca4e2 100644 --- a/rum/siteinfo.go +++ b/rum/siteinfo.go @@ -215,19 +215,13 @@ func (r SiteInfoNewParams) MarshalJSON() (data []byte, err error) { } type SiteInfoNewResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Success interface{} `json:"success,required"` - Result Site `json:"result"` - JSON siteInfoNewResponseEnvelopeJSON `json:"-"` + Result Site `json:"result"` + JSON siteInfoNewResponseEnvelopeJSON `json:"-"` } // siteInfoNewResponseEnvelopeJSON contains the JSON metadata for the struct // [SiteInfoNewResponseEnvelope] type siteInfoNewResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field Result apijson.Field raw string ExtraFields map[string]apijson.Field @@ -258,19 +252,13 @@ func (r SiteInfoUpdateParams) MarshalJSON() (data []byte, err error) { } type SiteInfoUpdateResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Success interface{} `json:"success,required"` - Result Site `json:"result"` - JSON siteInfoUpdateResponseEnvelopeJSON `json:"-"` + Result Site `json:"result"` + JSON siteInfoUpdateResponseEnvelopeJSON `json:"-"` } // siteInfoUpdateResponseEnvelopeJSON contains the JSON metadata for the struct // [SiteInfoUpdateResponseEnvelope] type siteInfoUpdateResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field Result apijson.Field raw string ExtraFields map[string]apijson.Field @@ -325,19 +313,13 @@ type SiteInfoDeleteParams struct { } type SiteInfoDeleteResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Success interface{} `json:"success,required"` - Result SiteInfoDeleteResponse `json:"result"` - JSON siteInfoDeleteResponseEnvelopeJSON `json:"-"` + Result SiteInfoDeleteResponse `json:"result"` + JSON siteInfoDeleteResponseEnvelopeJSON `json:"-"` } // siteInfoDeleteResponseEnvelopeJSON contains the JSON metadata for the struct // [SiteInfoDeleteResponseEnvelope] type siteInfoDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field Result apijson.Field raw string ExtraFields map[string]apijson.Field @@ -357,19 +339,13 @@ type SiteInfoGetParams struct { } type SiteInfoGetResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Success interface{} `json:"success,required"` - Result Site `json:"result"` - JSON siteInfoGetResponseEnvelopeJSON `json:"-"` + Result Site `json:"result"` + JSON siteInfoGetResponseEnvelopeJSON `json:"-"` } // siteInfoGetResponseEnvelopeJSON contains the JSON metadata for the struct // [SiteInfoGetResponseEnvelope] type siteInfoGetResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field Result apijson.Field raw string ExtraFields map[string]apijson.Field diff --git a/speed/availability.go b/speed/availability.go index d8884c7879..d9c72ddce6 100644 --- a/speed/availability.go +++ b/speed/availability.go @@ -108,19 +108,13 @@ type AvailabilityListParams struct { } type AvailabilityListResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Success interface{} `json:"success,required"` - Result Availability `json:"result"` - JSON availabilityListResponseEnvelopeJSON `json:"-"` + Result Availability `json:"result"` + JSON availabilityListResponseEnvelopeJSON `json:"-"` } // availabilityListResponseEnvelopeJSON contains the JSON metadata for the struct // [AvailabilityListResponseEnvelope] type availabilityListResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field Result apijson.Field raw string ExtraFields map[string]apijson.Field diff --git a/speed/page.go b/speed/page.go index 65eb5b2f48..a342424346 100644 --- a/speed/page.go +++ b/speed/page.go @@ -198,19 +198,13 @@ func (r PageTrendParamsRegion) IsKnown() bool { } type PageTrendResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Success interface{} `json:"success,required"` - Result Trend `json:"result"` - JSON pageTrendResponseEnvelopeJSON `json:"-"` + Result Trend `json:"result"` + JSON pageTrendResponseEnvelopeJSON `json:"-"` } // pageTrendResponseEnvelopeJSON contains the JSON metadata for the struct // [PageTrendResponseEnvelope] type pageTrendResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field Result apijson.Field raw string ExtraFields map[string]apijson.Field diff --git a/speed/pagetest.go b/speed/pagetest.go index 6c58ce933b..16bc74400b 100644 --- a/speed/pagetest.go +++ b/speed/pagetest.go @@ -260,19 +260,13 @@ func (r PageTestNewParamsRegion) IsKnown() bool { } type PageTestNewResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Success interface{} `json:"success,required"` - Result Test `json:"result"` - JSON pageTestNewResponseEnvelopeJSON `json:"-"` + Result Test `json:"result"` + JSON pageTestNewResponseEnvelopeJSON `json:"-"` } // pageTestNewResponseEnvelopeJSON contains the JSON metadata for the struct // [PageTestNewResponseEnvelope] type pageTestNewResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field Result apijson.Field raw string ExtraFields map[string]apijson.Field @@ -389,19 +383,13 @@ func (r PageTestDeleteParamsRegion) IsKnown() bool { } type PageTestDeleteResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Success interface{} `json:"success,required"` - Result PageTestDeleteResponse `json:"result"` - JSON pageTestDeleteResponseEnvelopeJSON `json:"-"` + Result PageTestDeleteResponse `json:"result"` + JSON pageTestDeleteResponseEnvelopeJSON `json:"-"` } // pageTestDeleteResponseEnvelopeJSON contains the JSON metadata for the struct // [PageTestDeleteResponseEnvelope] type pageTestDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field Result apijson.Field raw string ExtraFields map[string]apijson.Field @@ -421,19 +409,13 @@ type PageTestGetParams struct { } type PageTestGetResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Success interface{} `json:"success,required"` - Result Test `json:"result"` - JSON pageTestGetResponseEnvelopeJSON `json:"-"` + Result Test `json:"result"` + JSON pageTestGetResponseEnvelopeJSON `json:"-"` } // pageTestGetResponseEnvelopeJSON contains the JSON metadata for the struct // [PageTestGetResponseEnvelope] type pageTestGetResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field Result apijson.Field raw string ExtraFields map[string]apijson.Field diff --git a/speed/schedule.go b/speed/schedule.go index 348100e0d0..52d9dc14d4 100644 --- a/speed/schedule.go +++ b/speed/schedule.go @@ -247,19 +247,13 @@ func (r ScheduleNewParamsRegion) IsKnown() bool { } type ScheduleNewResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Success interface{} `json:"success,required"` - Result ScheduleNewResponse `json:"result"` - JSON scheduleNewResponseEnvelopeJSON `json:"-"` + Result ScheduleNewResponse `json:"result"` + JSON scheduleNewResponseEnvelopeJSON `json:"-"` } // scheduleNewResponseEnvelopeJSON contains the JSON metadata for the struct // [ScheduleNewResponseEnvelope] type scheduleNewResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field Result apijson.Field raw string ExtraFields map[string]apijson.Field @@ -324,19 +318,13 @@ func (r ScheduleDeleteParamsRegion) IsKnown() bool { } type ScheduleDeleteResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Success interface{} `json:"success,required"` - Result ScheduleDeleteResponse `json:"result"` - JSON scheduleDeleteResponseEnvelopeJSON `json:"-"` + Result ScheduleDeleteResponse `json:"result"` + JSON scheduleDeleteResponseEnvelopeJSON `json:"-"` } // scheduleDeleteResponseEnvelopeJSON contains the JSON metadata for the struct // [ScheduleDeleteResponseEnvelope] type scheduleDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field Result apijson.Field raw string ExtraFields map[string]apijson.Field @@ -401,9 +389,6 @@ func (r ScheduleGetParamsRegion) IsKnown() bool { } type ScheduleGetResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Success interface{} `json:"success,required"` // The test schedule. Result Schedule `json:"result"` JSON scheduleGetResponseEnvelopeJSON `json:"-"` @@ -412,9 +397,6 @@ type ScheduleGetResponseEnvelope struct { // scheduleGetResponseEnvelopeJSON contains the JSON metadata for the struct // [ScheduleGetResponseEnvelope] type scheduleGetResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Success apijson.Field Result apijson.Field raw string ExtraFields map[string]apijson.Field diff --git a/waiting_rooms/event.go b/waiting_rooms/event.go index d17cad8dac..02e045686b 100644 --- a/waiting_rooms/event.go +++ b/waiting_rooms/event.go @@ -243,20 +243,14 @@ func (r EventNewParams) MarshalJSON() (data []byte, err error) { } type EventNewResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Result Event `json:"result,required"` - Success interface{} `json:"success,required"` - JSON eventNewResponseEnvelopeJSON `json:"-"` + Result Event `json:"result,required"` + JSON eventNewResponseEnvelopeJSON `json:"-"` } // eventNewResponseEnvelopeJSON contains the JSON metadata for the struct // [EventNewResponseEnvelope] type eventNewResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field Result apijson.Field - Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -280,20 +274,14 @@ func (r EventUpdateParams) MarshalJSON() (data []byte, err error) { } type EventUpdateResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Result Event `json:"result,required"` - Success interface{} `json:"success,required"` - JSON eventUpdateResponseEnvelopeJSON `json:"-"` + Result Event `json:"result,required"` + JSON eventUpdateResponseEnvelopeJSON `json:"-"` } // eventUpdateResponseEnvelopeJSON contains the JSON metadata for the struct // [EventUpdateResponseEnvelope] type eventUpdateResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field Result apijson.Field - Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -329,20 +317,14 @@ type EventDeleteParams struct { } type EventDeleteResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Result EventDeleteResponse `json:"result,required"` - Success interface{} `json:"success,required"` - JSON eventDeleteResponseEnvelopeJSON `json:"-"` + Result EventDeleteResponse `json:"result,required"` + JSON eventDeleteResponseEnvelopeJSON `json:"-"` } // eventDeleteResponseEnvelopeJSON contains the JSON metadata for the struct // [EventDeleteResponseEnvelope] type eventDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field Result apijson.Field - Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -366,20 +348,14 @@ func (r EventEditParams) MarshalJSON() (data []byte, err error) { } type EventEditResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Result Event `json:"result,required"` - Success interface{} `json:"success,required"` - JSON eventEditResponseEnvelopeJSON `json:"-"` + Result Event `json:"result,required"` + JSON eventEditResponseEnvelopeJSON `json:"-"` } // eventEditResponseEnvelopeJSON contains the JSON metadata for the struct // [EventEditResponseEnvelope] type eventEditResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field Result apijson.Field - Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -398,20 +374,14 @@ type EventGetParams struct { } type EventGetResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Result Event `json:"result,required"` - Success interface{} `json:"success,required"` - JSON eventGetResponseEnvelopeJSON `json:"-"` + Result Event `json:"result,required"` + JSON eventGetResponseEnvelopeJSON `json:"-"` } // eventGetResponseEnvelopeJSON contains the JSON metadata for the struct // [EventGetResponseEnvelope] type eventGetResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field Result apijson.Field - Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/waiting_rooms/eventdetail.go b/waiting_rooms/eventdetail.go index 03911c3336..ff972378a1 100644 --- a/waiting_rooms/eventdetail.go +++ b/waiting_rooms/eventdetail.go @@ -173,20 +173,14 @@ type EventDetailGetParams struct { } type EventDetailGetResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Result EventDetailGetResponse `json:"result,required"` - Success interface{} `json:"success,required"` - JSON eventDetailGetResponseEnvelopeJSON `json:"-"` + Result EventDetailGetResponse `json:"result,required"` + JSON eventDetailGetResponseEnvelopeJSON `json:"-"` } // eventDetailGetResponseEnvelopeJSON contains the JSON metadata for the struct // [EventDetailGetResponseEnvelope] type eventDetailGetResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field Result apijson.Field - Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/waiting_rooms/page.go b/waiting_rooms/page.go index e2b0623a94..f75d20d5a2 100644 --- a/waiting_rooms/page.go +++ b/waiting_rooms/page.go @@ -132,20 +132,14 @@ func (r PagePreviewParams) MarshalJSON() (data []byte, err error) { } type PagePreviewResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Result PagePreviewResponse `json:"result,required"` - Success interface{} `json:"success,required"` - JSON pagePreviewResponseEnvelopeJSON `json:"-"` + Result PagePreviewResponse `json:"result,required"` + JSON pagePreviewResponseEnvelopeJSON `json:"-"` } // pagePreviewResponseEnvelopeJSON contains the JSON metadata for the struct // [PagePreviewResponseEnvelope] type pagePreviewResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field Result apijson.Field - Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/waiting_rooms/setting.go b/waiting_rooms/setting.go index 0c7d903a35..06377697b0 100644 --- a/waiting_rooms/setting.go +++ b/waiting_rooms/setting.go @@ -155,20 +155,14 @@ func (r SettingUpdateParams) MarshalJSON() (data []byte, err error) { } type SettingUpdateResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Result SettingUpdateResponse `json:"result,required"` - Success interface{} `json:"success,required"` - JSON settingUpdateResponseEnvelopeJSON `json:"-"` + Result SettingUpdateResponse `json:"result,required"` + JSON settingUpdateResponseEnvelopeJSON `json:"-"` } // settingUpdateResponseEnvelopeJSON contains the JSON metadata for the struct // [SettingUpdateResponseEnvelope] type settingUpdateResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field Result apijson.Field - Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -195,20 +189,14 @@ func (r SettingEditParams) MarshalJSON() (data []byte, err error) { } type SettingEditResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Result SettingEditResponse `json:"result,required"` - Success interface{} `json:"success,required"` - JSON settingEditResponseEnvelopeJSON `json:"-"` + Result SettingEditResponse `json:"result,required"` + JSON settingEditResponseEnvelopeJSON `json:"-"` } // settingEditResponseEnvelopeJSON contains the JSON metadata for the struct // [SettingEditResponseEnvelope] type settingEditResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field Result apijson.Field - Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -227,20 +215,14 @@ type SettingGetParams struct { } type SettingGetResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Result SettingGetResponse `json:"result,required"` - Success interface{} `json:"success,required"` - JSON settingGetResponseEnvelopeJSON `json:"-"` + Result SettingGetResponse `json:"result,required"` + JSON settingGetResponseEnvelopeJSON `json:"-"` } // settingGetResponseEnvelopeJSON contains the JSON metadata for the struct // [SettingGetResponseEnvelope] type settingGetResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field Result apijson.Field - Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/waiting_rooms/status.go b/waiting_rooms/status.go index f16460b156..75984eb2a1 100644 --- a/waiting_rooms/status.go +++ b/waiting_rooms/status.go @@ -111,20 +111,14 @@ type StatusGetParams struct { } type StatusGetResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Result StatusGetResponse `json:"result,required"` - Success interface{} `json:"success,required"` - JSON statusGetResponseEnvelopeJSON `json:"-"` + Result StatusGetResponse `json:"result,required"` + JSON statusGetResponseEnvelopeJSON `json:"-"` } // statusGetResponseEnvelopeJSON contains the JSON metadata for the struct // [StatusGetResponseEnvelope] type statusGetResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field Result apijson.Field - Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/waiting_rooms/waitingroom.go b/waiting_rooms/waitingroom.go index e07bf44f54..9ec2e78d64 100644 --- a/waiting_rooms/waitingroom.go +++ b/waiting_rooms/waitingroom.go @@ -1057,20 +1057,14 @@ func (r WaitingRoomNewParams) MarshalJSON() (data []byte, err error) { } type WaitingRoomNewResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Result WaitingRoom `json:"result,required"` - Success interface{} `json:"success,required"` - JSON waitingRoomNewResponseEnvelopeJSON `json:"-"` + Result WaitingRoom `json:"result,required"` + JSON waitingRoomNewResponseEnvelopeJSON `json:"-"` } // waitingRoomNewResponseEnvelopeJSON contains the JSON metadata for the struct // [WaitingRoomNewResponseEnvelope] type waitingRoomNewResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field Result apijson.Field - Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -1094,20 +1088,14 @@ func (r WaitingRoomUpdateParams) MarshalJSON() (data []byte, err error) { } type WaitingRoomUpdateResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Result WaitingRoom `json:"result,required"` - Success interface{} `json:"success,required"` - JSON waitingRoomUpdateResponseEnvelopeJSON `json:"-"` + Result WaitingRoom `json:"result,required"` + JSON waitingRoomUpdateResponseEnvelopeJSON `json:"-"` } // waitingRoomUpdateResponseEnvelopeJSON contains the JSON metadata for the struct // [WaitingRoomUpdateResponseEnvelope] type waitingRoomUpdateResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field Result apijson.Field - Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -1143,20 +1131,14 @@ type WaitingRoomDeleteParams struct { } type WaitingRoomDeleteResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Result WaitingRoomDeleteResponse `json:"result,required"` - Success interface{} `json:"success,required"` - JSON waitingRoomDeleteResponseEnvelopeJSON `json:"-"` + Result WaitingRoomDeleteResponse `json:"result,required"` + JSON waitingRoomDeleteResponseEnvelopeJSON `json:"-"` } // waitingRoomDeleteResponseEnvelopeJSON contains the JSON metadata for the struct // [WaitingRoomDeleteResponseEnvelope] type waitingRoomDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field Result apijson.Field - Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -1180,20 +1162,14 @@ func (r WaitingRoomEditParams) MarshalJSON() (data []byte, err error) { } type WaitingRoomEditResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Result WaitingRoom `json:"result,required"` - Success interface{} `json:"success,required"` - JSON waitingRoomEditResponseEnvelopeJSON `json:"-"` + Result WaitingRoom `json:"result,required"` + JSON waitingRoomEditResponseEnvelopeJSON `json:"-"` } // waitingRoomEditResponseEnvelopeJSON contains the JSON metadata for the struct // [WaitingRoomEditResponseEnvelope] type waitingRoomEditResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field Result apijson.Field - Success apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -1212,20 +1188,14 @@ type WaitingRoomGetParams struct { } type WaitingRoomGetResponseEnvelope struct { - Errors interface{} `json:"errors,required"` - Messages interface{} `json:"messages,required"` - Result WaitingRoom `json:"result,required"` - Success interface{} `json:"success,required"` - JSON waitingRoomGetResponseEnvelopeJSON `json:"-"` + Result WaitingRoom `json:"result,required"` + JSON waitingRoomGetResponseEnvelopeJSON `json:"-"` } // waitingRoomGetResponseEnvelopeJSON contains the JSON metadata for the struct // [WaitingRoomGetResponseEnvelope] type waitingRoomGetResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field Result apijson.Field - Success apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/workers/worker.go b/workers/worker.go index d23370fd22..5d447bdf54 100644 --- a/workers/worker.go +++ b/workers/worker.go @@ -67,7 +67,6 @@ type Binding struct { Outbound interface{} `json:"outbound,required"` // ID of the certificate to bind to CertificateID string `json:"certificate_id"` - Certificate interface{} `json:"certificate,required"` JSON bindingJSON `json:"-"` union BindingUnion } @@ -88,7 +87,6 @@ type bindingJSON struct { Namespace apijson.Field Outbound apijson.Field CertificateID apijson.Field - Certificate apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -247,8 +245,7 @@ type BindingParam struct { Namespace param.Field[string] `json:"namespace"` Outbound param.Field[interface{}] `json:"outbound,required"` // ID of the certificate to bind to - CertificateID param.Field[string] `json:"certificate_id"` - Certificate param.Field[interface{}] `json:"certificate,required"` + CertificateID param.Field[string] `json:"certificate_id"` } func (r BindingParam) MarshalJSON() (data []byte, err error) { @@ -726,7 +723,6 @@ func (r MigrationStepTransferredClassParam) MarshalJSON() (data []byte, err erro } type MTLSCERTBinding struct { - Certificate interface{} `json:"certificate,required"` // A JavaScript variable name for the binding. Name string `json:"name,required"` // The class of resource that the binding provides. @@ -738,7 +734,6 @@ type MTLSCERTBinding struct { // mtlscertBindingJSON contains the JSON metadata for the struct [MTLSCERTBinding] type mtlscertBindingJSON struct { - Certificate apijson.Field Name apijson.Field Type apijson.Field CertificateID apijson.Field @@ -772,7 +767,6 @@ func (r MTLSCERTBindingType) IsKnown() bool { } type MTLSCERTBindingParam struct { - Certificate param.Field[interface{}] `json:"certificate,required"` // The class of resource that the binding provides. Type param.Field[MTLSCERTBindingType] `json:"type,required"` // ID of the certificate to bind to diff --git a/zero_trust/dexfleetstatusdevice.go b/zero_trust/dexfleetstatusdevice.go index 062f0a97f3..f24d2b9ee7 100644 --- a/zero_trust/dexfleetstatusdevice.go +++ b/zero_trust/dexfleetstatusdevice.go @@ -61,13 +61,11 @@ type DEXFleetStatusDeviceListResponse struct { // Cloudflare colo Colo string `json:"colo,required"` // Device identifier (UUID v4) - DeviceID string `json:"deviceId,required"` - Mode interface{} `json:"mode,required"` + DeviceID string `json:"deviceId,required"` // Operating system Platform string `json:"platform,required"` // Network status - Status string `json:"status,required"` - Timestamp interface{} `json:"timestamp,required"` + Status string `json:"status,required"` // WARP client version Version string `json:"version,required"` // Device identifier (human readable) @@ -82,10 +80,8 @@ type DEXFleetStatusDeviceListResponse struct { type dexFleetStatusDeviceListResponseJSON struct { Colo apijson.Field DeviceID apijson.Field - Mode apijson.Field Platform apijson.Field Status apijson.Field - Timestamp apijson.Field Version apijson.Field DeviceName apijson.Field PersonEmail apijson.Field diff --git a/zones/dnssetting.go b/zones/dnssetting.go index 0e1515a747..843dbfa282 100644 --- a/zones/dnssetting.go +++ b/zones/dnssetting.go @@ -166,12 +166,8 @@ func (r DNSSettingEditParams) MarshalJSON() (data []byte, err error) { } type DNSSettingEditResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - FoundationDNS interface{} `json:"foundation_dns,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - MultiProvider interface{} `json:"multi_provider,required"` - Nameservers interface{} `json:"nameservers,required"` - SecondaryOverrides interface{} `json:"secondary_overrides,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success DNSSettingEditResponseEnvelopeSuccess `json:"success,required"` Result DNSSetting `json:"result"` @@ -181,16 +177,12 @@ type DNSSettingEditResponseEnvelope struct { // dnsSettingEditResponseEnvelopeJSON contains the JSON metadata for the struct // [DNSSettingEditResponseEnvelope] type dnsSettingEditResponseEnvelopeJSON struct { - Errors apijson.Field - FoundationDNS apijson.Field - Messages apijson.Field - MultiProvider apijson.Field - Nameservers apijson.Field - SecondaryOverrides apijson.Field - Success apijson.Field - Result apijson.Field - raw string - ExtraFields map[string]apijson.Field + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field } func (r *DNSSettingEditResponseEnvelope) UnmarshalJSON(data []byte) (err error) { @@ -222,12 +214,8 @@ type DNSSettingGetParams struct { } type DNSSettingGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - FoundationDNS interface{} `json:"foundation_dns,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - MultiProvider interface{} `json:"multi_provider,required"` - Nameservers interface{} `json:"nameservers,required"` - SecondaryOverrides interface{} `json:"secondary_overrides,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success DNSSettingGetResponseEnvelopeSuccess `json:"success,required"` Result DNSSetting `json:"result"` @@ -237,16 +225,12 @@ type DNSSettingGetResponseEnvelope struct { // dnsSettingGetResponseEnvelopeJSON contains the JSON metadata for the struct // [DNSSettingGetResponseEnvelope] type dnsSettingGetResponseEnvelopeJSON struct { - Errors apijson.Field - FoundationDNS apijson.Field - Messages apijson.Field - MultiProvider apijson.Field - Nameservers apijson.Field - SecondaryOverrides apijson.Field - Success apijson.Field - Result apijson.Field - raw string - ExtraFields map[string]apijson.Field + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field } func (r *DNSSettingGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { From 3943c86d41ec4502ba6903c8c4d8fb0cb2b0812d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 May 2024 03:37:55 +0000 Subject: [PATCH 126/127] feat(api): update via SDK Studio (#1977) --- api.md | 1 + intel/attacksurfacereportissue.go | 42 +++++++++---------------------- pagerules/pagerule.go | 12 ++++----- snippets/content_test.go | 1 + 4 files changed, 20 insertions(+), 36 deletions(-) diff --git a/api.md b/api.md index f48ecb7c97..7cd8220911 100644 --- a/api.md +++ b/api.md @@ -3457,6 +3457,7 @@ Params Types: Response Types: +- intel.IssueType - intel.AttackSurfaceReportIssueListResponse - intel.AttackSurfaceReportIssueClassResponse - intel.AttackSurfaceReportIssueDismissResponseUnion diff --git a/intel/attacksurfacereportissue.go b/intel/attacksurfacereportissue.go index d8e56e28c1..2e676ff5bd 100644 --- a/intel/attacksurfacereportissue.go +++ b/intel/attacksurfacereportissue.go @@ -206,18 +206,18 @@ func (r attackSurfaceReportIssueListResponseResultJSON) RawJSON() string { } type AttackSurfaceReportIssueListResponseResultIssue struct { - ID string `json:"id"` - Dismissed bool `json:"dismissed"` - IssueClass string `json:"issue_class"` - IssueType AttackSurfaceReportIssueListResponseResultIssuesIssueType `json:"issue_type"` - Payload interface{} `json:"payload"` - ResolveLink string `json:"resolve_link"` - ResolveText string `json:"resolve_text"` - Severity AttackSurfaceReportIssueListResponseResultIssuesSeverity `json:"severity"` - Since time.Time `json:"since" format:"date-time"` - Subject string `json:"subject"` - Timestamp time.Time `json:"timestamp" format:"date-time"` - JSON attackSurfaceReportIssueListResponseResultIssueJSON `json:"-"` + ID string `json:"id"` + Dismissed bool `json:"dismissed"` + IssueClass string `json:"issue_class"` + IssueType IssueType `json:"issue_type"` + Payload interface{} `json:"payload"` + ResolveLink string `json:"resolve_link"` + ResolveText string `json:"resolve_text"` + Severity AttackSurfaceReportIssueListResponseResultIssuesSeverity `json:"severity"` + Since time.Time `json:"since" format:"date-time"` + Subject string `json:"subject"` + Timestamp time.Time `json:"timestamp" format:"date-time"` + JSON attackSurfaceReportIssueListResponseResultIssueJSON `json:"-"` } // attackSurfaceReportIssueListResponseResultIssueJSON contains the JSON metadata @@ -246,24 +246,6 @@ func (r attackSurfaceReportIssueListResponseResultIssueJSON) RawJSON() string { return r.raw } -type AttackSurfaceReportIssueListResponseResultIssuesIssueType string - -const ( - AttackSurfaceReportIssueListResponseResultIssuesIssueTypeComplianceViolation AttackSurfaceReportIssueListResponseResultIssuesIssueType = "compliance_violation" - AttackSurfaceReportIssueListResponseResultIssuesIssueTypeEmailSecurity AttackSurfaceReportIssueListResponseResultIssuesIssueType = "email_security" - AttackSurfaceReportIssueListResponseResultIssuesIssueTypeExposedInfrastructure AttackSurfaceReportIssueListResponseResultIssuesIssueType = "exposed_infrastructure" - AttackSurfaceReportIssueListResponseResultIssuesIssueTypeInsecureConfiguration AttackSurfaceReportIssueListResponseResultIssuesIssueType = "insecure_configuration" - AttackSurfaceReportIssueListResponseResultIssuesIssueTypeWeakAuthentication AttackSurfaceReportIssueListResponseResultIssuesIssueType = "weak_authentication" -) - -func (r AttackSurfaceReportIssueListResponseResultIssuesIssueType) IsKnown() bool { - switch r { - case AttackSurfaceReportIssueListResponseResultIssuesIssueTypeComplianceViolation, AttackSurfaceReportIssueListResponseResultIssuesIssueTypeEmailSecurity, AttackSurfaceReportIssueListResponseResultIssuesIssueTypeExposedInfrastructure, AttackSurfaceReportIssueListResponseResultIssuesIssueTypeInsecureConfiguration, AttackSurfaceReportIssueListResponseResultIssuesIssueTypeWeakAuthentication: - return true - } - return false -} - type AttackSurfaceReportIssueListResponseResultIssuesSeverity string const ( diff --git a/pagerules/pagerule.go b/pagerules/pagerule.go index 2f28d9c101..f1286d447e 100644 --- a/pagerules/pagerule.go +++ b/pagerules/pagerule.go @@ -281,12 +281,12 @@ func (r RouteValueParam) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -// A request condition target. +// URL target. type Target struct { // String constraint. - Constraint TargetConstraint `json:"constraint,required"` + Constraint TargetConstraint `json:"constraint"` // A target based on the URL of the request. - Target TargetTarget `json:"target,required"` + Target TargetTarget `json:"target"` JSON targetJSON `json:"-"` } @@ -367,12 +367,12 @@ func (r TargetTarget) IsKnown() bool { return false } -// A request condition target. +// URL target. type TargetParam struct { // String constraint. - Constraint param.Field[TargetConstraintParam] `json:"constraint,required"` + Constraint param.Field[TargetConstraintParam] `json:"constraint"` // A target based on the URL of the request. - Target param.Field[TargetTarget] `json:"target,required"` + Target param.Field[TargetTarget] `json:"target"` } func (r TargetParam) MarshalJSON() (data []byte, err error) { diff --git a/snippets/content_test.go b/snippets/content_test.go index a7c3080863..6c7d2d0c64 100644 --- a/snippets/content_test.go +++ b/snippets/content_test.go @@ -17,6 +17,7 @@ import ( ) func TestContentGet(t *testing.T) { + t.Skip("throwing HTTP 415") server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(200) w.Write([]byte("abc")) From 97ed11d8c2b805a57058e4a090dde350688f9b2f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 May 2024 03:38:52 +0000 Subject: [PATCH 127/127] release: 2.2.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 137 ++++++++++++++++++++++++++++++++++ README.md | 2 +- internal/version.go | 2 +- 4 files changed, 140 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 656a2ef17d..bfc26f9c4e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.1.0" + ".": "2.2.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 922b1ee8e3..d3d4fcfec0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,142 @@ # Changelog +## 2.2.0 (2024-05-08) + +Full Changelog: [v2.1.0...v2.2.0](https://github.com/cloudflare/cloudflare-go/compare/v2.1.0...v2.2.0) + +### Features + +* **api:** OpenAPI spec update via Stainless API ([#1840](https://github.com/cloudflare/cloudflare-go/issues/1840)) ([70fd793](https://github.com/cloudflare/cloudflare-go/commit/70fd7937e7f47cc109becb1dc470e45b8837c19c)) +* **api:** OpenAPI spec update via Stainless API ([#1842](https://github.com/cloudflare/cloudflare-go/issues/1842)) ([09c26b2](https://github.com/cloudflare/cloudflare-go/commit/09c26b26e4d7375816e3c113d7ca34cac0330738)) +* **api:** OpenAPI spec update via Stainless API ([#1843](https://github.com/cloudflare/cloudflare-go/issues/1843)) ([7b8a09a](https://github.com/cloudflare/cloudflare-go/commit/7b8a09ab66847e43bce0c5945ec078cd4cba9e8e)) +* **api:** OpenAPI spec update via Stainless API ([#1846](https://github.com/cloudflare/cloudflare-go/issues/1846)) ([b8d823d](https://github.com/cloudflare/cloudflare-go/commit/b8d823ddb4d720f83e3d5eddb06a03f401c0e7b3)) +* **api:** OpenAPI spec update via Stainless API ([#1847](https://github.com/cloudflare/cloudflare-go/issues/1847)) ([80de1e4](https://github.com/cloudflare/cloudflare-go/commit/80de1e41bfa32404558211fe940994a04d756f77)) +* **api:** OpenAPI spec update via Stainless API ([#1848](https://github.com/cloudflare/cloudflare-go/issues/1848)) ([5639725](https://github.com/cloudflare/cloudflare-go/commit/563972540c6f58689b233ebc86d56d8b4bed12af)) +* **api:** OpenAPI spec update via Stainless API ([#1849](https://github.com/cloudflare/cloudflare-go/issues/1849)) ([c2df704](https://github.com/cloudflare/cloudflare-go/commit/c2df704abb15398046ed887063c607e0e1ee5c1c)) +* **api:** OpenAPI spec update via Stainless API ([#1850](https://github.com/cloudflare/cloudflare-go/issues/1850)) ([df733af](https://github.com/cloudflare/cloudflare-go/commit/df733af7c9ebc0f25242f833b73eac89672427ef)) +* **api:** OpenAPI spec update via Stainless API ([#1851](https://github.com/cloudflare/cloudflare-go/issues/1851)) ([edc969b](https://github.com/cloudflare/cloudflare-go/commit/edc969b06ea5a130fed665f129f93c20c38677c1)) +* **api:** OpenAPI spec update via Stainless API ([#1853](https://github.com/cloudflare/cloudflare-go/issues/1853)) ([996eeec](https://github.com/cloudflare/cloudflare-go/commit/996eeec918c0a8f129096d0d7134634c39ec174c)) +* **api:** OpenAPI spec update via Stainless API ([#1854](https://github.com/cloudflare/cloudflare-go/issues/1854)) ([aa70500](https://github.com/cloudflare/cloudflare-go/commit/aa705007ed526f28ae9f18866850405ca59c29d3)) +* **api:** OpenAPI spec update via Stainless API ([#1855](https://github.com/cloudflare/cloudflare-go/issues/1855)) ([1fa8a1c](https://github.com/cloudflare/cloudflare-go/commit/1fa8a1ce2c22332eac846b93fa08049e00a3fe20)) +* **api:** OpenAPI spec update via Stainless API ([#1856](https://github.com/cloudflare/cloudflare-go/issues/1856)) ([e1b6ec9](https://github.com/cloudflare/cloudflare-go/commit/e1b6ec936b95eda66bc2cb39244d802441286072)) +* **api:** OpenAPI spec update via Stainless API ([#1857](https://github.com/cloudflare/cloudflare-go/issues/1857)) ([a7d2733](https://github.com/cloudflare/cloudflare-go/commit/a7d27336921cc72a8c0e35e374d74a5d6416159b)) +* **api:** OpenAPI spec update via Stainless API ([#1858](https://github.com/cloudflare/cloudflare-go/issues/1858)) ([ee3b21e](https://github.com/cloudflare/cloudflare-go/commit/ee3b21ec7b9e00cf033160c5179ea66de2bf0d37)) +* **api:** OpenAPI spec update via Stainless API ([#1859](https://github.com/cloudflare/cloudflare-go/issues/1859)) ([1fb5075](https://github.com/cloudflare/cloudflare-go/commit/1fb50751f2ad67e840f7e1dc8860fcef0622f29f)) +* **api:** OpenAPI spec update via Stainless API ([#1860](https://github.com/cloudflare/cloudflare-go/issues/1860)) ([1f57de4](https://github.com/cloudflare/cloudflare-go/commit/1f57de4f37dbb9626d115bd2b55a4e36bd0d0eed)) +* **api:** OpenAPI spec update via Stainless API ([#1862](https://github.com/cloudflare/cloudflare-go/issues/1862)) ([de62d6c](https://github.com/cloudflare/cloudflare-go/commit/de62d6c1179a4edfe129b8da642cb09e5904ad25)) +* **api:** OpenAPI spec update via Stainless API ([#1863](https://github.com/cloudflare/cloudflare-go/issues/1863)) ([eea4b41](https://github.com/cloudflare/cloudflare-go/commit/eea4b41517d42813f342ce912054e090ec2dde96)) +* **api:** OpenAPI spec update via Stainless API ([#1864](https://github.com/cloudflare/cloudflare-go/issues/1864)) ([8baf2a6](https://github.com/cloudflare/cloudflare-go/commit/8baf2a6f4c7fc725ea449b61a70148fa0a33eb5d)) +* **api:** OpenAPI spec update via Stainless API ([#1866](https://github.com/cloudflare/cloudflare-go/issues/1866)) ([692ea51](https://github.com/cloudflare/cloudflare-go/commit/692ea51f083239638d0e645dcdaa68cd635fd2ab)) +* **api:** OpenAPI spec update via Stainless API ([#1867](https://github.com/cloudflare/cloudflare-go/issues/1867)) ([a31112e](https://github.com/cloudflare/cloudflare-go/commit/a31112e4396b99a92e784aafb21bc83ccba2179f)) +* **api:** OpenAPI spec update via Stainless API ([#1868](https://github.com/cloudflare/cloudflare-go/issues/1868)) ([f41dd89](https://github.com/cloudflare/cloudflare-go/commit/f41dd89520d881dedc1872a6d5ae84fdd3b79711)) +* **api:** OpenAPI spec update via Stainless API ([#1869](https://github.com/cloudflare/cloudflare-go/issues/1869)) ([c89613a](https://github.com/cloudflare/cloudflare-go/commit/c89613a0d3186e992a57cde82a53b3e7027a8ba1)) +* **api:** OpenAPI spec update via Stainless API ([#1870](https://github.com/cloudflare/cloudflare-go/issues/1870)) ([2d5e060](https://github.com/cloudflare/cloudflare-go/commit/2d5e060d799b77969f6890fd2324f7db9e3ce0bd)) +* **api:** OpenAPI spec update via Stainless API ([#1871](https://github.com/cloudflare/cloudflare-go/issues/1871)) ([fd8fd26](https://github.com/cloudflare/cloudflare-go/commit/fd8fd26282357d55f7a067b29a8e0123ed5df900)) +* **api:** OpenAPI spec update via Stainless API ([#1872](https://github.com/cloudflare/cloudflare-go/issues/1872)) ([3fb734c](https://github.com/cloudflare/cloudflare-go/commit/3fb734cd0c92a815795e38a6a5144a737e8726a9)) +* **api:** OpenAPI spec update via Stainless API ([#1873](https://github.com/cloudflare/cloudflare-go/issues/1873)) ([daca4b8](https://github.com/cloudflare/cloudflare-go/commit/daca4b817d88059421ac8ed8319e541a57380eac)) +* **api:** OpenAPI spec update via Stainless API ([#1874](https://github.com/cloudflare/cloudflare-go/issues/1874)) ([fcf413b](https://github.com/cloudflare/cloudflare-go/commit/fcf413bb5fb8470299bae8c4a69a7ec8dca95d17)) +* **api:** OpenAPI spec update via Stainless API ([#1875](https://github.com/cloudflare/cloudflare-go/issues/1875)) ([6e45fb6](https://github.com/cloudflare/cloudflare-go/commit/6e45fb6e93d5766e5781863b675e3a4974601695)) +* **api:** OpenAPI spec update via Stainless API ([#1876](https://github.com/cloudflare/cloudflare-go/issues/1876)) ([b66804f](https://github.com/cloudflare/cloudflare-go/commit/b66804f8ee31f6987dfe46a4825ce8fcc85bd9e2)) +* **api:** OpenAPI spec update via Stainless API ([#1877](https://github.com/cloudflare/cloudflare-go/issues/1877)) ([e1bbcc9](https://github.com/cloudflare/cloudflare-go/commit/e1bbcc922af4acde86f3b56b6c4a2bca9bfe2b7f)) +* **api:** OpenAPI spec update via Stainless API ([#1878](https://github.com/cloudflare/cloudflare-go/issues/1878)) ([a6cc625](https://github.com/cloudflare/cloudflare-go/commit/a6cc625a042488117455561ae3fc6f2a1a62cdaf)) +* **api:** OpenAPI spec update via Stainless API ([#1879](https://github.com/cloudflare/cloudflare-go/issues/1879)) ([0d8323b](https://github.com/cloudflare/cloudflare-go/commit/0d8323b76a282143ff2a2f7d968e0c6e21934450)) +* **api:** OpenAPI spec update via Stainless API ([#1880](https://github.com/cloudflare/cloudflare-go/issues/1880)) ([826316c](https://github.com/cloudflare/cloudflare-go/commit/826316c99ed6b55fbd48028f8847d736a7e3c67e)) +* **api:** OpenAPI spec update via Stainless API ([#1881](https://github.com/cloudflare/cloudflare-go/issues/1881)) ([26a4ef1](https://github.com/cloudflare/cloudflare-go/commit/26a4ef142906925bda190ca656470899d1a2dbbb)) +* **api:** OpenAPI spec update via Stainless API ([#1882](https://github.com/cloudflare/cloudflare-go/issues/1882)) ([213386a](https://github.com/cloudflare/cloudflare-go/commit/213386acb8dfaadb310e8046083ef147495de1be)) +* **api:** OpenAPI spec update via Stainless API ([#1883](https://github.com/cloudflare/cloudflare-go/issues/1883)) ([af2c259](https://github.com/cloudflare/cloudflare-go/commit/af2c259b1dfa2ef4387ba787721c440abf722e36)) +* **api:** OpenAPI spec update via Stainless API ([#1885](https://github.com/cloudflare/cloudflare-go/issues/1885)) ([a436f5e](https://github.com/cloudflare/cloudflare-go/commit/a436f5e745750644dbbd03b53ac491607fce25eb)) +* **api:** OpenAPI spec update via Stainless API ([#1888](https://github.com/cloudflare/cloudflare-go/issues/1888)) ([57e8e6d](https://github.com/cloudflare/cloudflare-go/commit/57e8e6d58da80a2dde5f621d74059908b4017768)) +* **api:** OpenAPI spec update via Stainless API ([#1889](https://github.com/cloudflare/cloudflare-go/issues/1889)) ([c0be306](https://github.com/cloudflare/cloudflare-go/commit/c0be306fd8fb63ce02c7e9fbfafddc97b767b39f)) +* **api:** OpenAPI spec update via Stainless API ([#1890](https://github.com/cloudflare/cloudflare-go/issues/1890)) ([278feb2](https://github.com/cloudflare/cloudflare-go/commit/278feb23418e1974670ce173ec6ebc97be15cd6e)) +* **api:** OpenAPI spec update via Stainless API ([#1891](https://github.com/cloudflare/cloudflare-go/issues/1891)) ([2cff27f](https://github.com/cloudflare/cloudflare-go/commit/2cff27f6a857961d5f94027aff420f41c576efb1)) +* **api:** OpenAPI spec update via Stainless API ([#1892](https://github.com/cloudflare/cloudflare-go/issues/1892)) ([fa7b98a](https://github.com/cloudflare/cloudflare-go/commit/fa7b98ab4532ba420924456504fe6fc94fd3f0b6)) +* **api:** OpenAPI spec update via Stainless API ([#1894](https://github.com/cloudflare/cloudflare-go/issues/1894)) ([3cc9b87](https://github.com/cloudflare/cloudflare-go/commit/3cc9b874efa61b14547bf052bff81e8e42fc100a)) +* **api:** OpenAPI spec update via Stainless API ([#1895](https://github.com/cloudflare/cloudflare-go/issues/1895)) ([2941913](https://github.com/cloudflare/cloudflare-go/commit/2941913d15d28648fc952ac574c615277b86ce93)) +* **api:** OpenAPI spec update via Stainless API ([#1896](https://github.com/cloudflare/cloudflare-go/issues/1896)) ([1cce5eb](https://github.com/cloudflare/cloudflare-go/commit/1cce5eb5123acad23e466ab898226a0dc201d96e)) +* **api:** OpenAPI spec update via Stainless API ([#1897](https://github.com/cloudflare/cloudflare-go/issues/1897)) ([8d66bd0](https://github.com/cloudflare/cloudflare-go/commit/8d66bd019da1e6f39944c5203bcd3f1cbce0dafe)) +* **api:** OpenAPI spec update via Stainless API ([#1898](https://github.com/cloudflare/cloudflare-go/issues/1898)) ([9ce240b](https://github.com/cloudflare/cloudflare-go/commit/9ce240b192d7732ac2f69d7700efda1b731c846f)) +* **api:** OpenAPI spec update via Stainless API ([#1899](https://github.com/cloudflare/cloudflare-go/issues/1899)) ([0afd266](https://github.com/cloudflare/cloudflare-go/commit/0afd2663ec41fccea421cbad7e2f43e71ee0aaee)) +* **api:** OpenAPI spec update via Stainless API ([#1900](https://github.com/cloudflare/cloudflare-go/issues/1900)) ([ed983c5](https://github.com/cloudflare/cloudflare-go/commit/ed983c50704eab5085fc5b98a32811352452d107)) +* **api:** OpenAPI spec update via Stainless API ([#1902](https://github.com/cloudflare/cloudflare-go/issues/1902)) ([7fa905b](https://github.com/cloudflare/cloudflare-go/commit/7fa905b981baaca160edaa67208af517a37f1902)) +* **api:** OpenAPI spec update via Stainless API ([#1904](https://github.com/cloudflare/cloudflare-go/issues/1904)) ([ba91f41](https://github.com/cloudflare/cloudflare-go/commit/ba91f415500e7c54c7ba4d3577cf16c3fa5c7aec)) +* **api:** OpenAPI spec update via Stainless API ([#1905](https://github.com/cloudflare/cloudflare-go/issues/1905)) ([685462c](https://github.com/cloudflare/cloudflare-go/commit/685462c64a343e7fc48a84e5fbac276b802ad87a)) +* **api:** OpenAPI spec update via Stainless API ([#1906](https://github.com/cloudflare/cloudflare-go/issues/1906)) ([22b6349](https://github.com/cloudflare/cloudflare-go/commit/22b6349e0d7c83d31644c2fd98d6a7080c626c3f)) +* **api:** OpenAPI spec update via Stainless API ([#1907](https://github.com/cloudflare/cloudflare-go/issues/1907)) ([1d233d2](https://github.com/cloudflare/cloudflare-go/commit/1d233d25733b913506d8835c23ff367c9968c78a)) +* **api:** OpenAPI spec update via Stainless API ([#1908](https://github.com/cloudflare/cloudflare-go/issues/1908)) ([2a88d76](https://github.com/cloudflare/cloudflare-go/commit/2a88d765c8f143eecd8a12ea18b468876ef11673)) +* **api:** OpenAPI spec update via Stainless API ([#1909](https://github.com/cloudflare/cloudflare-go/issues/1909)) ([11023d8](https://github.com/cloudflare/cloudflare-go/commit/11023d8e319dcc3281c1cae785d5a5d1de4c6a48)) +* **api:** OpenAPI spec update via Stainless API ([#1910](https://github.com/cloudflare/cloudflare-go/issues/1910)) ([7a42345](https://github.com/cloudflare/cloudflare-go/commit/7a423454dcc878c055549f942c49148d78edd661)) +* **api:** OpenAPI spec update via Stainless API ([#1911](https://github.com/cloudflare/cloudflare-go/issues/1911)) ([b51a8e2](https://github.com/cloudflare/cloudflare-go/commit/b51a8e25b8eb25679b285aebc311df9c82d555d1)) +* **api:** OpenAPI spec update via Stainless API ([#1912](https://github.com/cloudflare/cloudflare-go/issues/1912)) ([1ca418c](https://github.com/cloudflare/cloudflare-go/commit/1ca418c9eba6abf032ace448fdebac2967b57204)) +* **api:** OpenAPI spec update via Stainless API ([#1913](https://github.com/cloudflare/cloudflare-go/issues/1913)) ([fa9e05d](https://github.com/cloudflare/cloudflare-go/commit/fa9e05d044453f62628f0cf447ded615af5b0c06)) +* **api:** OpenAPI spec update via Stainless API ([#1914](https://github.com/cloudflare/cloudflare-go/issues/1914)) ([7c54539](https://github.com/cloudflare/cloudflare-go/commit/7c54539b04741a68c187b7d84822b719c65e18b2)) +* **api:** OpenAPI spec update via Stainless API ([#1915](https://github.com/cloudflare/cloudflare-go/issues/1915)) ([23742c3](https://github.com/cloudflare/cloudflare-go/commit/23742c3ac032893a12b7319d457ff0ed2995f6c2)) +* **api:** OpenAPI spec update via Stainless API ([#1916](https://github.com/cloudflare/cloudflare-go/issues/1916)) ([45a7df6](https://github.com/cloudflare/cloudflare-go/commit/45a7df6f2bec4fcc90ea054c002d925ae70a76e8)) +* **api:** OpenAPI spec update via Stainless API ([#1917](https://github.com/cloudflare/cloudflare-go/issues/1917)) ([13723cb](https://github.com/cloudflare/cloudflare-go/commit/13723cbed4a51bf1f0f3939383e0532b962b9891)) +* **api:** OpenAPI spec update via Stainless API ([#1918](https://github.com/cloudflare/cloudflare-go/issues/1918)) ([d2945a8](https://github.com/cloudflare/cloudflare-go/commit/d2945a88489c9dd16c95a92ae6e005fd00374be8)) +* **api:** OpenAPI spec update via Stainless API ([#1919](https://github.com/cloudflare/cloudflare-go/issues/1919)) ([ce25fff](https://github.com/cloudflare/cloudflare-go/commit/ce25fff2934f388f401c3ddbe13eacba4a495603)) +* **api:** OpenAPI spec update via Stainless API ([#1920](https://github.com/cloudflare/cloudflare-go/issues/1920)) ([faa8286](https://github.com/cloudflare/cloudflare-go/commit/faa828610cafcc3114b17e78253a5380606f2140)) +* **api:** OpenAPI spec update via Stainless API ([#1922](https://github.com/cloudflare/cloudflare-go/issues/1922)) ([27e33d6](https://github.com/cloudflare/cloudflare-go/commit/27e33d69f5790412c65284363e941fdca6e28795)) +* **api:** OpenAPI spec update via Stainless API ([#1923](https://github.com/cloudflare/cloudflare-go/issues/1923)) ([f3f59a8](https://github.com/cloudflare/cloudflare-go/commit/f3f59a80efcde43c52e189f592ca5ca0a8442f7a)) +* **api:** OpenAPI spec update via Stainless API ([#1924](https://github.com/cloudflare/cloudflare-go/issues/1924)) ([ae81799](https://github.com/cloudflare/cloudflare-go/commit/ae817994ea52c0921a2ab588e4ffd88f736fb50f)) +* **api:** OpenAPI spec update via Stainless API ([#1925](https://github.com/cloudflare/cloudflare-go/issues/1925)) ([14af5b2](https://github.com/cloudflare/cloudflare-go/commit/14af5b255965475fbd82f6e6ca3fd57b757c2449)) +* **api:** OpenAPI spec update via Stainless API ([#1926](https://github.com/cloudflare/cloudflare-go/issues/1926)) ([c54229e](https://github.com/cloudflare/cloudflare-go/commit/c54229ee081f621eda59819d7caca62bb5bd50cd)) +* **api:** OpenAPI spec update via Stainless API ([#1927](https://github.com/cloudflare/cloudflare-go/issues/1927)) ([8a91755](https://github.com/cloudflare/cloudflare-go/commit/8a91755ab1be8a757e7e791e64b93360bf1885cc)) +* **api:** OpenAPI spec update via Stainless API ([#1928](https://github.com/cloudflare/cloudflare-go/issues/1928)) ([5d85f84](https://github.com/cloudflare/cloudflare-go/commit/5d85f848409036d34fd976d64402a228c7a32c5a)) +* **api:** OpenAPI spec update via Stainless API ([#1929](https://github.com/cloudflare/cloudflare-go/issues/1929)) ([702d17d](https://github.com/cloudflare/cloudflare-go/commit/702d17dea9050b80d0089dbf89c7ccc106998ece)) +* **api:** OpenAPI spec update via Stainless API ([#1930](https://github.com/cloudflare/cloudflare-go/issues/1930)) ([4ffb758](https://github.com/cloudflare/cloudflare-go/commit/4ffb75853cbdb0a677a3278dc4fd34333de196f2)) +* **api:** OpenAPI spec update via Stainless API ([#1931](https://github.com/cloudflare/cloudflare-go/issues/1931)) ([1b28fd4](https://github.com/cloudflare/cloudflare-go/commit/1b28fd4f92990771c889e3a97566e03695a9f3f9)) +* **api:** OpenAPI spec update via Stainless API ([#1932](https://github.com/cloudflare/cloudflare-go/issues/1932)) ([438210c](https://github.com/cloudflare/cloudflare-go/commit/438210cee9277f8d32fb03a13202aee50021922e)) +* **api:** OpenAPI spec update via Stainless API ([#1933](https://github.com/cloudflare/cloudflare-go/issues/1933)) ([9b5abc3](https://github.com/cloudflare/cloudflare-go/commit/9b5abc3ce18318def6ee61eca3bd6512458c97a0)) +* **api:** OpenAPI spec update via Stainless API ([#1934](https://github.com/cloudflare/cloudflare-go/issues/1934)) ([3f43810](https://github.com/cloudflare/cloudflare-go/commit/3f438107105c7de83ffa5999f5a622c417b8644e)) +* **api:** OpenAPI spec update via Stainless API ([#1935](https://github.com/cloudflare/cloudflare-go/issues/1935)) ([97ce462](https://github.com/cloudflare/cloudflare-go/commit/97ce462c0bc8062a0fa8ed1d5e7bd3a33e44d856)) +* **api:** OpenAPI spec update via Stainless API ([#1936](https://github.com/cloudflare/cloudflare-go/issues/1936)) ([6bf1a33](https://github.com/cloudflare/cloudflare-go/commit/6bf1a33522dad00d200ad2508469798cffe9f587)) +* **api:** OpenAPI spec update via Stainless API ([#1937](https://github.com/cloudflare/cloudflare-go/issues/1937)) ([b36f46d](https://github.com/cloudflare/cloudflare-go/commit/b36f46df1010d485f141c04b448e07c4191cd926)) +* **api:** OpenAPI spec update via Stainless API ([#1940](https://github.com/cloudflare/cloudflare-go/issues/1940)) ([48003b3](https://github.com/cloudflare/cloudflare-go/commit/48003b339edc4b5dd4ad34b9e82eb84d767899f7)) +* **api:** OpenAPI spec update via Stainless API ([#1941](https://github.com/cloudflare/cloudflare-go/issues/1941)) ([b911f69](https://github.com/cloudflare/cloudflare-go/commit/b911f69569446e0247a8d5fadabf0bbc63e5f9ac)) +* **api:** OpenAPI spec update via Stainless API ([#1942](https://github.com/cloudflare/cloudflare-go/issues/1942)) ([24ed50d](https://github.com/cloudflare/cloudflare-go/commit/24ed50dab5a21187b7894e5b2e2754d28591a8eb)) +* **api:** OpenAPI spec update via Stainless API ([#1943](https://github.com/cloudflare/cloudflare-go/issues/1943)) ([dc821a6](https://github.com/cloudflare/cloudflare-go/commit/dc821a682b9876d894220c9cc309a0d58ec86e70)) +* **api:** OpenAPI spec update via Stainless API ([#1947](https://github.com/cloudflare/cloudflare-go/issues/1947)) ([b96b046](https://github.com/cloudflare/cloudflare-go/commit/b96b046488283635fb880a7e7cafe0faa8a0379a)) +* **api:** OpenAPI spec update via Stainless API ([#1948](https://github.com/cloudflare/cloudflare-go/issues/1948)) ([cda1d98](https://github.com/cloudflare/cloudflare-go/commit/cda1d9890aa6f5a1bc8857cf859b94231cc67e06)) +* **api:** OpenAPI spec update via Stainless API ([#1950](https://github.com/cloudflare/cloudflare-go/issues/1950)) ([fb2ff25](https://github.com/cloudflare/cloudflare-go/commit/fb2ff25aeb8cca13bcc444b33fccb5875e340b7f)) +* **api:** OpenAPI spec update via Stainless API ([#1951](https://github.com/cloudflare/cloudflare-go/issues/1951)) ([6a198de](https://github.com/cloudflare/cloudflare-go/commit/6a198dedd36c9b8e13e8175f134e88a5e3308ace)) +* **api:** OpenAPI spec update via Stainless API ([#1952](https://github.com/cloudflare/cloudflare-go/issues/1952)) ([77ff8dc](https://github.com/cloudflare/cloudflare-go/commit/77ff8dc903f942c194f34424bc053e0a2e1d2fdf)) +* **api:** OpenAPI spec update via Stainless API ([#1953](https://github.com/cloudflare/cloudflare-go/issues/1953)) ([9bbf92c](https://github.com/cloudflare/cloudflare-go/commit/9bbf92c162395a833ab59264b890301e9ebd5d6d)) +* **api:** OpenAPI spec update via Stainless API ([#1954](https://github.com/cloudflare/cloudflare-go/issues/1954)) ([ef1504c](https://github.com/cloudflare/cloudflare-go/commit/ef1504ccaf174b491a2b17ef4f836c20e6932398)) +* **api:** OpenAPI spec update via Stainless API ([#1955](https://github.com/cloudflare/cloudflare-go/issues/1955)) ([ecbc2ad](https://github.com/cloudflare/cloudflare-go/commit/ecbc2adec50da77990bfa2afe3b2ead175fb95cc)) +* **api:** OpenAPI spec update via Stainless API ([#1957](https://github.com/cloudflare/cloudflare-go/issues/1957)) ([324465c](https://github.com/cloudflare/cloudflare-go/commit/324465c09cb501a272bee2a4175e93ee38464819)) +* **api:** update via SDK Studio ([#1844](https://github.com/cloudflare/cloudflare-go/issues/1844)) ([e1ec709](https://github.com/cloudflare/cloudflare-go/commit/e1ec709087a2b01a555b7a85aa8a188e79d7595d)) +* **api:** update via SDK Studio ([#1852](https://github.com/cloudflare/cloudflare-go/issues/1852)) ([f7060f8](https://github.com/cloudflare/cloudflare-go/commit/f7060f8bc683ccc1207d84424de855352ea8c9fc)) +* **api:** update via SDK Studio ([#1865](https://github.com/cloudflare/cloudflare-go/issues/1865)) ([202f084](https://github.com/cloudflare/cloudflare-go/commit/202f0843e5f0686ab738d98dcaa65ed86a62260d)) +* **api:** update via SDK Studio ([#1886](https://github.com/cloudflare/cloudflare-go/issues/1886)) ([b04a64c](https://github.com/cloudflare/cloudflare-go/commit/b04a64c0984553582ce096496bb160edd4b25b57)) +* **api:** update via SDK Studio ([#1893](https://github.com/cloudflare/cloudflare-go/issues/1893)) ([fb652db](https://github.com/cloudflare/cloudflare-go/commit/fb652dbfcf915fc7f2525d2af16b48a0022c8245)) +* **api:** update via SDK Studio ([#1901](https://github.com/cloudflare/cloudflare-go/issues/1901)) ([febb26e](https://github.com/cloudflare/cloudflare-go/commit/febb26e50b012e7463dbd0911fed2d388833f21f)) +* **api:** update via SDK Studio ([#1903](https://github.com/cloudflare/cloudflare-go/issues/1903)) ([94fd2fa](https://github.com/cloudflare/cloudflare-go/commit/94fd2fa0767c6ec5cbbbc4aa25a20eb5a981f1af)) +* **api:** update via SDK Studio ([#1945](https://github.com/cloudflare/cloudflare-go/issues/1945)) ([9f18a22](https://github.com/cloudflare/cloudflare-go/commit/9f18a22274939cf453e908245f1bb7fe94dd5994)) +* **api:** update via SDK Studio ([#1946](https://github.com/cloudflare/cloudflare-go/issues/1946)) ([036568e](https://github.com/cloudflare/cloudflare-go/commit/036568e03b1bebb9c5c3c0632010dcc8cc49d7c6)) +* **api:** update via SDK Studio ([#1949](https://github.com/cloudflare/cloudflare-go/issues/1949)) ([08c17df](https://github.com/cloudflare/cloudflare-go/commit/08c17df90d716163b7dea414815f6b466cdbc622)) +* **api:** update via SDK Studio ([#1958](https://github.com/cloudflare/cloudflare-go/issues/1958)) ([539d2ee](https://github.com/cloudflare/cloudflare-go/commit/539d2ee8194a058818b55d063adc1a5fed86bba9)) +* **api:** update via SDK Studio ([#1960](https://github.com/cloudflare/cloudflare-go/issues/1960)) ([4298c46](https://github.com/cloudflare/cloudflare-go/commit/4298c4699360f7cd4303babf3795e348e4cd1634)) +* **api:** update via SDK Studio ([#1961](https://github.com/cloudflare/cloudflare-go/issues/1961)) ([493200d](https://github.com/cloudflare/cloudflare-go/commit/493200df97b38fa36e0dc36500d006de8c229e6c)) +* **api:** update via SDK Studio ([#1962](https://github.com/cloudflare/cloudflare-go/issues/1962)) ([a70e598](https://github.com/cloudflare/cloudflare-go/commit/a70e598fcca1774a21514c0bb5767cf76947eb8d)) +* **api:** update via SDK Studio ([#1963](https://github.com/cloudflare/cloudflare-go/issues/1963)) ([515ec56](https://github.com/cloudflare/cloudflare-go/commit/515ec56470e963778eed62ddc973dd680b5a32f0)) +* **api:** update via SDK Studio ([#1964](https://github.com/cloudflare/cloudflare-go/issues/1964)) ([7a0993d](https://github.com/cloudflare/cloudflare-go/commit/7a0993dcdfe1753b05827f80925c65ecfdbb9662)) +* **api:** update via SDK Studio ([#1965](https://github.com/cloudflare/cloudflare-go/issues/1965)) ([e1341b8](https://github.com/cloudflare/cloudflare-go/commit/e1341b8e899474285e897e9b03a53534d9f37fc9)) +* **api:** update via SDK Studio ([#1966](https://github.com/cloudflare/cloudflare-go/issues/1966)) ([069c7fe](https://github.com/cloudflare/cloudflare-go/commit/069c7fe233d9fddb80ae85d1135025b7ff38a41f)) +* **api:** update via SDK Studio ([#1967](https://github.com/cloudflare/cloudflare-go/issues/1967)) ([04a6457](https://github.com/cloudflare/cloudflare-go/commit/04a64571ffd56f49a6956fbc27106c38b78c7efb)) +* **api:** update via SDK Studio ([#1968](https://github.com/cloudflare/cloudflare-go/issues/1968)) ([3c5fbcb](https://github.com/cloudflare/cloudflare-go/commit/3c5fbcb6d03e6b1e5f32e0b1a14fa68b0c289736)) +* **api:** update via SDK Studio ([#1969](https://github.com/cloudflare/cloudflare-go/issues/1969)) ([3c696e7](https://github.com/cloudflare/cloudflare-go/commit/3c696e75a3ac72e9703125b7da1321d6ae66ec4a)) +* **api:** update via SDK Studio ([#1970](https://github.com/cloudflare/cloudflare-go/issues/1970)) ([c4160d3](https://github.com/cloudflare/cloudflare-go/commit/c4160d3e54622f5917bff90121b49a5e74be7814)) +* **api:** update via SDK Studio ([#1971](https://github.com/cloudflare/cloudflare-go/issues/1971)) ([d0005c2](https://github.com/cloudflare/cloudflare-go/commit/d0005c25a5a6aed3c230ded6501327f8b9582100)) +* **api:** update via SDK Studio ([#1972](https://github.com/cloudflare/cloudflare-go/issues/1972)) ([abb726f](https://github.com/cloudflare/cloudflare-go/commit/abb726f32974abc8780a9a8aa3f423b290915649)) +* **api:** update via SDK Studio ([#1973](https://github.com/cloudflare/cloudflare-go/issues/1973)) ([3789b4c](https://github.com/cloudflare/cloudflare-go/commit/3789b4c159b264b859e37a1559bb8d948b929d4c)) +* **api:** update via SDK Studio ([#1976](https://github.com/cloudflare/cloudflare-go/issues/1976)) ([95f5df8](https://github.com/cloudflare/cloudflare-go/commit/95f5df84be86634d9b2942a5692ba24e65b99736)) +* **api:** update via SDK Studio ([#1977](https://github.com/cloudflare/cloudflare-go/issues/1977)) ([3943c86](https://github.com/cloudflare/cloudflare-go/commit/3943c86d41ec4502ba6903c8c4d8fb0cb2b0812d)) + + +### Chores + +* rebuild project due to oas spec rename ([#1884](https://github.com/cloudflare/cloudflare-go/issues/1884)) ([59cd9f9](https://github.com/cloudflare/cloudflare-go/commit/59cd9f9bf4a2cd6f5a7b747c1b098839f41d84cc)) + ## 2.1.0 (2024-04-23) Full Changelog: [v2.0.0...v2.1.0](https://github.com/cloudflare/cloudflare-go/compare/v2.0.0...v2.1.0) diff --git a/README.md b/README.md index 3626c222d2..d90f4b57a8 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Or to pin the version: ```sh -go get -u 'github.com/cloudflare/cloudflare-go/v2@v2.1.0' +go get -u 'github.com/cloudflare/cloudflare-go/v2@v2.2.0' ``` diff --git a/internal/version.go b/internal/version.go index 436f832652..0759debdbf 100644 --- a/internal/version.go +++ b/internal/version.go @@ -2,4 +2,4 @@ package internal -const PackageVersion = "2.1.0" // x-release-please-version +const PackageVersion = "2.2.0" // x-release-please-version