Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#2112)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed May 21, 2024
1 parent da4d917 commit dbfdbee
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 32 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: 1296
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e43f1520a2b2216bc7dc46e06afd92de46884e56eceec212ea8b54bd99013ff3.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0c0d163e334ea4aceb9155a993fcb36ab5edcb6de64052f81f3c9df94e0ef4b7.yml
16 changes: 8 additions & 8 deletions magic_transit/site.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func (r *SiteService) Get(ctx context.Context, siteID string, query SiteGetParam
type Site struct {
// Identifier
ID string `json:"id"`
// Magic WAN Connector identifier tag.
// Magic Connector identifier tag.
ConnectorID string `json:"connector_id"`
Description string `json:"description"`
// Site high availability mode. If set to true, the site can have two connectors
Expand All @@ -147,7 +147,7 @@ type Site struct {
Location SiteLocation `json:"location"`
// The name of the site.
Name string `json:"name"`
// Magic WAN Connector identifier tag. Used when high availability mode is on.
// Magic Connector identifier tag. Used when high availability mode is on.
SecondaryConnectorID string `json:"secondary_connector_id"`
JSON siteJSON `json:"-"`
}
Expand Down Expand Up @@ -215,15 +215,15 @@ type SiteNewParams struct {
AccountID param.Field[string] `path:"account_id,required"`
// The name of the site.
Name param.Field[string] `json:"name,required"`
// Magic WAN Connector identifier tag.
// Magic Connector identifier tag.
ConnectorID param.Field[string] `json:"connector_id"`
Description param.Field[string] `json:"description"`
// Site high availability mode. If set to true, the site can have two connectors
// and runs in high availability mode.
HaMode param.Field[bool] `json:"ha_mode"`
// Location of site in latitude and longitude.
Location param.Field[SiteLocationParam] `json:"location"`
// Magic WAN Connector identifier tag. Used when high availability mode is on.
// Magic Connector identifier tag. Used when high availability mode is on.
SecondaryConnectorID param.Field[string] `json:"secondary_connector_id"`
}

Expand Down Expand Up @@ -277,14 +277,14 @@ func (r SiteNewResponseEnvelopeSuccess) IsKnown() bool {
type SiteUpdateParams struct {
// Identifier
AccountID param.Field[string] `path:"account_id,required"`
// Magic WAN Connector identifier tag.
// Magic Connector identifier tag.
ConnectorID param.Field[string] `json:"connector_id"`
Description param.Field[string] `json:"description"`
// Location of site in latitude and longitude.
Location param.Field[SiteLocationParam] `json:"location"`
// The name of the site.
Name param.Field[string] `json:"name"`
// Magic WAN Connector identifier tag. Used when high availability mode is on.
// Magic Connector identifier tag. Used when high availability mode is on.
SecondaryConnectorID param.Field[string] `json:"secondary_connector_id"`
}

Expand Down Expand Up @@ -401,14 +401,14 @@ func (r SiteDeleteResponseEnvelopeSuccess) IsKnown() bool {
type SiteEditParams struct {
// Identifier
AccountID param.Field[string] `path:"account_id,required"`
// Magic WAN Connector identifier tag.
// Magic Connector identifier tag.
ConnectorID param.Field[string] `json:"connector_id"`
Description param.Field[string] `json:"description"`
// Location of site in latitude and longitude.
Location param.Field[SiteLocationParam] `json:"location"`
// The name of the site.
Name param.Field[string] `json:"name"`
// Magic WAN Connector identifier tag. Used when high availability mode is on.
// Magic Connector identifier tag. Used when high availability mode is on.
SecondaryConnectorID param.Field[string] `json:"secondary_connector_id"`
}

Expand Down
16 changes: 8 additions & 8 deletions magic_transit/siteacl.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ type ACL struct {
Description string `json:"description"`
// The desired forwarding action for this ACL policy. If set to "false", the policy
// will forward traffic to Cloudflare. If set to "true", the policy will forward
// traffic locally on the Magic WAN Connector. If not included in request, will
// default to false.
// traffic locally on the Magic Connector. If not included in request, will default
// to false.
ForwardLocally bool `json:"forward_locally"`
LAN1 ACLConfiguration `json:"lan_1"`
LAN2 ACLConfiguration `json:"lan_2"`
Expand Down Expand Up @@ -272,8 +272,8 @@ type SiteACLNewParams struct {
Description param.Field[string] `json:"description"`
// The desired forwarding action for this ACL policy. If set to "false", the policy
// will forward traffic to Cloudflare. If set to "true", the policy will forward
// traffic locally on the Magic WAN Connector. If not included in request, will
// default to false.
// traffic locally on the Magic Connector. If not included in request, will default
// to false.
ForwardLocally param.Field[bool] `json:"forward_locally"`
Protocols param.Field[[]AllowedProtocol] `json:"protocols"`
}
Expand Down Expand Up @@ -333,8 +333,8 @@ type SiteACLUpdateParams struct {
Description param.Field[string] `json:"description"`
// The desired forwarding action for this ACL policy. If set to "false", the policy
// will forward traffic to Cloudflare. If set to "true", the policy will forward
// traffic locally on the Magic WAN Connector. If not included in request, will
// default to false.
// traffic locally on the Magic Connector. If not included in request, will default
// to false.
ForwardLocally param.Field[bool] `json:"forward_locally"`
LAN1 param.Field[ACLConfigurationParam] `json:"lan_1"`
LAN2 param.Field[ACLConfigurationParam] `json:"lan_2"`
Expand Down Expand Up @@ -452,8 +452,8 @@ type SiteACLEditParams struct {
Description param.Field[string] `json:"description"`
// The desired forwarding action for this ACL policy. If set to "false", the policy
// will forward traffic to Cloudflare. If set to "true", the policy will forward
// traffic locally on the Magic WAN Connector. If not included in request, will
// default to false.
// traffic locally on the Magic Connector. If not included in request, will default
// to false.
ForwardLocally param.Field[bool] `json:"forward_locally"`
LAN1 param.Field[ACLConfigurationParam] `json:"lan_1"`
LAN2 param.Field[ACLConfigurationParam] `json:"lan_2"`
Expand Down
16 changes: 8 additions & 8 deletions magic_transit/sitelan.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ func NewSiteLANService(opts ...option.RequestOption) (r *SiteLANService) {
return
}

// Creates a new LAN. If the site is in high availability mode, static_addressing
// is required along with secondary and virtual address.
// Creates a new Site LAN. If the site is in high availability mode,
// static_addressing is required along with secondary and virtual address.
func (r *SiteLANService) New(ctx context.Context, siteID string, params SiteLANNewParams, opts ...option.RequestOption) (res *[]LAN, err error) {
opts = append(r.Options[:], opts...)
var env SiteLANNewResponseEnvelope
Expand All @@ -48,7 +48,7 @@ func (r *SiteLANService) New(ctx context.Context, siteID string, params SiteLANN
return
}

// Update a specific LAN.
// Update a specific Site LAN.
func (r *SiteLANService) Update(ctx context.Context, siteID string, lanID string, params SiteLANUpdateParams, opts ...option.RequestOption) (res *LAN, err error) {
opts = append(r.Options[:], opts...)
var env SiteLANUpdateResponseEnvelope
Expand All @@ -61,7 +61,7 @@ func (r *SiteLANService) Update(ctx context.Context, siteID string, lanID string
return
}

// Lists LANs associated with an account and site.
// Lists Site LANs associated with an account.
func (r *SiteLANService) List(ctx context.Context, siteID string, query SiteLANListParams, opts ...option.RequestOption) (res *pagination.SinglePage[LAN], err error) {
var raw *http.Response
opts = append(r.Options, opts...)
Expand All @@ -79,12 +79,12 @@ func (r *SiteLANService) List(ctx context.Context, siteID string, query SiteLANL
return res, nil
}

// Lists LANs associated with an account and site.
// Lists Site LANs associated with an account.
func (r *SiteLANService) ListAutoPaging(ctx context.Context, siteID string, query SiteLANListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[LAN] {
return pagination.NewSinglePageAutoPager(r.List(ctx, siteID, query, opts...))
}

// Remove a specific LAN.
// Remove a specific Site LAN.
func (r *SiteLANService) Delete(ctx context.Context, siteID string, lanID string, body SiteLANDeleteParams, opts ...option.RequestOption) (res *LAN, err error) {
opts = append(r.Options[:], opts...)
var env SiteLANDeleteResponseEnvelope
Expand All @@ -97,7 +97,7 @@ func (r *SiteLANService) Delete(ctx context.Context, siteID string, lanID string
return
}

// Patch a specific LAN.
// Patch a specific Site LAN.
func (r *SiteLANService) Edit(ctx context.Context, siteID string, lanID string, params SiteLANEditParams, opts ...option.RequestOption) (res *LAN, err error) {
opts = append(r.Options[:], opts...)
var env SiteLANEditResponseEnvelope
Expand All @@ -110,7 +110,7 @@ func (r *SiteLANService) Edit(ctx context.Context, siteID string, lanID string,
return
}

// Get a specific LAN.
// Get a specific Site LAN.
func (r *SiteLANService) Get(ctx context.Context, siteID string, lanID string, query SiteLANGetParams, opts ...option.RequestOption) (res *LAN, err error) {
opts = append(r.Options[:], opts...)
var env SiteLANGetResponseEnvelope
Expand Down
14 changes: 7 additions & 7 deletions magic_transit/sitewan.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewSiteWANService(opts ...option.RequestOption) (r *SiteWANService) {
return
}

// Creates a new WAN.
// Creates a new Site WAN.
func (r *SiteWANService) New(ctx context.Context, siteID string, params SiteWANNewParams, opts ...option.RequestOption) (res *[]WAN, err error) {
opts = append(r.Options[:], opts...)
var env SiteWANNewResponseEnvelope
Expand All @@ -47,7 +47,7 @@ func (r *SiteWANService) New(ctx context.Context, siteID string, params SiteWANN
return
}

// Update a specific WAN.
// Update a specific Site WAN.
func (r *SiteWANService) Update(ctx context.Context, siteID string, wanID string, params SiteWANUpdateParams, opts ...option.RequestOption) (res *WAN, err error) {
opts = append(r.Options[:], opts...)
var env SiteWANUpdateResponseEnvelope
Expand All @@ -60,7 +60,7 @@ func (r *SiteWANService) Update(ctx context.Context, siteID string, wanID string
return
}

// Lists WANs associated with an account and site.
// Lists Site WANs associated with an account.
func (r *SiteWANService) List(ctx context.Context, siteID string, query SiteWANListParams, opts ...option.RequestOption) (res *pagination.SinglePage[WAN], err error) {
var raw *http.Response
opts = append(r.Options, opts...)
Expand All @@ -78,12 +78,12 @@ func (r *SiteWANService) List(ctx context.Context, siteID string, query SiteWANL
return res, nil
}

// Lists WANs associated with an account and site.
// Lists Site WANs associated with an account.
func (r *SiteWANService) ListAutoPaging(ctx context.Context, siteID string, query SiteWANListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[WAN] {
return pagination.NewSinglePageAutoPager(r.List(ctx, siteID, query, opts...))
}

// Remove a specific WAN.
// Remove a specific Site WAN.
func (r *SiteWANService) Delete(ctx context.Context, siteID string, wanID string, body SiteWANDeleteParams, opts ...option.RequestOption) (res *WAN, err error) {
opts = append(r.Options[:], opts...)
var env SiteWANDeleteResponseEnvelope
Expand All @@ -96,7 +96,7 @@ func (r *SiteWANService) Delete(ctx context.Context, siteID string, wanID string
return
}

// Patch a specific WAN.
// Patch a specific Site WAN.
func (r *SiteWANService) Edit(ctx context.Context, siteID string, wanID string, params SiteWANEditParams, opts ...option.RequestOption) (res *WAN, err error) {
opts = append(r.Options[:], opts...)
var env SiteWANEditResponseEnvelope
Expand All @@ -109,7 +109,7 @@ func (r *SiteWANService) Edit(ctx context.Context, siteID string, wanID string,
return
}

// Get a specific WAN.
// Get a specific Site WAN.
func (r *SiteWANService) Get(ctx context.Context, siteID string, wanID string, query SiteWANGetParams, opts ...option.RequestOption) (res *WAN, err error) {
opts = append(r.Options[:], opts...)
var env SiteWANGetResponseEnvelope
Expand Down

0 comments on commit dbfdbee

Please sign in to comment.