Skip to content

Commit

Permalink
chore: bump license year (#3770)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Jan 2, 2025
1 parent 60d4d64 commit 55ac2dc
Show file tree
Hide file tree
Showing 17 changed files with 150 additions and 0 deletions.
12 changes: 12 additions & 0 deletions magic_transit/cfinterconnect.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ func NewCfInterconnectService(opts ...option.RequestOption) (r *CfInterconnectSe
// without persisting changes.
func (r *CfInterconnectService) Update(ctx context.Context, cfInterconnectID string, params CfInterconnectUpdateParams, opts ...option.RequestOption) (res *CfInterconnectUpdateResponse, err error) {
var env CfInterconnectUpdateResponseEnvelope
if params.XMagicNewHcTarget.Present {
opts = append(opts, option.WithHeader("x-magic-new-hc-target", fmt.Sprintf("%s", params.XMagicNewHcTarget)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand All @@ -61,6 +64,9 @@ func (r *CfInterconnectService) Update(ctx context.Context, cfInterconnectID str
// Lists interconnects associated with an account.
func (r *CfInterconnectService) List(ctx context.Context, params CfInterconnectListParams, opts ...option.RequestOption) (res *CfInterconnectListResponse, err error) {
var env CfInterconnectListResponseEnvelope
if params.XMagicNewHcTarget.Present {
opts = append(opts, option.WithHeader("x-magic-new-hc-target", fmt.Sprintf("%s", params.XMagicNewHcTarget)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand All @@ -80,6 +86,9 @@ func (r *CfInterconnectService) List(ctx context.Context, params CfInterconnectL
// without persisting changes.
func (r *CfInterconnectService) BulkUpdate(ctx context.Context, params CfInterconnectBulkUpdateParams, opts ...option.RequestOption) (res *CfInterconnectBulkUpdateResponse, err error) {
var env CfInterconnectBulkUpdateResponseEnvelope
if params.XMagicNewHcTarget.Present {
opts = append(opts, option.WithHeader("x-magic-new-hc-target", fmt.Sprintf("%s", params.XMagicNewHcTarget)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand All @@ -97,6 +106,9 @@ func (r *CfInterconnectService) BulkUpdate(ctx context.Context, params CfInterco
// Lists details for a specific interconnect.
func (r *CfInterconnectService) Get(ctx context.Context, cfInterconnectID string, params CfInterconnectGetParams, opts ...option.RequestOption) (res *CfInterconnectGetResponse, err error) {
var env CfInterconnectGetResponseEnvelope
if params.XMagicNewHcTarget.Present {
opts = append(opts, option.WithHeader("x-magic-new-hc-target", fmt.Sprintf("%s", params.XMagicNewHcTarget)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand Down
18 changes: 18 additions & 0 deletions magic_transit/gretunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ func NewGRETunnelService(opts ...option.RequestOption) (r *GRETunnelService) {
// parameter to only run validation without persisting changes.
func (r *GRETunnelService) New(ctx context.Context, params GRETunnelNewParams, opts ...option.RequestOption) (res *GRETunnelNewResponse, err error) {
var env GRETunnelNewResponseEnvelope
if params.XMagicNewHcTarget.Present {
opts = append(opts, option.WithHeader("x-magic-new-hc-target", fmt.Sprintf("%s", params.XMagicNewHcTarget)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand All @@ -59,6 +62,9 @@ func (r *GRETunnelService) New(ctx context.Context, params GRETunnelNewParams, o
// parameter to only run validation without persisting changes.
func (r *GRETunnelService) Update(ctx context.Context, greTunnelID string, params GRETunnelUpdateParams, opts ...option.RequestOption) (res *GRETunnelUpdateResponse, err error) {
var env GRETunnelUpdateResponseEnvelope
if params.XMagicNewHcTarget.Present {
opts = append(opts, option.WithHeader("x-magic-new-hc-target", fmt.Sprintf("%s", params.XMagicNewHcTarget)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand All @@ -80,6 +86,9 @@ func (r *GRETunnelService) Update(ctx context.Context, greTunnelID string, param
// Lists GRE tunnels associated with an account.
func (r *GRETunnelService) List(ctx context.Context, params GRETunnelListParams, opts ...option.RequestOption) (res *GRETunnelListResponse, err error) {
var env GRETunnelListResponseEnvelope
if params.XMagicNewHcTarget.Present {
opts = append(opts, option.WithHeader("x-magic-new-hc-target", fmt.Sprintf("%s", params.XMagicNewHcTarget)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand All @@ -98,6 +107,9 @@ func (r *GRETunnelService) List(ctx context.Context, params GRETunnelListParams,
// an optional query parameter to only run validation without persisting changes.
func (r *GRETunnelService) Delete(ctx context.Context, greTunnelID string, params GRETunnelDeleteParams, opts ...option.RequestOption) (res *GRETunnelDeleteResponse, err error) {
var env GRETunnelDeleteResponseEnvelope
if params.XMagicNewHcTarget.Present {
opts = append(opts, option.WithHeader("x-magic-new-hc-target", fmt.Sprintf("%s", params.XMagicNewHcTarget)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand All @@ -120,6 +132,9 @@ func (r *GRETunnelService) Delete(ctx context.Context, greTunnelID string, param
// parameter to only run validation without persisting changes.
func (r *GRETunnelService) BulkUpdate(ctx context.Context, params GRETunnelBulkUpdateParams, opts ...option.RequestOption) (res *GRETunnelBulkUpdateResponse, err error) {
var env GRETunnelBulkUpdateResponseEnvelope
if params.XMagicNewHcTarget.Present {
opts = append(opts, option.WithHeader("x-magic-new-hc-target", fmt.Sprintf("%s", params.XMagicNewHcTarget)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand All @@ -137,6 +152,9 @@ func (r *GRETunnelService) BulkUpdate(ctx context.Context, params GRETunnelBulkU
// Lists informtion for a specific GRE tunnel.
func (r *GRETunnelService) Get(ctx context.Context, greTunnelID string, params GRETunnelGetParams, opts ...option.RequestOption) (res *GRETunnelGetResponse, err error) {
var env GRETunnelGetResponseEnvelope
if params.XMagicNewHcTarget.Present {
opts = append(opts, option.WithHeader("x-magic-new-hc-target", fmt.Sprintf("%s", params.XMagicNewHcTarget)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand Down
18 changes: 18 additions & 0 deletions magic_transit/ipsectunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ func NewIPSECTunnelService(opts ...option.RequestOption) (r *IPSECTunnelService)
// changes.
func (r *IPSECTunnelService) New(ctx context.Context, params IPSECTunnelNewParams, opts ...option.RequestOption) (res *IPSECTunnelNewResponse, err error) {
var env IPSECTunnelNewResponseEnvelope
if params.XMagicNewHcTarget.Present {
opts = append(opts, option.WithHeader("x-magic-new-hc-target", fmt.Sprintf("%s", params.XMagicNewHcTarget)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand All @@ -61,6 +64,9 @@ func (r *IPSECTunnelService) New(ctx context.Context, params IPSECTunnelNewParam
// without persisting changes.
func (r *IPSECTunnelService) Update(ctx context.Context, ipsecTunnelID string, params IPSECTunnelUpdateParams, opts ...option.RequestOption) (res *IPSECTunnelUpdateResponse, err error) {
var env IPSECTunnelUpdateResponseEnvelope
if params.XMagicNewHcTarget.Present {
opts = append(opts, option.WithHeader("x-magic-new-hc-target", fmt.Sprintf("%s", params.XMagicNewHcTarget)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand All @@ -82,6 +88,9 @@ func (r *IPSECTunnelService) Update(ctx context.Context, ipsecTunnelID string, p
// Lists IPsec tunnels associated with an account.
func (r *IPSECTunnelService) List(ctx context.Context, params IPSECTunnelListParams, opts ...option.RequestOption) (res *IPSECTunnelListResponse, err error) {
var env IPSECTunnelListResponseEnvelope
if params.XMagicNewHcTarget.Present {
opts = append(opts, option.WithHeader("x-magic-new-hc-target", fmt.Sprintf("%s", params.XMagicNewHcTarget)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand All @@ -101,6 +110,9 @@ func (r *IPSECTunnelService) List(ctx context.Context, params IPSECTunnelListPar
// without persisting changes.
func (r *IPSECTunnelService) Delete(ctx context.Context, ipsecTunnelID string, params IPSECTunnelDeleteParams, opts ...option.RequestOption) (res *IPSECTunnelDeleteResponse, err error) {
var env IPSECTunnelDeleteResponseEnvelope
if params.XMagicNewHcTarget.Present {
opts = append(opts, option.WithHeader("x-magic-new-hc-target", fmt.Sprintf("%s", params.XMagicNewHcTarget)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand All @@ -124,6 +136,9 @@ func (r *IPSECTunnelService) Delete(ctx context.Context, ipsecTunnelID string, p
// without persisting changes.
func (r *IPSECTunnelService) BulkUpdate(ctx context.Context, params IPSECTunnelBulkUpdateParams, opts ...option.RequestOption) (res *IPSECTunnelBulkUpdateResponse, err error) {
var env IPSECTunnelBulkUpdateResponseEnvelope
if params.XMagicNewHcTarget.Present {
opts = append(opts, option.WithHeader("x-magic-new-hc-target", fmt.Sprintf("%s", params.XMagicNewHcTarget)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand All @@ -141,6 +156,9 @@ func (r *IPSECTunnelService) BulkUpdate(ctx context.Context, params IPSECTunnelB
// Lists details for a specific IPsec tunnel.
func (r *IPSECTunnelService) Get(ctx context.Context, ipsecTunnelID string, params IPSECTunnelGetParams, opts ...option.RequestOption) (res *IPSECTunnelGetResponse, err error) {
var env IPSECTunnelGetResponseEnvelope
if params.XMagicNewHcTarget.Present {
opts = append(opts, option.WithHeader("x-magic-new-hc-target", fmt.Sprintf("%s", params.XMagicNewHcTarget)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand Down
3 changes: 3 additions & 0 deletions magic_transit/site.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ func (r *SiteService) Edit(ctx context.Context, siteID string, params SiteEditPa
// Get a specific Site.
func (r *SiteService) Get(ctx context.Context, siteID string, params SiteGetParams, opts ...option.RequestOption) (res *Site, err error) {
var env SiteGetResponseEnvelope
if params.XMagicNewHcTarget.Present {
opts = append(opts, option.WithHeader("x-magic-new-hc-target", fmt.Sprintf("%s", params.XMagicNewHcTarget)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand Down
12 changes: 12 additions & 0 deletions r2/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ func NewBucketService(opts ...option.RequestOption) (r *BucketService) {
// Creates a new R2 bucket.
func (r *BucketService) New(ctx context.Context, params BucketNewParams, opts ...option.RequestOption) (res *Bucket, err error) {
var env BucketNewResponseEnvelope
if params.CfR2Jurisdiction.Present {
opts = append(opts, option.WithHeader("cf-r2-jurisdiction", fmt.Sprintf("%s", params.CfR2Jurisdiction)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand All @@ -66,6 +69,9 @@ func (r *BucketService) New(ctx context.Context, params BucketNewParams, opts ..
// Lists all R2 buckets on your account
func (r *BucketService) List(ctx context.Context, params BucketListParams, opts ...option.RequestOption) (res *BucketListResponse, err error) {
var env BucketListResponseEnvelope
if params.CfR2Jurisdiction.Present {
opts = append(opts, option.WithHeader("cf-r2-jurisdiction", fmt.Sprintf("%s", params.CfR2Jurisdiction)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand All @@ -83,6 +89,9 @@ func (r *BucketService) List(ctx context.Context, params BucketListParams, opts
// Deletes an existing R2 bucket.
func (r *BucketService) Delete(ctx context.Context, bucketName string, params BucketDeleteParams, opts ...option.RequestOption) (res *BucketDeleteResponse, err error) {
var env BucketDeleteResponseEnvelope
if params.CfR2Jurisdiction.Present {
opts = append(opts, option.WithHeader("cf-r2-jurisdiction", fmt.Sprintf("%s", params.CfR2Jurisdiction)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand All @@ -104,6 +113,9 @@ func (r *BucketService) Delete(ctx context.Context, bucketName string, params Bu
// Gets metadata for an existing R2 bucket.
func (r *BucketService) Get(ctx context.Context, bucketName string, params BucketGetParams, opts ...option.RequestOption) (res *Bucket, err error) {
var env BucketGetResponseEnvelope
if params.CfR2Jurisdiction.Present {
opts = append(opts, option.WithHeader("cf-r2-jurisdiction", fmt.Sprintf("%s", params.CfR2Jurisdiction)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand Down
9 changes: 9 additions & 0 deletions r2/bucketcors.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ func NewBucketCORSService(opts ...option.RequestOption) (r *BucketCORSService) {
// Set the CORS policy for a bucket
func (r *BucketCORSService) Update(ctx context.Context, bucketName string, params BucketCORSUpdateParams, opts ...option.RequestOption) (res *BucketCORSUpdateResponse, err error) {
var env BucketCORSUpdateResponseEnvelope
if params.CfR2Jurisdiction.Present {
opts = append(opts, option.WithHeader("cf-r2-jurisdiction", fmt.Sprintf("%s", params.CfR2Jurisdiction)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand All @@ -58,6 +61,9 @@ func (r *BucketCORSService) Update(ctx context.Context, bucketName string, param
// Delete the CORS policy for a bucket
func (r *BucketCORSService) Delete(ctx context.Context, bucketName string, params BucketCORSDeleteParams, opts ...option.RequestOption) (res *BucketCORSDeleteResponse, err error) {
var env BucketCORSDeleteResponseEnvelope
if params.CfR2Jurisdiction.Present {
opts = append(opts, option.WithHeader("cf-r2-jurisdiction", fmt.Sprintf("%s", params.CfR2Jurisdiction)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand All @@ -79,6 +85,9 @@ func (r *BucketCORSService) Delete(ctx context.Context, bucketName string, param
// Get the CORS policy for a bucket
func (r *BucketCORSService) Get(ctx context.Context, bucketName string, params BucketCORSGetParams, opts ...option.RequestOption) (res *BucketCORSGetResponse, err error) {
var env BucketCORSGetResponseEnvelope
if params.CfR2Jurisdiction.Present {
opts = append(opts, option.WithHeader("cf-r2-jurisdiction", fmt.Sprintf("%s", params.CfR2Jurisdiction)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand Down
15 changes: 15 additions & 0 deletions r2/bucketdomaincustom.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ func NewBucketDomainCustomService(opts ...option.RequestOption) (r *BucketDomain
// Register a new custom domain for an existing R2 bucket.
func (r *BucketDomainCustomService) New(ctx context.Context, bucketName string, params BucketDomainCustomNewParams, opts ...option.RequestOption) (res *BucketDomainCustomNewResponse, err error) {
var env BucketDomainCustomNewResponseEnvelope
if params.CfR2Jurisdiction.Present {
opts = append(opts, option.WithHeader("cf-r2-jurisdiction", fmt.Sprintf("%s", params.CfR2Jurisdiction)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand All @@ -58,6 +61,9 @@ func (r *BucketDomainCustomService) New(ctx context.Context, bucketName string,
// Edit the configuration for a custom domain on an existing R2 bucket.
func (r *BucketDomainCustomService) Update(ctx context.Context, bucketName string, domainName string, params BucketDomainCustomUpdateParams, opts ...option.RequestOption) (res *BucketDomainCustomUpdateResponse, err error) {
var env BucketDomainCustomUpdateResponseEnvelope
if params.CfR2Jurisdiction.Present {
opts = append(opts, option.WithHeader("cf-r2-jurisdiction", fmt.Sprintf("%s", params.CfR2Jurisdiction)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand All @@ -83,6 +89,9 @@ func (r *BucketDomainCustomService) Update(ctx context.Context, bucketName strin
// Gets a list of all custom domains registered with an existing R2 bucket.
func (r *BucketDomainCustomService) List(ctx context.Context, bucketName string, params BucketDomainCustomListParams, opts ...option.RequestOption) (res *BucketDomainCustomListResponse, err error) {
var env BucketDomainCustomListResponseEnvelope
if params.CfR2Jurisdiction.Present {
opts = append(opts, option.WithHeader("cf-r2-jurisdiction", fmt.Sprintf("%s", params.CfR2Jurisdiction)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand All @@ -104,6 +113,9 @@ func (r *BucketDomainCustomService) List(ctx context.Context, bucketName string,
// Remove custom domain registration from an existing R2 bucket
func (r *BucketDomainCustomService) Delete(ctx context.Context, bucketName string, domainName string, params BucketDomainCustomDeleteParams, opts ...option.RequestOption) (res *BucketDomainCustomDeleteResponse, err error) {
var env BucketDomainCustomDeleteResponseEnvelope
if params.CfR2Jurisdiction.Present {
opts = append(opts, option.WithHeader("cf-r2-jurisdiction", fmt.Sprintf("%s", params.CfR2Jurisdiction)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand All @@ -129,6 +141,9 @@ func (r *BucketDomainCustomService) Delete(ctx context.Context, bucketName strin
// Get the configuration for a custom domain on an existing R2 bucket.
func (r *BucketDomainCustomService) Get(ctx context.Context, bucketName string, domainName string, params BucketDomainCustomGetParams, opts ...option.RequestOption) (res *BucketDomainCustomGetResponse, err error) {
var env BucketDomainCustomGetResponseEnvelope
if params.CfR2Jurisdiction.Present {
opts = append(opts, option.WithHeader("cf-r2-jurisdiction", fmt.Sprintf("%s", params.CfR2Jurisdiction)))
}
opts = append(r.Options[:], opts...)
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
Expand Down
Loading

0 comments on commit 55ac2dc

Please sign in to comment.