From a9a45c4aab9082ac49164c3d548950f79a40092f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 17 Dec 2023 00:22:14 -0800 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#2309) --- gkehub/v1alpha/gkehub-api.json | 5 +- gkehub/v1alpha/gkehub-gen.go | 3 +- networkservices/v1/networkservices-api.json | 88 +++++++++- networkservices/v1/networkservices-gen.go | 154 ++++++++++++++++-- .../v1beta1/networkservices-api.json | 88 +++++++++- .../v1beta1/networkservices-gen.go | 154 ++++++++++++++++-- 6 files changed, 463 insertions(+), 29 deletions(-) diff --git a/gkehub/v1alpha/gkehub-api.json b/gkehub/v1alpha/gkehub-api.json index 08089a5901e..5993774cb73 100644 --- a/gkehub/v1alpha/gkehub-api.json +++ b/gkehub/v1alpha/gkehub-api.json @@ -2098,7 +2098,7 @@ } } }, - "revision": "20231201", + "revision": "20231206", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -5632,7 +5632,8 @@ "type": "string" }, "podAntiAffinity": { - "description": "Pod anti-affinity enablement.", + "deprecated": true, + "description": "Pod anti-affinity enablement. Deprecated: use `pod_affinity` instead.", "type": "boolean" }, "podTolerations": { diff --git a/gkehub/v1alpha/gkehub-gen.go b/gkehub/v1alpha/gkehub-gen.go index cf53776378b..9cbfcf803d9 100644 --- a/gkehub/v1alpha/gkehub-gen.go +++ b/gkehub/v1alpha/gkehub-gen.go @@ -6096,7 +6096,8 @@ type PolicyControllerPolicyControllerDeploymentConfig struct { // this deployment. Default for admissions deployment. PodAffinity string `json:"podAffinity,omitempty"` - // PodAntiAffinity: Pod anti-affinity enablement. + // PodAntiAffinity: Pod anti-affinity enablement. Deprecated: use + // `pod_affinity` instead. PodAntiAffinity bool `json:"podAntiAffinity,omitempty"` // PodTolerations: Pod tolerations of node taints. diff --git a/networkservices/v1/networkservices-api.json b/networkservices/v1/networkservices-api.json index e21600e7fb0..02194b008ce 100644 --- a/networkservices/v1/networkservices-api.json +++ b/networkservices/v1/networkservices-api.json @@ -2148,7 +2148,7 @@ } } }, - "revision": "20231129", + "revision": "20231211", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -2406,6 +2406,20 @@ "description": "Optional. A free-text description of the resource. Max length 1024 characters.", "type": "string" }, + "envoyHeaders": { + "description": "Optional. Determines if envoy will insert internal debug headers into upstream requests. Other Envoy headers may still be injected. By default, envoy will not insert any debug headers.", + "enum": [ + "ENVOY_HEADERS_UNSPECIFIED", + "NONE", + "DEBUG_HEADERS" + ], + "enumDescriptions": [ + "Defaults to NONE.", + "Suppress envoy debug headers.", + "Envoy will insert default internal debug headers into upstream requests: x-envoy-attempt-count x-envoy-is-timeout-retry x-envoy-expected-rq-timeout-ms x-envoy-original-path x-envoy-upstream-stream-duration-ms" + ], + "type": "string" + }, "gatewaySecurityPolicy": { "description": "Optional. A fully-qualified GatewaySecurityPolicy URL reference. Defines how a server should apply security policy to inbound (VM to Proxy) initiated connections. For example: `projects/*/locations/*/gatewaySecurityPolicies/swg-policy`. This policy is specific to gateways of type 'SECURE_WEB_GATEWAY'.", "type": "string" @@ -2715,6 +2729,11 @@ "$ref": "GrpcRouteFaultInjectionPolicy", "description": "Optional. The specification for fault injection introduced into traffic to test the resiliency of clients to destination service failure. As part of fault injection, when clients send requests to a destination, delays can be introduced on a percentage of requests before sending those requests to the destination service. Similarly requests from clients can be aborted by for a percentage of requests. timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy" }, + "idleTimeout": { + "description": "Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 1 hour. If set to 0s, the timeout will be disabled.", + "format": "google-duration", + "type": "string" + }, "retryPolicy": { "$ref": "GrpcRouteRetryPolicy", "description": "Optional. Specifies the retry policy associated with this route." @@ -2904,6 +2923,14 @@ "description": "Specifications of a destination to which the request should be routed to.", "id": "HttpRouteDestination", "properties": { + "requestHeaderModifier": { + "$ref": "HttpRouteHeaderModifier", + "description": "Optional. The specification for modifying the headers of a matching request prior to delivery of the request to the destination. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration." + }, + "responseHeaderModifier": { + "$ref": "HttpRouteHeaderModifier", + "description": "Optional. The specification for modifying the headers of a response prior to sending the response back to the client. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration." + }, "serviceName": { "description": "The URL of a BackendService to route traffic to.", "type": "string" @@ -3049,6 +3076,27 @@ }, "type": "object" }, + "HttpRouteHttpDirectResponse": { + "description": "Static HTTP response object to be returned.", + "id": "HttpRouteHttpDirectResponse", + "properties": { + "bytesBody": { + "description": "Optional. Response body as bytes. Maximum body size is 4096B.", + "format": "byte", + "type": "string" + }, + "status": { + "description": "Required. Status to return as part of HTTP Response. Must be a positive integer.", + "format": "int32", + "type": "integer" + }, + "stringBody": { + "description": "Optional. Response body as a string. Maximum body length is 1024 characters.", + "type": "string" + } + }, + "type": "object" + }, "HttpRouteQueryParameterMatch": { "description": "Specifications to match a query parameter in the request.", "id": "HttpRouteQueryParameterMatch", @@ -3131,6 +3179,11 @@ "destination": { "$ref": "HttpRouteDestination", "description": "The destination the requests will be mirrored to. The weight of the destination will be ignored." + }, + "mirrorPercent": { + "description": "Optional. The percentage of requests to get mirrored to the desired destination.", + "format": "float", + "type": "number" } }, "type": "object" @@ -3174,10 +3227,19 @@ }, "type": "array" }, + "directResponse": { + "$ref": "HttpRouteHttpDirectResponse", + "description": "Optional. Static HTTP Response object to be returned regardless of the request." + }, "faultInjectionPolicy": { "$ref": "HttpRouteFaultInjectionPolicy", "description": "The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced on a percentage of requests before sending those requests to the backend service. Similarly requests from clients can be aborted for a percentage of requests. timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy" }, + "idleTimeout": { + "description": "Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 1 hour. If set to 0s, the timeout will be disabled.", + "format": "google-duration", + "type": "string" + }, "redirect": { "$ref": "HttpRouteRedirect", "description": "If set, the request is directed as configured by this field." @@ -3531,6 +3593,20 @@ "description": "Optional. A free-text description of the resource. Max length 1024 characters.", "type": "string" }, + "envoyHeaders": { + "description": "Optional. Determines if envoy will insert internal debug headers into upstream requests. Other Envoy headers may still be injected. By default, envoy will not insert any debug headers.", + "enum": [ + "ENVOY_HEADERS_UNSPECIFIED", + "NONE", + "DEBUG_HEADERS" + ], + "enumDescriptions": [ + "Defaults to NONE.", + "Suppress envoy debug headers.", + "Envoy will insert default internal debug headers into upstream requests: x-envoy-attempt-count x-envoy-is-timeout-retry x-envoy-expected-rq-timeout-ms x-envoy-original-path x-envoy-upstream-stream-duration-ms" + ], + "type": "string" + }, "interceptionPort": { "description": "Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to listen on the specified port of localhost (127.0.0.1) address. The SIDECAR proxy will expect all traffic to be redirected to this port regardless of its actual ip:port destination. If unset, a port '15001' is used as the interception port. This is applicable only for sidecar proxy deployments.", "format": "int32", @@ -3828,6 +3904,11 @@ }, "type": "array" }, + "idleTimeout": { + "description": "Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 30 seconds. If set to 0s, the timeout will be disabled.", + "format": "google-duration", + "type": "string" + }, "originalDestination": { "description": "Optional. If true, Router will use the destination IP and port of the original connection as the destination of the request. Default is false. Only one of route destinations or original destination can be set.", "type": "boolean" @@ -3982,6 +4063,11 @@ "$ref": "TlsRouteRouteDestination" }, "type": "array" + }, + "idleTimeout": { + "description": "Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 1 hour. If set to 0s, the timeout will be disabled.", + "format": "google-duration", + "type": "string" } }, "type": "object" diff --git a/networkservices/v1/networkservices-gen.go b/networkservices/v1/networkservices-gen.go index 6429d6ced98..2db46a9080b 100644 --- a/networkservices/v1/networkservices-gen.go +++ b/networkservices/v1/networkservices-gen.go @@ -814,6 +814,19 @@ type Gateway struct { // length 1024 characters. Description string `json:"description,omitempty"` + // EnvoyHeaders: Optional. Determines if envoy will insert internal + // debug headers into upstream requests. Other Envoy headers may still + // be injected. By default, envoy will not insert any debug headers. + // + // Possible values: + // "ENVOY_HEADERS_UNSPECIFIED" - Defaults to NONE. + // "NONE" - Suppress envoy debug headers. + // "DEBUG_HEADERS" - Envoy will insert default internal debug headers + // into upstream requests: x-envoy-attempt-count + // x-envoy-is-timeout-retry x-envoy-expected-rq-timeout-ms + // x-envoy-original-path x-envoy-upstream-stream-duration-ms + EnvoyHeaders string `json:"envoyHeaders,omitempty"` + // GatewaySecurityPolicy: Optional. A fully-qualified // GatewaySecurityPolicy URL reference. Defines how a server should // apply security policy to inbound (VM to Proxy) initiated connections. @@ -1308,6 +1321,13 @@ type GrpcRouteRouteAction struct { // ignored by clients that are configured with a fault_injection_policy FaultInjectionPolicy *GrpcRouteFaultInjectionPolicy `json:"faultInjectionPolicy,omitempty"` + // IdleTimeout: Optional. Specifies the idle timeout for the selected + // route. The idle timeout is defined as the period in which there are + // no bytes sent or received on either the upstream or downstream + // connection. If not set, the default idle timeout is 1 hour. If set to + // 0s, the timeout will be disabled. + IdleTimeout string `json:"idleTimeout,omitempty"` + // RetryPolicy: Optional. Specifies the retry policy associated with // this route. RetryPolicy *GrpcRouteRetryPolicy `json:"retryPolicy,omitempty"` @@ -1608,6 +1628,20 @@ func (s *HttpRouteCorsPolicy) MarshalJSON() ([]byte, error) { // HttpRouteDestination: Specifications of a destination to which the // request should be routed to. type HttpRouteDestination struct { + // RequestHeaderModifier: Optional. The specification for modifying the + // headers of a matching request prior to delivery of the request to the + // destination. If HeaderModifiers are set on both the Destination and + // the RouteAction, they will be merged. Conflicts between the two will + // not be resolved on the configuration. + RequestHeaderModifier *HttpRouteHeaderModifier `json:"requestHeaderModifier,omitempty"` + + // ResponseHeaderModifier: Optional. The specification for modifying the + // headers of a response prior to sending the response back to the + // client. If HeaderModifiers are set on both the Destination and the + // RouteAction, they will be merged. Conflicts between the two will not + // be resolved on the configuration. + ResponseHeaderModifier *HttpRouteHeaderModifier `json:"responseHeaderModifier,omitempty"` + // ServiceName: The URL of a BackendService to route traffic to. ServiceName string `json:"serviceName,omitempty"` @@ -1623,20 +1657,22 @@ type HttpRouteDestination struct { // distributed in equal proportions to all of them. Weight int64 `json:"weight,omitempty"` - // ForceSendFields is a list of field names (e.g. "ServiceName") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "RequestHeaderModifier") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ServiceName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "RequestHeaderModifier") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -1879,6 +1915,44 @@ func (s *HttpRouteHeaderModifier) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// HttpRouteHttpDirectResponse: Static HTTP response object to be +// returned. +type HttpRouteHttpDirectResponse struct { + // BytesBody: Optional. Response body as bytes. Maximum body size is + // 4096B. + BytesBody string `json:"bytesBody,omitempty"` + + // Status: Required. Status to return as part of HTTP Response. Must be + // a positive integer. + Status int64 `json:"status,omitempty"` + + // StringBody: Optional. Response body as a string. Maximum body length + // is 1024 characters. + StringBody string `json:"stringBody,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BytesBody") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BytesBody") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpRouteHttpDirectResponse) MarshalJSON() ([]byte, error) { + type NoMethod HttpRouteHttpDirectResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // HttpRouteQueryParameterMatch: Specifications to match a query // parameter in the request. type HttpRouteQueryParameterMatch struct { @@ -2005,6 +2079,10 @@ type HttpRouteRequestMirrorPolicy struct { // weight of the destination will be ignored. Destination *HttpRouteDestination `json:"destination,omitempty"` + // MirrorPercent: Optional. The percentage of requests to get mirrored + // to the desired destination. + MirrorPercent float64 `json:"mirrorPercent,omitempty"` + // ForceSendFields is a list of field names (e.g. "Destination") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2028,6 +2106,20 @@ func (s *HttpRouteRequestMirrorPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +func (s *HttpRouteRequestMirrorPolicy) UnmarshalJSON(data []byte) error { + type NoMethod HttpRouteRequestMirrorPolicy + var s1 struct { + MirrorPercent gensupport.JSONFloat64 `json:"mirrorPercent"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.MirrorPercent = float64(s1.MirrorPercent) + return nil +} + // HttpRouteRetryPolicy: The specifications for retries. type HttpRouteRetryPolicy struct { // NumRetries: Specifies the allowed number of retries. This number must @@ -2086,6 +2178,10 @@ type HttpRouteRouteAction struct { // Destinations: The destination to which traffic should be forwarded. Destinations []*HttpRouteDestination `json:"destinations,omitempty"` + // DirectResponse: Optional. Static HTTP Response object to be returned + // regardless of the request. + DirectResponse *HttpRouteHttpDirectResponse `json:"directResponse,omitempty"` + // FaultInjectionPolicy: The specification for fault injection // introduced into traffic to test the resiliency of clients to backend // service failure. As part of fault injection, when clients send @@ -2096,6 +2192,13 @@ type HttpRouteRouteAction struct { // clients that are configured with a fault_injection_policy FaultInjectionPolicy *HttpRouteFaultInjectionPolicy `json:"faultInjectionPolicy,omitempty"` + // IdleTimeout: Optional. Specifies the idle timeout for the selected + // route. The idle timeout is defined as the period in which there are + // no bytes sent or received on either the upstream or downstream + // connection. If not set, the default idle timeout is 1 hour. If set to + // 0s, the timeout will be disabled. + IdleTimeout string `json:"idleTimeout,omitempty"` + // Redirect: If set, the request is directed as configured by this // field. Redirect *HttpRouteRedirect `json:"redirect,omitempty"` @@ -2776,6 +2879,19 @@ type Mesh struct { // length 1024 characters. Description string `json:"description,omitempty"` + // EnvoyHeaders: Optional. Determines if envoy will insert internal + // debug headers into upstream requests. Other Envoy headers may still + // be injected. By default, envoy will not insert any debug headers. + // + // Possible values: + // "ENVOY_HEADERS_UNSPECIFIED" - Defaults to NONE. + // "NONE" - Suppress envoy debug headers. + // "DEBUG_HEADERS" - Envoy will insert default internal debug headers + // into upstream requests: x-envoy-attempt-count + // x-envoy-is-timeout-retry x-envoy-expected-rq-timeout-ms + // x-envoy-original-path x-envoy-upstream-stream-duration-ms + EnvoyHeaders string `json:"envoyHeaders,omitempty"` + // InterceptionPort: Optional. If set to a valid TCP port (1-65535), // instructs the SIDECAR proxy to listen on the specified port of // localhost (127.0.0.1) address. The SIDECAR proxy will expect all @@ -3268,6 +3384,13 @@ type TcpRouteRouteAction struct { // Only one of route destination or original destination can be set. Destinations []*TcpRouteRouteDestination `json:"destinations,omitempty"` + // IdleTimeout: Optional. Specifies the idle timeout for the selected + // route. The idle timeout is defined as the period in which there are + // no bytes sent or received on either the upstream or downstream + // connection. If not set, the default idle timeout is 30 seconds. If + // set to 0s, the timeout will be disabled. + IdleTimeout string `json:"idleTimeout,omitempty"` + // OriginalDestination: Optional. If true, Router will use the // destination IP and port of the original connection as the destination // of the request. Default is false. Only one of route destinations or @@ -3557,6 +3680,13 @@ type TlsRouteRouteAction struct { // should be forwarded. At least one destination service is required. Destinations []*TlsRouteRouteDestination `json:"destinations,omitempty"` + // IdleTimeout: Optional. Specifies the idle timeout for the selected + // route. The idle timeout is defined as the period in which there are + // no bytes sent or received on either the upstream or downstream + // connection. If not set, the default idle timeout is 1 hour. If set to + // 0s, the timeout will be disabled. + IdleTimeout string `json:"idleTimeout,omitempty"` + // ForceSendFields is a list of field names (e.g. "Destinations") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any diff --git a/networkservices/v1beta1/networkservices-api.json b/networkservices/v1beta1/networkservices-api.json index e7e3d8da9ad..e785bf7ea2d 100644 --- a/networkservices/v1beta1/networkservices-api.json +++ b/networkservices/v1beta1/networkservices-api.json @@ -2483,7 +2483,7 @@ } } }, - "revision": "20231129", + "revision": "20231211", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -2787,6 +2787,20 @@ "description": "Optional. A free-text description of the resource. Max length 1024 characters.", "type": "string" }, + "envoyHeaders": { + "description": "Optional. Determines if envoy will insert internal debug headers into upstream requests. Other Envoy headers may still be injected. By default, envoy will not insert any debug headers.", + "enum": [ + "ENVOY_HEADERS_UNSPECIFIED", + "NONE", + "DEBUG_HEADERS" + ], + "enumDescriptions": [ + "Defaults to NONE.", + "Suppress envoy debug headers.", + "Envoy will insert default internal debug headers into upstream requests: x-envoy-attempt-count x-envoy-is-timeout-retry x-envoy-expected-rq-timeout-ms x-envoy-original-path x-envoy-upstream-stream-duration-ms" + ], + "type": "string" + }, "gatewaySecurityPolicy": { "description": "Optional. A fully-qualified GatewaySecurityPolicy URL reference. Defines how a server should apply security policy to inbound (VM to Proxy) initiated connections. For example: `projects/*/locations/*/gatewaySecurityPolicies/swg-policy`. This policy is specific to gateways of type 'SECURE_WEB_GATEWAY'.", "type": "string" @@ -3096,6 +3110,11 @@ "$ref": "GrpcRouteFaultInjectionPolicy", "description": "Optional. The specification for fault injection introduced into traffic to test the resiliency of clients to destination service failure. As part of fault injection, when clients send requests to a destination, delays can be introduced on a percentage of requests before sending those requests to the destination service. Similarly requests from clients can be aborted by for a percentage of requests. timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy" }, + "idleTimeout": { + "description": "Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 1 hour. If set to 0s, the timeout will be disabled.", + "format": "google-duration", + "type": "string" + }, "retryPolicy": { "$ref": "GrpcRouteRetryPolicy", "description": "Optional. Specifies the retry policy associated with this route." @@ -3285,6 +3304,14 @@ "description": "Specifications of a destination to which the request should be routed to.", "id": "HttpRouteDestination", "properties": { + "requestHeaderModifier": { + "$ref": "HttpRouteHeaderModifier", + "description": "Optional. The specification for modifying the headers of a matching request prior to delivery of the request to the destination. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration." + }, + "responseHeaderModifier": { + "$ref": "HttpRouteHeaderModifier", + "description": "Optional. The specification for modifying the headers of a response prior to sending the response back to the client. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration." + }, "serviceName": { "description": "The URL of a BackendService to route traffic to.", "type": "string" @@ -3430,6 +3457,27 @@ }, "type": "object" }, + "HttpRouteHttpDirectResponse": { + "description": "Static HTTP response object to be returned.", + "id": "HttpRouteHttpDirectResponse", + "properties": { + "bytesBody": { + "description": "Optional. Response body as bytes. Maximum body size is 4096B.", + "format": "byte", + "type": "string" + }, + "status": { + "description": "Required. Status to return as part of HTTP Response. Must be a positive integer.", + "format": "int32", + "type": "integer" + }, + "stringBody": { + "description": "Optional. Response body as a string. Maximum body length is 1024 characters.", + "type": "string" + } + }, + "type": "object" + }, "HttpRouteQueryParameterMatch": { "description": "Specifications to match a query parameter in the request.", "id": "HttpRouteQueryParameterMatch", @@ -3512,6 +3560,11 @@ "destination": { "$ref": "HttpRouteDestination", "description": "The destination the requests will be mirrored to. The weight of the destination will be ignored." + }, + "mirrorPercent": { + "description": "Optional. The percentage of requests to get mirrored to the desired destination.", + "format": "float", + "type": "number" } }, "type": "object" @@ -3555,10 +3608,19 @@ }, "type": "array" }, + "directResponse": { + "$ref": "HttpRouteHttpDirectResponse", + "description": "Optional. Static HTTP Response object to be returned regardless of the request." + }, "faultInjectionPolicy": { "$ref": "HttpRouteFaultInjectionPolicy", "description": "The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced on a percentage of requests before sending those requests to the backend service. Similarly requests from clients can be aborted for a percentage of requests. timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy" }, + "idleTimeout": { + "description": "Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 1 hour. If set to 0s, the timeout will be disabled.", + "format": "google-duration", + "type": "string" + }, "redirect": { "$ref": "HttpRouteRedirect", "description": "If set, the request is directed as configured by this field." @@ -4104,6 +4166,20 @@ "description": "Optional. A free-text description of the resource. Max length 1024 characters.", "type": "string" }, + "envoyHeaders": { + "description": "Optional. Determines if envoy will insert internal debug headers into upstream requests. Other Envoy headers may still be injected. By default, envoy will not insert any debug headers.", + "enum": [ + "ENVOY_HEADERS_UNSPECIFIED", + "NONE", + "DEBUG_HEADERS" + ], + "enumDescriptions": [ + "Defaults to NONE.", + "Suppress envoy debug headers.", + "Envoy will insert default internal debug headers into upstream requests: x-envoy-attempt-count x-envoy-is-timeout-retry x-envoy-expected-rq-timeout-ms x-envoy-original-path x-envoy-upstream-stream-duration-ms" + ], + "type": "string" + }, "interceptionPort": { "description": "Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to listen on the specified port of localhost (127.0.0.1) address. The SIDECAR proxy will expect all traffic to be redirected to this port regardless of its actual ip:port destination. If unset, a port '15001' is used as the interception port. This is applicable only for sidecar proxy deployments.", "format": "int32", @@ -4527,6 +4603,11 @@ }, "type": "array" }, + "idleTimeout": { + "description": "Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 30 seconds. If set to 0s, the timeout will be disabled.", + "format": "google-duration", + "type": "string" + }, "originalDestination": { "description": "Optional. If true, Router will use the destination IP and port of the original connection as the destination of the request. Default is false. Only one of route destinations or original destination can be set.", "type": "boolean" @@ -4681,6 +4762,11 @@ "$ref": "TlsRouteRouteDestination" }, "type": "array" + }, + "idleTimeout": { + "description": "Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 1 hour. If set to 0s, the timeout will be disabled.", + "format": "google-duration", + "type": "string" } }, "type": "object" diff --git a/networkservices/v1beta1/networkservices-gen.go b/networkservices/v1beta1/networkservices-gen.go index 6ab68f45953..0f5c7629e13 100644 --- a/networkservices/v1beta1/networkservices-gen.go +++ b/networkservices/v1beta1/networkservices-gen.go @@ -886,6 +886,19 @@ type Gateway struct { // length 1024 characters. Description string `json:"description,omitempty"` + // EnvoyHeaders: Optional. Determines if envoy will insert internal + // debug headers into upstream requests. Other Envoy headers may still + // be injected. By default, envoy will not insert any debug headers. + // + // Possible values: + // "ENVOY_HEADERS_UNSPECIFIED" - Defaults to NONE. + // "NONE" - Suppress envoy debug headers. + // "DEBUG_HEADERS" - Envoy will insert default internal debug headers + // into upstream requests: x-envoy-attempt-count + // x-envoy-is-timeout-retry x-envoy-expected-rq-timeout-ms + // x-envoy-original-path x-envoy-upstream-stream-duration-ms + EnvoyHeaders string `json:"envoyHeaders,omitempty"` + // GatewaySecurityPolicy: Optional. A fully-qualified // GatewaySecurityPolicy URL reference. Defines how a server should // apply security policy to inbound (VM to Proxy) initiated connections. @@ -1380,6 +1393,13 @@ type GrpcRouteRouteAction struct { // ignored by clients that are configured with a fault_injection_policy FaultInjectionPolicy *GrpcRouteFaultInjectionPolicy `json:"faultInjectionPolicy,omitempty"` + // IdleTimeout: Optional. Specifies the idle timeout for the selected + // route. The idle timeout is defined as the period in which there are + // no bytes sent or received on either the upstream or downstream + // connection. If not set, the default idle timeout is 1 hour. If set to + // 0s, the timeout will be disabled. + IdleTimeout string `json:"idleTimeout,omitempty"` + // RetryPolicy: Optional. Specifies the retry policy associated with // this route. RetryPolicy *GrpcRouteRetryPolicy `json:"retryPolicy,omitempty"` @@ -1680,6 +1700,20 @@ func (s *HttpRouteCorsPolicy) MarshalJSON() ([]byte, error) { // HttpRouteDestination: Specifications of a destination to which the // request should be routed to. type HttpRouteDestination struct { + // RequestHeaderModifier: Optional. The specification for modifying the + // headers of a matching request prior to delivery of the request to the + // destination. If HeaderModifiers are set on both the Destination and + // the RouteAction, they will be merged. Conflicts between the two will + // not be resolved on the configuration. + RequestHeaderModifier *HttpRouteHeaderModifier `json:"requestHeaderModifier,omitempty"` + + // ResponseHeaderModifier: Optional. The specification for modifying the + // headers of a response prior to sending the response back to the + // client. If HeaderModifiers are set on both the Destination and the + // RouteAction, they will be merged. Conflicts between the two will not + // be resolved on the configuration. + ResponseHeaderModifier *HttpRouteHeaderModifier `json:"responseHeaderModifier,omitempty"` + // ServiceName: The URL of a BackendService to route traffic to. ServiceName string `json:"serviceName,omitempty"` @@ -1695,20 +1729,22 @@ type HttpRouteDestination struct { // distributed in equal proportions to all of them. Weight int64 `json:"weight,omitempty"` - // ForceSendFields is a list of field names (e.g. "ServiceName") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "RequestHeaderModifier") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ServiceName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "RequestHeaderModifier") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -1951,6 +1987,44 @@ func (s *HttpRouteHeaderModifier) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// HttpRouteHttpDirectResponse: Static HTTP response object to be +// returned. +type HttpRouteHttpDirectResponse struct { + // BytesBody: Optional. Response body as bytes. Maximum body size is + // 4096B. + BytesBody string `json:"bytesBody,omitempty"` + + // Status: Required. Status to return as part of HTTP Response. Must be + // a positive integer. + Status int64 `json:"status,omitempty"` + + // StringBody: Optional. Response body as a string. Maximum body length + // is 1024 characters. + StringBody string `json:"stringBody,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BytesBody") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BytesBody") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpRouteHttpDirectResponse) MarshalJSON() ([]byte, error) { + type NoMethod HttpRouteHttpDirectResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // HttpRouteQueryParameterMatch: Specifications to match a query // parameter in the request. type HttpRouteQueryParameterMatch struct { @@ -2077,6 +2151,10 @@ type HttpRouteRequestMirrorPolicy struct { // weight of the destination will be ignored. Destination *HttpRouteDestination `json:"destination,omitempty"` + // MirrorPercent: Optional. The percentage of requests to get mirrored + // to the desired destination. + MirrorPercent float64 `json:"mirrorPercent,omitempty"` + // ForceSendFields is a list of field names (e.g. "Destination") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2100,6 +2178,20 @@ func (s *HttpRouteRequestMirrorPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +func (s *HttpRouteRequestMirrorPolicy) UnmarshalJSON(data []byte) error { + type NoMethod HttpRouteRequestMirrorPolicy + var s1 struct { + MirrorPercent gensupport.JSONFloat64 `json:"mirrorPercent"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.MirrorPercent = float64(s1.MirrorPercent) + return nil +} + // HttpRouteRetryPolicy: The specifications for retries. type HttpRouteRetryPolicy struct { // NumRetries: Specifies the allowed number of retries. This number must @@ -2158,6 +2250,10 @@ type HttpRouteRouteAction struct { // Destinations: The destination to which traffic should be forwarded. Destinations []*HttpRouteDestination `json:"destinations,omitempty"` + // DirectResponse: Optional. Static HTTP Response object to be returned + // regardless of the request. + DirectResponse *HttpRouteHttpDirectResponse `json:"directResponse,omitempty"` + // FaultInjectionPolicy: The specification for fault injection // introduced into traffic to test the resiliency of clients to backend // service failure. As part of fault injection, when clients send @@ -2168,6 +2264,13 @@ type HttpRouteRouteAction struct { // clients that are configured with a fault_injection_policy FaultInjectionPolicy *HttpRouteFaultInjectionPolicy `json:"faultInjectionPolicy,omitempty"` + // IdleTimeout: Optional. Specifies the idle timeout for the selected + // route. The idle timeout is defined as the period in which there are + // no bytes sent or received on either the upstream or downstream + // connection. If not set, the default idle timeout is 1 hour. If set to + // 0s, the timeout will be disabled. + IdleTimeout string `json:"idleTimeout,omitempty"` + // Redirect: If set, the request is directed as configured by this // field. Redirect *HttpRouteRedirect `json:"redirect,omitempty"` @@ -3129,6 +3232,19 @@ type Mesh struct { // length 1024 characters. Description string `json:"description,omitempty"` + // EnvoyHeaders: Optional. Determines if envoy will insert internal + // debug headers into upstream requests. Other Envoy headers may still + // be injected. By default, envoy will not insert any debug headers. + // + // Possible values: + // "ENVOY_HEADERS_UNSPECIFIED" - Defaults to NONE. + // "NONE" - Suppress envoy debug headers. + // "DEBUG_HEADERS" - Envoy will insert default internal debug headers + // into upstream requests: x-envoy-attempt-count + // x-envoy-is-timeout-retry x-envoy-expected-rq-timeout-ms + // x-envoy-original-path x-envoy-upstream-stream-duration-ms + EnvoyHeaders string `json:"envoyHeaders,omitempty"` + // InterceptionPort: Optional. If set to a valid TCP port (1-65535), // instructs the SIDECAR proxy to listen on the specified port of // localhost (127.0.0.1) address. The SIDECAR proxy will expect all @@ -3865,6 +3981,13 @@ type TcpRouteRouteAction struct { // Only one of route destination or original destination can be set. Destinations []*TcpRouteRouteDestination `json:"destinations,omitempty"` + // IdleTimeout: Optional. Specifies the idle timeout for the selected + // route. The idle timeout is defined as the period in which there are + // no bytes sent or received on either the upstream or downstream + // connection. If not set, the default idle timeout is 30 seconds. If + // set to 0s, the timeout will be disabled. + IdleTimeout string `json:"idleTimeout,omitempty"` + // OriginalDestination: Optional. If true, Router will use the // destination IP and port of the original connection as the destination // of the request. Default is false. Only one of route destinations or @@ -4154,6 +4277,13 @@ type TlsRouteRouteAction struct { // should be forwarded. At least one destination service is required. Destinations []*TlsRouteRouteDestination `json:"destinations,omitempty"` + // IdleTimeout: Optional. Specifies the idle timeout for the selected + // route. The idle timeout is defined as the period in which there are + // no bytes sent or received on either the upstream or downstream + // connection. If not set, the default idle timeout is 1 hour. If set to + // 0s, the timeout will be disabled. + IdleTimeout string `json:"idleTimeout,omitempty"` + // ForceSendFields is a list of field names (e.g. "Destinations") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any