diff --git a/api.md b/api.md index 1693e205378..21544435c34 100644 --- a/api.md +++ b/api.md @@ -2519,14 +2519,9 @@ Methods: ## Operations -Params Types: - -- api_gateway.APIShieldOperationParam - Response Types: -- api_gateway.APIShieldOperation -- api_gateway.OperationNewResponse +- api_gateway.APIShield - api_gateway.OperationListResponse - api_gateway.OperationDeleteResponse - api_gateway.OperationBulkDeleteResponse @@ -2534,7 +2529,7 @@ Response Types: Methods: -- client.APIGateway.Operations.New(ctx context.Context, params api_gateway.OperationNewParams) ([]api_gateway.OperationNewResponse, error) +- client.APIGateway.Operations.New(ctx context.Context, params api_gateway.OperationNewParams) ([]api_gateway.APIShield, 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/operation.go b/api_gateway/operation.go index c22be953ed8..901ef96c4bd 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 *[]OperationNewResponse, err error) { +func (r *OperationService) New(ctx context.Context, params OperationNewParams, opts ...option.RequestOption) (res *[]APIShield, err error) { var env OperationNewResponseEnvelope opts = append(r.Options[:], opts...) if params.ZoneID.Value == "" { @@ -138,79 +138,7 @@ func (r *OperationService) Get(ctx context.Context, operationID string, params O return } -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 { +type APIShield 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: @@ -220,16 +148,15 @@ type OperationNewResponse 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 OperationNewResponseMethod `json:"method,required"` + Method APIShieldMethod `json:"method,required"` // UUID - OperationID string `json:"operation_id,required"` - Features OperationNewResponseFeatures `json:"features"` - JSON operationNewResponseJSON `json:"-"` + OperationID string `json:"operation_id,required"` + Features APIShieldFeatures `json:"features"` + JSON apiShieldJSON `json:"-"` } -// operationNewResponseJSON contains the JSON metadata for the struct -// [OperationNewResponse] -type operationNewResponseJSON struct { +// apiShieldJSON contains the JSON metadata for the struct [APIShield] +type apiShieldJSON struct { Endpoint apijson.Field Host apijson.Field LastUpdated apijson.Field @@ -240,60 +167,62 @@ type operationNewResponseJSON struct { ExtraFields map[string]apijson.Field } -func (r *OperationNewResponse) UnmarshalJSON(data []byte) (err error) { +func (r *APIShield) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r operationNewResponseJSON) RawJSON() string { +func (r apiShieldJSON) RawJSON() string { return r.raw } +func (r APIShield) implementsAPIGatewayUserSchemaOperationListResponse() {} + // The HTTP method used to access the endpoint. -type OperationNewResponseMethod string +type APIShieldMethod string const ( - 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" + 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" ) -func (r OperationNewResponseMethod) IsKnown() bool { +func (r APIShieldMethod) IsKnown() bool { switch r { - case OperationNewResponseMethodGet, OperationNewResponseMethodPost, OperationNewResponseMethodHead, OperationNewResponseMethodOptions, OperationNewResponseMethodPut, OperationNewResponseMethodDelete, OperationNewResponseMethodConnect, OperationNewResponseMethodPatch, OperationNewResponseMethodTrace: + case APIShieldMethodGet, APIShieldMethodPost, APIShieldMethodHead, APIShieldMethodOptions, APIShieldMethodPut, APIShieldMethodDelete, APIShieldMethodConnect, APIShieldMethodPatch, APIShieldMethodTrace: return true } return false } -type OperationNewResponseFeatures struct { +type APIShieldFeatures struct { // This field can have the runtime type of - // [OperationNewResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting]. + // [APIShieldFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting]. APIRouting interface{} `json:"api_routing"` // This field can have the runtime type of - // [OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals]. + // [APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals]. ConfidenceIntervals interface{} `json:"confidence_intervals"` // This field can have the runtime type of - // [OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas]. + // [APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas]. ParameterSchemas interface{} `json:"parameter_schemas"` // This field can have the runtime type of - // [OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo]. + // [APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo]. SchemaInfo interface{} `json:"schema_info"` // This field can have the runtime type of - // [OperationNewResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds]. - Thresholds interface{} `json:"thresholds"` - JSON operationNewResponseFeaturesJSON `json:"-"` - union OperationNewResponseFeaturesUnion + // [APIShieldFeaturesAPIShieldOperationFeatureThresholdsThresholds]. + Thresholds interface{} `json:"thresholds"` + JSON apiShieldFeaturesJSON `json:"-"` + union APIShieldFeaturesUnion } -// operationNewResponseFeaturesJSON contains the JSON metadata for the struct -// [OperationNewResponseFeatures] -type operationNewResponseFeaturesJSON struct { +// apiShieldFeaturesJSON contains the JSON metadata for the struct +// [APIShieldFeatures] +type apiShieldFeaturesJSON struct { APIRouting apijson.Field ConfidenceIntervals apijson.Field ParameterSchemas apijson.Field @@ -303,12 +232,12 @@ type operationNewResponseFeaturesJSON struct { ExtraFields map[string]apijson.Field } -func (r operationNewResponseFeaturesJSON) RawJSON() string { +func (r apiShieldFeaturesJSON) RawJSON() string { return r.raw } -func (r *OperationNewResponseFeatures) UnmarshalJSON(data []byte) (err error) { - *r = OperationNewResponseFeatures{} +func (r *APIShieldFeatures) UnmarshalJSON(data []byte) (err error) { + *r = APIShieldFeatures{} err = apijson.UnmarshalRoot(data, &r.union) if err != nil { return err @@ -316,83 +245,81 @@ func (r *OperationNewResponseFeatures) UnmarshalJSON(data []byte) (err error) { return apijson.Port(r.union, &r) } -// AsUnion returns a [OperationNewResponseFeaturesUnion] interface which you can -// cast to the specific types for more type safety. +// AsUnion returns a [APIShieldFeaturesUnion] interface which you can cast to the +// specific types for more type safety. // // Possible runtime types of the union are -// [api_gateway.OperationNewResponseFeaturesAPIShieldOperationFeatureThresholds], -// [api_gateway.OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemas], -// [api_gateway.OperationNewResponseFeaturesAPIShieldOperationFeatureAPIRouting], -// [api_gateway.OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervals], -// [api_gateway.OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfo]. -func (r OperationNewResponseFeatures) AsUnion() OperationNewResponseFeaturesUnion { +// [api_gateway.APIShieldFeaturesAPIShieldOperationFeatureThresholds], +// [api_gateway.APIShieldFeaturesAPIShieldOperationFeatureParameterSchemas], +// [api_gateway.APIShieldFeaturesAPIShieldOperationFeatureAPIRouting], +// [api_gateway.APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervals], +// [api_gateway.APIShieldFeaturesAPIShieldOperationFeatureSchemaInfo]. +func (r APIShieldFeatures) AsUnion() APIShieldFeaturesUnion { return r.union } // Union satisfied by -// [api_gateway.OperationNewResponseFeaturesAPIShieldOperationFeatureThresholds], -// [api_gateway.OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemas], -// [api_gateway.OperationNewResponseFeaturesAPIShieldOperationFeatureAPIRouting], -// [api_gateway.OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervals] -// or -// [api_gateway.OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfo]. -type OperationNewResponseFeaturesUnion interface { - implementsAPIGatewayOperationNewResponseFeatures() +// [api_gateway.APIShieldFeaturesAPIShieldOperationFeatureThresholds], +// [api_gateway.APIShieldFeaturesAPIShieldOperationFeatureParameterSchemas], +// [api_gateway.APIShieldFeaturesAPIShieldOperationFeatureAPIRouting], +// [api_gateway.APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervals] or +// [api_gateway.APIShieldFeaturesAPIShieldOperationFeatureSchemaInfo]. +type APIShieldFeaturesUnion interface { + implementsAPIGatewayAPIShieldFeatures() } func init() { apijson.RegisterUnion( - reflect.TypeOf((*OperationNewResponseFeaturesUnion)(nil)).Elem(), + reflect.TypeOf((*APIShieldFeaturesUnion)(nil)).Elem(), "", apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(OperationNewResponseFeaturesAPIShieldOperationFeatureThresholds{}), + Type: reflect.TypeOf(APIShieldFeaturesAPIShieldOperationFeatureThresholds{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemas{}), + Type: reflect.TypeOf(APIShieldFeaturesAPIShieldOperationFeatureParameterSchemas{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(OperationNewResponseFeaturesAPIShieldOperationFeatureAPIRouting{}), + Type: reflect.TypeOf(APIShieldFeaturesAPIShieldOperationFeatureAPIRouting{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervals{}), + Type: reflect.TypeOf(APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervals{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfo{}), + Type: reflect.TypeOf(APIShieldFeaturesAPIShieldOperationFeatureSchemaInfo{}), }, ) } -type OperationNewResponseFeaturesAPIShieldOperationFeatureThresholds struct { - Thresholds OperationNewResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds `json:"thresholds"` - JSON operationNewResponseFeaturesAPIShieldOperationFeatureThresholdsJSON `json:"-"` +type APIShieldFeaturesAPIShieldOperationFeatureThresholds struct { + Thresholds APIShieldFeaturesAPIShieldOperationFeatureThresholdsThresholds `json:"thresholds"` + JSON apiShieldFeaturesAPIShieldOperationFeatureThresholdsJSON `json:"-"` } -// operationNewResponseFeaturesAPIShieldOperationFeatureThresholdsJSON contains the -// JSON metadata for the struct -// [OperationNewResponseFeaturesAPIShieldOperationFeatureThresholds] -type operationNewResponseFeaturesAPIShieldOperationFeatureThresholdsJSON struct { +// apiShieldFeaturesAPIShieldOperationFeatureThresholdsJSON contains the JSON +// metadata for the struct [APIShieldFeaturesAPIShieldOperationFeatureThresholds] +type apiShieldFeaturesAPIShieldOperationFeatureThresholdsJSON struct { Thresholds apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureThresholds) UnmarshalJSON(data []byte) (err error) { +func (r *APIShieldFeaturesAPIShieldOperationFeatureThresholds) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r operationNewResponseFeaturesAPIShieldOperationFeatureThresholdsJSON) RawJSON() string { +func (r apiShieldFeaturesAPIShieldOperationFeatureThresholdsJSON) RawJSON() string { return r.raw } -func (r OperationNewResponseFeaturesAPIShieldOperationFeatureThresholds) implementsAPIGatewayOperationNewResponseFeatures() { +func (r APIShieldFeaturesAPIShieldOperationFeatureThresholds) implementsAPIGatewayAPIShieldFeatures() { } -type OperationNewResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds struct { +type APIShieldFeaturesAPIShieldOperationFeatureThresholdsThresholds 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. @@ -409,14 +336,14 @@ type OperationNewResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds s // 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 operationNewResponseFeaturesAPIShieldOperationFeatureThresholdsThresholdsJSON `json:"-"` + SuggestedThreshold int64 `json:"suggested_threshold"` + JSON apiShieldFeaturesAPIShieldOperationFeatureThresholdsThresholdsJSON `json:"-"` } -// operationNewResponseFeaturesAPIShieldOperationFeatureThresholdsThresholdsJSON -// contains the JSON metadata for the struct -// [OperationNewResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds] -type operationNewResponseFeaturesAPIShieldOperationFeatureThresholdsThresholdsJSON struct { +// apiShieldFeaturesAPIShieldOperationFeatureThresholdsThresholdsJSON contains the +// JSON metadata for the struct +// [APIShieldFeaturesAPIShieldOperationFeatureThresholdsThresholds] +type apiShieldFeaturesAPIShieldOperationFeatureThresholdsThresholdsJSON struct { AuthIDTokens apijson.Field DataPoints apijson.Field LastUpdated apijson.Field @@ -430,232 +357,231 @@ type operationNewResponseFeaturesAPIShieldOperationFeatureThresholdsThresholdsJS ExtraFields map[string]apijson.Field } -func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds) UnmarshalJSON(data []byte) (err error) { +func (r *APIShieldFeaturesAPIShieldOperationFeatureThresholdsThresholds) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r operationNewResponseFeaturesAPIShieldOperationFeatureThresholdsThresholdsJSON) RawJSON() string { +func (r apiShieldFeaturesAPIShieldOperationFeatureThresholdsThresholdsJSON) RawJSON() string { return r.raw } -type OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemas struct { - ParameterSchemas OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas `json:"parameter_schemas,required"` - JSON operationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasJSON `json:"-"` +type APIShieldFeaturesAPIShieldOperationFeatureParameterSchemas struct { + ParameterSchemas APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas `json:"parameter_schemas,required"` + JSON apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasJSON `json:"-"` } -// operationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasJSON -// contains the JSON metadata for the struct -// [OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemas] -type operationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasJSON struct { +// apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasJSON contains the JSON +// metadata for the struct +// [APIShieldFeaturesAPIShieldOperationFeatureParameterSchemas] +type apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasJSON struct { ParameterSchemas apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemas) UnmarshalJSON(data []byte) (err error) { +func (r *APIShieldFeaturesAPIShieldOperationFeatureParameterSchemas) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r operationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasJSON) RawJSON() string { +func (r apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasJSON) RawJSON() string { return r.raw } -func (r OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemas) implementsAPIGatewayOperationNewResponseFeatures() { +func (r APIShieldFeaturesAPIShieldOperationFeatureParameterSchemas) implementsAPIGatewayAPIShieldFeatures() { } -type OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas struct { +type APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas struct { LastUpdated time.Time `json:"last_updated" format:"date-time"` // An operation schema object containing a response. - ParameterSchemas OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas `json:"parameter_schemas"` - JSON operationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasJSON `json:"-"` + ParameterSchemas APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas `json:"parameter_schemas"` + JSON apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasJSON `json:"-"` } -// operationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasJSON +// apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasJSON // contains the JSON metadata for the struct -// [OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas] -type operationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasJSON struct { +// [APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas] +type apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasJSON struct { LastUpdated apijson.Field ParameterSchemas apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas) UnmarshalJSON(data []byte) (err error) { +func (r *APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r operationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasJSON) RawJSON() string { +func (r apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasJSON) RawJSON() string { return r.raw } // An operation schema object containing a response. -type OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas struct { +type APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas 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 operationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasJSON `json:"-"` + Responses interface{} `json:"responses,nullable"` + JSON apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasJSON `json:"-"` } -// operationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasJSON +// apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasJSON // contains the JSON metadata for the struct -// [OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas] -type operationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasJSON struct { +// [APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas] +type apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasJSON struct { Parameters apijson.Field Responses apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas) UnmarshalJSON(data []byte) (err error) { +func (r *APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r operationNewResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasJSON) RawJSON() string { +func (r apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasJSON) RawJSON() string { return r.raw } -type OperationNewResponseFeaturesAPIShieldOperationFeatureAPIRouting struct { +type APIShieldFeaturesAPIShieldOperationFeatureAPIRouting struct { // API Routing settings on endpoint. - APIRouting OperationNewResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting `json:"api_routing"` - JSON operationNewResponseFeaturesAPIShieldOperationFeatureAPIRoutingJSON `json:"-"` + APIRouting APIShieldFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting `json:"api_routing"` + JSON apiShieldFeaturesAPIShieldOperationFeatureAPIRoutingJSON `json:"-"` } -// operationNewResponseFeaturesAPIShieldOperationFeatureAPIRoutingJSON contains the -// JSON metadata for the struct -// [OperationNewResponseFeaturesAPIShieldOperationFeatureAPIRouting] -type operationNewResponseFeaturesAPIShieldOperationFeatureAPIRoutingJSON struct { +// apiShieldFeaturesAPIShieldOperationFeatureAPIRoutingJSON contains the JSON +// metadata for the struct [APIShieldFeaturesAPIShieldOperationFeatureAPIRouting] +type apiShieldFeaturesAPIShieldOperationFeatureAPIRoutingJSON struct { APIRouting apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureAPIRouting) UnmarshalJSON(data []byte) (err error) { +func (r *APIShieldFeaturesAPIShieldOperationFeatureAPIRouting) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r operationNewResponseFeaturesAPIShieldOperationFeatureAPIRoutingJSON) RawJSON() string { +func (r apiShieldFeaturesAPIShieldOperationFeatureAPIRoutingJSON) RawJSON() string { return r.raw } -func (r OperationNewResponseFeaturesAPIShieldOperationFeatureAPIRouting) implementsAPIGatewayOperationNewResponseFeatures() { +func (r APIShieldFeaturesAPIShieldOperationFeatureAPIRouting) implementsAPIGatewayAPIShieldFeatures() { } // API Routing settings on endpoint. -type OperationNewResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting struct { +type APIShieldFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting struct { LastUpdated time.Time `json:"last_updated" format:"date-time"` // Target route. - Route string `json:"route"` - JSON operationNewResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRoutingJSON `json:"-"` + Route string `json:"route"` + JSON apiShieldFeaturesAPIShieldOperationFeatureAPIRoutingAPIRoutingJSON `json:"-"` } -// operationNewResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRoutingJSON -// contains the JSON metadata for the struct -// [OperationNewResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting] -type operationNewResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRoutingJSON struct { +// apiShieldFeaturesAPIShieldOperationFeatureAPIRoutingAPIRoutingJSON contains the +// JSON metadata for the struct +// [APIShieldFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting] +type apiShieldFeaturesAPIShieldOperationFeatureAPIRoutingAPIRoutingJSON struct { LastUpdated apijson.Field Route apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting) UnmarshalJSON(data []byte) (err error) { +func (r *APIShieldFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r operationNewResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRoutingJSON) RawJSON() string { +func (r apiShieldFeaturesAPIShieldOperationFeatureAPIRoutingAPIRoutingJSON) RawJSON() string { return r.raw } -type OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervals struct { - ConfidenceIntervals OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals `json:"confidence_intervals"` - JSON operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsJSON `json:"-"` +type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervals struct { + ConfidenceIntervals APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals `json:"confidence_intervals"` + JSON apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsJSON `json:"-"` } -// operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsJSON -// contains the JSON metadata for the struct -// [OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervals] -type operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsJSON struct { +// apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsJSON contains the +// JSON metadata for the struct +// [APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervals] +type apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsJSON struct { ConfidenceIntervals apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervals) UnmarshalJSON(data []byte) (err error) { +func (r *APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervals) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsJSON) RawJSON() string { +func (r apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsJSON) RawJSON() string { return r.raw } -func (r OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervals) implementsAPIGatewayOperationNewResponseFeatures() { +func (r APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervals) implementsAPIGatewayAPIShieldFeatures() { } -type OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals struct { - LastUpdated time.Time `json:"last_updated" format:"date-time"` - SuggestedThreshold OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold `json:"suggested_threshold"` - JSON operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsJSON `json:"-"` +type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals struct { + LastUpdated time.Time `json:"last_updated" format:"date-time"` + SuggestedThreshold APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold `json:"suggested_threshold"` + JSON apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsJSON `json:"-"` } -// operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsJSON +// apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsJSON // contains the JSON metadata for the struct -// [OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals] -type operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsJSON struct { +// [APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals] +type apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsJSON struct { LastUpdated apijson.Field SuggestedThreshold apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals) UnmarshalJSON(data []byte) (err error) { +func (r *APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsJSON) RawJSON() string { +func (r apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsJSON) RawJSON() string { return r.raw } -type OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold struct { - ConfidenceIntervals OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals `json:"confidence_intervals"` +type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold struct { + ConfidenceIntervals APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals `json:"confidence_intervals"` // Suggested threshold. - Mean float64 `json:"mean"` - JSON operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdJSON `json:"-"` + Mean float64 `json:"mean"` + JSON apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdJSON `json:"-"` } -// operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdJSON +// apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdJSON // contains the JSON metadata for the struct -// [OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold] -type operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdJSON struct { +// [APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold] +type apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdJSON struct { ConfidenceIntervals apijson.Field Mean apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold) UnmarshalJSON(data []byte) (err error) { +func (r *APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdJSON) RawJSON() string { +func (r apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdJSON) RawJSON() string { return r.raw } -type OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals struct { +type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals struct { // Upper and lower bound for percentile estimate - P90 OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 `json:"p90"` + P90 APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 `json:"p90"` // Upper and lower bound for percentile estimate - P95 OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 `json:"p95"` + P95 APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 `json:"p95"` // Upper and lower bound for percentile estimate - P99 OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99 `json:"p99"` - JSON operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsJSON `json:"-"` + P99 APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99 `json:"p99"` + JSON apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsJSON `json:"-"` } -// operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsJSON +// apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsJSON // contains the JSON metadata for the struct -// [OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals] -type operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsJSON struct { +// [APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals] +type apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsJSON struct { P90 apijson.Field P95 apijson.Field P99 apijson.Field @@ -663,134 +589,133 @@ type operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsCon ExtraFields map[string]apijson.Field } -func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals) UnmarshalJSON(data []byte) (err error) { +func (r *APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsJSON) RawJSON() string { +func (r apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsJSON) RawJSON() string { return r.raw } // Upper and lower bound for percentile estimate -type OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 struct { +type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 struct { // Lower bound for percentile estimate Lower float64 `json:"lower"` // Upper bound for percentile estimate - Upper float64 `json:"upper"` - JSON operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90JSON `json:"-"` + Upper float64 `json:"upper"` + JSON apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90JSON `json:"-"` } -// operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90JSON +// apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90JSON // contains the JSON metadata for the struct -// [OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90] -type operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90JSON struct { +// [APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90] +type apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90JSON struct { Lower apijson.Field Upper apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90) UnmarshalJSON(data []byte) (err error) { +func (r *APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90JSON) RawJSON() string { +func (r apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90JSON) RawJSON() string { return r.raw } // Upper and lower bound for percentile estimate -type OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 struct { +type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 struct { // Lower bound for percentile estimate Lower float64 `json:"lower"` // Upper bound for percentile estimate - Upper float64 `json:"upper"` - JSON operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95JSON `json:"-"` + Upper float64 `json:"upper"` + JSON apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95JSON `json:"-"` } -// operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95JSON +// apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95JSON // contains the JSON metadata for the struct -// [OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95] -type operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95JSON struct { +// [APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95] +type apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95JSON struct { Lower apijson.Field Upper apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95) UnmarshalJSON(data []byte) (err error) { +func (r *APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95JSON) RawJSON() string { +func (r apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95JSON) RawJSON() string { return r.raw } // Upper and lower bound for percentile estimate -type OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99 struct { +type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99 struct { // Lower bound for percentile estimate Lower float64 `json:"lower"` // Upper bound for percentile estimate - Upper float64 `json:"upper"` - JSON operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99JSON `json:"-"` + Upper float64 `json:"upper"` + JSON apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99JSON `json:"-"` } -// operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99JSON +// apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99JSON // contains the JSON metadata for the struct -// [OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99] -type operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99JSON struct { +// [APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99] +type apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99JSON struct { Lower apijson.Field Upper apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99) UnmarshalJSON(data []byte) (err error) { +func (r *APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r operationNewResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99JSON) RawJSON() string { +func (r apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99JSON) RawJSON() string { return r.raw } -type OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfo struct { - SchemaInfo OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo `json:"schema_info"` - JSON operationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoJSON `json:"-"` +type APIShieldFeaturesAPIShieldOperationFeatureSchemaInfo struct { + SchemaInfo APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo `json:"schema_info"` + JSON apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoJSON `json:"-"` } -// operationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoJSON contains the -// JSON metadata for the struct -// [OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfo] -type operationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoJSON struct { +// apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoJSON contains the JSON +// metadata for the struct [APIShieldFeaturesAPIShieldOperationFeatureSchemaInfo] +type apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoJSON struct { SchemaInfo apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfo) UnmarshalJSON(data []byte) (err error) { +func (r *APIShieldFeaturesAPIShieldOperationFeatureSchemaInfo) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r operationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoJSON) RawJSON() string { +func (r apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoJSON) RawJSON() string { return r.raw } -func (r OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfo) implementsAPIGatewayOperationNewResponseFeatures() { +func (r APIShieldFeaturesAPIShieldOperationFeatureSchemaInfo) implementsAPIGatewayAPIShieldFeatures() { } -type OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo struct { +type APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo struct { // Schema active on endpoint. - ActiveSchema OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema `json:"active_schema"` + ActiveSchema APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema `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 OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction `json:"mitigation_action,nullable"` - JSON operationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoJSON `json:"-"` + MitigationAction APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction `json:"mitigation_action,nullable"` + JSON apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoJSON `json:"-"` } -// operationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoJSON -// contains the JSON metadata for the struct -// [OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo] -type operationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoJSON struct { +// apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoJSON contains the +// JSON metadata for the struct +// [APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo] +type apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoJSON struct { ActiveSchema apijson.Field LearnedAvailable apijson.Field MitigationAction apijson.Field @@ -798,30 +723,30 @@ type operationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoJS ExtraFields map[string]apijson.Field } -func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo) UnmarshalJSON(data []byte) (err error) { +func (r *APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r operationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoJSON) RawJSON() string { +func (r apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoJSON) RawJSON() string { return r.raw } // Schema active on endpoint. -type OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema struct { +type APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema 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 operationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchemaJSON `json:"-"` + Name string `json:"name"` + JSON apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchemaJSON `json:"-"` } -// operationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchemaJSON +// apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchemaJSON // contains the JSON metadata for the struct -// [OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema] -type operationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchemaJSON struct { +// [APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema] +type apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchemaJSON struct { ID apijson.Field CreatedAt apijson.Field IsLearned apijson.Field @@ -830,26 +755,26 @@ type operationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoAc ExtraFields map[string]apijson.Field } -func (r *OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema) UnmarshalJSON(data []byte) (err error) { +func (r *APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r operationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchemaJSON) RawJSON() string { +func (r apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchemaJSON) RawJSON() string { return r.raw } // Action taken on requests failing validation. -type OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction string +type APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction string const ( - OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionNone OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "none" - OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionLog OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "log" - OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionBlock OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "block" + APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionNone APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "none" + APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionLog APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "log" + APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionBlock APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "block" ) -func (r OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction) IsKnown() bool { +func (r APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction) IsKnown() bool { switch r { - case OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionNone, OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionLog, OperationNewResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionBlock: + case APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionNone, APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionLog, APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionBlock: return true } return false @@ -2229,18 +2154,57 @@ func (r OperationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInf type OperationNewParams struct { // Identifier - ZoneID param.Field[string] `path:"zone_id,required"` - Body []APIShieldOperationParam `json:"body,required"` + ZoneID param.Field[string] `path:"zone_id,required"` + Body []OperationNewParamsBody `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 []OperationNewResponse `json:"result,required"` + Errors Message `json:"errors,required"` + Messages Message `json:"messages,required"` + Result []APIShield `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 bfbb7f32443..5a4fe9d2b17 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.APIShieldOperationParam{{ + Body: []api_gateway.OperationNewParamsBody{{ Endpoint: cloudflare.F("/api/v1/users/{var1}"), Host: cloudflare.F("www.example.com"), - Method: cloudflare.F(api_gateway.APIShieldOperationMethodGet), + Method: cloudflare.F(api_gateway.OperationNewParamsBodyMethodGet), }}, }) if err != nil { diff --git a/api_gateway/userschemaoperation.go b/api_gateway/userschemaoperation.go index 5ff07e0a249..cbcabd44b49 100644 --- a/api_gateway/userschemaoperation.go +++ b/api_gateway/userschemaoperation.go @@ -82,8 +82,7 @@ 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 - // [UserSchemaOperationListResponseAPIShieldOperationFeatures]. + // This field can have the runtime type of [APIShieldFeatures]. Features interface{} `json:"features"` LastUpdated time.Time `json:"last_updated" format:"date-time"` // UUID @@ -121,16 +120,14 @@ 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.UserSchemaOperationListResponseAPIShieldOperation], -// [api_gateway.APIShieldOperation]. +// Possible runtime types of the union are [api_gateway.APIShield], +// [api_gateway.UserSchemaOperationListResponseAPIShieldBasicOperation]. func (r UserSchemaOperationListResponse) AsUnion() UserSchemaOperationListResponseUnion { return r.union } -// Union satisfied by -// [api_gateway.UserSchemaOperationListResponseAPIShieldOperation] or -// [api_gateway.APIShieldOperation]. +// Union satisfied by [api_gateway.APIShield] or +// [api_gateway.UserSchemaOperationListResponseAPIShieldBasicOperation]. type UserSchemaOperationListResponseUnion interface { implementsAPIGatewayUserSchemaOperationListResponse() } @@ -141,660 +138,67 @@ func init() { "", apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(UserSchemaOperationListResponseAPIShieldOperation{}), + Type: reflect.TypeOf(APIShield{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(APIShieldOperation{}), + Type: reflect.TypeOf(UserSchemaOperationListResponseAPIShieldBasicOperation{}), }, ) } -type UserSchemaOperationListResponseAPIShieldOperation struct { +type UserSchemaOperationListResponseAPIShieldBasicOperation 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"` - LastUpdated time.Time `json:"last_updated,required" format:"date-time"` + Host string `json:"host,required" format:"hostname"` // The HTTP method used to access the endpoint. - Method UserSchemaOperationListResponseAPIShieldOperationMethod `json:"method,required"` - // UUID - OperationID string `json:"operation_id,required"` - Features UserSchemaOperationListResponseAPIShieldOperationFeatures `json:"features"` - JSON userSchemaOperationListResponseAPIShieldOperationJSON `json:"-"` + Method UserSchemaOperationListResponseAPIShieldBasicOperationMethod `json:"method,required"` + JSON userSchemaOperationListResponseAPIShieldBasicOperationJSON `json:"-"` } -// userSchemaOperationListResponseAPIShieldOperationJSON contains the JSON metadata -// for the struct [UserSchemaOperationListResponseAPIShieldOperation] -type userSchemaOperationListResponseAPIShieldOperationJSON struct { +// userSchemaOperationListResponseAPIShieldBasicOperationJSON contains the JSON +// metadata for the struct [UserSchemaOperationListResponseAPIShieldBasicOperation] +type userSchemaOperationListResponseAPIShieldBasicOperationJSON 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 *UserSchemaOperationListResponseAPIShieldOperation) UnmarshalJSON(data []byte) (err error) { +func (r *UserSchemaOperationListResponseAPIShieldBasicOperation) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r userSchemaOperationListResponseAPIShieldOperationJSON) RawJSON() string { +func (r userSchemaOperationListResponseAPIShieldBasicOperationJSON) RawJSON() string { return r.raw } -func (r UserSchemaOperationListResponseAPIShieldOperation) implementsAPIGatewayUserSchemaOperationListResponse() { +func (r UserSchemaOperationListResponseAPIShieldBasicOperation) implementsAPIGatewayUserSchemaOperationListResponse() { } // The HTTP method used to access the endpoint. -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 +type UserSchemaOperationListResponseAPIShieldBasicOperationMethod string const ( - UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionNone UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "none" - UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionLog UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "log" - UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionBlock UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "block" + 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" ) -func (r UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction) IsKnown() bool { +func (r UserSchemaOperationListResponseAPIShieldBasicOperationMethod) IsKnown() bool { switch r { - case UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionNone, UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionLog, UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionBlock: + case UserSchemaOperationListResponseAPIShieldBasicOperationMethodGet, UserSchemaOperationListResponseAPIShieldBasicOperationMethodPost, UserSchemaOperationListResponseAPIShieldBasicOperationMethodHead, UserSchemaOperationListResponseAPIShieldBasicOperationMethodOptions, UserSchemaOperationListResponseAPIShieldBasicOperationMethodPut, UserSchemaOperationListResponseAPIShieldBasicOperationMethodDelete, UserSchemaOperationListResponseAPIShieldBasicOperationMethodConnect, UserSchemaOperationListResponseAPIShieldBasicOperationMethodPatch, UserSchemaOperationListResponseAPIShieldBasicOperationMethodTrace: return true } return false