From 66242622c7a1018f4de493a4e7682b1db0a043d1 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 17 Sep 2024 14:32:55 +0000
Subject: [PATCH] feat(api): OpenAPI spec update via Stainless API (#3147)
---
.stats.yml | 2 +-
api.md | 8 +-
argo/tieredcaching.go | 16 +--
cache/cachereserve.go | 40 +++----
cache/regionaltieredcache.go | 20 ++--
cache/smarttieredcache.go | 24 ++---
cache/variant.go | 30 +++---
event_notifications/r2configuration.go | 6 +-
event_notifications/r2configurationqueue.go | 12 +--
hyperdrive/config.go | 2 +-
kv/namespace.go | 42 +-------
kv/namespacebulk.go | 42 +-------
kv/namespacevalue.go | 42 +-------
magic_network_monitoring/config.go | 102 ++++++++++++++++--
magic_network_monitoring/config_test.go | 54 ++++++++--
magic_network_monitoring/configfull.go | 2 +-
magic_network_monitoring/rule.go | 74 +++++++++++--
magic_network_monitoring/rule_test.go | 34 ++++--
.../originpostquantumencryption.go | 16 +--
pages/project.go | 4 +-
pages/projectdeployment.go | 2 +-
pages/projectdomain.go | 2 +-
queues/consumer.go | 24 ++---
queues/message.go | 12 +--
queues/queue.go | 26 ++---
vectorize/index.go | 4 +-
zero_trust/accessapplication.go | 2 +-
zero_trust/device.go | 2 +-
zero_trust/devicepolicycertificate.go | 4 +-
zero_trust/devicepostureintegration.go | 2 +-
zero_trust/devicerevoke.go | 2 +-
zero_trust/deviceunrevoke.go | 2 +-
zero_trust/dlpprofilecustom.go | 2 +-
zero_trust/riskscoring.go | 2 +-
zero_trust/riskscoringintegration.go | 2 +-
35 files changed, 380 insertions(+), 282 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index ebc4f7e8226..156d8ba6f8c 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,2 +1,2 @@
configured_endpoints: 1330
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5a8cd482991a2fe85970f5f88927e85036e382cf9fc2f96d6cf87603d223fe38.yml
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-afb55f82a2eb387bf61f7b9f7549b96ff5f857ddbe4888d9cc9abc78aba33b77.yml
diff --git a/api.md b/api.md
index f7331256262..b6c13e1ee95 100644
--- a/api.md
+++ b/api.md
@@ -6758,13 +6758,13 @@ Methods:
Response Types:
-- origin_post_quantum_encryption.interface{}
-- origin_post_quantum_encryption.interface{}
+- origin_post_quantum_encryption.OriginPostQuantumEncryptionUpdateResponse
+- origin_post_quantum_encryption.OriginPostQuantumEncryptionGetResponse
Methods:
-- client.OriginPostQuantumEncryption.Update(ctx context.Context, params origin_post_quantum_encryption.OriginPostQuantumEncryptionUpdateParams) (origin_post_quantum_encryption.interface{}, error)
-- client.OriginPostQuantumEncryption.Get(ctx context.Context, query origin_post_quantum_encryption.OriginPostQuantumEncryptionGetParams) (origin_post_quantum_encryption.interface{}, error)
+- client.OriginPostQuantumEncryption.Update(ctx context.Context, params origin_post_quantum_encryption.OriginPostQuantumEncryptionUpdateParams) (origin_post_quantum_encryption.OriginPostQuantumEncryptionUpdateResponse, error)
+- client.OriginPostQuantumEncryption.Get(ctx context.Context, query origin_post_quantum_encryption.OriginPostQuantumEncryptionGetParams) (origin_post_quantum_encryption.OriginPostQuantumEncryptionGetResponse, error)
# Speed
diff --git a/argo/tieredcaching.go b/argo/tieredcaching.go
index da5468e3338..d5902b21325 100644
--- a/argo/tieredcaching.go
+++ b/argo/tieredcaching.go
@@ -191,11 +191,11 @@ func (r TieredCachingEditParamsValue) IsKnown() bool {
}
type TieredCachingEditResponseEnvelope struct {
- Errors []shared.ResponseInfo `json:"errors,required"`
- Messages []shared.ResponseInfo `json:"messages,required"`
- Result TieredCachingEditResponse `json:"result,required"`
+ Errors []shared.ResponseInfo `json:"errors,required"`
+ Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success TieredCachingEditResponseEnvelopeSuccess `json:"success,required"`
+ Result TieredCachingEditResponse `json:"result"`
JSON tieredCachingEditResponseEnvelopeJSON `json:"-"`
}
@@ -204,8 +204,8 @@ type TieredCachingEditResponseEnvelope struct {
type tieredCachingEditResponseEnvelopeJSON struct {
Errors apijson.Field
Messages apijson.Field
- Result apijson.Field
Success apijson.Field
+ Result apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
@@ -239,11 +239,11 @@ type TieredCachingGetParams struct {
}
type TieredCachingGetResponseEnvelope struct {
- Errors []shared.ResponseInfo `json:"errors,required"`
- Messages []shared.ResponseInfo `json:"messages,required"`
- Result TieredCachingGetResponse `json:"result,required"`
+ Errors []shared.ResponseInfo `json:"errors,required"`
+ Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success TieredCachingGetResponseEnvelopeSuccess `json:"success,required"`
+ Result TieredCachingGetResponse `json:"result"`
JSON tieredCachingGetResponseEnvelopeJSON `json:"-"`
}
@@ -252,8 +252,8 @@ type TieredCachingGetResponseEnvelope struct {
type tieredCachingGetResponseEnvelopeJSON 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/cache/cachereserve.go b/cache/cachereserve.go
index 819e199f831..27e271a2d3c 100644
--- a/cache/cachereserve.go
+++ b/cache/cachereserve.go
@@ -354,14 +354,14 @@ func (r CacheReserveClearParams) MarshalJSON() (data []byte, err error) {
type CacheReserveClearResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
+ // Whether the API call was successful
+ Success CacheReserveClearResponseEnvelopeSuccess `json:"success,required"`
// 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
// that you cannot undo or cancel this operation.
- Result CacheReserveClearResponse `json:"result,required"`
- // Whether the API call was successful
- Success CacheReserveClearResponseEnvelopeSuccess `json:"success,required"`
- JSON cacheReserveClearResponseEnvelopeJSON `json:"-"`
+ Result CacheReserveClearResponse `json:"result"`
+ JSON cacheReserveClearResponseEnvelopeJSON `json:"-"`
}
// cacheReserveClearResponseEnvelopeJSON contains the JSON metadata for the struct
@@ -369,8 +369,8 @@ type CacheReserveClearResponseEnvelope struct {
type cacheReserveClearResponseEnvelopeJSON struct {
Errors apijson.Field
Messages apijson.Field
- Result apijson.Field
Success apijson.Field
+ Result apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
@@ -428,16 +428,16 @@ func (r CacheReserveEditParamsValue) IsKnown() bool {
type CacheReserveEditResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
+ // Whether the API call was successful
+ Success CacheReserveEditResponseEnvelopeSuccess `json:"success,required"`
// 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
// to reduce Reserve operations costs. See the
// [developer docs](https://developers.cloudflare.com/cache/about/cache-reserve)
// for more information.
- Result CacheReserveEditResponse `json:"result,required"`
- // Whether the API call was successful
- Success CacheReserveEditResponseEnvelopeSuccess `json:"success,required"`
- JSON cacheReserveEditResponseEnvelopeJSON `json:"-"`
+ Result CacheReserveEditResponse `json:"result"`
+ JSON cacheReserveEditResponseEnvelopeJSON `json:"-"`
}
// cacheReserveEditResponseEnvelopeJSON contains the JSON metadata for the struct
@@ -445,8 +445,8 @@ type CacheReserveEditResponseEnvelope struct {
type cacheReserveEditResponseEnvelopeJSON struct {
Errors apijson.Field
Messages apijson.Field
- Result apijson.Field
Success apijson.Field
+ Result apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
@@ -482,16 +482,16 @@ type CacheReserveGetParams struct {
type CacheReserveGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
+ // Whether the API call was successful
+ Success CacheReserveGetResponseEnvelopeSuccess `json:"success,required"`
// 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
// to reduce Reserve operations costs. See the
// [developer docs](https://developers.cloudflare.com/cache/about/cache-reserve)
// for more information.
- Result CacheReserveGetResponse `json:"result,required"`
- // Whether the API call was successful
- Success CacheReserveGetResponseEnvelopeSuccess `json:"success,required"`
- JSON cacheReserveGetResponseEnvelopeJSON `json:"-"`
+ Result CacheReserveGetResponse `json:"result"`
+ JSON cacheReserveGetResponseEnvelopeJSON `json:"-"`
}
// cacheReserveGetResponseEnvelopeJSON contains the JSON metadata for the struct
@@ -499,8 +499,8 @@ type CacheReserveGetResponseEnvelope struct {
type cacheReserveGetResponseEnvelopeJSON struct {
Errors apijson.Field
Messages apijson.Field
- Result apijson.Field
Success apijson.Field
+ Result apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
@@ -536,14 +536,14 @@ type CacheReserveStatusParams struct {
type CacheReserveStatusResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
+ // Whether the API call was successful
+ Success CacheReserveStatusResponseEnvelopeSuccess `json:"success,required"`
// 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
// that you cannot undo or cancel this operation.
- Result CacheReserveStatusResponse `json:"result,required"`
- // Whether the API call was successful
- Success CacheReserveStatusResponseEnvelopeSuccess `json:"success,required"`
- JSON cacheReserveStatusResponseEnvelopeJSON `json:"-"`
+ Result CacheReserveStatusResponse `json:"result"`
+ JSON cacheReserveStatusResponseEnvelopeJSON `json:"-"`
}
// cacheReserveStatusResponseEnvelopeJSON contains the JSON metadata for the struct
@@ -551,8 +551,8 @@ type CacheReserveStatusResponseEnvelope struct {
type cacheReserveStatusResponseEnvelopeJSON 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/cache/regionaltieredcache.go b/cache/regionaltieredcache.go
index 4598dbe2737..1572296c0aa 100644
--- a/cache/regionaltieredcache.go
+++ b/cache/regionaltieredcache.go
@@ -240,13 +240,13 @@ func (r RegionalTieredCacheEditParamsValue) IsKnown() bool {
type RegionalTieredCacheEditResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
+ // Whether the API call was successful
+ Success RegionalTieredCacheEditResponseEnvelopeSuccess `json:"success,required"`
// Instructs Cloudflare to check a regional hub data center on the way to your
// upper tier. This can help improve performance for smart and custom tiered cache
// topologies.
- Result RegionalTieredCacheEditResponse `json:"result,required"`
- // Whether the API call was successful
- Success RegionalTieredCacheEditResponseEnvelopeSuccess `json:"success,required"`
- JSON regionalTieredCacheEditResponseEnvelopeJSON `json:"-"`
+ Result RegionalTieredCacheEditResponse `json:"result"`
+ JSON regionalTieredCacheEditResponseEnvelopeJSON `json:"-"`
}
// regionalTieredCacheEditResponseEnvelopeJSON contains the JSON metadata for the
@@ -254,8 +254,8 @@ type RegionalTieredCacheEditResponseEnvelope struct {
type regionalTieredCacheEditResponseEnvelopeJSON struct {
Errors apijson.Field
Messages apijson.Field
- Result apijson.Field
Success apijson.Field
+ Result apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
@@ -291,13 +291,13 @@ type RegionalTieredCacheGetParams struct {
type RegionalTieredCacheGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
+ // Whether the API call was successful
+ Success RegionalTieredCacheGetResponseEnvelopeSuccess `json:"success,required"`
// Instructs Cloudflare to check a regional hub data center on the way to your
// upper tier. This can help improve performance for smart and custom tiered cache
// topologies.
- Result RegionalTieredCacheGetResponse `json:"result,required"`
- // Whether the API call was successful
- Success RegionalTieredCacheGetResponseEnvelopeSuccess `json:"success,required"`
- JSON regionalTieredCacheGetResponseEnvelopeJSON `json:"-"`
+ Result RegionalTieredCacheGetResponse `json:"result"`
+ JSON regionalTieredCacheGetResponseEnvelopeJSON `json:"-"`
}
// regionalTieredCacheGetResponseEnvelopeJSON contains the JSON metadata for the
@@ -305,8 +305,8 @@ type RegionalTieredCacheGetResponseEnvelope struct {
type regionalTieredCacheGetResponseEnvelopeJSON 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/cache/smarttieredcache.go b/cache/smarttieredcache.go
index 37bea55b024..4b651a65e21 100644
--- a/cache/smarttieredcache.go
+++ b/cache/smarttieredcache.go
@@ -233,11 +233,11 @@ type SmartTieredCacheDeleteParams struct {
}
type SmartTieredCacheDeleteResponseEnvelope struct {
- Errors []shared.ResponseInfo `json:"errors,required"`
- Messages []shared.ResponseInfo `json:"messages,required"`
- Result SmartTieredCacheDeleteResponse `json:"result,required"`
+ Errors []shared.ResponseInfo `json:"errors,required"`
+ Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success SmartTieredCacheDeleteResponseEnvelopeSuccess `json:"success,required"`
+ Result SmartTieredCacheDeleteResponse `json:"result"`
JSON smartTieredCacheDeleteResponseEnvelopeJSON `json:"-"`
}
@@ -246,8 +246,8 @@ type SmartTieredCacheDeleteResponseEnvelope struct {
type smartTieredCacheDeleteResponseEnvelopeJSON struct {
Errors apijson.Field
Messages apijson.Field
- Result apijson.Field
Success apijson.Field
+ Result apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
@@ -303,11 +303,11 @@ func (r SmartTieredCacheEditParamsValue) IsKnown() bool {
}
type SmartTieredCacheEditResponseEnvelope struct {
- Errors []shared.ResponseInfo `json:"errors,required"`
- Messages []shared.ResponseInfo `json:"messages,required"`
- Result SmartTieredCacheEditResponse `json:"result,required"`
+ Errors []shared.ResponseInfo `json:"errors,required"`
+ Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success SmartTieredCacheEditResponseEnvelopeSuccess `json:"success,required"`
+ Result SmartTieredCacheEditResponse `json:"result"`
JSON smartTieredCacheEditResponseEnvelopeJSON `json:"-"`
}
@@ -316,8 +316,8 @@ type SmartTieredCacheEditResponseEnvelope struct {
type smartTieredCacheEditResponseEnvelopeJSON struct {
Errors apijson.Field
Messages apijson.Field
- Result apijson.Field
Success apijson.Field
+ Result apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
@@ -351,11 +351,11 @@ type SmartTieredCacheGetParams struct {
}
type SmartTieredCacheGetResponseEnvelope struct {
- Errors []shared.ResponseInfo `json:"errors,required"`
- Messages []shared.ResponseInfo `json:"messages,required"`
- Result SmartTieredCacheGetResponse `json:"result,required"`
+ Errors []shared.ResponseInfo `json:"errors,required"`
+ Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success SmartTieredCacheGetResponseEnvelopeSuccess `json:"success,required"`
+ Result SmartTieredCacheGetResponse `json:"result"`
JSON smartTieredCacheGetResponseEnvelopeJSON `json:"-"`
}
@@ -364,8 +364,8 @@ type SmartTieredCacheGetResponseEnvelope struct {
type smartTieredCacheGetResponseEnvelopeJSON 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/cache/variant.go b/cache/variant.go
index 87d416922db..7f5a4bfd15d 100644
--- a/cache/variant.go
+++ b/cache/variant.go
@@ -344,15 +344,15 @@ type VariantDeleteParams struct {
type VariantDeleteResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
+ // Whether the API call was successful
+ Success VariantDeleteResponseEnvelopeSuccess `json:"success,required"`
// Variant support enables caching variants of images with certain file extensions
// in addition to the original. This only applies when the origin server sends the
// '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.
- Result CacheVariant `json:"result,required"`
- // Whether the API call was successful
- Success VariantDeleteResponseEnvelopeSuccess `json:"success,required"`
- JSON variantDeleteResponseEnvelopeJSON `json:"-"`
+ Result CacheVariant `json:"result"`
+ JSON variantDeleteResponseEnvelopeJSON `json:"-"`
}
// variantDeleteResponseEnvelopeJSON contains the JSON metadata for the struct
@@ -360,8 +360,8 @@ type VariantDeleteResponseEnvelope struct {
type variantDeleteResponseEnvelopeJSON struct {
Errors apijson.Field
Messages apijson.Field
- Result apijson.Field
Success apijson.Field
+ Result apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
@@ -444,15 +444,15 @@ func (r VariantEditParamsValue) MarshalJSON() (data []byte, err error) {
type VariantEditResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
+ // Whether the API call was successful
+ Success VariantEditResponseEnvelopeSuccess `json:"success,required"`
// Variant support enables caching variants of images with certain file extensions
// in addition to the original. This only applies when the origin server sends the
// '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.
- Result VariantEditResponse `json:"result,required"`
- // Whether the API call was successful
- Success VariantEditResponseEnvelopeSuccess `json:"success,required"`
- JSON variantEditResponseEnvelopeJSON `json:"-"`
+ Result VariantEditResponse `json:"result"`
+ JSON variantEditResponseEnvelopeJSON `json:"-"`
}
// variantEditResponseEnvelopeJSON contains the JSON metadata for the struct
@@ -460,8 +460,8 @@ type VariantEditResponseEnvelope struct {
type variantEditResponseEnvelopeJSON struct {
Errors apijson.Field
Messages apijson.Field
- Result apijson.Field
Success apijson.Field
+ Result apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
@@ -497,15 +497,15 @@ type VariantGetParams struct {
type VariantGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
+ // Whether the API call was successful
+ Success VariantGetResponseEnvelopeSuccess `json:"success,required"`
// Variant support enables caching variants of images with certain file extensions
// in addition to the original. This only applies when the origin server sends the
// '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.
- Result VariantGetResponse `json:"result,required"`
- // Whether the API call was successful
- Success VariantGetResponseEnvelopeSuccess `json:"success,required"`
- JSON variantGetResponseEnvelopeJSON `json:"-"`
+ Result VariantGetResponse `json:"result"`
+ JSON variantGetResponseEnvelopeJSON `json:"-"`
}
// variantGetResponseEnvelopeJSON contains the JSON metadata for the struct
@@ -513,8 +513,8 @@ type VariantGetResponseEnvelope struct {
type variantGetResponseEnvelopeJSON 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/event_notifications/r2configuration.go b/event_notifications/r2configuration.go
index 1ac2be3be97..ec8f85bae15 100644
--- a/event_notifications/r2configuration.go
+++ b/event_notifications/r2configuration.go
@@ -132,7 +132,7 @@ func (r R2ConfigurationGetResponseItemRulesAction) IsKnown() bool {
}
type R2ConfigurationGetParams struct {
- // Identifier
+ // Identifier.
AccountID param.Field[string] `path:"account_id,required"`
}
@@ -140,7 +140,7 @@ type R2ConfigurationGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result R2ConfigurationGetResponse `json:"result,required"`
- // Whether the API call was successful
+ // Whether the API call was successful.
Success R2ConfigurationGetResponseEnvelopeSuccess `json:"success,required"`
JSON r2ConfigurationGetResponseEnvelopeJSON `json:"-"`
}
@@ -164,7 +164,7 @@ func (r r2ConfigurationGetResponseEnvelopeJSON) RawJSON() string {
return r.raw
}
-// Whether the API call was successful
+// Whether the API call was successful.
type R2ConfigurationGetResponseEnvelopeSuccess bool
const (
diff --git a/event_notifications/r2configurationqueue.go b/event_notifications/r2configurationqueue.go
index 282ff0cf965..17472ab362d 100644
--- a/event_notifications/r2configurationqueue.go
+++ b/event_notifications/r2configurationqueue.go
@@ -136,7 +136,7 @@ func (r R2ConfigurationQueueDeleteResponseArray) ImplementsEventNotificationsR2C
}
type R2ConfigurationQueueUpdateParams struct {
- // Identifier
+ // Identifier.
AccountID param.Field[string] `path:"account_id,required"`
// Array of rules to drive notifications
Rules param.Field[[]R2ConfigurationQueueUpdateParamsRule] `json:"rules"`
@@ -181,7 +181,7 @@ type R2ConfigurationQueueUpdateResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result R2ConfigurationQueueUpdateResponse `json:"result,required"`
- // Whether the API call was successful
+ // Whether the API call was successful.
Success R2ConfigurationQueueUpdateResponseEnvelopeSuccess `json:"success,required"`
JSON r2ConfigurationQueueUpdateResponseEnvelopeJSON `json:"-"`
}
@@ -205,7 +205,7 @@ func (r r2ConfigurationQueueUpdateResponseEnvelopeJSON) RawJSON() string {
return r.raw
}
-// Whether the API call was successful
+// Whether the API call was successful.
type R2ConfigurationQueueUpdateResponseEnvelopeSuccess bool
const (
@@ -221,7 +221,7 @@ func (r R2ConfigurationQueueUpdateResponseEnvelopeSuccess) IsKnown() bool {
}
type R2ConfigurationQueueDeleteParams struct {
- // Identifier
+ // Identifier.
AccountID param.Field[string] `path:"account_id,required"`
}
@@ -229,7 +229,7 @@ type R2ConfigurationQueueDeleteResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result R2ConfigurationQueueDeleteResponseUnion `json:"result,required"`
- // Whether the API call was successful
+ // Whether the API call was successful.
Success R2ConfigurationQueueDeleteResponseEnvelopeSuccess `json:"success,required"`
JSON r2ConfigurationQueueDeleteResponseEnvelopeJSON `json:"-"`
}
@@ -253,7 +253,7 @@ func (r r2ConfigurationQueueDeleteResponseEnvelopeJSON) RawJSON() string {
return r.raw
}
-// Whether the API call was successful
+// Whether the API call was successful.
type R2ConfigurationQueueDeleteResponseEnvelopeSuccess bool
const (
diff --git a/hyperdrive/config.go b/hyperdrive/config.go
index e77b6824900..15c7608bd36 100644
--- a/hyperdrive/config.go
+++ b/hyperdrive/config.go
@@ -283,7 +283,7 @@ type ConfigDeleteParams struct {
type ConfigDeleteResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
- Result interface{} `json:"result,required"`
+ Result interface{} `json:"result,required,nullable"`
// Whether the API call was successful
Success ConfigDeleteResponseEnvelopeSuccess `json:"success,required"`
JSON configDeleteResponseEnvelopeJSON `json:"-"`
diff --git a/kv/namespace.go b/kv/namespace.go
index a49b83fa42a..60e8043626d 100644
--- a/kv/namespace.go
+++ b/kv/namespace.go
@@ -182,43 +182,9 @@ func (r namespaceJSON) RawJSON() string {
return r.raw
}
-type NamespaceUpdateResponse struct {
- JSON namespaceUpdateResponseJSON `json:"-"`
-}
-
-// namespaceUpdateResponseJSON contains the JSON metadata for the struct
-// [NamespaceUpdateResponse]
-type namespaceUpdateResponseJSON struct {
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *NamespaceUpdateResponse) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r namespaceUpdateResponseJSON) RawJSON() string {
- return r.raw
-}
+type NamespaceUpdateResponse = interface{}
-type NamespaceDeleteResponse struct {
- JSON namespaceDeleteResponseJSON `json:"-"`
-}
-
-// namespaceDeleteResponseJSON contains the JSON metadata for the struct
-// [NamespaceDeleteResponse]
-type namespaceDeleteResponseJSON struct {
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *NamespaceDeleteResponse) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r namespaceDeleteResponseJSON) RawJSON() string {
- return r.raw
-}
+type NamespaceDeleteResponse = interface{}
type NamespaceNewParams struct {
// Identifier
@@ -290,7 +256,7 @@ type NamespaceUpdateResponseEnvelope struct {
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success NamespaceUpdateResponseEnvelopeSuccess `json:"success,required"`
- Result NamespaceUpdateResponse `json:"result,nullable"`
+ Result NamespaceUpdateResponse `json:"result"`
JSON namespaceUpdateResponseEnvelopeJSON `json:"-"`
}
@@ -391,7 +357,7 @@ type NamespaceDeleteResponseEnvelope struct {
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success NamespaceDeleteResponseEnvelopeSuccess `json:"success,required"`
- Result NamespaceDeleteResponse `json:"result,nullable"`
+ Result NamespaceDeleteResponse `json:"result"`
JSON namespaceDeleteResponseEnvelopeJSON `json:"-"`
}
diff --git a/kv/namespacebulk.go b/kv/namespacebulk.go
index 9adcd256cde..83dad1b35b1 100644
--- a/kv/namespacebulk.go
+++ b/kv/namespacebulk.go
@@ -82,43 +82,9 @@ func (r *NamespaceBulkService) Delete(ctx context.Context, namespaceID string, b
return
}
-type NamespaceBulkUpdateResponse struct {
- JSON namespaceBulkUpdateResponseJSON `json:"-"`
-}
-
-// namespaceBulkUpdateResponseJSON contains the JSON metadata for the struct
-// [NamespaceBulkUpdateResponse]
-type namespaceBulkUpdateResponseJSON struct {
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *NamespaceBulkUpdateResponse) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r namespaceBulkUpdateResponseJSON) RawJSON() string {
- return r.raw
-}
+type NamespaceBulkUpdateResponse = interface{}
-type NamespaceBulkDeleteResponse struct {
- JSON namespaceBulkDeleteResponseJSON `json:"-"`
-}
-
-// namespaceBulkDeleteResponseJSON contains the JSON metadata for the struct
-// [NamespaceBulkDeleteResponse]
-type namespaceBulkDeleteResponseJSON struct {
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *NamespaceBulkDeleteResponse) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r namespaceBulkDeleteResponseJSON) RawJSON() string {
- return r.raw
-}
+type NamespaceBulkDeleteResponse = interface{}
type NamespaceBulkUpdateParams struct {
// Identifier
@@ -159,7 +125,7 @@ type NamespaceBulkUpdateResponseEnvelope struct {
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success NamespaceBulkUpdateResponseEnvelopeSuccess `json:"success,required"`
- Result NamespaceBulkUpdateResponse `json:"result,nullable"`
+ Result NamespaceBulkUpdateResponse `json:"result"`
JSON namespaceBulkUpdateResponseEnvelopeJSON `json:"-"`
}
@@ -207,7 +173,7 @@ type NamespaceBulkDeleteResponseEnvelope struct {
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success NamespaceBulkDeleteResponseEnvelopeSuccess `json:"success,required"`
- Result NamespaceBulkDeleteResponse `json:"result,nullable"`
+ Result NamespaceBulkDeleteResponse `json:"result"`
JSON namespaceBulkDeleteResponseEnvelopeJSON `json:"-"`
}
diff --git a/kv/namespacevalue.go b/kv/namespacevalue.go
index 96cafbcdcd1..74da3256a48 100644
--- a/kv/namespacevalue.go
+++ b/kv/namespacevalue.go
@@ -115,43 +115,9 @@ func (r *NamespaceValueService) Get(ctx context.Context, namespaceID string, key
return
}
-type NamespaceValueUpdateResponse struct {
- JSON namespaceValueUpdateResponseJSON `json:"-"`
-}
-
-// namespaceValueUpdateResponseJSON contains the JSON metadata for the struct
-// [NamespaceValueUpdateResponse]
-type namespaceValueUpdateResponseJSON struct {
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *NamespaceValueUpdateResponse) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r namespaceValueUpdateResponseJSON) RawJSON() string {
- return r.raw
-}
+type NamespaceValueUpdateResponse = interface{}
-type NamespaceValueDeleteResponse struct {
- JSON namespaceValueDeleteResponseJSON `json:"-"`
-}
-
-// namespaceValueDeleteResponseJSON contains the JSON metadata for the struct
-// [NamespaceValueDeleteResponse]
-type namespaceValueDeleteResponseJSON struct {
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *NamespaceValueDeleteResponse) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r namespaceValueDeleteResponseJSON) RawJSON() string {
- return r.raw
-}
+type NamespaceValueDeleteResponse = interface{}
type NamespaceValueUpdateParams struct {
// Identifier
@@ -171,7 +137,7 @@ type NamespaceValueUpdateResponseEnvelope struct {
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success NamespaceValueUpdateResponseEnvelopeSuccess `json:"success,required"`
- Result NamespaceValueUpdateResponse `json:"result,nullable"`
+ Result NamespaceValueUpdateResponse `json:"result"`
JSON namespaceValueUpdateResponseEnvelopeJSON `json:"-"`
}
@@ -219,7 +185,7 @@ type NamespaceValueDeleteResponseEnvelope struct {
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success NamespaceValueDeleteResponseEnvelopeSuccess `json:"success,required"`
- Result NamespaceValueDeleteResponse `json:"result,nullable"`
+ Result NamespaceValueDeleteResponse `json:"result"`
JSON namespaceValueDeleteResponseEnvelopeJSON `json:"-"`
}
diff --git a/magic_network_monitoring/config.go b/magic_network_monitoring/config.go
index 2dd45002eaf..e4db48380d6 100644
--- a/magic_network_monitoring/config.go
+++ b/magic_network_monitoring/config.go
@@ -105,7 +105,7 @@ func (r *ConfigService) Edit(ctx context.Context, params ConfigEditParams, opts
return
}
-// Lists default sampling and router IPs for account.
+// Lists default sampling, router IPs and warp devices for account.
func (r *ConfigService) Get(ctx context.Context, query ConfigGetParams, opts ...option.RequestOption) (res *Configuration, err error) {
var env ConfigGetResponseEnvelope
opts = append(r.Options[:], opts...)
@@ -127,9 +127,10 @@ type Configuration struct {
// should match the packet sampling rate configured on the router.
DefaultSampling float64 `json:"default_sampling,required"`
// The account name.
- Name string `json:"name,required"`
- RouterIPs []string `json:"router_ips,required"`
- JSON configurationJSON `json:"-"`
+ Name string `json:"name,required"`
+ RouterIPs []string `json:"router_ips,required"`
+ WARPDevices []ConfigurationWARPDevice `json:"warp_devices,required"`
+ JSON configurationJSON `json:"-"`
}
// configurationJSON contains the JSON metadata for the struct [Configuration]
@@ -137,6 +138,7 @@ type configurationJSON struct {
DefaultSampling apijson.Field
Name apijson.Field
RouterIPs apijson.Field
+ WARPDevices apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
@@ -149,13 +151,57 @@ func (r configurationJSON) RawJSON() string {
return r.raw
}
+// Object representing a warp device with an ID and name.
+type ConfigurationWARPDevice struct {
+ // Unique identifier for the warp device.
+ ID string `json:"id,required"`
+ // Name of the warp device.
+ Name string `json:"name,required"`
+ JSON configurationWARPDeviceJSON `json:"-"`
+}
+
+// configurationWARPDeviceJSON contains the JSON metadata for the struct
+// [ConfigurationWARPDevice]
+type configurationWARPDeviceJSON struct {
+ ID apijson.Field
+ Name apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *ConfigurationWARPDevice) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r configurationWARPDeviceJSON) RawJSON() string {
+ return r.raw
+}
+
type ConfigNewParams struct {
AccountID param.Field[string] `path:"account_id,required"`
- Body interface{} `json:"body,required"`
+ // 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"`
+ WARPDevices param.Field[[]ConfigNewParamsWARPDevice] `json:"warp_devices"`
}
func (r ConfigNewParams) MarshalJSON() (data []byte, err error) {
- return apijson.MarshalRoot(r.Body)
+ return apijson.MarshalRoot(r)
+}
+
+// Object representing a warp device with an ID and name.
+type ConfigNewParamsWARPDevice struct {
+ // Unique identifier for the warp device.
+ ID param.Field[string] `json:"id,required"`
+ // Name of the warp device.
+ Name param.Field[string] `json:"name,required"`
+}
+
+func (r ConfigNewParamsWARPDevice) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
}
type ConfigNewResponseEnvelope struct {
@@ -203,11 +249,29 @@ func (r ConfigNewResponseEnvelopeSuccess) IsKnown() bool {
type ConfigUpdateParams struct {
AccountID param.Field[string] `path:"account_id,required"`
- Body interface{} `json:"body,required"`
+ // 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"`
+ WARPDevices param.Field[[]ConfigUpdateParamsWARPDevice] `json:"warp_devices"`
}
func (r ConfigUpdateParams) MarshalJSON() (data []byte, err error) {
- return apijson.MarshalRoot(r.Body)
+ return apijson.MarshalRoot(r)
+}
+
+// Object representing a warp device with an ID and name.
+type ConfigUpdateParamsWARPDevice struct {
+ // Unique identifier for the warp device.
+ ID param.Field[string] `json:"id,required"`
+ // Name of the warp device.
+ Name param.Field[string] `json:"name,required"`
+}
+
+func (r ConfigUpdateParamsWARPDevice) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
}
type ConfigUpdateResponseEnvelope struct {
@@ -302,11 +366,29 @@ func (r ConfigDeleteResponseEnvelopeSuccess) IsKnown() bool {
type ConfigEditParams struct {
AccountID param.Field[string] `path:"account_id,required"`
- Body interface{} `json:"body,required"`
+ // 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"`
+ // The account name.
+ Name param.Field[string] `json:"name"`
+ RouterIPs param.Field[[]string] `json:"router_ips"`
+ WARPDevices param.Field[[]ConfigEditParamsWARPDevice] `json:"warp_devices"`
}
func (r ConfigEditParams) MarshalJSON() (data []byte, err error) {
- return apijson.MarshalRoot(r.Body)
+ return apijson.MarshalRoot(r)
+}
+
+// Object representing a warp device with an ID and name.
+type ConfigEditParamsWARPDevice struct {
+ // Unique identifier for the warp device.
+ ID param.Field[string] `json:"id,required"`
+ // Name of the warp device.
+ Name param.Field[string] `json:"name,required"`
+}
+
+func (r ConfigEditParamsWARPDevice) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
}
type ConfigEditResponseEnvelope struct {
diff --git a/magic_network_monitoring/config_test.go b/magic_network_monitoring/config_test.go
index aed6bbc154f..ae46bf20b22 100644
--- a/magic_network_monitoring/config_test.go
+++ b/magic_network_monitoring/config_test.go
@@ -14,7 +14,7 @@ import (
"github.com/cloudflare/cloudflare-go/v2/option"
)
-func TestConfigNew(t *testing.T) {
+func TestConfigNewWithOptionalParams(t *testing.T) {
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
@@ -28,8 +28,20 @@ func TestConfigNew(t *testing.T) {
option.WithAPIEmail("user@example.com"),
)
_, err := client.MagicNetworkMonitoring.Configs.New(context.TODO(), magic_network_monitoring.ConfigNewParams{
- AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"),
- Body: map[string]interface{}{},
+ AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"),
+ DefaultSampling: cloudflare.F(1.000000),
+ Name: cloudflare.F("cloudflare user's account"),
+ RouterIPs: cloudflare.F([]string{"203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"}),
+ WARPDevices: cloudflare.F([]magic_network_monitoring.ConfigNewParamsWARPDevice{{
+ ID: cloudflare.F("5360368d-b351-4791-abe1-93550dabd351"),
+ Name: cloudflare.F("My warp device"),
+ }, {
+ ID: cloudflare.F("5360368d-b351-4791-abe1-93550dabd351"),
+ Name: cloudflare.F("My warp device"),
+ }, {
+ ID: cloudflare.F("5360368d-b351-4791-abe1-93550dabd351"),
+ Name: cloudflare.F("My warp device"),
+ }}),
})
if err != nil {
var apierr *cloudflare.Error
@@ -40,7 +52,7 @@ func TestConfigNew(t *testing.T) {
}
}
-func TestConfigUpdate(t *testing.T) {
+func TestConfigUpdateWithOptionalParams(t *testing.T) {
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
@@ -54,8 +66,20 @@ func TestConfigUpdate(t *testing.T) {
option.WithAPIEmail("user@example.com"),
)
_, err := client.MagicNetworkMonitoring.Configs.Update(context.TODO(), magic_network_monitoring.ConfigUpdateParams{
- AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"),
- Body: map[string]interface{}{},
+ AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"),
+ DefaultSampling: cloudflare.F(1.000000),
+ Name: cloudflare.F("cloudflare user's account"),
+ RouterIPs: cloudflare.F([]string{"203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"}),
+ WARPDevices: cloudflare.F([]magic_network_monitoring.ConfigUpdateParamsWARPDevice{{
+ ID: cloudflare.F("5360368d-b351-4791-abe1-93550dabd351"),
+ Name: cloudflare.F("My warp device"),
+ }, {
+ ID: cloudflare.F("5360368d-b351-4791-abe1-93550dabd351"),
+ Name: cloudflare.F("My warp device"),
+ }, {
+ ID: cloudflare.F("5360368d-b351-4791-abe1-93550dabd351"),
+ Name: cloudflare.F("My warp device"),
+ }}),
})
if err != nil {
var apierr *cloudflare.Error
@@ -91,7 +115,7 @@ func TestConfigDelete(t *testing.T) {
}
}
-func TestConfigEdit(t *testing.T) {
+func TestConfigEditWithOptionalParams(t *testing.T) {
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
@@ -105,8 +129,20 @@ func TestConfigEdit(t *testing.T) {
option.WithAPIEmail("user@example.com"),
)
_, err := client.MagicNetworkMonitoring.Configs.Edit(context.TODO(), magic_network_monitoring.ConfigEditParams{
- AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"),
- Body: map[string]interface{}{},
+ AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"),
+ DefaultSampling: cloudflare.F(1.000000),
+ Name: cloudflare.F("cloudflare user's account"),
+ RouterIPs: cloudflare.F([]string{"203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"}),
+ WARPDevices: cloudflare.F([]magic_network_monitoring.ConfigEditParamsWARPDevice{{
+ ID: cloudflare.F("5360368d-b351-4791-abe1-93550dabd351"),
+ Name: cloudflare.F("My warp device"),
+ }, {
+ ID: cloudflare.F("5360368d-b351-4791-abe1-93550dabd351"),
+ Name: cloudflare.F("My warp device"),
+ }, {
+ ID: cloudflare.F("5360368d-b351-4791-abe1-93550dabd351"),
+ Name: cloudflare.F("My warp device"),
+ }}),
})
if err != nil {
var apierr *cloudflare.Error
diff --git a/magic_network_monitoring/configfull.go b/magic_network_monitoring/configfull.go
index c178370ccca..208cca042c6 100644
--- a/magic_network_monitoring/configfull.go
+++ b/magic_network_monitoring/configfull.go
@@ -34,7 +34,7 @@ func NewConfigFullService(opts ...option.RequestOption) (r *ConfigFullService) {
return
}
-// Lists default sampling, router IPs, and rules for account.
+// Lists default sampling, router IPs, warp devices, and rules for account.
func (r *ConfigFullService) Get(ctx context.Context, query ConfigFullGetParams, opts ...option.RequestOption) (res *Configuration, err error) {
var env ConfigFullGetResponseEnvelope
opts = append(r.Options[:], opts...)
diff --git a/magic_network_monitoring/rule.go b/magic_network_monitoring/rule.go
index a387cfbfba1..cfed72825ca 100644
--- a/magic_network_monitoring/rule.go
+++ b/magic_network_monitoring/rule.go
@@ -213,11 +213,31 @@ func (r magicNetworkMonitoringRuleJSON) RawJSON() string {
type RuleNewParams struct {
AccountID param.Field[string] `path:"account_id,required"`
- Body interface{} `json:"body,required"`
+ // The amount of time that the rule threshold must be exceeded to send an alert
+ // notification. The final value must be equivalent to one of the following 8
+ // values ["1m","5m","10m","15m","20m","30m","45m","60m"]. The format is
+ // AhBmCsDmsEusFns where A, B, C, D, E and F durations are optional; however at
+ // least one unit must be provided.
+ Duration param.Field[string] `json:"duration,required"`
+ // The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9,
+ // underscore (\_), dash (-), period (.), and tilde (~). You can’t have a space in
+ // the rule name. Max 256 characters.
+ Name param.Field[string] `json:"name,required"`
+ // Toggle on if you would like Cloudflare to automatically advertise the IP
+ // Prefixes within the rule via Magic Transit when the rule is triggered. Only
+ // available for users of Magic Transit.
+ AutomaticAdvertisement param.Field[bool] `json:"automatic_advertisement"`
+ // The number of bits per second for the rule. When this value is exceeded for the
+ // set duration, an alert notification is sent. Minimum of 1 and no maximum.
+ Bandwidth param.Field[float64] `json:"bandwidth"`
+ // The number of packets per second for the rule. When this value is exceeded for
+ // the set duration, an alert notification is sent. Minimum of 1 and no maximum.
+ PacketThreshold param.Field[float64] `json:"packet_threshold"`
+ Prefixes param.Field[[]string] `json:"prefixes"`
}
func (r RuleNewParams) MarshalJSON() (data []byte, err error) {
- return apijson.MarshalRoot(r.Body)
+ return apijson.MarshalRoot(r)
}
type RuleNewResponseEnvelope struct {
@@ -265,11 +285,33 @@ func (r RuleNewResponseEnvelopeSuccess) IsKnown() bool {
type RuleUpdateParams struct {
AccountID param.Field[string] `path:"account_id,required"`
- Body interface{} `json:"body,required"`
+ // The amount of time that the rule threshold must be exceeded to send an alert
+ // notification. The final value must be equivalent to one of the following 8
+ // values ["1m","5m","10m","15m","20m","30m","45m","60m"]. The format is
+ // AhBmCsDmsEusFns where A, B, C, D, E and F durations are optional; however at
+ // least one unit must be provided.
+ Duration param.Field[string] `json:"duration,required"`
+ // The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9,
+ // underscore (\_), dash (-), period (.), and tilde (~). You can’t have a space in
+ // the rule name. Max 256 characters.
+ Name param.Field[string] `json:"name,required"`
+ // The id of the rule. Must be unique.
+ ID param.Field[string] `json:"id"`
+ // Toggle on if you would like Cloudflare to automatically advertise the IP
+ // Prefixes within the rule via Magic Transit when the rule is triggered. Only
+ // available for users of Magic Transit.
+ AutomaticAdvertisement param.Field[bool] `json:"automatic_advertisement"`
+ // The number of bits per second for the rule. When this value is exceeded for the
+ // set duration, an alert notification is sent. Minimum of 1 and no maximum.
+ Bandwidth param.Field[float64] `json:"bandwidth"`
+ // The number of packets per second for the rule. When this value is exceeded for
+ // the set duration, an alert notification is sent. Minimum of 1 and no maximum.
+ PacketThreshold param.Field[float64] `json:"packet_threshold"`
+ Prefixes param.Field[[]string] `json:"prefixes"`
}
func (r RuleUpdateParams) MarshalJSON() (data []byte, err error) {
- return apijson.MarshalRoot(r.Body)
+ return apijson.MarshalRoot(r)
}
type RuleUpdateResponseEnvelope struct {
@@ -368,11 +410,31 @@ func (r RuleDeleteResponseEnvelopeSuccess) IsKnown() bool {
type RuleEditParams struct {
AccountID param.Field[string] `path:"account_id,required"`
- Body interface{} `json:"body,required"`
+ // Toggle on if you would like Cloudflare to automatically advertise the IP
+ // Prefixes within the rule via Magic Transit when the rule is triggered. Only
+ // available for users of Magic Transit.
+ AutomaticAdvertisement param.Field[bool] `json:"automatic_advertisement"`
+ // The number of bits per second for the rule. When this value is exceeded for the
+ // set duration, an alert notification is sent. Minimum of 1 and no maximum.
+ Bandwidth param.Field[float64] `json:"bandwidth"`
+ // The amount of time that the rule threshold must be exceeded to send an alert
+ // notification. The final value must be equivalent to one of the following 8
+ // values ["1m","5m","10m","15m","20m","30m","45m","60m"]. The format is
+ // AhBmCsDmsEusFns where A, B, C, D, E and F durations are optional; however at
+ // least one unit must be provided.
+ Duration param.Field[string] `json:"duration"`
+ // The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9,
+ // underscore (\_), dash (-), period (.), and tilde (~). You can’t have a space in
+ // the rule name. Max 256 characters.
+ Name param.Field[string] `json:"name"`
+ // The number of packets per second for the rule. When this value is exceeded for
+ // the set duration, an alert notification is sent. Minimum of 1 and no maximum.
+ PacketThreshold param.Field[float64] `json:"packet_threshold"`
+ Prefixes param.Field[[]string] `json:"prefixes"`
}
func (r RuleEditParams) MarshalJSON() (data []byte, err error) {
- return apijson.MarshalRoot(r.Body)
+ return apijson.MarshalRoot(r)
}
type RuleEditResponseEnvelope struct {
diff --git a/magic_network_monitoring/rule_test.go b/magic_network_monitoring/rule_test.go
index 87299520f4c..28eea7b763b 100644
--- a/magic_network_monitoring/rule_test.go
+++ b/magic_network_monitoring/rule_test.go
@@ -14,7 +14,7 @@ import (
"github.com/cloudflare/cloudflare-go/v2/option"
)
-func TestRuleNew(t *testing.T) {
+func TestRuleNewWithOptionalParams(t *testing.T) {
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
@@ -28,8 +28,13 @@ func TestRuleNew(t *testing.T) {
option.WithAPIEmail("user@example.com"),
)
_, err := client.MagicNetworkMonitoring.Rules.New(context.TODO(), magic_network_monitoring.RuleNewParams{
- AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"),
- Body: map[string]interface{}{},
+ AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"),
+ Duration: cloudflare.F("300s"),
+ Name: cloudflare.F("my_rule_1"),
+ AutomaticAdvertisement: cloudflare.F(true),
+ Bandwidth: cloudflare.F(1000.000000),
+ PacketThreshold: cloudflare.F(10000.000000),
+ Prefixes: cloudflare.F([]string{"203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"}),
})
if err != nil {
var apierr *cloudflare.Error
@@ -40,7 +45,7 @@ func TestRuleNew(t *testing.T) {
}
}
-func TestRuleUpdate(t *testing.T) {
+func TestRuleUpdateWithOptionalParams(t *testing.T) {
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
@@ -54,8 +59,14 @@ func TestRuleUpdate(t *testing.T) {
option.WithAPIEmail("user@example.com"),
)
_, err := client.MagicNetworkMonitoring.Rules.Update(context.TODO(), magic_network_monitoring.RuleUpdateParams{
- AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"),
- Body: map[string]interface{}{},
+ AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"),
+ Duration: cloudflare.F("300s"),
+ Name: cloudflare.F("my_rule_1"),
+ ID: cloudflare.F("2890e6fa406311ed9b5a23f70f6fb8cf"),
+ AutomaticAdvertisement: cloudflare.F(true),
+ Bandwidth: cloudflare.F(1000.000000),
+ PacketThreshold: cloudflare.F(10000.000000),
+ Prefixes: cloudflare.F([]string{"203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"}),
})
if err != nil {
var apierr *cloudflare.Error
@@ -120,7 +131,7 @@ func TestRuleDelete(t *testing.T) {
}
}
-func TestRuleEdit(t *testing.T) {
+func TestRuleEditWithOptionalParams(t *testing.T) {
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
@@ -137,8 +148,13 @@ func TestRuleEdit(t *testing.T) {
context.TODO(),
"2890e6fa406311ed9b5a23f70f6fb8cf",
magic_network_monitoring.RuleEditParams{
- AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"),
- Body: map[string]interface{}{},
+ AccountID: cloudflare.F("6f91088a406011ed95aed352566e8d4c"),
+ AutomaticAdvertisement: cloudflare.F(true),
+ Bandwidth: cloudflare.F(1000.000000),
+ Duration: cloudflare.F("300s"),
+ Name: cloudflare.F("my_rule_1"),
+ PacketThreshold: cloudflare.F(10000.000000),
+ Prefixes: cloudflare.F([]string{"203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"}),
},
)
if err != nil {
diff --git a/origin_post_quantum_encryption/originpostquantumencryption.go b/origin_post_quantum_encryption/originpostquantumencryption.go
index 1ff884cec8f..7d4b3ea59ff 100644
--- a/origin_post_quantum_encryption/originpostquantumencryption.go
+++ b/origin_post_quantum_encryption/originpostquantumencryption.go
@@ -40,7 +40,7 @@ func NewOriginPostQuantumEncryptionService(opts ...option.RequestOption) (r *Ori
// connections when the origin supports and prefers PQ), supported means that PQ
// algorithms are advertised but only used when requested by the origin, and off
// means that PQ algorithms are not advertised
-func (r *OriginPostQuantumEncryptionService) Update(ctx context.Context, params OriginPostQuantumEncryptionUpdateParams, opts ...option.RequestOption) (res *interface{}, err error) {
+func (r *OriginPostQuantumEncryptionService) Update(ctx context.Context, params OriginPostQuantumEncryptionUpdateParams, opts ...option.RequestOption) (res *OriginPostQuantumEncryptionUpdateResponse, err error) {
var env OriginPostQuantumEncryptionUpdateResponseEnvelope
opts = append(r.Options[:], opts...)
if params.ZoneID.Value == "" {
@@ -62,7 +62,7 @@ func (r *OriginPostQuantumEncryptionService) Update(ctx context.Context, params
// connections when the origin supports and prefers PQ), supported means that PQ
// algorithms are advertised but only used when requested by the origin, and off
// means that PQ algorithms are not advertised
-func (r *OriginPostQuantumEncryptionService) Get(ctx context.Context, query OriginPostQuantumEncryptionGetParams, opts ...option.RequestOption) (res *interface{}, err error) {
+func (r *OriginPostQuantumEncryptionService) Get(ctx context.Context, query OriginPostQuantumEncryptionGetParams, opts ...option.RequestOption) (res *OriginPostQuantumEncryptionGetResponse, err error) {
var env OriginPostQuantumEncryptionGetResponseEnvelope
opts = append(r.Options[:], opts...)
if query.ZoneID.Value == "" {
@@ -78,6 +78,10 @@ func (r *OriginPostQuantumEncryptionService) Get(ctx context.Context, query Orig
return
}
+type OriginPostQuantumEncryptionUpdateResponse = interface{}
+
+type OriginPostQuantumEncryptionGetResponse = interface{}
+
type OriginPostQuantumEncryptionUpdateParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
@@ -109,9 +113,9 @@ func (r OriginPostQuantumEncryptionUpdateParamsValue) IsKnown() bool {
type OriginPostQuantumEncryptionUpdateResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
- Result interface{} `json:"result,required"`
// Whether the API call was successful
Success OriginPostQuantumEncryptionUpdateResponseEnvelopeSuccess `json:"success,required"`
+ Result OriginPostQuantumEncryptionUpdateResponse `json:"result"`
JSON originPostQuantumEncryptionUpdateResponseEnvelopeJSON `json:"-"`
}
@@ -120,8 +124,8 @@ type OriginPostQuantumEncryptionUpdateResponseEnvelope struct {
type originPostQuantumEncryptionUpdateResponseEnvelopeJSON struct {
Errors apijson.Field
Messages apijson.Field
- Result apijson.Field
Success apijson.Field
+ Result apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
@@ -157,9 +161,9 @@ type OriginPostQuantumEncryptionGetParams struct {
type OriginPostQuantumEncryptionGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
- Result interface{} `json:"result,required"`
// Whether the API call was successful
Success OriginPostQuantumEncryptionGetResponseEnvelopeSuccess `json:"success,required"`
+ Result OriginPostQuantumEncryptionGetResponse `json:"result"`
JSON originPostQuantumEncryptionGetResponseEnvelopeJSON `json:"-"`
}
@@ -168,8 +172,8 @@ type OriginPostQuantumEncryptionGetResponseEnvelope struct {
type originPostQuantumEncryptionGetResponseEnvelopeJSON 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/pages/project.go b/pages/project.go
index 47184bfe53f..1b7255d69ec 100644
--- a/pages/project.go
+++ b/pages/project.go
@@ -2030,7 +2030,7 @@ type ProjectDeleteParams struct {
type ProjectDeleteResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
- Result ProjectDeleteResponse `json:"result,required,nullable"`
+ Result ProjectDeleteResponse `json:"result,required"`
// Whether the API call was successful
Success ProjectDeleteResponseEnvelopeSuccess `json:"success,required"`
JSON projectDeleteResponseEnvelopeJSON `json:"-"`
@@ -2182,7 +2182,7 @@ type ProjectPurgeBuildCacheParams struct {
type ProjectPurgeBuildCacheResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
- Result ProjectPurgeBuildCacheResponse `json:"result,required,nullable"`
+ Result ProjectPurgeBuildCacheResponse `json:"result,required"`
// Whether the API call was successful
Success ProjectPurgeBuildCacheResponseEnvelopeSuccess `json:"success,required"`
JSON projectPurgeBuildCacheResponseEnvelopeJSON `json:"-"`
diff --git a/pages/projectdeployment.go b/pages/projectdeployment.go
index c135f8d7cb0..348501dbe33 100644
--- a/pages/projectdeployment.go
+++ b/pages/projectdeployment.go
@@ -305,7 +305,7 @@ type ProjectDeploymentDeleteParams struct {
type ProjectDeploymentDeleteResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
- Result ProjectDeploymentDeleteResponse `json:"result,required,nullable"`
+ Result ProjectDeploymentDeleteResponse `json:"result,required"`
// Whether the API call was successful
Success ProjectDeploymentDeleteResponseEnvelopeSuccess `json:"success,required"`
JSON projectDeploymentDeleteResponseEnvelopeJSON `json:"-"`
diff --git a/pages/projectdomain.go b/pages/projectdomain.go
index 5262cdce1ce..c604f833f2c 100644
--- a/pages/projectdomain.go
+++ b/pages/projectdomain.go
@@ -927,7 +927,7 @@ type ProjectDomainDeleteParams struct {
type ProjectDomainDeleteResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
- Result ProjectDomainDeleteResponse `json:"result,required,nullable"`
+ Result ProjectDomainDeleteResponse `json:"result,required"`
// Whether the API call was successful
Success ProjectDomainDeleteResponseEnvelopeSuccess `json:"success,required"`
JSON projectDomainDeleteResponseEnvelopeJSON `json:"-"`
diff --git a/queues/consumer.go b/queues/consumer.go
index e916b000e69..7c94a59e0fe 100644
--- a/queues/consumer.go
+++ b/queues/consumer.go
@@ -324,7 +324,7 @@ type ConsumerDeleteResponseArray []interface{}
func (r ConsumerDeleteResponseArray) ImplementsQueuesConsumerDeleteResponseUnion() {}
type ConsumerNewParams struct {
- // Identifier
+ // Identifier.
AccountID param.Field[string] `path:"account_id,required"`
Body interface{} `json:"body,required"`
}
@@ -337,7 +337,7 @@ type ConsumerNewResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result ConsumerNewResponse `json:"result,required,nullable"`
- // Whether the API call was successful
+ // Whether the API call was successful.
Success ConsumerNewResponseEnvelopeSuccess `json:"success,required"`
ResultInfo ConsumerNewResponseEnvelopeResultInfo `json:"result_info"`
JSON consumerNewResponseEnvelopeJSON `json:"-"`
@@ -363,7 +363,7 @@ func (r consumerNewResponseEnvelopeJSON) RawJSON() string {
return r.raw
}
-// Whether the API call was successful
+// Whether the API call was successful.
type ConsumerNewResponseEnvelopeSuccess bool
const (
@@ -410,7 +410,7 @@ func (r consumerNewResponseEnvelopeResultInfoJSON) RawJSON() string {
}
type ConsumerUpdateParams struct {
- // Identifier
+ // Identifier.
AccountID param.Field[string] `path:"account_id,required"`
Body interface{} `json:"body,required"`
}
@@ -423,7 +423,7 @@ type ConsumerUpdateResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result ConsumerUpdateResponse `json:"result,required,nullable"`
- // Whether the API call was successful
+ // Whether the API call was successful.
Success ConsumerUpdateResponseEnvelopeSuccess `json:"success,required"`
ResultInfo ConsumerUpdateResponseEnvelopeResultInfo `json:"result_info"`
JSON consumerUpdateResponseEnvelopeJSON `json:"-"`
@@ -449,7 +449,7 @@ func (r consumerUpdateResponseEnvelopeJSON) RawJSON() string {
return r.raw
}
-// Whether the API call was successful
+// Whether the API call was successful.
type ConsumerUpdateResponseEnvelopeSuccess bool
const (
@@ -496,7 +496,7 @@ func (r consumerUpdateResponseEnvelopeResultInfoJSON) RawJSON() string {
}
type ConsumerDeleteParams struct {
- // Identifier
+ // Identifier.
AccountID param.Field[string] `path:"account_id,required"`
}
@@ -504,7 +504,7 @@ type ConsumerDeleteResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result ConsumerDeleteResponseUnion `json:"result,required,nullable"`
- // Whether the API call was successful
+ // Whether the API call was successful.
Success ConsumerDeleteResponseEnvelopeSuccess `json:"success,required"`
ResultInfo ConsumerDeleteResponseEnvelopeResultInfo `json:"result_info"`
JSON consumerDeleteResponseEnvelopeJSON `json:"-"`
@@ -530,7 +530,7 @@ func (r consumerDeleteResponseEnvelopeJSON) RawJSON() string {
return r.raw
}
-// Whether the API call was successful
+// Whether the API call was successful.
type ConsumerDeleteResponseEnvelopeSuccess bool
const (
@@ -577,7 +577,7 @@ func (r consumerDeleteResponseEnvelopeResultInfoJSON) RawJSON() string {
}
type ConsumerGetParams struct {
- // Identifier
+ // Identifier.
AccountID param.Field[string] `path:"account_id,required"`
}
@@ -585,7 +585,7 @@ type ConsumerGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result []Consumer `json:"result,required,nullable"`
- // Whether the API call was successful
+ // Whether the API call was successful.
Success ConsumerGetResponseEnvelopeSuccess `json:"success,required"`
ResultInfo ConsumerGetResponseEnvelopeResultInfo `json:"result_info"`
JSON consumerGetResponseEnvelopeJSON `json:"-"`
@@ -611,7 +611,7 @@ func (r consumerGetResponseEnvelopeJSON) RawJSON() string {
return r.raw
}
-// Whether the API call was successful
+// Whether the API call was successful.
type ConsumerGetResponseEnvelopeSuccess bool
const (
diff --git a/queues/message.go b/queues/message.go
index 0aa17e97400..60384219c07 100644
--- a/queues/message.go
+++ b/queues/message.go
@@ -135,7 +135,7 @@ func (r messagePullResponseJSON) RawJSON() string {
}
type MessageAckParams struct {
- // Identifier
+ // Identifier.
AccountID param.Field[string] `path:"account_id,required"`
Acks param.Field[[]MessageAckParamsAck] `json:"acks"`
Retries param.Field[[]MessageAckParamsRetry] `json:"retries"`
@@ -170,7 +170,7 @@ type MessageAckResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result MessageAckResponse `json:"result,required,nullable"`
- // Whether the API call was successful
+ // Whether the API call was successful.
Success MessageAckResponseEnvelopeSuccess `json:"success,required"`
ResultInfo MessageAckResponseEnvelopeResultInfo `json:"result_info"`
JSON messageAckResponseEnvelopeJSON `json:"-"`
@@ -196,7 +196,7 @@ func (r messageAckResponseEnvelopeJSON) RawJSON() string {
return r.raw
}
-// Whether the API call was successful
+// Whether the API call was successful.
type MessageAckResponseEnvelopeSuccess bool
const (
@@ -243,7 +243,7 @@ func (r messageAckResponseEnvelopeResultInfoJSON) RawJSON() string {
}
type MessagePullParams struct {
- // Identifier
+ // Identifier.
AccountID param.Field[string] `path:"account_id,required"`
// The maximum number of messages to include in a batch.
BatchSize param.Field[float64] `json:"batch_size"`
@@ -260,7 +260,7 @@ type MessagePullResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result []MessagePullResponse `json:"result,required,nullable"`
- // Whether the API call was successful
+ // Whether the API call was successful.
Success MessagePullResponseEnvelopeSuccess `json:"success,required"`
ResultInfo MessagePullResponseEnvelopeResultInfo `json:"result_info"`
JSON messagePullResponseEnvelopeJSON `json:"-"`
@@ -286,7 +286,7 @@ func (r messagePullResponseEnvelopeJSON) RawJSON() string {
return r.raw
}
-// Whether the API call was successful
+// Whether the API call was successful.
type MessagePullResponseEnvelopeSuccess bool
const (
diff --git a/queues/queue.go b/queues/queue.go
index 76bf149c3b7..24f167ae2b9 100644
--- a/queues/queue.go
+++ b/queues/queue.go
@@ -281,7 +281,7 @@ type QueueDeleteResponseArray []interface{}
func (r QueueDeleteResponseArray) ImplementsQueuesQueueDeleteResponseUnion() {}
type QueueNewParams struct {
- // Identifier
+ // Identifier.
AccountID param.Field[string] `path:"account_id,required"`
QueueName param.Field[string] `json:"queue_name,required"`
}
@@ -294,7 +294,7 @@ type QueueNewResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result QueueCreated `json:"result,required,nullable"`
- // Whether the API call was successful
+ // Whether the API call was successful.
Success QueueNewResponseEnvelopeSuccess `json:"success,required"`
ResultInfo QueueNewResponseEnvelopeResultInfo `json:"result_info"`
JSON queueNewResponseEnvelopeJSON `json:"-"`
@@ -320,7 +320,7 @@ func (r queueNewResponseEnvelopeJSON) RawJSON() string {
return r.raw
}
-// Whether the API call was successful
+// Whether the API call was successful.
type QueueNewResponseEnvelopeSuccess bool
const (
@@ -367,7 +367,7 @@ func (r queueNewResponseEnvelopeResultInfoJSON) RawJSON() string {
}
type QueueUpdateParams struct {
- // Identifier
+ // Identifier.
AccountID param.Field[string] `path:"account_id,required"`
Body interface{} `json:"body,required"`
}
@@ -380,7 +380,7 @@ type QueueUpdateResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result QueueUpdated `json:"result,required,nullable"`
- // Whether the API call was successful
+ // Whether the API call was successful.
Success QueueUpdateResponseEnvelopeSuccess `json:"success,required"`
ResultInfo QueueUpdateResponseEnvelopeResultInfo `json:"result_info"`
JSON queueUpdateResponseEnvelopeJSON `json:"-"`
@@ -406,7 +406,7 @@ func (r queueUpdateResponseEnvelopeJSON) RawJSON() string {
return r.raw
}
-// Whether the API call was successful
+// Whether the API call was successful.
type QueueUpdateResponseEnvelopeSuccess bool
const (
@@ -453,12 +453,12 @@ func (r queueUpdateResponseEnvelopeResultInfoJSON) RawJSON() string {
}
type QueueListParams struct {
- // Identifier
+ // Identifier.
AccountID param.Field[string] `path:"account_id,required"`
}
type QueueDeleteParams struct {
- // Identifier
+ // Identifier.
AccountID param.Field[string] `path:"account_id,required"`
}
@@ -466,7 +466,7 @@ type QueueDeleteResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result QueueDeleteResponseUnion `json:"result,required,nullable"`
- // Whether the API call was successful
+ // Whether the API call was successful.
Success QueueDeleteResponseEnvelopeSuccess `json:"success,required"`
ResultInfo QueueDeleteResponseEnvelopeResultInfo `json:"result_info"`
JSON queueDeleteResponseEnvelopeJSON `json:"-"`
@@ -492,7 +492,7 @@ func (r queueDeleteResponseEnvelopeJSON) RawJSON() string {
return r.raw
}
-// Whether the API call was successful
+// Whether the API call was successful.
type QueueDeleteResponseEnvelopeSuccess bool
const (
@@ -539,7 +539,7 @@ func (r queueDeleteResponseEnvelopeResultInfoJSON) RawJSON() string {
}
type QueueGetParams struct {
- // Identifier
+ // Identifier.
AccountID param.Field[string] `path:"account_id,required"`
}
@@ -547,7 +547,7 @@ type QueueGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result Queue `json:"result,required,nullable"`
- // Whether the API call was successful
+ // Whether the API call was successful.
Success QueueGetResponseEnvelopeSuccess `json:"success,required"`
ResultInfo QueueGetResponseEnvelopeResultInfo `json:"result_info"`
JSON queueGetResponseEnvelopeJSON `json:"-"`
@@ -573,7 +573,7 @@ func (r queueGetResponseEnvelopeJSON) RawJSON() string {
return r.raw
}
-// Whether the API call was successful
+// Whether the API call was successful.
type QueueGetResponseEnvelopeSuccess bool
const (
diff --git a/vectorize/index.go b/vectorize/index.go
index 5722845af75..cc1e0b8a31d 100644
--- a/vectorize/index.go
+++ b/vectorize/index.go
@@ -450,7 +450,7 @@ func (r indexQueryResponseJSON) RawJSON() string {
type IndexQueryResponseMatch struct {
// Identifier for a Vector
ID string `json:"id"`
- Metadata interface{} `json:"metadata,nullable"`
+ Metadata interface{} `json:"metadata"`
Namespace string `json:"namespace,nullable"`
// The score of the vector according to the index's distance metric
Score float64 `json:"score"`
@@ -662,7 +662,7 @@ type IndexDeleteParams struct {
type IndexDeleteResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
- Result interface{} `json:"result,required"`
+ Result interface{} `json:"result,required,nullable"`
// Whether the API call was successful
Success IndexDeleteResponseEnvelopeSuccess `json:"success,required"`
JSON indexDeleteResponseEnvelopeJSON `json:"-"`
diff --git a/zero_trust/accessapplication.go b/zero_trust/accessapplication.go
index 81e6cba7fed..53e104e136d 100644
--- a/zero_trust/accessapplication.go
+++ b/zero_trust/accessapplication.go
@@ -16732,7 +16732,7 @@ type AccessApplicationRevokeTokensParams struct {
}
type AccessApplicationRevokeTokensResponseEnvelope struct {
- Result AccessApplicationRevokeTokensResponse `json:"result,nullable"`
+ Result AccessApplicationRevokeTokensResponse `json:"result"`
Success AccessApplicationRevokeTokensResponseEnvelopeSuccess `json:"success"`
JSON accessApplicationRevokeTokensResponseEnvelopeJSON `json:"-"`
}
diff --git a/zero_trust/device.go b/zero_trust/device.go
index eb07eb38752..2f54021cbf1 100644
--- a/zero_trust/device.go
+++ b/zero_trust/device.go
@@ -232,7 +232,7 @@ type DeviceGetParams struct {
type DeviceGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
- Result interface{} `json:"result,required"`
+ Result interface{} `json:"result,required,nullable"`
// Whether the API call was successful.
Success DeviceGetResponseEnvelopeSuccess `json:"success,required"`
JSON deviceGetResponseEnvelopeJSON `json:"-"`
diff --git a/zero_trust/devicepolicycertificate.go b/zero_trust/devicepolicycertificate.go
index 8aca8d5ac93..9de4b56c20a 100644
--- a/zero_trust/devicepolicycertificate.go
+++ b/zero_trust/devicepolicycertificate.go
@@ -91,7 +91,7 @@ func (r DevicePolicyCertificateUpdateParams) MarshalJSON() (data []byte, err err
type DevicePolicyCertificateUpdateResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
- Result interface{} `json:"result,required"`
+ Result interface{} `json:"result,required,nullable"`
// Whether the API call was successful.
Success DevicePolicyCertificateUpdateResponseEnvelopeSuccess `json:"success,required"`
JSON devicePolicyCertificateUpdateResponseEnvelopeJSON `json:"-"`
@@ -134,7 +134,7 @@ func (r DevicePolicyCertificateUpdateResponseEnvelopeSuccess) IsKnown() bool {
type DevicePolicyCertificateGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
- Result interface{} `json:"result,required"`
+ Result interface{} `json:"result,required,nullable"`
// Whether the API call was successful.
Success DevicePolicyCertificateGetResponseEnvelopeSuccess `json:"success,required"`
JSON devicePolicyCertificateGetResponseEnvelopeJSON `json:"-"`
diff --git a/zero_trust/devicepostureintegration.go b/zero_trust/devicepostureintegration.go
index ea0458cb934..6cd6fd331b9 100644
--- a/zero_trust/devicepostureintegration.go
+++ b/zero_trust/devicepostureintegration.go
@@ -501,7 +501,7 @@ type DevicePostureIntegrationDeleteParams struct {
type DevicePostureIntegrationDeleteResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
- Result interface{} `json:"result,required"`
+ Result interface{} `json:"result,required,nullable"`
// Whether the API call was successful.
Success DevicePostureIntegrationDeleteResponseEnvelopeSuccess `json:"success,required"`
JSON devicePostureIntegrationDeleteResponseEnvelopeJSON `json:"-"`
diff --git a/zero_trust/devicerevoke.go b/zero_trust/devicerevoke.go
index 1ba87d52359..dbe58acd793 100644
--- a/zero_trust/devicerevoke.go
+++ b/zero_trust/devicerevoke.go
@@ -64,7 +64,7 @@ func (r DeviceRevokeNewParams) MarshalJSON() (data []byte, err error) {
type DeviceRevokeNewResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
- Result interface{} `json:"result,required"`
+ Result interface{} `json:"result,required,nullable"`
// Whether the API call was successful.
Success DeviceRevokeNewResponseEnvelopeSuccess `json:"success,required"`
JSON deviceRevokeNewResponseEnvelopeJSON `json:"-"`
diff --git a/zero_trust/deviceunrevoke.go b/zero_trust/deviceunrevoke.go
index d47c5e143c6..caddbf3f5bf 100644
--- a/zero_trust/deviceunrevoke.go
+++ b/zero_trust/deviceunrevoke.go
@@ -64,7 +64,7 @@ func (r DeviceUnrevokeNewParams) MarshalJSON() (data []byte, err error) {
type DeviceUnrevokeNewResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
- Result interface{} `json:"result,required"`
+ Result interface{} `json:"result,required,nullable"`
// Whether the API call was successful.
Success DeviceUnrevokeNewResponseEnvelopeSuccess `json:"success,required"`
JSON deviceUnrevokeNewResponseEnvelopeJSON `json:"-"`
diff --git a/zero_trust/dlpprofilecustom.go b/zero_trust/dlpprofilecustom.go
index 99b8e5c96eb..ca387e32ddc 100644
--- a/zero_trust/dlpprofilecustom.go
+++ b/zero_trust/dlpprofilecustom.go
@@ -667,7 +667,7 @@ type DLPProfileCustomDeleteResponseEnvelope struct {
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success DLPProfileCustomDeleteResponseEnvelopeSuccess `json:"success,required"`
- Result DLPProfileCustomDeleteResponse `json:"result,nullable"`
+ Result DLPProfileCustomDeleteResponse `json:"result"`
JSON dlpProfileCustomDeleteResponseEnvelopeJSON `json:"-"`
}
diff --git a/zero_trust/riskscoring.go b/zero_trust/riskscoring.go
index ae999a06e01..2698316326b 100644
--- a/zero_trust/riskscoring.go
+++ b/zero_trust/riskscoring.go
@@ -264,7 +264,7 @@ type RiskScoringResetResponseEnvelope struct {
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success RiskScoringResetResponseEnvelopeSuccess `json:"success,required"`
- Result RiskScoringResetResponse `json:"result,nullable"`
+ Result RiskScoringResetResponse `json:"result"`
JSON riskScoringResetResponseEnvelopeJSON `json:"-"`
}
diff --git a/zero_trust/riskscoringintegration.go b/zero_trust/riskscoringintegration.go
index 05e039fb5a2..4aa39a7e554 100644
--- a/zero_trust/riskscoringintegration.go
+++ b/zero_trust/riskscoringintegration.go
@@ -532,7 +532,7 @@ type RiskScoringIntegrationDeleteResponseEnvelope struct {
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success RiskScoringIntegrationDeleteResponseEnvelopeSuccess `json:"success,required"`
- Result RiskScoringIntegrationDeleteResponse `json:"result,nullable"`
+ Result RiskScoringIntegrationDeleteResponse `json:"result"`
JSON riskScoringIntegrationDeleteResponseEnvelopeJSON `json:"-"`
}