Skip to content

Commit

Permalink
feat: OpenAPI spec update via Stainless API
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Feb 15, 2024
1 parent 17bfdd8 commit 4b5ae6c
Show file tree
Hide file tree
Showing 33 changed files with 1,069 additions and 1,069 deletions.
20 changes: 10 additions & 10 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1977,29 +1977,29 @@ Methods:
- <code title="patch /zones/{zone_id}/settings/always_online">client.Settings.AlwaysOnline.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAlwaysOnlineService.Update">Update</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, zoneID <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAlwaysOnlineUpdateParams">SettingAlwaysOnlineUpdateParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAlwaysOnlineUpdateResponse">SettingAlwaysOnlineUpdateResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /zones/{zone_id}/settings/always_online">client.Settings.AlwaysOnline.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAlwaysOnlineService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, zoneID <a href="https://pkg.go.dev/builtin#string">string</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAlwaysOnlineGetResponse">SettingAlwaysOnlineGetResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

## AlwaysUseHTTPs
## AlwaysUseHTTPS

Response Types:

- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAlwaysUseHTTPUpdateResponse">SettingAlwaysUseHTTPUpdateResponse</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAlwaysUseHTTPGetResponse">SettingAlwaysUseHTTPGetResponse</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAlwaysUseHTTPSUpdateResponse">SettingAlwaysUseHTTPSUpdateResponse</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAlwaysUseHTTPSGetResponse">SettingAlwaysUseHTTPSGetResponse</a>

Methods:

- <code title="patch /zones/{zone_id}/settings/always_use_https">client.Settings.AlwaysUseHTTPs.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAlwaysUseHTTPService.Update">Update</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, zoneID <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAlwaysUseHTTPUpdateParams">SettingAlwaysUseHTTPUpdateParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAlwaysUseHTTPUpdateResponse">SettingAlwaysUseHTTPUpdateResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /zones/{zone_id}/settings/always_use_https">client.Settings.AlwaysUseHTTPs.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAlwaysUseHTTPService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, zoneID <a href="https://pkg.go.dev/builtin#string">string</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAlwaysUseHTTPGetResponse">SettingAlwaysUseHTTPGetResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="patch /zones/{zone_id}/settings/always_use_https">client.Settings.AlwaysUseHTTPS.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAlwaysUseHTTPSService.Update">Update</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, zoneID <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAlwaysUseHTTPSUpdateParams">SettingAlwaysUseHTTPSUpdateParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAlwaysUseHTTPSUpdateResponse">SettingAlwaysUseHTTPSUpdateResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /zones/{zone_id}/settings/always_use_https">client.Settings.AlwaysUseHTTPS.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAlwaysUseHTTPSService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, zoneID <a href="https://pkg.go.dev/builtin#string">string</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAlwaysUseHTTPSGetResponse">SettingAlwaysUseHTTPSGetResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

## AutomaticHTTPsRewrites
## AutomaticHTTPSRewrites

Response Types:

- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAutomaticHTTPsRewriteUpdateResponse">SettingAutomaticHTTPsRewriteUpdateResponse</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAutomaticHTTPsRewriteGetResponse">SettingAutomaticHTTPsRewriteGetResponse</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAutomaticHTTPSRewriteUpdateResponse">SettingAutomaticHTTPSRewriteUpdateResponse</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAutomaticHTTPSRewriteGetResponse">SettingAutomaticHTTPSRewriteGetResponse</a>

Methods:

- <code title="patch /zones/{zone_id}/settings/automatic_https_rewrites">client.Settings.AutomaticHTTPsRewrites.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAutomaticHTTPsRewriteService.Update">Update</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, zoneID <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAutomaticHTTPsRewriteUpdateParams">SettingAutomaticHTTPsRewriteUpdateParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAutomaticHTTPsRewriteUpdateResponse">SettingAutomaticHTTPsRewriteUpdateResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /zones/{zone_id}/settings/automatic_https_rewrites">client.Settings.AutomaticHTTPsRewrites.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAutomaticHTTPsRewriteService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, zoneID <a href="https://pkg.go.dev/builtin#string">string</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAutomaticHTTPsRewriteGetResponse">SettingAutomaticHTTPsRewriteGetResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="patch /zones/{zone_id}/settings/automatic_https_rewrites">client.Settings.AutomaticHTTPSRewrites.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAutomaticHTTPSRewriteService.Update">Update</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, zoneID <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAutomaticHTTPSRewriteUpdateParams">SettingAutomaticHTTPSRewriteUpdateParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAutomaticHTTPSRewriteUpdateResponse">SettingAutomaticHTTPSRewriteUpdateResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /zones/{zone_id}/settings/automatic_https_rewrites">client.Settings.AutomaticHTTPSRewrites.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAutomaticHTTPSRewriteService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, zoneID <a href="https://pkg.go.dev/builtin#string">string</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#SettingAutomaticHTTPSRewriteGetResponse">SettingAutomaticHTTPSRewriteGetResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

