Skip to content

Commit

Permalink
chore(internal): codegen related update (#3713)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Dec 9, 2024
1 parent 410d00a commit 2e9441a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1557,9 +1557,9 @@ Methods:

Response Types:

- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/firewall">firewall</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/firewall#DeletedFilter">DeletedFilter</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/firewall">firewall</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/firewall#FirewallRule">FirewallRule</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/firewall">firewall</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/firewall#Product">Product</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/firewall">firewall</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/firewall#DeletedFilter">DeletedFilter</a>

Methods:

Expand Down
52 changes: 26 additions & 26 deletions firewall/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,32 @@ func (r *RuleService) Get(ctx context.Context, ruleID string, params RuleGetPara
return
}

type DeletedFilter struct {
// The unique identifier of the filter.
ID string `json:"id,required"`
// When true, indicates that the firewall rule was deleted.
Deleted bool `json:"deleted,required"`
JSON deletedFilterJSON `json:"-"`
}

// deletedFilterJSON contains the JSON metadata for the struct [DeletedFilter]
type deletedFilterJSON struct {
ID apijson.Field
Deleted apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

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

func (r deletedFilterJSON) RawJSON() string {
return r.raw
}

func (r DeletedFilter) ImplementsFirewallFirewallRuleFilter() {}

type FirewallRule struct {
// The unique identifier of the firewall rule.
ID string `json:"id"`
Expand Down Expand Up @@ -409,32 +435,6 @@ func (r Product) IsKnown() bool {
return false
}

type DeletedFilter struct {
// The unique identifier of the filter.
ID string `json:"id,required"`
// When true, indicates that the firewall rule was deleted.
Deleted bool `json:"deleted,required"`
JSON deletedFilterJSON `json:"-"`
}

// deletedFilterJSON contains the JSON metadata for the struct [DeletedFilter]
type deletedFilterJSON struct {
ID apijson.Field
Deleted apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

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

func (r deletedFilterJSON) RawJSON() string {
return r.raw
}

func (r DeletedFilter) ImplementsFirewallFirewallRuleFilter() {}

type RuleNewParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
Expand Down

0 comments on commit 2e9441a

Please sign in to comment.