Skip to content

Commit

Permalink
feat(api): api update (#3707)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Dec 6, 2024
1 parent 693ee3a commit b2640e3
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1450
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0530d6510c5b139af850d24a4f932d5139c8d321a955ffa101b0debafbd75465.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4dc0e42c684fd5bb1470f8d6251d3d4a5194297e87606215b60d9a6ba5a5f7eb.yml
60 changes: 36 additions & 24 deletions zero_trust/gatewaycertificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ type GatewayCertificateNewResponse struct {
// Certificate UUID tag.
ID string `json:"id"`
// The deployment status of the certificate on Cloudflare's edge. Certificates in
// the 'active' state may be used for Gateway TLS interception.
// the 'available' (previously called 'active') state may be used for Gateway TLS
// interception.
BindingStatus GatewayCertificateNewResponseBindingStatus `json:"binding_status"`
// The CA certificate
Certificate string `json:"certificate"`
Expand Down Expand Up @@ -218,19 +219,20 @@ func (r gatewayCertificateNewResponseJSON) RawJSON() string {
}

// The deployment status of the certificate on Cloudflare's edge. Certificates in
// the 'active' state may be used for Gateway TLS interception.
// the 'available' (previously called 'active') state may be used for Gateway TLS
// interception.
type GatewayCertificateNewResponseBindingStatus string

const (
GatewayCertificateNewResponseBindingStatusPendingDeployment GatewayCertificateNewResponseBindingStatus = "pending_deployment"
GatewayCertificateNewResponseBindingStatusActive GatewayCertificateNewResponseBindingStatus = "active"
GatewayCertificateNewResponseBindingStatusAvailable GatewayCertificateNewResponseBindingStatus = "available"
GatewayCertificateNewResponseBindingStatusPendingDeletion GatewayCertificateNewResponseBindingStatus = "pending_deletion"
GatewayCertificateNewResponseBindingStatusInactive GatewayCertificateNewResponseBindingStatus = "inactive"
)

func (r GatewayCertificateNewResponseBindingStatus) IsKnown() bool {
switch r {
case GatewayCertificateNewResponseBindingStatusPendingDeployment, GatewayCertificateNewResponseBindingStatusActive, GatewayCertificateNewResponseBindingStatusPendingDeletion, GatewayCertificateNewResponseBindingStatusInactive:
case GatewayCertificateNewResponseBindingStatusPendingDeployment, GatewayCertificateNewResponseBindingStatusAvailable, GatewayCertificateNewResponseBindingStatusPendingDeletion, GatewayCertificateNewResponseBindingStatusInactive:
return true
}
return false
Expand All @@ -256,7 +258,8 @@ type GatewayCertificateListResponse struct {
// Certificate UUID tag.
ID string `json:"id"`
// The deployment status of the certificate on Cloudflare's edge. Certificates in
// the 'active' state may be used for Gateway TLS interception.
// the 'available' (previously called 'active') state may be used for Gateway TLS
// interception.
BindingStatus GatewayCertificateListResponseBindingStatus `json:"binding_status"`
// The CA certificate
Certificate string `json:"certificate"`
Expand Down Expand Up @@ -305,19 +308,20 @@ func (r gatewayCertificateListResponseJSON) RawJSON() string {
}

// The deployment status of the certificate on Cloudflare's edge. Certificates in
// the 'active' state may be used for Gateway TLS interception.
// the 'available' (previously called 'active') state may be used for Gateway TLS
// interception.
type GatewayCertificateListResponseBindingStatus string

const (
GatewayCertificateListResponseBindingStatusPendingDeployment GatewayCertificateListResponseBindingStatus = "pending_deployment"
GatewayCertificateListResponseBindingStatusActive GatewayCertificateListResponseBindingStatus = "active"
GatewayCertificateListResponseBindingStatusAvailable GatewayCertificateListResponseBindingStatus = "available"
GatewayCertificateListResponseBindingStatusPendingDeletion GatewayCertificateListResponseBindingStatus = "pending_deletion"
GatewayCertificateListResponseBindingStatusInactive GatewayCertificateListResponseBindingStatus = "inactive"
)

func (r GatewayCertificateListResponseBindingStatus) IsKnown() bool {
switch r {
case GatewayCertificateListResponseBindingStatusPendingDeployment, GatewayCertificateListResponseBindingStatusActive, GatewayCertificateListResponseBindingStatusPendingDeletion, GatewayCertificateListResponseBindingStatusInactive:
case GatewayCertificateListResponseBindingStatusPendingDeployment, GatewayCertificateListResponseBindingStatusAvailable, GatewayCertificateListResponseBindingStatusPendingDeletion, GatewayCertificateListResponseBindingStatusInactive:
return true
}
return false
Expand All @@ -343,7 +347,8 @@ type GatewayCertificateDeleteResponse struct {
// Certificate UUID tag.
ID string `json:"id"`
// The deployment status of the certificate on Cloudflare's edge. Certificates in
// the 'active' state may be used for Gateway TLS interception.
// the 'available' (previously called 'active') state may be used for Gateway TLS
// interception.
BindingStatus GatewayCertificateDeleteResponseBindingStatus `json:"binding_status"`
// The CA certificate
Certificate string `json:"certificate"`
Expand Down Expand Up @@ -392,19 +397,20 @@ func (r gatewayCertificateDeleteResponseJSON) RawJSON() string {
}

// The deployment status of the certificate on Cloudflare's edge. Certificates in
// the 'active' state may be used for Gateway TLS interception.
// the 'available' (previously called 'active') state may be used for Gateway TLS
// interception.
type GatewayCertificateDeleteResponseBindingStatus string

const (
GatewayCertificateDeleteResponseBindingStatusPendingDeployment GatewayCertificateDeleteResponseBindingStatus = "pending_deployment"
GatewayCertificateDeleteResponseBindingStatusActive GatewayCertificateDeleteResponseBindingStatus = "active"
GatewayCertificateDeleteResponseBindingStatusAvailable GatewayCertificateDeleteResponseBindingStatus = "available"
GatewayCertificateDeleteResponseBindingStatusPendingDeletion GatewayCertificateDeleteResponseBindingStatus = "pending_deletion"
GatewayCertificateDeleteResponseBindingStatusInactive GatewayCertificateDeleteResponseBindingStatus = "inactive"
)

func (r GatewayCertificateDeleteResponseBindingStatus) IsKnown() bool {
switch r {
case GatewayCertificateDeleteResponseBindingStatusPendingDeployment, GatewayCertificateDeleteResponseBindingStatusActive, GatewayCertificateDeleteResponseBindingStatusPendingDeletion, GatewayCertificateDeleteResponseBindingStatusInactive:
case GatewayCertificateDeleteResponseBindingStatusPendingDeployment, GatewayCertificateDeleteResponseBindingStatusAvailable, GatewayCertificateDeleteResponseBindingStatusPendingDeletion, GatewayCertificateDeleteResponseBindingStatusInactive:
return true
}
return false
Expand All @@ -430,7 +436,8 @@ type GatewayCertificateActivateResponse struct {
// Certificate UUID tag.
ID string `json:"id"`
// The deployment status of the certificate on Cloudflare's edge. Certificates in
// the 'active' state may be used for Gateway TLS interception.
// the 'available' (previously called 'active') state may be used for Gateway TLS
// interception.
BindingStatus GatewayCertificateActivateResponseBindingStatus `json:"binding_status"`
// The CA certificate
Certificate string `json:"certificate"`
Expand Down Expand Up @@ -479,19 +486,20 @@ func (r gatewayCertificateActivateResponseJSON) RawJSON() string {
}

// The deployment status of the certificate on Cloudflare's edge. Certificates in
// the 'active' state may be used for Gateway TLS interception.
// the 'available' (previously called 'active') state may be used for Gateway TLS
// interception.
type GatewayCertificateActivateResponseBindingStatus string

const (
GatewayCertificateActivateResponseBindingStatusPendingDeployment GatewayCertificateActivateResponseBindingStatus = "pending_deployment"
GatewayCertificateActivateResponseBindingStatusActive GatewayCertificateActivateResponseBindingStatus = "active"
GatewayCertificateActivateResponseBindingStatusAvailable GatewayCertificateActivateResponseBindingStatus = "available"
GatewayCertificateActivateResponseBindingStatusPendingDeletion GatewayCertificateActivateResponseBindingStatus = "pending_deletion"
GatewayCertificateActivateResponseBindingStatusInactive GatewayCertificateActivateResponseBindingStatus = "inactive"
)

func (r GatewayCertificateActivateResponseBindingStatus) IsKnown() bool {
switch r {
case GatewayCertificateActivateResponseBindingStatusPendingDeployment, GatewayCertificateActivateResponseBindingStatusActive, GatewayCertificateActivateResponseBindingStatusPendingDeletion, GatewayCertificateActivateResponseBindingStatusInactive:
case GatewayCertificateActivateResponseBindingStatusPendingDeployment, GatewayCertificateActivateResponseBindingStatusAvailable, GatewayCertificateActivateResponseBindingStatusPendingDeletion, GatewayCertificateActivateResponseBindingStatusInactive:
return true
}
return false
Expand All @@ -517,7 +525,8 @@ type GatewayCertificateDeactivateResponse struct {
// Certificate UUID tag.
ID string `json:"id"`
// The deployment status of the certificate on Cloudflare's edge. Certificates in
// the 'active' state may be used for Gateway TLS interception.
// the 'available' (previously called 'active') state may be used for Gateway TLS
// interception.
BindingStatus GatewayCertificateDeactivateResponseBindingStatus `json:"binding_status"`
// The CA certificate
Certificate string `json:"certificate"`
Expand Down Expand Up @@ -566,19 +575,20 @@ func (r gatewayCertificateDeactivateResponseJSON) RawJSON() string {
}

// The deployment status of the certificate on Cloudflare's edge. Certificates in
// the 'active' state may be used for Gateway TLS interception.
// the 'available' (previously called 'active') state may be used for Gateway TLS
// interception.
type GatewayCertificateDeactivateResponseBindingStatus string

const (
GatewayCertificateDeactivateResponseBindingStatusPendingDeployment GatewayCertificateDeactivateResponseBindingStatus = "pending_deployment"
GatewayCertificateDeactivateResponseBindingStatusActive GatewayCertificateDeactivateResponseBindingStatus = "active"
GatewayCertificateDeactivateResponseBindingStatusAvailable GatewayCertificateDeactivateResponseBindingStatus = "available"
GatewayCertificateDeactivateResponseBindingStatusPendingDeletion GatewayCertificateDeactivateResponseBindingStatus = "pending_deletion"
GatewayCertificateDeactivateResponseBindingStatusInactive GatewayCertificateDeactivateResponseBindingStatus = "inactive"
)

func (r GatewayCertificateDeactivateResponseBindingStatus) IsKnown() bool {
switch r {
case GatewayCertificateDeactivateResponseBindingStatusPendingDeployment, GatewayCertificateDeactivateResponseBindingStatusActive, GatewayCertificateDeactivateResponseBindingStatusPendingDeletion, GatewayCertificateDeactivateResponseBindingStatusInactive:
case GatewayCertificateDeactivateResponseBindingStatusPendingDeployment, GatewayCertificateDeactivateResponseBindingStatusAvailable, GatewayCertificateDeactivateResponseBindingStatusPendingDeletion, GatewayCertificateDeactivateResponseBindingStatusInactive:
return true
}
return false
Expand All @@ -604,7 +614,8 @@ type GatewayCertificateGetResponse struct {
// Certificate UUID tag.
ID string `json:"id"`
// The deployment status of the certificate on Cloudflare's edge. Certificates in
// the 'active' state may be used for Gateway TLS interception.
// the 'available' (previously called 'active') state may be used for Gateway TLS
// interception.
BindingStatus GatewayCertificateGetResponseBindingStatus `json:"binding_status"`
// The CA certificate
Certificate string `json:"certificate"`
Expand Down Expand Up @@ -653,19 +664,20 @@ func (r gatewayCertificateGetResponseJSON) RawJSON() string {
}

// The deployment status of the certificate on Cloudflare's edge. Certificates in
// the 'active' state may be used for Gateway TLS interception.
// the 'available' (previously called 'active') state may be used for Gateway TLS
// interception.
type GatewayCertificateGetResponseBindingStatus string

const (
GatewayCertificateGetResponseBindingStatusPendingDeployment GatewayCertificateGetResponseBindingStatus = "pending_deployment"
GatewayCertificateGetResponseBindingStatusActive GatewayCertificateGetResponseBindingStatus = "active"
GatewayCertificateGetResponseBindingStatusAvailable GatewayCertificateGetResponseBindingStatus = "available"
GatewayCertificateGetResponseBindingStatusPendingDeletion GatewayCertificateGetResponseBindingStatus = "pending_deletion"
GatewayCertificateGetResponseBindingStatusInactive GatewayCertificateGetResponseBindingStatus = "inactive"
)

func (r GatewayCertificateGetResponseBindingStatus) IsKnown() bool {
switch r {
case GatewayCertificateGetResponseBindingStatusPendingDeployment, GatewayCertificateGetResponseBindingStatusActive, GatewayCertificateGetResponseBindingStatusPendingDeletion, GatewayCertificateGetResponseBindingStatusInactive:
case GatewayCertificateGetResponseBindingStatusPendingDeployment, GatewayCertificateGetResponseBindingStatusAvailable, GatewayCertificateGetResponseBindingStatusPendingDeletion, GatewayCertificateGetResponseBindingStatusInactive:
return true
}
return false
Expand Down
10 changes: 6 additions & 4 deletions zero_trust/gatewayconfiguration.go
Original file line number Diff line number Diff line change
Expand Up @@ -492,8 +492,9 @@ func (r gatewayConfigurationSettingsJSON) RawJSON() string {
// Certificate settings for Gateway TLS interception. If not specified, the
// Cloudflare Root CA will be used.
type GatewayConfigurationSettingsCertificate struct {
// UUID of certificate to be used for interception. Certificate must be active on
// the edge. A nil UUID will indicate the Cloudflare Root CA should be used.
// UUID of certificate to be used for interception. Certificate must be available
// (previously called 'active') on the edge. A nil UUID will indicate the
// Cloudflare Root CA should be used.
ID string `json:"id,required"`
JSON gatewayConfigurationSettingsCertificateJSON `json:"-"`
}
Expand Down Expand Up @@ -593,8 +594,9 @@ func (r GatewayConfigurationSettingsParam) MarshalJSON() (data []byte, err error
// Certificate settings for Gateway TLS interception. If not specified, the
// Cloudflare Root CA will be used.
type GatewayConfigurationSettingsCertificateParam struct {
// UUID of certificate to be used for interception. Certificate must be active on
// the edge. A nil UUID will indicate the Cloudflare Root CA should be used.
// UUID of certificate to be used for interception. Certificate must be available
// (previously called 'active') on the edge. A nil UUID will indicate the
// Cloudflare Root CA should be used.
ID param.Field[string] `json:"id,required"`
}

Expand Down
Loading

0 comments on commit b2640e3

Please sign in to comment.