## AutomaticPlatformOptimization

Expand Down
66 changes: 33 additions & 33 deletions auditlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (r *AuditLogService) AuditLogsGetAccountAuditLogs(ctx context.Context, acco
}

// Union satisfied by [AuditLogAuditLogsGetAccountAuditLogsResponseObject] or
// [AuditLogAuditLogsGetAccountAuditLogsResponseWQTosW6OAPIResponseCommon].
// [AuditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommon].
type AuditLogAuditLogsGetAccountAuditLogsResponse interface {
implementsAuditLogAuditLogsGetAccountAuditLogsResponse()
}
Expand Down Expand Up @@ -225,19 +225,19 @@ func (r *AuditLogAuditLogsGetAccountAuditLogsResponseObjectResultResource) Unmar
return apijson.UnmarshalRoot(data, r)
}

type AuditLogAuditLogsGetAccountAuditLogsResponseWQTosW6OAPIResponseCommon struct {
Errors []AuditLogAuditLogsGetAccountAuditLogsResponseWQTosW6OAPIResponseCommonError `json:"errors,required"`
Messages []AuditLogAuditLogsGetAccountAuditLogsResponseWQTosW6OAPIResponseCommonMessage `json:"messages,required"`
Result AuditLogAuditLogsGetAccountAuditLogsResponseWQTosW6OAPIResponseCommonResult `json:"result,required"`
type AuditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommon struct {
Errors []AuditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonError `json:"errors,required"`
Messages []AuditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonMessage `json:"messages,required"`
Result AuditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonResult `json:"result,required"`
// Whether the API call was successful
Success AuditLogAuditLogsGetAccountAuditLogsResponseWQTosW6OAPIResponseCommonSuccess `json:"success,required"`
JSON auditLogAuditLogsGetAccountAuditLogsResponseWqTosW6OapiResponseCommonJSON `json:"-"`
Success AuditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonSuccess `json:"success,required"`
JSON auditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonJSON `json:"-"`
}

// auditLogAuditLogsGetAccountAuditLogsResponseWqTosW6OapiResponseCommonJSON
// auditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonJSON
// contains the JSON metadata for the struct
// [AuditLogAuditLogsGetAccountAuditLogsResponseWQTosW6OAPIResponseCommon]
type auditLogAuditLogsGetAccountAuditLogsResponseWqTosW6OapiResponseCommonJSON struct {
// [AuditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommon]
type auditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonJSON struct {
Errors apijson.Field
Messages apijson.Field
Result apijson.Field
Expand All @@ -246,64 +246,64 @@ type auditLogAuditLogsGetAccountAuditLogsResponseWqTosW6OapiResponseCommonJSON s
ExtraFields map[string]apijson.Field
}

func (r *AuditLogAuditLogsGetAccountAuditLogsResponseWQTosW6OAPIResponseCommon) UnmarshalJSON(data []byte) (err error) {
func (r *AuditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommon) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}

func (r AuditLogAuditLogsGetAccountAuditLogsResponseWQTosW6OAPIResponseCommon) implementsAuditLogAuditLogsGetAccountAuditLogsResponse() {
func (r AuditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommon) implementsAuditLogAuditLogsGetAccountAuditLogsResponse() {
}

type AuditLogAuditLogsGetAccountAuditLogsResponseWQTosW6OAPIResponseCommonError struct {
type AuditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonError struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON auditLogAuditLogsGetAccountAuditLogsResponseWqTosW6OapiResponseCommonErrorJSON `json:"-"`
JSON auditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonErrorJSON `json:"-"`
}

// auditLogAuditLogsGetAccountAuditLogsResponseWqTosW6OapiResponseCommonErrorJSON
// auditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonErrorJSON
// contains the JSON metadata for the struct
// [AuditLogAuditLogsGetAccountAuditLogsResponseWQTosW6OAPIResponseCommonError]
type auditLogAuditLogsGetAccountAuditLogsResponseWqTosW6OapiResponseCommonErrorJSON struct {
// [AuditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonError]
type auditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonErrorJSON struct {
Code apijson.Field
Message apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

func (r *AuditLogAuditLogsGetAccountAuditLogsResponseWQTosW6OAPIResponseCommonError) UnmarshalJSON(data []byte) (err error) {
func (r *AuditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonError) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}

type AuditLogAuditLogsGetAccountAuditLogsResponseWQTosW6OAPIResponseCommonMessage struct {
type AuditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonMessage struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON auditLogAuditLogsGetAccountAuditLogsResponseWqTosW6OapiResponseCommonMessageJSON `json:"-"`
JSON auditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonMessageJSON `json:"-"`
}

// auditLogAuditLogsGetAccountAuditLogsResponseWqTosW6OapiResponseCommonMessageJSON
// auditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonMessageJSON
// contains the JSON metadata for the struct
// [AuditLogAuditLogsGetAccountAuditLogsResponseWQTosW6OAPIResponseCommonMessage]
type auditLogAuditLogsGetAccountAuditLogsResponseWqTosW6OapiResponseCommonMessageJSON struct {
// [AuditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonMessage]
type auditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonMessageJSON struct {
Code apijson.Field
Message apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

func (r *AuditLogAuditLogsGetAccountAuditLogsResponseWQTosW6OAPIResponseCommonMessage) UnmarshalJSON(data []byte) (err error) {
func (r *AuditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonMessage) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}

// Union satisfied by
// [AuditLogAuditLogsGetAccountAuditLogsResponseWQTosW6OAPIResponseCommonResultUnknown],
// [AuditLogAuditLogsGetAccountAuditLogsResponseWQTosW6OAPIResponseCommonResultArray]
// [AuditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonResultUnknown],
// [AuditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonResultArray]
// or [shared.UnionString].
type AuditLogAuditLogsGetAccountAuditLogsResponseWQTosW6OAPIResponseCommonResult interface {
ImplementsAuditLogAuditLogsGetAccountAuditLogsResponseWqTosW6OapiResponseCommonResult()
type AuditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonResult interface {
ImplementsAuditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonResult()
}

func init() {
apijson.RegisterUnion(
reflect.TypeOf((*AuditLogAuditLogsGetAccountAuditLogsResponseWQTosW6OAPIResponseCommonResult)(nil)).Elem(),
reflect.TypeOf((*AuditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonResult)(nil)).Elem(),
"",
apijson.UnionVariant{
TypeFilter: gjson.String,
Expand All @@ -312,16 +312,16 @@ func init() {
)
}

type AuditLogAuditLogsGetAccountAuditLogsResponseWQTosW6OAPIResponseCommonResultArray []interface{}
type AuditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonResultArray []interface{}

func (r AuditLogAuditLogsGetAccountAuditLogsResponseWQTosW6OAPIResponseCommonResultArray) ImplementsAuditLogAuditLogsGetAccountAuditLogsResponseWqTosW6OapiResponseCommonResult() {
func (r AuditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonResultArray) ImplementsAuditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonResult() {
}

// Whether the API call was successful
type AuditLogAuditLogsGetAccountAuditLogsResponseWQTosW6OAPIResponseCommonSuccess bool
type AuditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonSuccess bool

const (
AuditLogAuditLogsGetAccountAuditLogsResponseWQTosW6OAPIResponseCommonSuccessTrue AuditLogAuditLogsGetAccountAuditLogsResponseWQTosW6OAPIResponseCommonSuccess = true
AuditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonSuccessTrue AuditLogAuditLogsGetAccountAuditLogsResponse7B8bPyv1APIResponseCommonSuccess = true
)

type AuditLogAuditLogsGetAccountAuditLogsParams struct {
Expand Down
Loading

0 comments on commit 4b5ae6c

Please sign in to comment.