Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): api update #3762

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1483
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9de61f5a88c379c64b92ec838a305dfcbf98fbe539fe13b36b6d016943caf98d.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e77c57a9eafea3cb08364e2c43b0e4f54cef07caee6bbbd0b9200161e9ff67e9.yml
26 changes: 13 additions & 13 deletions zero_trust/gatewayconfiguration.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ func (r FipsSettingsParam) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}

// account settings.
// Account settings
type GatewayConfigurationSettings struct {
// Activity log settings.
ActivityLog ActivityLogSettings `json:"activity_log"`
Expand Down Expand Up @@ -557,7 +557,7 @@ func (r GatewayConfigurationSettingsSandboxFallbackAction) IsKnown() bool {
return false
}

// account settings.
// Account settings
type GatewayConfigurationSettingsParam struct {
// Activity log settings.
ActivityLog param.Field[ActivityLogSettingsParam] `json:"activity_log"`
Expand Down Expand Up @@ -728,10 +728,10 @@ func (r TLSSettingsParam) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}

// account settings.
// Account settings
type GatewayConfigurationUpdateResponse struct {
CreatedAt time.Time `json:"created_at" format:"date-time"`
// account settings.
// Account settings
Settings GatewayConfigurationSettings `json:"settings"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
JSON gatewayConfigurationUpdateResponseJSON `json:"-"`
Expand All @@ -755,10 +755,10 @@ func (r gatewayConfigurationUpdateResponseJSON) RawJSON() string {
return r.raw
}

// account settings.
// Account settings
type GatewayConfigurationEditResponse struct {
CreatedAt time.Time `json:"created_at" format:"date-time"`
// account settings.
// Account settings
Settings GatewayConfigurationSettings `json:"settings"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
JSON gatewayConfigurationEditResponseJSON `json:"-"`
Expand All @@ -782,10 +782,10 @@ func (r gatewayConfigurationEditResponseJSON) RawJSON() string {
return r.raw
}

// account settings.
// Account settings
type GatewayConfigurationGetResponse struct {
CreatedAt time.Time `json:"created_at" format:"date-time"`
// account settings.
// Account settings
Settings GatewayConfigurationSettings `json:"settings"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
JSON gatewayConfigurationGetResponseJSON `json:"-"`
Expand All @@ -811,7 +811,7 @@ func (r gatewayConfigurationGetResponseJSON) RawJSON() string {

type GatewayConfigurationUpdateParams struct {
AccountID param.Field[string] `path:"account_id,required"`
// account settings.
// Account settings
Settings param.Field[GatewayConfigurationSettingsParam] `json:"settings"`
}

Expand All @@ -824,7 +824,7 @@ type GatewayConfigurationUpdateResponseEnvelope struct {
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success GatewayConfigurationUpdateResponseEnvelopeSuccess `json:"success,required"`
// account settings.
// Account settings
Result GatewayConfigurationUpdateResponse `json:"result"`
JSON gatewayConfigurationUpdateResponseEnvelopeJSON `json:"-"`
}
Expand Down Expand Up @@ -865,7 +865,7 @@ func (r GatewayConfigurationUpdateResponseEnvelopeSuccess) IsKnown() bool {

type GatewayConfigurationEditParams struct {
AccountID param.Field[string] `path:"account_id,required"`
// account settings.
// Account settings
Settings param.Field[GatewayConfigurationSettingsParam] `json:"settings"`
}

Expand All @@ -878,7 +878,7 @@ type GatewayConfigurationEditResponseEnvelope struct {
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success GatewayConfigurationEditResponseEnvelopeSuccess `json:"success,required"`
// account settings.
// Account settings
Result GatewayConfigurationEditResponse `json:"result"`
JSON gatewayConfigurationEditResponseEnvelopeJSON `json:"-"`
}
Expand Down Expand Up @@ -926,7 +926,7 @@ type GatewayConfigurationGetResponseEnvelope struct {
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success GatewayConfigurationGetResponseEnvelopeSuccess `json:"success,required"`
// account settings.
// Account settings
Result GatewayConfigurationGetResponse `json:"result"`
JSON gatewayConfigurationGetResponseEnvelopeJSON `json:"-"`
}
Expand Down
9 changes: 6 additions & 3 deletions zero_trust/gatewayrule.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,11 @@ type GatewayRule struct {
// policies.
Schedule Schedule `json:"schedule"`
// The wirefilter expression used for traffic matching.
Traffic string `json:"traffic"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
JSON gatewayRuleJSON `json:"-"`
Traffic string `json:"traffic"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
// version number of the rule
Version int64 `json:"version"`
JSON gatewayRuleJSON `json:"-"`
}

// gatewayRuleJSON contains the JSON metadata for the struct [GatewayRule]
Expand All @@ -346,6 +348,7 @@ type gatewayRuleJSON struct {
Schedule apijson.Field
Traffic apijson.Field
UpdatedAt apijson.Field
Version apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down