Skip to content

Commit

Permalink
feat(api): remap models to newer bundle names (#3557)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Nov 4, 2024
1 parent 55ea581 commit dfcfc3f
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 25 deletions.
4 changes: 0 additions & 4 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -644,10 +644,6 @@ Methods:

## Variants

Params Types:

- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/cache">cache</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/cache#CacheVariantIdentifierParam">CacheVariantIdentifierParam</a>

Response Types:

- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/cache">cache</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/cache#CacheVariant">CacheVariant</a>
Expand Down
5 changes: 2 additions & 3 deletions argo/tieredcaching.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"net/http"
"time"

"github.com/cloudflare/cloudflare-go/v3/cache"
"github.com/cloudflare/cloudflare-go/v3/internal/apijson"
"github.com/cloudflare/cloudflare-go/v3/internal/param"
"github.com/cloudflare/cloudflare-go/v3/internal/requestconfig"
Expand Down Expand Up @@ -166,7 +165,7 @@ func (r TieredCachingGetResponseValue) IsKnown() bool {

type TieredCachingEditParams struct {
// Identifier
ZoneID param.Field[cache.CacheVariantIdentifierParam] `path:"zone_id,required"`
ZoneID param.Field[string] `path:"zone_id,required"`
// Enables Tiered Caching.
Value param.Field[TieredCachingEditParamsValue] `json:"value,required"`
}
Expand Down Expand Up @@ -236,7 +235,7 @@ func (r TieredCachingEditResponseEnvelopeSuccess) IsKnown() bool {

type TieredCachingGetParams struct {
// Identifier
ZoneID param.Field[cache.CacheVariantIdentifierParam] `path:"zone_id,required"`
ZoneID param.Field[string] `path:"zone_id,required"`
}

type TieredCachingGetResponseEnvelope struct {
Expand Down
10 changes: 5 additions & 5 deletions cache/cachereserve.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,8 @@ func (r cacheReserveStatusResponseJSON) RawJSON() string {

type CacheReserveClearParams struct {
// Identifier
ZoneID param.Field[CacheVariantIdentifierParam] `path:"zone_id,required"`
Body interface{} `json:"body,required"`
ZoneID param.Field[string] `path:"zone_id,required"`
Body interface{} `json:"body,required"`
}

func (r CacheReserveClearParams) MarshalJSON() (data []byte, err error) {
Expand Down Expand Up @@ -400,7 +400,7 @@ func (r CacheReserveClearResponseEnvelopeSuccess) IsKnown() bool {

type CacheReserveEditParams struct {
// Identifier
ZoneID param.Field[CacheVariantIdentifierParam] `path:"zone_id,required"`
ZoneID param.Field[string] `path:"zone_id,required"`
// Value of the Cache Reserve zone setting.
Value param.Field[CacheReserveEditParamsValue] `json:"value,required"`
}
Expand Down Expand Up @@ -476,7 +476,7 @@ func (r CacheReserveEditResponseEnvelopeSuccess) IsKnown() bool {

type CacheReserveGetParams struct {
// Identifier
ZoneID param.Field[CacheVariantIdentifierParam] `path:"zone_id,required"`
ZoneID param.Field[string] `path:"zone_id,required"`
}

type CacheReserveGetResponseEnvelope struct {
Expand Down Expand Up @@ -530,7 +530,7 @@ func (r CacheReserveGetResponseEnvelopeSuccess) IsKnown() bool {

type CacheReserveStatusParams struct {
// Identifier
ZoneID param.Field[CacheVariantIdentifierParam] `path:"zone_id,required"`
ZoneID param.Field[string] `path:"zone_id,required"`
}

type CacheReserveStatusResponseEnvelope struct {
Expand Down
4 changes: 2 additions & 2 deletions cache/regionaltieredcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func (r regionalTieredCacheGetResponseValueJSON) RawJSON() string {

type RegionalTieredCacheEditParams struct {
// Identifier
ZoneID param.Field[CacheVariantIdentifierParam] `path:"zone_id,required"`
ZoneID param.Field[string] `path:"zone_id,required"`
// Value of the Regional Tiered Cache zone setting.
Value param.Field[RegionalTieredCacheEditParamsValue] `json:"value,required"`
}
Expand Down Expand Up @@ -285,7 +285,7 @@ func (r RegionalTieredCacheEditResponseEnvelopeSuccess) IsKnown() bool {

type RegionalTieredCacheGetParams struct {
// Identifier
ZoneID param.Field[CacheVariantIdentifierParam] `path:"zone_id,required"`
ZoneID param.Field[string] `path:"zone_id,required"`
}

type RegionalTieredCacheGetResponseEnvelope struct {
Expand Down
6 changes: 3 additions & 3 deletions cache/smarttieredcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func (r SmartTieredCacheGetResponseValue) IsKnown() bool {

type SmartTieredCacheDeleteParams struct {
// Identifier
ZoneID param.Field[CacheVariantIdentifierParam] `path:"zone_id,required"`
ZoneID param.Field[string] `path:"zone_id,required"`
}

type SmartTieredCacheDeleteResponseEnvelope struct {
Expand Down Expand Up @@ -277,7 +277,7 @@ func (r SmartTieredCacheDeleteResponseEnvelopeSuccess) IsKnown() bool {

type SmartTieredCacheEditParams struct {
// Identifier
ZoneID param.Field[CacheVariantIdentifierParam] `path:"zone_id,required"`
ZoneID param.Field[string] `path:"zone_id,required"`
// Enable or disable the Smart Tiered Cache
Value param.Field[SmartTieredCacheEditParamsValue] `json:"value,required"`
}
Expand Down Expand Up @@ -347,7 +347,7 @@ func (r SmartTieredCacheEditResponseEnvelopeSuccess) IsKnown() bool {

type SmartTieredCacheGetParams struct {
// Identifier
ZoneID param.Field[CacheVariantIdentifierParam] `path:"zone_id,required"`
ZoneID param.Field[string] `path:"zone_id,required"`
}

type SmartTieredCacheGetResponseEnvelope struct {
Expand Down
8 changes: 3 additions & 5 deletions cache/variant.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ func (r CacheVariantID) IsKnown() bool {
return false
}

type CacheVariantIdentifierParam = string

// 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
Expand Down Expand Up @@ -370,7 +368,7 @@ func (r variantGetResponseValueJSON) RawJSON() string {

type VariantDeleteParams struct {
// Identifier
ZoneID param.Field[CacheVariantIdentifierParam] `path:"zone_id,required"`
ZoneID param.Field[string] `path:"zone_id,required"`
}

type VariantDeleteResponseEnvelope struct {
Expand Down Expand Up @@ -423,7 +421,7 @@ func (r VariantDeleteResponseEnvelopeSuccess) IsKnown() bool {

type VariantEditParams struct {
// Identifier
ZoneID param.Field[CacheVariantIdentifierParam] `path:"zone_id,required"`
ZoneID param.Field[string] `path:"zone_id,required"`
// Value of the zone setting.
Value param.Field[VariantEditParamsValue] `json:"value,required"`
}
Expand Down Expand Up @@ -523,7 +521,7 @@ func (r VariantEditResponseEnvelopeSuccess) IsKnown() bool {

type VariantGetParams struct {
// Identifier
ZoneID param.Field[CacheVariantIdentifierParam] `path:"zone_id,required"`
ZoneID param.Field[string] `path:"zone_id,required"`
}

type VariantGetResponseEnvelope struct {
Expand Down
5 changes: 2 additions & 3 deletions origin_post_quantum_encryption/originpostquantumencryption.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"fmt"
"net/http"

"github.com/cloudflare/cloudflare-go/v3/cache"
"github.com/cloudflare/cloudflare-go/v3/internal/apijson"
"github.com/cloudflare/cloudflare-go/v3/internal/param"
"github.com/cloudflare/cloudflare-go/v3/internal/requestconfig"
Expand Down Expand Up @@ -81,7 +80,7 @@ func (r *OriginPostQuantumEncryptionService) Get(ctx context.Context, query Orig

type OriginPostQuantumEncryptionUpdateParams struct {
// Identifier
ZoneID param.Field[cache.CacheVariantIdentifierParam] `path:"zone_id,required"`
ZoneID param.Field[string] `path:"zone_id,required"`
// Value of the Origin Post Quantum Encryption Setting.
Value param.Field[OriginPostQuantumEncryptionUpdateParamsValue] `json:"value,required"`
}
Expand Down Expand Up @@ -152,7 +151,7 @@ func (r OriginPostQuantumEncryptionUpdateResponseEnvelopeSuccess) IsKnown() bool

type OriginPostQuantumEncryptionGetParams struct {
// Identifier
ZoneID param.Field[cache.CacheVariantIdentifierParam] `path:"zone_id,required"`
ZoneID param.Field[string] `path:"zone_id,required"`
}

type OriginPostQuantumEncryptionGetResponseEnvelope struct {
Expand Down

0 comments on commit dfcfc3f

Please sign in to comment.