From 419477cb7667132b9923d89101d42e358a16fd7b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 21:32:34 +0000 Subject: [PATCH] feat(api): update via SDK Studio (#3645) --- api.md | 13 +- api_gateway/discovery.go | 158 ------- api_gateway/discoveryoperation.go | 163 ++++++- api_gateway/operation.go | 558 ++++++++++++------------ api_gateway/operation_test.go | 4 +- api_gateway/userschemaoperation.go | 654 +++++++++++++++++++++++++++-- 6 files changed, 1094 insertions(+), 456 deletions(-) diff --git a/api.md b/api.md index 21544435c34..7c1dc91cd00 100644 --- a/api.md +++ b/api.md @@ -2497,7 +2497,6 @@ Methods: Response Types: -- api_gateway.DiscoveryOperation - api_gateway.DiscoveryGetResponse Methods: @@ -2508,20 +2507,26 @@ Methods: Response Types: +- api_gateway.DiscoveryOperationListResponse - api_gateway.DiscoveryOperationBulkEditResponse - api_gateway.DiscoveryOperationEditResponse Methods: -- client.APIGateway.Discovery.Operations.List(ctx context.Context, params api_gateway.DiscoveryOperationListParams) (pagination.V4PagePaginationArray[api_gateway.DiscoveryOperation], error) +- client.APIGateway.Discovery.Operations.List(ctx context.Context, params api_gateway.DiscoveryOperationListParams) (pagination.V4PagePaginationArray[api_gateway.DiscoveryOperationListResponse], error) - client.APIGateway.Discovery.Operations.BulkEdit(ctx context.Context, params api_gateway.DiscoveryOperationBulkEditParams) (api_gateway.DiscoveryOperationBulkEditResponse, error) - client.APIGateway.Discovery.Operations.Edit(ctx context.Context, operationID string, params api_gateway.DiscoveryOperationEditParams) (api_gateway.DiscoveryOperationEditResponse, error) ## Operations +Params Types: + +- api_gateway.APIShieldOperationParam + Response Types: -- api_gateway.APIShield +- api_gateway.APIShieldOperation +- api_gateway.OperationNewResponse - api_gateway.OperationListResponse - api_gateway.OperationDeleteResponse - api_gateway.OperationBulkDeleteResponse @@ -2529,7 +2534,7 @@ Response Types: Methods: -- client.APIGateway.Operations.New(ctx context.Context, params api_gateway.OperationNewParams) ([]api_gateway.APIShield, error) +- client.APIGateway.Operations.New(ctx context.Context, params api_gateway.OperationNewParams) ([]api_gateway.OperationNewResponse, error) - client.APIGateway.Operations.List(ctx context.Context, params api_gateway.OperationListParams) (pagination.V4PagePaginationArray[api_gateway.OperationListResponse], error) - client.APIGateway.Operations.Delete(ctx context.Context, operationID string, body api_gateway.OperationDeleteParams) (api_gateway.OperationDeleteResponse, error) - client.APIGateway.Operations.BulkDelete(ctx context.Context, body api_gateway.OperationBulkDeleteParams) (api_gateway.OperationBulkDeleteResponse, error) diff --git a/api_gateway/discovery.go b/api_gateway/discovery.go index 798c41d796a..763626263fa 100644 --- a/api_gateway/discovery.go +++ b/api_gateway/discovery.go @@ -54,164 +54,6 @@ func (r *DiscoveryService) Get(ctx context.Context, query DiscoveryGetParams, op return } -type DiscoveryOperation struct { - // UUID - ID string `json:"id,required"` - // The endpoint which can contain path parameter templates in curly braces, each - // will be replaced from left to right with {varN}, starting with {var1}, during - // insertion. This will further be Cloudflare-normalized upon insertion. See: - // https://developers.cloudflare.com/rules/normalization/how-it-works/. - Endpoint string `json:"endpoint,required" format:"uri-template"` - // RFC3986-compliant host. - Host string `json:"host,required" format:"hostname"` - LastUpdated time.Time `json:"last_updated,required" format:"date-time"` - // The HTTP method used to access the endpoint. - Method DiscoveryOperationMethod `json:"method,required"` - // API discovery engine(s) that discovered this operation - Origin []DiscoveryOperationOrigin `json:"origin,required"` - // State of operation in API Discovery - // - // - `review` - Operation is not saved into API Shield Endpoint Management - // - `saved` - Operation is saved into API Shield Endpoint Management - // - `ignored` - Operation is marked as ignored - State DiscoveryOperationState `json:"state,required"` - Features DiscoveryOperationFeatures `json:"features"` - JSON discoveryOperationJSON `json:"-"` -} - -// discoveryOperationJSON contains the JSON metadata for the struct -// [DiscoveryOperation] -type discoveryOperationJSON struct { - ID apijson.Field - Endpoint apijson.Field - Host apijson.Field - LastUpdated apijson.Field - Method apijson.Field - Origin apijson.Field - State apijson.Field - Features apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *DiscoveryOperation) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r discoveryOperationJSON) RawJSON() string { - return r.raw -} - -// The HTTP method used to access the endpoint. -type DiscoveryOperationMethod string - -const ( - DiscoveryOperationMethodGet DiscoveryOperationMethod = "GET" - DiscoveryOperationMethodPost DiscoveryOperationMethod = "POST" - DiscoveryOperationMethodHead DiscoveryOperationMethod = "HEAD" - DiscoveryOperationMethodOptions DiscoveryOperationMethod = "OPTIONS" - DiscoveryOperationMethodPut DiscoveryOperationMethod = "PUT" - DiscoveryOperationMethodDelete DiscoveryOperationMethod = "DELETE" - DiscoveryOperationMethodConnect DiscoveryOperationMethod = "CONNECT" - DiscoveryOperationMethodPatch DiscoveryOperationMethod = "PATCH" - DiscoveryOperationMethodTrace DiscoveryOperationMethod = "TRACE" -) - -func (r DiscoveryOperationMethod) IsKnown() bool { - switch r { - case DiscoveryOperationMethodGet, DiscoveryOperationMethodPost, DiscoveryOperationMethodHead, DiscoveryOperationMethodOptions, DiscoveryOperationMethodPut, DiscoveryOperationMethodDelete, DiscoveryOperationMethodConnect, DiscoveryOperationMethodPatch, DiscoveryOperationMethodTrace: - return true - } - return false -} - -// - `ML` - Discovered operation was sourced using ML API Discovery \* -// `SessionIdentifier` - Discovered operation was sourced using Session -// Identifier API Discovery -type DiscoveryOperationOrigin string - -const ( - DiscoveryOperationOriginMl DiscoveryOperationOrigin = "ML" - DiscoveryOperationOriginSessionIdentifier DiscoveryOperationOrigin = "SessionIdentifier" -) - -func (r DiscoveryOperationOrigin) IsKnown() bool { - switch r { - case DiscoveryOperationOriginMl, DiscoveryOperationOriginSessionIdentifier: - return true - } - return false -} - -// State of operation in API Discovery -// -// - `review` - Operation is not saved into API Shield Endpoint Management -// - `saved` - Operation is saved into API Shield Endpoint Management -// - `ignored` - Operation is marked as ignored -type DiscoveryOperationState string - -const ( - DiscoveryOperationStateReview DiscoveryOperationState = "review" - DiscoveryOperationStateSaved DiscoveryOperationState = "saved" - DiscoveryOperationStateIgnored DiscoveryOperationState = "ignored" -) - -func (r DiscoveryOperationState) IsKnown() bool { - switch r { - case DiscoveryOperationStateReview, DiscoveryOperationStateSaved, DiscoveryOperationStateIgnored: - return true - } - return false -} - -type DiscoveryOperationFeatures struct { - TrafficStats DiscoveryOperationFeaturesTrafficStats `json:"traffic_stats"` - JSON discoveryOperationFeaturesJSON `json:"-"` -} - -// discoveryOperationFeaturesJSON contains the JSON metadata for the struct -// [DiscoveryOperationFeatures] -type discoveryOperationFeaturesJSON struct { - TrafficStats apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *DiscoveryOperationFeatures) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r discoveryOperationFeaturesJSON) RawJSON() string { - return r.raw -} - -type DiscoveryOperationFeaturesTrafficStats struct { - LastUpdated time.Time `json:"last_updated,required" format:"date-time"` - // The period in seconds these statistics were computed over - PeriodSeconds int64 `json:"period_seconds,required"` - // The average number of requests seen during this period - Requests float64 `json:"requests,required"` - JSON discoveryOperationFeaturesTrafficStatsJSON `json:"-"` -} - -// discoveryOperationFeaturesTrafficStatsJSON contains the JSON metadata for the -// struct [DiscoveryOperationFeaturesTrafficStats] -type discoveryOperationFeaturesTrafficStatsJSON struct { - LastUpdated apijson.Field - PeriodSeconds apijson.Field - Requests apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *DiscoveryOperationFeaturesTrafficStats) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r discoveryOperationFeaturesTrafficStatsJSON) RawJSON() string { - return r.raw -} - type DiscoveryGetResponse struct { Schemas []interface{} `json:"schemas,required"` Timestamp time.Time `json:"timestamp,required" format:"date-time"` diff --git a/api_gateway/discoveryoperation.go b/api_gateway/discoveryoperation.go index a8901569b14..d3ea351cc66 100644 --- a/api_gateway/discoveryoperation.go +++ b/api_gateway/discoveryoperation.go @@ -8,6 +8,7 @@ import ( "fmt" "net/http" "net/url" + "time" "github.com/cloudflare/cloudflare-go/v3/internal/apijson" "github.com/cloudflare/cloudflare-go/v3/internal/apiquery" @@ -37,7 +38,7 @@ func NewDiscoveryOperationService(opts ...option.RequestOption) (r *DiscoveryOpe } // Retrieve the most up to date view of discovered operations -func (r *DiscoveryOperationService) List(ctx context.Context, params DiscoveryOperationListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[DiscoveryOperation], err error) { +func (r *DiscoveryOperationService) List(ctx context.Context, params DiscoveryOperationListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[DiscoveryOperationListResponse], err error) { var raw *http.Response opts = append(r.Options[:], opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) @@ -59,7 +60,7 @@ func (r *DiscoveryOperationService) List(ctx context.Context, params DiscoveryOp } // Retrieve the most up to date view of discovered operations -func (r *DiscoveryOperationService) ListAutoPaging(ctx context.Context, params DiscoveryOperationListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[DiscoveryOperation] { +func (r *DiscoveryOperationService) ListAutoPaging(ctx context.Context, params DiscoveryOperationListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[DiscoveryOperationListResponse] { return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...)) } @@ -101,6 +102,164 @@ func (r *DiscoveryOperationService) Edit(ctx context.Context, operationID string return } +type DiscoveryOperationListResponse struct { + // UUID + ID string `json:"id,required"` + // The endpoint which can contain path parameter templates in curly braces, each + // will be replaced from left to right with {varN}, starting with {var1}, during + // insertion. This will further be Cloudflare-normalized upon insertion. See: + // https://developers.cloudflare.com/rules/normalization/how-it-works/. + Endpoint string `json:"endpoint,required" format:"uri-template"` + // RFC3986-compliant host. + Host string `json:"host,required" format:"hostname"` + LastUpdated time.Time `json:"last_updated,required" format:"date-time"` + // The HTTP method used to access the endpoint. + Method DiscoveryOperationListResponseMethod `json:"method,required"` + // API discovery engine(s) that discovered this operation + Origin []DiscoveryOperationListResponseOrigin `json:"origin,required"` + // State of operation in API Discovery + // + // - `review` - Operation is not saved into API Shield Endpoint Management + // - `saved` - Operation is saved into API Shield Endpoint Management + // - `ignored` - Operation is marked as ignored + State DiscoveryOperationListResponseState `json:"state,required"` + Features DiscoveryOperationListResponseFeatures `json:"features"` + JSON discoveryOperationListResponseJSON `json:"-"` +} + +// discoveryOperationListResponseJSON contains the JSON metadata for the struct +// [DiscoveryOperationListResponse] +type discoveryOperationListResponseJSON struct { + ID apijson.Field + Endpoint apijson.Field + Host apijson.Field + LastUpdated apijson.Field + Method apijson.Field + Origin apijson.Field + State apijson.Field + Features apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DiscoveryOperationListResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r discoveryOperationListResponseJSON) RawJSON() string { + return r.raw +} + +// The HTTP method used to access the endpoint. +type DiscoveryOperationListResponseMethod string + +const ( + DiscoveryOperationListResponseMethodGet DiscoveryOperationListResponseMethod = "GET" + DiscoveryOperationListResponseMethodPost DiscoveryOperationListResponseMethod = "POST" + DiscoveryOperationListResponseMethodHead DiscoveryOperationListResponseMethod = "HEAD" + DiscoveryOperationListResponseMethodOptions DiscoveryOperationListResponseMethod = "OPTIONS" + DiscoveryOperationListResponseMethodPut DiscoveryOperationListResponseMethod = "PUT" + DiscoveryOperationListResponseMethodDelete DiscoveryOperationListResponseMethod = "DELETE" + DiscoveryOperationListResponseMethodConnect DiscoveryOperationListResponseMethod = "CONNECT" + DiscoveryOperationListResponseMethodPatch DiscoveryOperationListResponseMethod = "PATCH" + DiscoveryOperationListResponseMethodTrace DiscoveryOperationListResponseMethod = "TRACE" +) + +func (r DiscoveryOperationListResponseMethod) IsKnown() bool { + switch r { + case DiscoveryOperationListResponseMethodGet, DiscoveryOperationListResponseMethodPost, DiscoveryOperationListResponseMethodHead, DiscoveryOperationListResponseMethodOptions, DiscoveryOperationListResponseMethodPut, DiscoveryOperationListResponseMethodDelete, DiscoveryOperationListResponseMethodConnect, DiscoveryOperationListResponseMethodPatch, DiscoveryOperationListResponseMethodTrace: + return true + } + return false +} + +// - `ML` - Discovered operation was sourced using ML API Discovery \* +// `SessionIdentifier` - Discovered operation was sourced using Session +// Identifier API Discovery +type DiscoveryOperationListResponseOrigin string + +const ( + DiscoveryOperationListResponseOriginMl DiscoveryOperationListResponseOrigin = "ML" + DiscoveryOperationListResponseOriginSessionIdentifier DiscoveryOperationListResponseOrigin = "SessionIdentifier" +) + +func (r DiscoveryOperationListResponseOrigin) IsKnown() bool { + switch r { + case DiscoveryOperationListResponseOriginMl, DiscoveryOperationListResponseOriginSessionIdentifier: + return true + } + return false +} + +// State of operation in API Discovery +// +// - `review` - Operation is not saved into API Shield Endpoint Management +// - `saved` - Operation is saved into API Shield Endpoint Management +// - `ignored` - Operation is marked as ignored +type DiscoveryOperationListResponseState string + +const ( + DiscoveryOperationListResponseStateReview DiscoveryOperationListResponseState = "review" + DiscoveryOperationListResponseStateSaved DiscoveryOperationListResponseState = "saved" + DiscoveryOperationListResponseStateIgnored DiscoveryOperationListResponseState = "ignored" +) + +func (r DiscoveryOperationListResponseState) IsKnown() bool { + switch r { + case DiscoveryOperationListResponseStateReview, DiscoveryOperationListResponseStateSaved, DiscoveryOperationListResponseStateIgnored: + return true + } + return false +} + +type DiscoveryOperationListResponseFeatures struct { + TrafficStats DiscoveryOperationListResponseFeaturesTrafficStats `json:"traffic_stats"` + JSON discoveryOperationListResponseFeaturesJSON `json:"-"` +} + +// discoveryOperationListResponseFeaturesJSON contains the JSON metadata for the +// struct [DiscoveryOperationListResponseFeatures] +type discoveryOperationListResponseFeaturesJSON struct { + TrafficStats apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DiscoveryOperationListResponseFeatures) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r discoveryOperationListResponseFeaturesJSON) RawJSON() string { + return r.raw +} + +type DiscoveryOperationListResponseFeaturesTrafficStats struct { + LastUpdated time.Time `json:"last_updated,required" format:"date-time"` + // The period in seconds these statistics were computed over + PeriodSeconds int64 `json:"period_seconds,required"` + // The average number of requests seen during this period + Requests float64 `json:"requests,required"` + JSON discoveryOperationListResponseFeaturesTrafficStatsJSON `json:"-"` +} + +// discoveryOperationListResponseFeaturesTrafficStatsJSON contains the JSON +// metadata for the struct [DiscoveryOperationListResponseFeaturesTrafficStats] +type discoveryOperationListResponseFeaturesTrafficStatsJSON struct { + LastUpdated apijson.Field + PeriodSeconds apijson.Field + Requests apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DiscoveryOperationListResponseFeaturesTrafficStats) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r discoveryOperationListResponseFeaturesTrafficStatsJSON) RawJSON() string { + return r.raw +} + type DiscoveryOperationBulkEditResponse map[string]DiscoveryOperationBulkEditResponseItem // Mappings of discovered operations (keys) to objects describing their state diff --git a/api_gateway/operation.go b/api_gateway/operation.go index 901ef96c4bd..c22be953ed8 100644 --- a/api_gateway/operation.go +++ b/api_gateway/operation.go @@ -46,7 +46,7 @@ func NewOperationService(opts ...option.RequestOption) (r *OperationService) { // operation and must be unique on the zone. Inserting an operation that matches an // existing one will return the record of the already existing operation and update // its last_updated date. -func (r *OperationService) New(ctx context.Context, params OperationNewParams, opts ...option.RequestOption) (res *[]APIShield, err error) { +func (r *OperationService) New(ctx context.Context, params OperationNewParams, opts ...option.RequestOption) (res *[]OperationNewResponse, err error) { var env OperationNewResponseEnvelope opts = append(r.Options[:], opts...) if params.ZoneID.Value == "" { @@ -138,7 +138,79 @@ func (r *OperationService) Get(ctx context.Context, operationID string, params O return } -type APIShield struct { +type APIShieldOperation struct { + // The endpoint which can contain path parameter templates in curly braces, each + // will be replaced from left to right with {varN}, starting with {var1}, during + // insertion. This will further be Cloudflare-normalized upon insertion. See: + // https://developers.cloudflare.com/rules/normalization/how-it-works/. + Endpoint string `json:"endpoint,required" format:"uri-template"` + // RFC3986-compliant host. + Host string `json:"host,required" format:"hostname"` + // The HTTP method used to access the endpoint. + Method APIShieldOperationMethod `json:"method,required"` + JSON apiShieldOperationJSON `json:"-"` +} + +// apiShieldOperationJSON contains the JSON metadata for the struct +// [APIShieldOperation] +type apiShieldOperationJSON struct { + Endpoint apijson.Field + Host apijson.Field + Method apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *APIShieldOperation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r apiShieldOperationJSON) RawJSON() string { + return r.raw +} + +func (r APIShieldOperation) implementsAPIGatewayUserSchemaOperationListResponse() {} + +// The HTTP method used to access the endpoint. +type APIShieldOperationMethod string + +const ( + APIShieldOperationMethodGet APIShieldOperationMethod = "GET" + APIShieldOperationMethodPost APIShieldOperationMethod = "POST" + APIShieldOperationMethodHead APIShieldOperationMethod = "HEAD" + APIShieldOperationMethodOptions APIShieldOperationMethod = "OPTIONS" + APIShieldOperationMethodPut APIShieldOperationMethod = "PUT" + APIShieldOperationMethodDelete APIShieldOperationMethod = "DELETE" + APIShieldOperationMethodConnect APIShieldOperationMethod = "CONNECT" + APIShieldOperationMethodPatch APIShieldOperationMethod = "PATCH" + APIShieldOperationMethodTrace APIShieldOperationMethod = "TRACE" +) + +func (r APIShieldOperationMethod) IsKnown() bool { + switch r { + case APIShieldOperationMethodGet, APIShieldOperationMethodPost, APIShieldOperationMethodHead, APIShieldOperationMethodOptions, APIShieldOperationMethodPut, APIShieldOperationMethodDelete, APIShieldOperationMethodConnect, APIShieldOperationMethodPatch, APIShieldOperationMethodTrace: + return true + } + return false +} + +type APIShieldOperationParam struct { + // The endpoint which can contain path parameter templates in curly braces, each + // will be replaced from left to right with {varN}, starting with {var1}, during + // insertion. This will further be Cloudflare-normalized upon insertion. See: + // https://developers.cloudflare.com/rules/normalization/how-it-works/. + Endpoint param.Field[string] `json:"endpoint,required" format:"uri-template"` + // RFC3986-compliant host. + Host param.Field[string] `json:"host,required" format:"hostname"` + // The HTTP method used to access the endpoint. + Method param.Field[APIShieldOperationMethod] `json:"method,required"` +} + +func (r APIShieldOperationParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type OperationNewResponse struct { // The endpoint which can contain path parameter templates in curly braces, each // will be replaced from left to right with {varN}, starting with {var1}, during // insertion. This will further be Cloudflare-normalized upon insertion. See: @@ -148,15 +220,16 @@ type APIShield struct { Host string `json:"host,required" format:"hostname"` LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The HTTP method used to access the endpoint. - Method APIShieldMethod `json:"method,required"` + Method OperationNewResponseMethod `json:"method,required"` // UUID - OperationID string `json:"operation_id,required"` - Features APIShieldFeatures `json:"features"` - JSON apiShieldJSON `json:"-"` + OperationID string `json:"operation_id,required"` + Features OperationNewResponseFeatures `json:"features"` + JSON operationNewResponseJSON `json:"-"` } -// apiShieldJSON contains the JSON metadata for the struct [APIShield] -type apiShieldJSON struct { +// operationNewResponseJSON contains the JSON metadata for the struct +// [OperationNewResponse] +type operationNewResponseJSON struct { Endpoint apijson.Field Host apijson.Field LastUpdated apijson.Field @@ -167,62 +240,60 @@ type apiShieldJSON struct { ExtraFields map[string]apijson.Field } -func (r *APIShield) UnmarshalJSON(data []byte) (err error) { +func (r *OperationNewResponse) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r apiShieldJSON) RawJSON() string { +func (r operationNewResponseJSON) RawJSON() string { return r.raw } -func (r APIShield) implementsAPIGatewayUserSchemaOperationListResponse() {} - // The HTTP method used to access the endpoint. -type APIShieldMethod string +type OperationNewResponseMethod string const ( - APIShieldMethodGet APIShieldMethod = "GET" - APIShieldMethodPost APIShieldMethod = "POST" - APIShieldMethodHead APIShieldMethod = "HEAD" - APIShieldMethodOptions APIShieldMethod = "OPTIONS" - APIShieldMethodPut APIShieldMethod = "PUT" - APIShieldMethodDelete APIShieldMethod = "DELETE" - APIShieldMethodConnect APIShieldMethod = "CONNECT" - APIShieldMethodPatch APIShieldMethod = "PATCH" - APIShieldMethodTrace APIShieldMethod = "TRACE" + OperationNewResponseMethodGet OperationNewResponseMethod = "GET" + OperationNewResponseMethodPost OperationNewResponseMethod = "POST" + OperationNewResponseMethodHead OperationNewResponseMethod = "HEAD" + OperationNewResponseMethodOptions OperationNewResponseMethod = "OPTIONS" + OperationNewResponseMethodPut OperationNewResponseMethod = "PUT" + OperationNewResponseMethodDelete OperationNewResponseMethod = "DELETE" + OperationNewResponseMethodConnect OperationNewResponseMethod = "CONNECT" + OperationNewResponseMethodPatch OperationNewResponseMethod = "PATCH" + OperationNewResponseMethodTrace OperationNewResponseMethod = "TRACE" ) -func (r APIShieldMethod) IsKnown() bool { +func (r OperationNewResponseMethod) IsKnown() bool { switch r { - case APIShieldMethodGet, APIShieldMethodPost, APIShieldMethodHead, APIShieldMethodOptions, APIShieldMethodPut, APIShieldMethodDelete, APIShieldMethodConnect, APIShieldMethodPatch, APIShieldMethodTrace: + case OperationNewResponseMethodGet, OperationNewResponseMethodPost, OperationNewResponseMethodHead, OperationNewResponseMethodOptions, OperationNewResponseMethodPut, OperationNewResponseMethodDelete, OperationNewResponseMethodConnect, OperationNewResponseMethodPatch, OperationNewResponseMethodTrace: return true } return false } -type APIShieldFeatures struct { +type OperationNewResponseFeatures struct { // This field can have the runtime type of - // [APIShieldFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting]. + // [OperationNewResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting]. APIRouting interface{} `json:"api_routing"` // This field can have the runtime type of - // [APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals]. + // [OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals]. ConfidenceIntervals interface{} `json:"confidence_intervals"` // This field can have the runtime type of - // [APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas]. + // [OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas]. ParameterSchemas interface{} `json:"parameter_schemas"` // This field can have the runtime type of - // [APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo]. + // [OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo]. SchemaInfo interface{} `json:"schema_info"` // This field can have the runtime type of - // [APIShieldFeaturesAPIShieldOperationFeatureThresholdsThresholds]. - Thresholds interface{} `json:"thresholds"` - JSON apiShieldFeaturesJSON `json:"-"` - union APIShieldFeaturesUnion + // [OperationNewResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds]. + Thresholds interface{} `json:"thresholds"` + JSON operationNewResponseFeaturesJSON `json:"-"` + union OperationNewResponseFeaturesUnion } -// apiShieldFeaturesJSON contains the JSON metadata for the struct -// [APIShieldFeatures] -type apiShieldFeaturesJSON struct { +// operationNewResponseFeaturesJSON contains the JSON metadata for the struct +// [OperationNewResponseFeatures] +type operationNewResponseFeaturesJSON struct { APIRouting apijson.Field ConfidenceIntervals apijson.Field ParameterSchemas apijson.Field @@ -232,12 +303,12 @@ type apiShieldFeaturesJSON struct { ExtraFields map[string]apijson.Field } -func (r apiShieldFeaturesJSON) RawJSON() string { +func (r operationNewResponseFeaturesJSON) RawJSON() string { return r.raw } -func (r *APIShieldFeatures) UnmarshalJSON(data []byte) (err error) { - *r = APIShieldFeatures{} +func (r *OperationNewResponseFeatures) UnmarshalJSON(data []byte) (err error) { + *r = OperationNewResponseFeatures{} err = apijson.UnmarshalRoot(data, &r.union) if err != nil { return err @@ -245,81 +316,83 @@ func (r *APIShieldFeatures) UnmarshalJSON(data []byte) (err error) { return apijson.Port(r.union, &r) } -// AsUnion returns a [APIShieldFeaturesUnion] interface which you can cast to the -// specific types for more type safety. +// AsUnion returns a [OperationNewResponseFeaturesUnion] interface which you can +// cast to the specific types for more type safety. // // Possible runtime types of the union are -// [api_gateway.APIShieldFeaturesAPIShieldOperationFeatureThresholds], -// [api_gateway.APIShieldFeaturesAPIShieldOperationFeatureParameterSchemas], -// [api_gateway.APIShieldFeaturesAPIShieldOperationFeatureAPIRouting], -// [api_gateway.APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervals], -// [api_gateway.APIShieldFeaturesAPIShieldOperationFeatureSchemaInfo]. -func (r APIShieldFeatures) AsUnion() APIShieldFeaturesUnion { +// [api_gateway.OperationNewResponseFeaturesAPIShieldOperationFeatureThresholds], +// [api_gateway.OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemas], +// [api_gateway.OperationNewResponseFeaturesAPIShieldOperationFeatureAPIRouting], +// [api_gateway.OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervals], +// [api_gateway.OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfo]. +func (r OperationNewResponseFeatures) AsUnion() OperationNewResponseFeaturesUnion { return r.union } // Union satisfied by -// [api_gateway.APIShieldFeaturesAPIShieldOperationFeatureThresholds], -// [api_gateway.APIShieldFeaturesAPIShieldOperationFeatureParameterSchemas], -// [api_gateway.APIShieldFeaturesAPIShieldOperationFeatureAPIRouting], -// [api_gateway.APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervals] or -// [api_gateway.APIShieldFeaturesAPIShieldOperationFeatureSchemaInfo]. -type APIShieldFeaturesUnion interface { - implementsAPIGatewayAPIShieldFeatures() +// [api_gateway.OperationNewResponseFeaturesAPIShieldOperationFeatureThresholds], +// [api_gateway.OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemas], +// [api_gateway.OperationNewResponseFeaturesAPIShieldOperationFeatureAPIRouting], +// [api_gateway.OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervals] +// or +// [api_gateway.OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfo]. +type OperationNewResponseFeaturesUnion interface { + implementsAPIGatewayOperationNewResponseFeatures() } func init() { apijson.RegisterUnion( - reflect.TypeOf((*APIShieldFeaturesUnion)(nil)).Elem(), + reflect.TypeOf((*OperationNewResponseFeaturesUnion)(nil)).Elem(), "", apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(APIShieldFeaturesAPIShieldOperationFeatureThresholds{}), + Type: reflect.TypeOf(OperationNewResponseFeaturesAPIShieldOperationFeatureThresholds{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(APIShieldFeaturesAPIShieldOperationFeatureParameterSchemas{}), + Type: reflect.TypeOf(OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemas{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(APIShieldFeaturesAPIShieldOperationFeatureAPIRouting{}), + Type: reflect.TypeOf(OperationNewResponseFeaturesAPIShieldOperationFeatureAPIRouting{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervals{}), + Type: reflect.TypeOf(OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervals{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(APIShieldFeaturesAPIShieldOperationFeatureSchemaInfo{}), + Type: reflect.TypeOf(OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfo{}), }, ) } -type APIShieldFeaturesAPIShieldOperationFeatureThresholds struct { - Thresholds APIShieldFeaturesAPIShieldOperationFeatureThresholdsThresholds `json:"thresholds"` - JSON apiShieldFeaturesAPIShieldOperationFeatureThresholdsJSON `json:"-"` +type OperationNewResponseFeaturesAPIShieldOperationFeatureThresholds struct { + Thresholds OperationNewResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds `json:"thresholds"` + JSON operationNewResponseFeaturesAPIShieldOperationFeatureThresholdsJSON `json:"-"` } -// apiShieldFeaturesAPIShieldOperationFeatureThresholdsJSON contains the JSON -// metadata for the struct [APIShieldFeaturesAPIShieldOperationFeatureThresholds] -type apiShieldFeaturesAPIShieldOperationFeatureThresholdsJSON struct { +// operationNewResponseFeaturesAPIShieldOperationFeatureThresholdsJSON contains the +// JSON metadata for the struct +// [OperationNewResponseFeaturesAPIShieldOperationFeatureThresholds] +type operationNewResponseFeaturesAPIShieldOperationFeatureThresholdsJSON struct { Thresholds apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *APIShieldFeaturesAPIShieldOperationFeatureThresholds) UnmarshalJSON(data []byte) (err error) { +func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureThresholds) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r apiShieldFeaturesAPIShieldOperationFeatureThresholdsJSON) RawJSON() string { +func (r operationNewResponseFeaturesAPIShieldOperationFeatureThresholdsJSON) RawJSON() string { return r.raw } -func (r APIShieldFeaturesAPIShieldOperationFeatureThresholds) implementsAPIGatewayAPIShieldFeatures() { +func (r OperationNewResponseFeaturesAPIShieldOperationFeatureThresholds) implementsAPIGatewayOperationNewResponseFeatures() { } -type APIShieldFeaturesAPIShieldOperationFeatureThresholdsThresholds struct { +type OperationNewResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds struct { // The total number of auth-ids seen across this calculation. AuthIDTokens int64 `json:"auth_id_tokens"` // The number of data points used for the threshold suggestion calculation. @@ -336,14 +409,14 @@ type APIShieldFeaturesAPIShieldOperationFeatureThresholdsThresholds struct { // The estimated number of requests covered by these calculations. Requests int64 `json:"requests"` // The suggested threshold in requests done by the same auth_id or period_seconds. - SuggestedThreshold int64 `json:"suggested_threshold"` - JSON apiShieldFeaturesAPIShieldOperationFeatureThresholdsThresholdsJSON `json:"-"` + SuggestedThreshold int64 `json:"suggested_threshold"` + JSON operationNewResponseFeaturesAPIShieldOperationFeatureThresholdsThresholdsJSON `json:"-"` } -// apiShieldFeaturesAPIShieldOperationFeatureThresholdsThresholdsJSON contains the -// JSON metadata for the struct -// [APIShieldFeaturesAPIShieldOperationFeatureThresholdsThresholds] -type apiShieldFeaturesAPIShieldOperationFeatureThresholdsThresholdsJSON struct { +// operationNewResponseFeaturesAPIShieldOperationFeatureThresholdsThresholdsJSON +// contains the JSON metadata for the struct +// [OperationNewResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds] +type operationNewResponseFeaturesAPIShieldOperationFeatureThresholdsThresholdsJSON struct { AuthIDTokens apijson.Field DataPoints apijson.Field LastUpdated apijson.Field @@ -357,231 +430,232 @@ type apiShieldFeaturesAPIShieldOperationFeatureThresholdsThresholdsJSON struct { ExtraFields map[string]apijson.Field } -func (r *APIShieldFeaturesAPIShieldOperationFeatureThresholdsThresholds) UnmarshalJSON(data []byte) (err error) { +func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r apiShieldFeaturesAPIShieldOperationFeatureThresholdsThresholdsJSON) RawJSON() string { +func (r operationNewResponseFeaturesAPIShieldOperationFeatureThresholdsThresholdsJSON) RawJSON() string { return r.raw } -type APIShieldFeaturesAPIShieldOperationFeatureParameterSchemas struct { - ParameterSchemas APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas `json:"parameter_schemas,required"` - JSON apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasJSON `json:"-"` +type OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemas struct { + ParameterSchemas OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas `json:"parameter_schemas,required"` + JSON operationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasJSON `json:"-"` } -// apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasJSON contains the JSON -// metadata for the struct -// [APIShieldFeaturesAPIShieldOperationFeatureParameterSchemas] -type apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasJSON struct { +// operationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasJSON +// contains the JSON metadata for the struct +// [OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemas] +type operationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasJSON struct { ParameterSchemas apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *APIShieldFeaturesAPIShieldOperationFeatureParameterSchemas) UnmarshalJSON(data []byte) (err error) { +func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemas) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasJSON) RawJSON() string { +func (r operationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasJSON) RawJSON() string { return r.raw } -func (r APIShieldFeaturesAPIShieldOperationFeatureParameterSchemas) implementsAPIGatewayAPIShieldFeatures() { +func (r OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemas) implementsAPIGatewayOperationNewResponseFeatures() { } -type APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas struct { +type OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas struct { LastUpdated time.Time `json:"last_updated" format:"date-time"` // An operation schema object containing a response. - ParameterSchemas APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas `json:"parameter_schemas"` - JSON apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasJSON `json:"-"` + ParameterSchemas OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas `json:"parameter_schemas"` + JSON operationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasJSON `json:"-"` } -// apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasJSON +// operationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasJSON // contains the JSON metadata for the struct -// [APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas] -type apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasJSON struct { +// [OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas] +type operationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasJSON struct { LastUpdated apijson.Field ParameterSchemas apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas) UnmarshalJSON(data []byte) (err error) { +func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasJSON) RawJSON() string { +func (r operationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasJSON) RawJSON() string { return r.raw } // An operation schema object containing a response. -type APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas struct { +type OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas struct { // An array containing the learned parameter schemas. Parameters []interface{} `json:"parameters"` // An empty response object. This field is required to yield a valid operation // schema. - Responses interface{} `json:"responses,nullable"` - JSON apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasJSON `json:"-"` + Responses interface{} `json:"responses,nullable"` + JSON operationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasJSON `json:"-"` } -// apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasJSON +// operationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasJSON // contains the JSON metadata for the struct -// [APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas] -type apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasJSON struct { +// [OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas] +type operationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasJSON struct { Parameters apijson.Field Responses apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas) UnmarshalJSON(data []byte) (err error) { +func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasJSON) RawJSON() string { +func (r operationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasJSON) RawJSON() string { return r.raw } -type APIShieldFeaturesAPIShieldOperationFeatureAPIRouting struct { +type OperationNewResponseFeaturesAPIShieldOperationFeatureAPIRouting struct { // API Routing settings on endpoint. - APIRouting APIShieldFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting `json:"api_routing"` - JSON apiShieldFeaturesAPIShieldOperationFeatureAPIRoutingJSON `json:"-"` + APIRouting OperationNewResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting `json:"api_routing"` + JSON operationNewResponseFeaturesAPIShieldOperationFeatureAPIRoutingJSON `json:"-"` } -// apiShieldFeaturesAPIShieldOperationFeatureAPIRoutingJSON contains the JSON -// metadata for the struct [APIShieldFeaturesAPIShieldOperationFeatureAPIRouting] -type apiShieldFeaturesAPIShieldOperationFeatureAPIRoutingJSON struct { +// operationNewResponseFeaturesAPIShieldOperationFeatureAPIRoutingJSON contains the +// JSON metadata for the struct +// [OperationNewResponseFeaturesAPIShieldOperationFeatureAPIRouting] +type operationNewResponseFeaturesAPIShieldOperationFeatureAPIRoutingJSON struct { APIRouting apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *APIShieldFeaturesAPIShieldOperationFeatureAPIRouting) UnmarshalJSON(data []byte) (err error) { +func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureAPIRouting) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r apiShieldFeaturesAPIShieldOperationFeatureAPIRoutingJSON) RawJSON() string { +func (r operationNewResponseFeaturesAPIShieldOperationFeatureAPIRoutingJSON) RawJSON() string { return r.raw } -func (r APIShieldFeaturesAPIShieldOperationFeatureAPIRouting) implementsAPIGatewayAPIShieldFeatures() { +func (r OperationNewResponseFeaturesAPIShieldOperationFeatureAPIRouting) implementsAPIGatewayOperationNewResponseFeatures() { } // API Routing settings on endpoint. -type APIShieldFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting struct { +type OperationNewResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting struct { LastUpdated time.Time `json:"last_updated" format:"date-time"` // Target route. - Route string `json:"route"` - JSON apiShieldFeaturesAPIShieldOperationFeatureAPIRoutingAPIRoutingJSON `json:"-"` + Route string `json:"route"` + JSON operationNewResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRoutingJSON `json:"-"` } -// apiShieldFeaturesAPIShieldOperationFeatureAPIRoutingAPIRoutingJSON contains the -// JSON metadata for the struct -// [APIShieldFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting] -type apiShieldFeaturesAPIShieldOperationFeatureAPIRoutingAPIRoutingJSON struct { +// operationNewResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRoutingJSON +// contains the JSON metadata for the struct +// [OperationNewResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting] +type operationNewResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRoutingJSON struct { LastUpdated apijson.Field Route apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *APIShieldFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting) UnmarshalJSON(data []byte) (err error) { +func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r apiShieldFeaturesAPIShieldOperationFeatureAPIRoutingAPIRoutingJSON) RawJSON() string { +func (r operationNewResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRoutingJSON) RawJSON() string { return r.raw } -type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervals struct { - ConfidenceIntervals APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals `json:"confidence_intervals"` - JSON apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsJSON `json:"-"` +type OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervals struct { + ConfidenceIntervals OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals `json:"confidence_intervals"` + JSON operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsJSON `json:"-"` } -// apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsJSON contains the -// JSON metadata for the struct -// [APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervals] -type apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsJSON struct { +// operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsJSON +// contains the JSON metadata for the struct +// [OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervals] +type operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsJSON struct { ConfidenceIntervals apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervals) UnmarshalJSON(data []byte) (err error) { +func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervals) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsJSON) RawJSON() string { +func (r operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsJSON) RawJSON() string { return r.raw } -func (r APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervals) implementsAPIGatewayAPIShieldFeatures() { +func (r OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervals) implementsAPIGatewayOperationNewResponseFeatures() { } -type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals struct { - LastUpdated time.Time `json:"last_updated" format:"date-time"` - SuggestedThreshold APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold `json:"suggested_threshold"` - JSON apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsJSON `json:"-"` +type OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals struct { + LastUpdated time.Time `json:"last_updated" format:"date-time"` + SuggestedThreshold OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold `json:"suggested_threshold"` + JSON operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsJSON `json:"-"` } -// apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsJSON +// operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsJSON // contains the JSON metadata for the struct -// [APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals] -type apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsJSON struct { +// [OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals] +type operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsJSON struct { LastUpdated apijson.Field SuggestedThreshold apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals) UnmarshalJSON(data []byte) (err error) { +func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsJSON) RawJSON() string { +func (r operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsJSON) RawJSON() string { return r.raw } -type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold struct { - ConfidenceIntervals APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals `json:"confidence_intervals"` +type OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold struct { + ConfidenceIntervals OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals `json:"confidence_intervals"` // Suggested threshold. - Mean float64 `json:"mean"` - JSON apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdJSON `json:"-"` + Mean float64 `json:"mean"` + JSON operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdJSON `json:"-"` } -// apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdJSON +// operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdJSON // contains the JSON metadata for the struct -// [APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold] -type apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdJSON struct { +// [OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold] +type operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdJSON struct { ConfidenceIntervals apijson.Field Mean apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold) UnmarshalJSON(data []byte) (err error) { +func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdJSON) RawJSON() string { +func (r operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdJSON) RawJSON() string { return r.raw } -type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals struct { +type OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals struct { // Upper and lower bound for percentile estimate - P90 APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 `json:"p90"` + P90 OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 `json:"p90"` // Upper and lower bound for percentile estimate - P95 APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 `json:"p95"` + P95 OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 `json:"p95"` // Upper and lower bound for percentile estimate - P99 APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99 `json:"p99"` - JSON apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsJSON `json:"-"` + P99 OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99 `json:"p99"` + JSON operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsJSON `json:"-"` } -// apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsJSON +// operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsJSON // contains the JSON metadata for the struct -// [APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals] -type apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsJSON struct { +// [OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals] +type operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsJSON struct { P90 apijson.Field P95 apijson.Field P99 apijson.Field @@ -589,133 +663,134 @@ type apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceInte ExtraFields map[string]apijson.Field } -func (r *APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals) UnmarshalJSON(data []byte) (err error) { +func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsJSON) RawJSON() string { +func (r operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsJSON) RawJSON() string { return r.raw } // Upper and lower bound for percentile estimate -type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 struct { +type OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 struct { // Lower bound for percentile estimate Lower float64 `json:"lower"` // Upper bound for percentile estimate - Upper float64 `json:"upper"` - JSON apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90JSON `json:"-"` + Upper float64 `json:"upper"` + JSON operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90JSON `json:"-"` } -// apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90JSON +// operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90JSON // contains the JSON metadata for the struct -// [APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90] -type apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90JSON struct { +// [OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90] +type operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90JSON struct { Lower apijson.Field Upper apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90) UnmarshalJSON(data []byte) (err error) { +func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90JSON) RawJSON() string { +func (r operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90JSON) RawJSON() string { return r.raw } // Upper and lower bound for percentile estimate -type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 struct { +type OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 struct { // Lower bound for percentile estimate Lower float64 `json:"lower"` // Upper bound for percentile estimate - Upper float64 `json:"upper"` - JSON apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95JSON `json:"-"` + Upper float64 `json:"upper"` + JSON operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95JSON `json:"-"` } -// apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95JSON +// operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95JSON // contains the JSON metadata for the struct -// [APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95] -type apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95JSON struct { +// [OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95] +type operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95JSON struct { Lower apijson.Field Upper apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95) UnmarshalJSON(data []byte) (err error) { +func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95JSON) RawJSON() string { +func (r operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95JSON) RawJSON() string { return r.raw } // Upper and lower bound for percentile estimate -type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99 struct { +type OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99 struct { // Lower bound for percentile estimate Lower float64 `json:"lower"` // Upper bound for percentile estimate - Upper float64 `json:"upper"` - JSON apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99JSON `json:"-"` + Upper float64 `json:"upper"` + JSON operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99JSON `json:"-"` } -// apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99JSON +// operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99JSON // contains the JSON metadata for the struct -// [APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99] -type apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99JSON struct { +// [OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99] +type operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99JSON struct { Lower apijson.Field Upper apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99) UnmarshalJSON(data []byte) (err error) { +func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99JSON) RawJSON() string { +func (r operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99JSON) RawJSON() string { return r.raw } -type APIShieldFeaturesAPIShieldOperationFeatureSchemaInfo struct { - SchemaInfo APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo `json:"schema_info"` - JSON apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoJSON `json:"-"` +type OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfo struct { + SchemaInfo OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo `json:"schema_info"` + JSON operationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoJSON `json:"-"` } -// apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoJSON contains the JSON -// metadata for the struct [APIShieldFeaturesAPIShieldOperationFeatureSchemaInfo] -type apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoJSON struct { +// operationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoJSON contains the +// JSON metadata for the struct +// [OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfo] +type operationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoJSON struct { SchemaInfo apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *APIShieldFeaturesAPIShieldOperationFeatureSchemaInfo) UnmarshalJSON(data []byte) (err error) { +func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfo) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoJSON) RawJSON() string { +func (r operationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoJSON) RawJSON() string { return r.raw } -func (r APIShieldFeaturesAPIShieldOperationFeatureSchemaInfo) implementsAPIGatewayAPIShieldFeatures() { +func (r OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfo) implementsAPIGatewayOperationNewResponseFeatures() { } -type APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo struct { +type OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo struct { // Schema active on endpoint. - ActiveSchema APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema `json:"active_schema"` + ActiveSchema OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema `json:"active_schema"` // True if a Cloudflare-provided learned schema is available for this endpoint. LearnedAvailable bool `json:"learned_available"` // Action taken on requests failing validation. - MitigationAction APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction `json:"mitigation_action,nullable"` - JSON apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoJSON `json:"-"` + MitigationAction OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction `json:"mitigation_action,nullable"` + JSON operationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoJSON `json:"-"` } -// apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoJSON contains the -// JSON metadata for the struct -// [APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo] -type apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoJSON struct { +// operationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoJSON +// contains the JSON metadata for the struct +// [OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo] +type operationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoJSON struct { ActiveSchema apijson.Field LearnedAvailable apijson.Field MitigationAction apijson.Field @@ -723,30 +798,30 @@ type apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoJSON struct { ExtraFields map[string]apijson.Field } -func (r *APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo) UnmarshalJSON(data []byte) (err error) { +func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoJSON) RawJSON() string { +func (r operationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoJSON) RawJSON() string { return r.raw } // Schema active on endpoint. -type APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema struct { +type OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema struct { // UUID ID string `json:"id"` CreatedAt time.Time `json:"created_at" format:"date-time"` // True if schema is Cloudflare-provided. IsLearned bool `json:"is_learned"` // Schema file name. - Name string `json:"name"` - JSON apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchemaJSON `json:"-"` + Name string `json:"name"` + JSON operationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchemaJSON `json:"-"` } -// apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchemaJSON +// operationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchemaJSON // contains the JSON metadata for the struct -// [APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema] -type apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchemaJSON struct { +// [OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema] +type operationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchemaJSON struct { ID apijson.Field CreatedAt apijson.Field IsLearned apijson.Field @@ -755,26 +830,26 @@ type apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchemaJ ExtraFields map[string]apijson.Field } -func (r *APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema) UnmarshalJSON(data []byte) (err error) { +func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchemaJSON) RawJSON() string { +func (r operationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchemaJSON) RawJSON() string { return r.raw } // Action taken on requests failing validation. -type APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction string +type OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction string const ( - APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionNone APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "none" - APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionLog APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "log" - APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionBlock APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "block" + OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionNone OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "none" + OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionLog OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "log" + OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionBlock OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "block" ) -func (r APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction) IsKnown() bool { +func (r OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction) IsKnown() bool { switch r { - case APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionNone, APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionLog, APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionBlock: + case OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionNone, OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionLog, OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionBlock: return true } return false @@ -2154,57 +2229,18 @@ func (r OperationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInf type OperationNewParams struct { // Identifier - ZoneID param.Field[string] `path:"zone_id,required"` - Body []OperationNewParamsBody `json:"body,required"` + ZoneID param.Field[string] `path:"zone_id,required"` + Body []APIShieldOperationParam `json:"body,required"` } func (r OperationNewParams) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r.Body) } -type OperationNewParamsBody struct { - // The endpoint which can contain path parameter templates in curly braces, each - // will be replaced from left to right with {varN}, starting with {var1}, during - // insertion. This will further be Cloudflare-normalized upon insertion. See: - // https://developers.cloudflare.com/rules/normalization/how-it-works/. - Endpoint param.Field[string] `json:"endpoint,required" format:"uri-template"` - // RFC3986-compliant host. - Host param.Field[string] `json:"host,required" format:"hostname"` - // The HTTP method used to access the endpoint. - Method param.Field[OperationNewParamsBodyMethod] `json:"method,required"` -} - -func (r OperationNewParamsBody) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -// The HTTP method used to access the endpoint. -type OperationNewParamsBodyMethod string - -const ( - OperationNewParamsBodyMethodGet OperationNewParamsBodyMethod = "GET" - OperationNewParamsBodyMethodPost OperationNewParamsBodyMethod = "POST" - OperationNewParamsBodyMethodHead OperationNewParamsBodyMethod = "HEAD" - OperationNewParamsBodyMethodOptions OperationNewParamsBodyMethod = "OPTIONS" - OperationNewParamsBodyMethodPut OperationNewParamsBodyMethod = "PUT" - OperationNewParamsBodyMethodDelete OperationNewParamsBodyMethod = "DELETE" - OperationNewParamsBodyMethodConnect OperationNewParamsBodyMethod = "CONNECT" - OperationNewParamsBodyMethodPatch OperationNewParamsBodyMethod = "PATCH" - OperationNewParamsBodyMethodTrace OperationNewParamsBodyMethod = "TRACE" -) - -func (r OperationNewParamsBodyMethod) IsKnown() bool { - switch r { - case OperationNewParamsBodyMethodGet, OperationNewParamsBodyMethodPost, OperationNewParamsBodyMethodHead, OperationNewParamsBodyMethodOptions, OperationNewParamsBodyMethodPut, OperationNewParamsBodyMethodDelete, OperationNewParamsBodyMethodConnect, OperationNewParamsBodyMethodPatch, OperationNewParamsBodyMethodTrace: - return true - } - return false -} - type OperationNewResponseEnvelope struct { - Errors Message `json:"errors,required"` - Messages Message `json:"messages,required"` - Result []APIShield `json:"result,required"` + Errors Message `json:"errors,required"` + Messages Message `json:"messages,required"` + Result []OperationNewResponse `json:"result,required"` // Whether the API call was successful Success OperationNewResponseEnvelopeSuccess `json:"success,required"` JSON operationNewResponseEnvelopeJSON `json:"-"` diff --git a/api_gateway/operation_test.go b/api_gateway/operation_test.go index 5a4fe9d2b17..bfbb7f32443 100644 --- a/api_gateway/operation_test.go +++ b/api_gateway/operation_test.go @@ -29,10 +29,10 @@ func TestOperationNew(t *testing.T) { ) _, err := client.APIGateway.Operations.New(context.TODO(), api_gateway.OperationNewParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: []api_gateway.OperationNewParamsBody{{ + Body: []api_gateway.APIShieldOperationParam{{ Endpoint: cloudflare.F("/api/v1/users/{var1}"), Host: cloudflare.F("www.example.com"), - Method: cloudflare.F(api_gateway.OperationNewParamsBodyMethodGet), + Method: cloudflare.F(api_gateway.APIShieldOperationMethodGet), }}, }) if err != nil { diff --git a/api_gateway/userschemaoperation.go b/api_gateway/userschemaoperation.go index cbcabd44b49..5ff07e0a249 100644 --- a/api_gateway/userschemaoperation.go +++ b/api_gateway/userschemaoperation.go @@ -82,7 +82,8 @@ type UserSchemaOperationListResponse struct { Host string `json:"host,required" format:"hostname"` // The HTTP method used to access the endpoint. Method UserSchemaOperationListResponseMethod `json:"method,required"` - // This field can have the runtime type of [APIShieldFeatures]. + // This field can have the runtime type of + // [UserSchemaOperationListResponseAPIShieldOperationFeatures]. Features interface{} `json:"features"` LastUpdated time.Time `json:"last_updated" format:"date-time"` // UUID @@ -120,14 +121,16 @@ func (r *UserSchemaOperationListResponse) UnmarshalJSON(data []byte) (err error) // AsUnion returns a [UserSchemaOperationListResponseUnion] interface which you can // cast to the specific types for more type safety. // -// Possible runtime types of the union are [api_gateway.APIShield], -// [api_gateway.UserSchemaOperationListResponseAPIShieldBasicOperation]. +// Possible runtime types of the union are +// [api_gateway.UserSchemaOperationListResponseAPIShieldOperation], +// [api_gateway.APIShieldOperation]. func (r UserSchemaOperationListResponse) AsUnion() UserSchemaOperationListResponseUnion { return r.union } -// Union satisfied by [api_gateway.APIShield] or -// [api_gateway.UserSchemaOperationListResponseAPIShieldBasicOperation]. +// Union satisfied by +// [api_gateway.UserSchemaOperationListResponseAPIShieldOperation] or +// [api_gateway.APIShieldOperation]. type UserSchemaOperationListResponseUnion interface { implementsAPIGatewayUserSchemaOperationListResponse() } @@ -138,67 +141,660 @@ func init() { "", apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(APIShield{}), + Type: reflect.TypeOf(UserSchemaOperationListResponseAPIShieldOperation{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(UserSchemaOperationListResponseAPIShieldBasicOperation{}), + Type: reflect.TypeOf(APIShieldOperation{}), }, ) } -type UserSchemaOperationListResponseAPIShieldBasicOperation struct { +type UserSchemaOperationListResponseAPIShieldOperation struct { // The endpoint which can contain path parameter templates in curly braces, each // will be replaced from left to right with {varN}, starting with {var1}, during // insertion. This will further be Cloudflare-normalized upon insertion. See: // https://developers.cloudflare.com/rules/normalization/how-it-works/. Endpoint string `json:"endpoint,required" format:"uri-template"` // RFC3986-compliant host. - Host string `json:"host,required" format:"hostname"` + Host string `json:"host,required" format:"hostname"` + LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The HTTP method used to access the endpoint. - Method UserSchemaOperationListResponseAPIShieldBasicOperationMethod `json:"method,required"` - JSON userSchemaOperationListResponseAPIShieldBasicOperationJSON `json:"-"` + Method UserSchemaOperationListResponseAPIShieldOperationMethod `json:"method,required"` + // UUID + OperationID string `json:"operation_id,required"` + Features UserSchemaOperationListResponseAPIShieldOperationFeatures `json:"features"` + JSON userSchemaOperationListResponseAPIShieldOperationJSON `json:"-"` } -// userSchemaOperationListResponseAPIShieldBasicOperationJSON contains the JSON -// metadata for the struct [UserSchemaOperationListResponseAPIShieldBasicOperation] -type userSchemaOperationListResponseAPIShieldBasicOperationJSON struct { +// userSchemaOperationListResponseAPIShieldOperationJSON contains the JSON metadata +// for the struct [UserSchemaOperationListResponseAPIShieldOperation] +type userSchemaOperationListResponseAPIShieldOperationJSON struct { Endpoint apijson.Field Host apijson.Field + LastUpdated apijson.Field Method apijson.Field + OperationID apijson.Field + Features apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *UserSchemaOperationListResponseAPIShieldBasicOperation) UnmarshalJSON(data []byte) (err error) { +func (r *UserSchemaOperationListResponseAPIShieldOperation) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r userSchemaOperationListResponseAPIShieldBasicOperationJSON) RawJSON() string { +func (r userSchemaOperationListResponseAPIShieldOperationJSON) RawJSON() string { return r.raw } -func (r UserSchemaOperationListResponseAPIShieldBasicOperation) implementsAPIGatewayUserSchemaOperationListResponse() { +func (r UserSchemaOperationListResponseAPIShieldOperation) implementsAPIGatewayUserSchemaOperationListResponse() { } // The HTTP method used to access the endpoint. -type UserSchemaOperationListResponseAPIShieldBasicOperationMethod string +type UserSchemaOperationListResponseAPIShieldOperationMethod string + +const ( + UserSchemaOperationListResponseAPIShieldOperationMethodGet UserSchemaOperationListResponseAPIShieldOperationMethod = "GET" + UserSchemaOperationListResponseAPIShieldOperationMethodPost UserSchemaOperationListResponseAPIShieldOperationMethod = "POST" + UserSchemaOperationListResponseAPIShieldOperationMethodHead UserSchemaOperationListResponseAPIShieldOperationMethod = "HEAD" + UserSchemaOperationListResponseAPIShieldOperationMethodOptions UserSchemaOperationListResponseAPIShieldOperationMethod = "OPTIONS" + UserSchemaOperationListResponseAPIShieldOperationMethodPut UserSchemaOperationListResponseAPIShieldOperationMethod = "PUT" + UserSchemaOperationListResponseAPIShieldOperationMethodDelete UserSchemaOperationListResponseAPIShieldOperationMethod = "DELETE" + UserSchemaOperationListResponseAPIShieldOperationMethodConnect UserSchemaOperationListResponseAPIShieldOperationMethod = "CONNECT" + UserSchemaOperationListResponseAPIShieldOperationMethodPatch UserSchemaOperationListResponseAPIShieldOperationMethod = "PATCH" + UserSchemaOperationListResponseAPIShieldOperationMethodTrace UserSchemaOperationListResponseAPIShieldOperationMethod = "TRACE" +) + +func (r UserSchemaOperationListResponseAPIShieldOperationMethod) IsKnown() bool { + switch r { + case UserSchemaOperationListResponseAPIShieldOperationMethodGet, UserSchemaOperationListResponseAPIShieldOperationMethodPost, UserSchemaOperationListResponseAPIShieldOperationMethodHead, UserSchemaOperationListResponseAPIShieldOperationMethodOptions, UserSchemaOperationListResponseAPIShieldOperationMethodPut, UserSchemaOperationListResponseAPIShieldOperationMethodDelete, UserSchemaOperationListResponseAPIShieldOperationMethodConnect, UserSchemaOperationListResponseAPIShieldOperationMethodPatch, UserSchemaOperationListResponseAPIShieldOperationMethodTrace: + return true + } + return false +} + +type UserSchemaOperationListResponseAPIShieldOperationFeatures struct { + // This field can have the runtime type of + // [UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting]. + APIRouting interface{} `json:"api_routing"` + // This field can have the runtime type of + // [UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals]. + ConfidenceIntervals interface{} `json:"confidence_intervals"` + // This field can have the runtime type of + // [UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas]. + ParameterSchemas interface{} `json:"parameter_schemas"` + // This field can have the runtime type of + // [UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo]. + SchemaInfo interface{} `json:"schema_info"` + // This field can have the runtime type of + // [UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureThresholdsThresholds]. + Thresholds interface{} `json:"thresholds"` + JSON userSchemaOperationListResponseAPIShieldOperationFeaturesJSON `json:"-"` + union UserSchemaOperationListResponseAPIShieldOperationFeaturesUnion +} + +// userSchemaOperationListResponseAPIShieldOperationFeaturesJSON contains the JSON +// metadata for the struct +// [UserSchemaOperationListResponseAPIShieldOperationFeatures] +type userSchemaOperationListResponseAPIShieldOperationFeaturesJSON struct { + APIRouting apijson.Field + ConfidenceIntervals apijson.Field + ParameterSchemas apijson.Field + SchemaInfo apijson.Field + Thresholds apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r userSchemaOperationListResponseAPIShieldOperationFeaturesJSON) RawJSON() string { + return r.raw +} + +func (r *UserSchemaOperationListResponseAPIShieldOperationFeatures) UnmarshalJSON(data []byte) (err error) { + *r = UserSchemaOperationListResponseAPIShieldOperationFeatures{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a +// [UserSchemaOperationListResponseAPIShieldOperationFeaturesUnion] interface which +// you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [api_gateway.UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureThresholds], +// [api_gateway.UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemas], +// [api_gateway.UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureAPIRouting], +// [api_gateway.UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervals], +// [api_gateway.UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfo]. +func (r UserSchemaOperationListResponseAPIShieldOperationFeatures) AsUnion() UserSchemaOperationListResponseAPIShieldOperationFeaturesUnion { + return r.union +} + +// Union satisfied by +// [api_gateway.UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureThresholds], +// [api_gateway.UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemas], +// [api_gateway.UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureAPIRouting], +// [api_gateway.UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervals] +// or +// [api_gateway.UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfo]. +type UserSchemaOperationListResponseAPIShieldOperationFeaturesUnion interface { + implementsAPIGatewayUserSchemaOperationListResponseAPIShieldOperationFeatures() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*UserSchemaOperationListResponseAPIShieldOperationFeaturesUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureThresholds{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemas{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureAPIRouting{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervals{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfo{}), + }, + ) +} + +type UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureThresholds struct { + Thresholds UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureThresholdsThresholds `json:"thresholds"` + JSON userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureThresholdsJSON `json:"-"` +} + +// userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureThresholdsJSON +// contains the JSON metadata for the struct +// [UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureThresholds] +type userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureThresholdsJSON struct { + Thresholds apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureThresholds) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureThresholdsJSON) RawJSON() string { + return r.raw +} + +func (r UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureThresholds) implementsAPIGatewayUserSchemaOperationListResponseAPIShieldOperationFeatures() { +} + +type UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureThresholdsThresholds struct { + // The total number of auth-ids seen across this calculation. + AuthIDTokens int64 `json:"auth_id_tokens"` + // The number of data points used for the threshold suggestion calculation. + DataPoints int64 `json:"data_points"` + LastUpdated time.Time `json:"last_updated" format:"date-time"` + // The p50 quantile of requests (in period_seconds). + P50 int64 `json:"p50"` + // The p90 quantile of requests (in period_seconds). + P90 int64 `json:"p90"` + // The p99 quantile of requests (in period_seconds). + P99 int64 `json:"p99"` + // The period over which this threshold is suggested. + PeriodSeconds int64 `json:"period_seconds"` + // The estimated number of requests covered by these calculations. + Requests int64 `json:"requests"` + // The suggested threshold in requests done by the same auth_id or period_seconds. + SuggestedThreshold int64 `json:"suggested_threshold"` + JSON userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureThresholdsThresholdsJSON `json:"-"` +} + +// userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureThresholdsThresholdsJSON +// contains the JSON metadata for the struct +// [UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureThresholdsThresholds] +type userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureThresholdsThresholdsJSON struct { + AuthIDTokens apijson.Field + DataPoints apijson.Field + LastUpdated apijson.Field + P50 apijson.Field + P90 apijson.Field + P99 apijson.Field + PeriodSeconds apijson.Field + Requests apijson.Field + SuggestedThreshold apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureThresholdsThresholds) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureThresholdsThresholdsJSON) RawJSON() string { + return r.raw +} + +type UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemas struct { + ParameterSchemas UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas `json:"parameter_schemas,required"` + JSON userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasJSON `json:"-"` +} + +// userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasJSON +// contains the JSON metadata for the struct +// [UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemas] +type userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasJSON struct { + ParameterSchemas apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemas) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasJSON) RawJSON() string { + return r.raw +} + +func (r UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemas) implementsAPIGatewayUserSchemaOperationListResponseAPIShieldOperationFeatures() { +} + +type UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas struct { + LastUpdated time.Time `json:"last_updated" format:"date-time"` + // An operation schema object containing a response. + ParameterSchemas UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas `json:"parameter_schemas"` + JSON userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasJSON `json:"-"` +} + +// userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasJSON +// contains the JSON metadata for the struct +// [UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas] +type userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasJSON struct { + LastUpdated apijson.Field + ParameterSchemas apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasJSON) RawJSON() string { + return r.raw +} + +// An operation schema object containing a response. +type UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas struct { + // An array containing the learned parameter schemas. + Parameters []interface{} `json:"parameters"` + // An empty response object. This field is required to yield a valid operation + // schema. + Responses interface{} `json:"responses,nullable"` + JSON userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasJSON `json:"-"` +} + +// userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasJSON +// contains the JSON metadata for the struct +// [UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas] +type userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasJSON struct { + Parameters apijson.Field + Responses apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasJSON) RawJSON() string { + return r.raw +} + +type UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureAPIRouting struct { + // API Routing settings on endpoint. + APIRouting UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting `json:"api_routing"` + JSON userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureAPIRoutingJSON `json:"-"` +} + +// userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureAPIRoutingJSON +// contains the JSON metadata for the struct +// [UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureAPIRouting] +type userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureAPIRoutingJSON struct { + APIRouting apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureAPIRouting) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureAPIRoutingJSON) RawJSON() string { + return r.raw +} + +func (r UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureAPIRouting) implementsAPIGatewayUserSchemaOperationListResponseAPIShieldOperationFeatures() { +} + +// API Routing settings on endpoint. +type UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting struct { + LastUpdated time.Time `json:"last_updated" format:"date-time"` + // Target route. + Route string `json:"route"` + JSON userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureAPIRoutingAPIRoutingJSON `json:"-"` +} + +// userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureAPIRoutingAPIRoutingJSON +// contains the JSON metadata for the struct +// [UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting] +type userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureAPIRoutingAPIRoutingJSON struct { + LastUpdated apijson.Field + Route apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureAPIRoutingAPIRoutingJSON) RawJSON() string { + return r.raw +} + +type UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervals struct { + ConfidenceIntervals UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals `json:"confidence_intervals"` + JSON userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsJSON `json:"-"` +} + +// userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsJSON +// contains the JSON metadata for the struct +// [UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervals] +type userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsJSON struct { + ConfidenceIntervals apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervals) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsJSON) RawJSON() string { + return r.raw +} + +func (r UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervals) implementsAPIGatewayUserSchemaOperationListResponseAPIShieldOperationFeatures() { +} + +type UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals struct { + LastUpdated time.Time `json:"last_updated" format:"date-time"` + SuggestedThreshold UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold `json:"suggested_threshold"` + JSON userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsJSON `json:"-"` +} + +// userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsJSON +// contains the JSON metadata for the struct +// [UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals] +type userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsJSON struct { + LastUpdated apijson.Field + SuggestedThreshold apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsJSON) RawJSON() string { + return r.raw +} + +type UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold struct { + ConfidenceIntervals UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals `json:"confidence_intervals"` + // Suggested threshold. + Mean float64 `json:"mean"` + JSON userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdJSON `json:"-"` +} + +// userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdJSON +// contains the JSON metadata for the struct +// [UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold] +type userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdJSON struct { + ConfidenceIntervals apijson.Field + Mean apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdJSON) RawJSON() string { + return r.raw +} + +type UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals struct { + // Upper and lower bound for percentile estimate + P90 UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 `json:"p90"` + // Upper and lower bound for percentile estimate + P95 UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 `json:"p95"` + // Upper and lower bound for percentile estimate + P99 UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99 `json:"p99"` + JSON userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsJSON `json:"-"` +} + +// userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsJSON +// contains the JSON metadata for the struct +// [UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals] +type userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsJSON struct { + P90 apijson.Field + P95 apijson.Field + P99 apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsJSON) RawJSON() string { + return r.raw +} + +// Upper and lower bound for percentile estimate +type UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 struct { + // Lower bound for percentile estimate + Lower float64 `json:"lower"` + // Upper bound for percentile estimate + Upper float64 `json:"upper"` + JSON userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90JSON `json:"-"` +} + +// userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90JSON +// contains the JSON metadata for the struct +// [UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90] +type userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90JSON struct { + Lower apijson.Field + Upper apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90JSON) RawJSON() string { + return r.raw +} + +// Upper and lower bound for percentile estimate +type UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 struct { + // Lower bound for percentile estimate + Lower float64 `json:"lower"` + // Upper bound for percentile estimate + Upper float64 `json:"upper"` + JSON userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95JSON `json:"-"` +} + +// userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95JSON +// contains the JSON metadata for the struct +// [UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95] +type userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95JSON struct { + Lower apijson.Field + Upper apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95JSON) RawJSON() string { + return r.raw +} + +// Upper and lower bound for percentile estimate +type UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99 struct { + // Lower bound for percentile estimate + Lower float64 `json:"lower"` + // Upper bound for percentile estimate + Upper float64 `json:"upper"` + JSON userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99JSON `json:"-"` +} + +// userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99JSON +// contains the JSON metadata for the struct +// [UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99] +type userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99JSON struct { + Lower apijson.Field + Upper apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99JSON) RawJSON() string { + return r.raw +} + +type UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfo struct { + SchemaInfo UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo `json:"schema_info"` + JSON userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoJSON `json:"-"` +} + +// userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoJSON +// contains the JSON metadata for the struct +// [UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfo] +type userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoJSON struct { + SchemaInfo apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoJSON) RawJSON() string { + return r.raw +} + +func (r UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfo) implementsAPIGatewayUserSchemaOperationListResponseAPIShieldOperationFeatures() { +} + +type UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo struct { + // Schema active on endpoint. + ActiveSchema UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema `json:"active_schema"` + // True if a Cloudflare-provided learned schema is available for this endpoint. + LearnedAvailable bool `json:"learned_available"` + // Action taken on requests failing validation. + MitigationAction UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction `json:"mitigation_action,nullable"` + JSON userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoJSON `json:"-"` +} + +// userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoJSON +// contains the JSON metadata for the struct +// [UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo] +type userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoJSON struct { + ActiveSchema apijson.Field + LearnedAvailable apijson.Field + MitigationAction apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoJSON) RawJSON() string { + return r.raw +} + +// Schema active on endpoint. +type UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema struct { + // UUID + ID string `json:"id"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + // True if schema is Cloudflare-provided. + IsLearned bool `json:"is_learned"` + // Schema file name. + Name string `json:"name"` + JSON userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchemaJSON `json:"-"` +} + +// userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchemaJSON +// contains the JSON metadata for the struct +// [UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema] +type userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchemaJSON struct { + ID apijson.Field + CreatedAt apijson.Field + IsLearned apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r userSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchemaJSON) RawJSON() string { + return r.raw +} + +// Action taken on requests failing validation. +type UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction string const ( - UserSchemaOperationListResponseAPIShieldBasicOperationMethodGet UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "GET" - UserSchemaOperationListResponseAPIShieldBasicOperationMethodPost UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "POST" - UserSchemaOperationListResponseAPIShieldBasicOperationMethodHead UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "HEAD" - UserSchemaOperationListResponseAPIShieldBasicOperationMethodOptions UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "OPTIONS" - UserSchemaOperationListResponseAPIShieldBasicOperationMethodPut UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "PUT" - UserSchemaOperationListResponseAPIShieldBasicOperationMethodDelete UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "DELETE" - UserSchemaOperationListResponseAPIShieldBasicOperationMethodConnect UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "CONNECT" - UserSchemaOperationListResponseAPIShieldBasicOperationMethodPatch UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "PATCH" - UserSchemaOperationListResponseAPIShieldBasicOperationMethodTrace UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "TRACE" + UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionNone UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "none" + UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionLog UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "log" + UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionBlock UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "block" ) -func (r UserSchemaOperationListResponseAPIShieldBasicOperationMethod) IsKnown() bool { +func (r UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction) IsKnown() bool { switch r { - case UserSchemaOperationListResponseAPIShieldBasicOperationMethodGet, UserSchemaOperationListResponseAPIShieldBasicOperationMethodPost, UserSchemaOperationListResponseAPIShieldBasicOperationMethodHead, UserSchemaOperationListResponseAPIShieldBasicOperationMethodOptions, UserSchemaOperationListResponseAPIShieldBasicOperationMethodPut, UserSchemaOperationListResponseAPIShieldBasicOperationMethodDelete, UserSchemaOperationListResponseAPIShieldBasicOperationMethodConnect, UserSchemaOperationListResponseAPIShieldBasicOperationMethodPatch, UserSchemaOperationListResponseAPIShieldBasicOperationMethodTrace: + case UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionNone, UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionLog, UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionBlock: return true } return false