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 27, 2024
1 parent 9e6b580 commit bc3be11
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 6 deletions.
1 change: 0 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4082,7 +4082,6 @@ Methods:

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#JjJoFrd1Trace">JjJoFrd1Trace</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#RequestTracerTraceNewResponse">RequestTracerTraceNewResponse</a>

Methods:
Expand Down
98 changes: 93 additions & 5 deletions requesttracertrace.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,12 @@ func (r *RequestTracerTraceService) New(ctx context.Context, accountIdentifier s
return
}

type JjJoFrd1Trace []JjJoFrd1Trace

// Trace result with an origin status code
type RequestTracerTraceNewResponse struct {
// HTTP Status code of zone response
StatusCode int64 `json:"status_code"`
Trace JjJoFrd1Trace `json:"trace"`
JSON requestTracerTraceNewResponseJSON `json:"-"`
StatusCode int64 `json:"status_code"`
Trace []RequestTracerTraceNewResponseTrace `json:"trace"`
JSON requestTracerTraceNewResponseJSON `json:"-"`
}

// requestTracerTraceNewResponseJSON contains the JSON metadata for the struct
Expand All @@ -67,6 +65,96 @@ func (r *RequestTracerTraceNewResponse) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}

// List of steps acting on request/response
type RequestTracerTraceNewResponseTrace struct {
// If step type is rule, then action performed by this rule
Action string `json:"action"`
// If step type is rule, then action parameters of this rule as JSON
ActionParameters interface{} `json:"action_parameters"`
// If step type is rule or ruleset, the description of this entity
Description string `json:"description"`
// If step type is rule, then expression used to match for this rule
Expression string `json:"expression"`
// If step type is ruleset, then kind of this ruleset
Kind string `json:"kind"`
// Whether tracing step affected tracing request/response
Matched bool `json:"matched"`
// If step type is ruleset, then name of this ruleset
Name string `json:"name"`
// Tracing step identifying name
StepName string `json:"step_name"`
Trace []RequestTracerTraceNewResponseTraceTrace `json:"trace"`
// Tracing step type
Type string `json:"type"`
JSON requestTracerTraceNewResponseTraceJSON `json:"-"`
}

// requestTracerTraceNewResponseTraceJSON contains the JSON metadata for the struct
// [RequestTracerTraceNewResponseTrace]
type requestTracerTraceNewResponseTraceJSON struct {
Action apijson.Field
ActionParameters apijson.Field
Description apijson.Field
Expression apijson.Field
Kind apijson.Field
Matched apijson.Field
Name apijson.Field
StepName apijson.Field
Trace apijson.Field
Type apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

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

// List of steps acting on request/response
type RequestTracerTraceNewResponseTraceTrace struct {
// If step type is rule, then action performed by this rule
Action string `json:"action"`
// If step type is rule, then action parameters of this rule as JSON
ActionParameters interface{} `json:"action_parameters"`
// If step type is rule or ruleset, the description of this entity
Description string `json:"description"`
// If step type is rule, then expression used to match for this rule
Expression string `json:"expression"`
// If step type is ruleset, then kind of this ruleset
Kind string `json:"kind"`
// Whether tracing step affected tracing request/response
Matched bool `json:"matched"`
// If step type is ruleset, then name of this ruleset
Name string `json:"name"`
// Tracing step identifying name
StepName string `json:"step_name"`
Trace interface{} `json:"trace"`
// Tracing step type
Type string `json:"type"`
JSON requestTracerTraceNewResponseTraceTraceJSON `json:"-"`
}

// requestTracerTraceNewResponseTraceTraceJSON contains the JSON metadata for the
// struct [RequestTracerTraceNewResponseTraceTrace]
type requestTracerTraceNewResponseTraceTraceJSON struct {
Action apijson.Field
ActionParameters apijson.Field
Description apijson.Field
Expression apijson.Field
Kind apijson.Field
Matched apijson.Field
Name apijson.Field
StepName apijson.Field
Trace apijson.Field
Type apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

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

type RequestTracerTraceNewParams struct {
// HTTP Method of tracing request
Method param.Field[string] `json:"method,required"`
Expand Down

0 comments on commit bc3be11

Please sign in to comment.