io.envoyproxy.envoy.api.v2.route.RouteAction.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of envoy-scala-control-plane_2.13 Show documentation
Show all versions of envoy-scala-control-plane_2.13 Show documentation
ScalaPB generated bindings for Envoy
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3
package io.envoyproxy.envoy.api.v2.route
/** [#next-free-field: 34]
*
* @param clusterNotFoundResponseCode
* The HTTP status code to use when configured cluster is not found.
* The default response code is 503 Service Unavailable.
* @param metadataMatch
* Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
* in the upstream cluster with metadata matching what's set in this field will be considered
* for load balancing. If using :ref:`weighted_clusters
* <envoy_api_field_route.RouteAction.weighted_clusters>`, metadata will be merged, with values
* provided there taking precedence. The filter name should be specified as *envoy.lb*.
* @param prefixRewrite
* Indicates that during forwarding, the matched prefix (or path) should be
* swapped with this value. This option allows application URLs to be rooted
* at a different path from those exposed at the reverse proxy layer. The router filter will
* place the original path before rewrite into the :ref:`x-envoy-original-path
* <config_http_filters_router_x-envoy-original-path>` header.
*
* Only one of *prefix_rewrite* or
* :ref:`regex_rewrite <envoy_api_field_route.RouteAction.regex_rewrite>`
* may be specified.
*
* .. attention::
*
* Pay careful attention to the use of trailing slashes in the
* :ref:`route's match <envoy_api_field_route.Route.match>` prefix value.
* Stripping a prefix from a path requires multiple Routes to handle all cases. For example,
* rewriting */prefix* to */* and */prefix/etc* to */etc* cannot be done in a single
* :ref:`Route <envoy_api_msg_route.Route>`, as shown by the below config entries:
*
* .. code-block:: yaml
*
* - match:
* prefix: "/prefix/"
* route:
* prefix_rewrite: "/"
* - match:
* prefix: "/prefix"
* route:
* prefix_rewrite: "/"
*
* Having above entries in the config, requests to */prefix* will be stripped to */*, while
* requests to */prefix/etc* will be stripped to */etc*.
* @param regexRewrite
* Indicates that during forwarding, portions of the path that match the
* pattern should be rewritten, even allowing the substitution of capture
* groups from the pattern into the new path as specified by the rewrite
* substitution string. This is useful to allow application paths to be
* rewritten in a way that is aware of segments with variable content like
* identifiers. The router filter will place the original path as it was
* before the rewrite into the :ref:`x-envoy-original-path
* <config_http_filters_router_x-envoy-original-path>` header.
*
* Only one of :ref:`prefix_rewrite <envoy_api_field_route.RouteAction.prefix_rewrite>`
* or *regex_rewrite* may be specified.
*
* Examples using Google's `RE2 <https://github.com/google/re2>`_ engine:
*
* * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution
* string of ``&92;2/instance/&92;1`` would transform ``/service/foo/v1/api``
* into ``/v1/api/instance/foo``.
*
* * The pattern ``one`` paired with a substitution string of ``two`` would
* transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``.
*
* * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of
* ``&92;1two&92;2`` would replace only the first occurrence of ``one``,
* transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``.
*
* * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/``
* would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to
* ``/aaa/yyy/bbb``.
* @param timeout
* Specifies the upstream timeout for the route. If not specified, the default is 15s. This
* spans between the point at which the entire downstream request (i.e. end-of-stream) has been
* processed and when the upstream response has been completely processed. A value of 0 will
* disable the route's timeout.
*
* .. note::
*
* This timeout includes all retries. See also
* :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
* :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
* :ref:`retry overview <arch_overview_http_routing_retry>`.
* @param idleTimeout
* Specifies the idle timeout for the route. If not specified, there is no per-route idle timeout,
* although the connection manager wide :ref:`stream_idle_timeout
* <envoy_api_field_config.filter.network.http_connection_manager.v2.HttpConnectionManager.stream_idle_timeout>`
* will still apply. A value of 0 will completely disable the route's idle timeout, even if a
* connection manager stream idle timeout is configured.
*
* The idle timeout is distinct to :ref:`timeout
* <envoy_api_field_route.RouteAction.timeout>`, which provides an upper bound
* on the upstream response time; :ref:`idle_timeout
* <envoy_api_field_route.RouteAction.idle_timeout>` instead bounds the amount
* of time the request's stream may be idle.
*
* After header decoding, the idle timeout will apply on downstream and
* upstream request events. Each time an encode/decode event for headers or
* data is processed for the stream, the timer will be reset. If the timeout
* fires, the stream is terminated with a 408 Request Timeout error code if no
* upstream response header has been received, otherwise a stream reset
* occurs.
* @param retryPolicy
* Indicates that the route has a retry policy. Note that if this is set,
* it'll take precedence over the virtual host level retry policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
* @param retryPolicyTypedConfig
* [#not-implemented-hide:]
* Specifies the configuration for retry policy extension. Note that if this is set, it'll take
* precedence over the virtual host level retry policy entirely (e.g.: policies are not merged,
* most internal one becomes the enforced policy). :ref:`Retry policy <envoy_api_field_route.VirtualHost.retry_policy>`
* should not be set if this field is used.
* @param requestMirrorPolicy
* Indicates that the route has a request mirroring policy.
*
* .. attention::
* This field has been deprecated in favor of `request_mirror_policies` which supports one or
* more mirroring policies.
* @param requestMirrorPolicies
* Indicates that the route has request mirroring policies.
* @param priority
* Optionally specifies the :ref:`routing priority <arch_overview_http_routing_priority>`.
* @param rateLimits
* Specifies a set of rate limit configurations that could be applied to the
* route.
* @param includeVhRateLimits
* Specifies if the rate limit filter should include the virtual host rate
* limits. By default, if the route configured rate limits, the virtual host
* :ref:`rate_limits <envoy_api_field_route.VirtualHost.rate_limits>` are not applied to the
* request.
* @param hashPolicy
* Specifies a list of hash policies to use for ring hash load balancing. Each
* hash policy is evaluated individually and the combined result is used to
* route the request. The method of combination is deterministic such that
* identical lists of hash policies will produce the same hash. Since a hash
* policy examines specific parts of a request, it can fail to produce a hash
* (i.e. if the hashed header is not present). If (and only if) all configured
* hash policies fail to generate a hash, no hash will be produced for
* the route. In this case, the behavior is the same as if no hash policies
* were specified (i.e. the ring hash load balancer will choose a random
* backend). If a hash policy has the "terminal" attribute set to true, and
* there is already a hash generated, the hash is returned immediately,
* ignoring the rest of the hash policy list.
* @param cors
* Indicates that the route has a CORS policy.
* @param maxGrpcTimeout
* If present, and the request is a gRPC request, use the
* `grpc-timeout header <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_,
* or its default value (infinity) instead of
* :ref:`timeout <envoy_api_field_route.RouteAction.timeout>`, but limit the applied timeout
* to the maximum value specified here. If configured as 0, the maximum allowed timeout for
* gRPC requests is infinity. If not configured at all, the `grpc-timeout` header is not used
* and gRPC requests time out like any other requests using
* :ref:`timeout <envoy_api_field_route.RouteAction.timeout>` or its default.
* This can be used to prevent unexpected upstream request timeouts due to potentially long
* time gaps between gRPC request and response in gRPC streaming mode.
*
* .. note::
*
* If a timeout is specified using :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, it takes
* precedence over `grpc-timeout header <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, when
* both are present. See also
* :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
* :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
* :ref:`retry overview <arch_overview_http_routing_retry>`.
* @param grpcTimeoutOffset
* If present, Envoy will adjust the timeout provided by the `grpc-timeout` header by subtracting
* the provided duration from the header. This is useful in allowing Envoy to set its global
* timeout to be less than that of the deadline imposed by the calling client, which makes it more
* likely that Envoy will handle the timeout instead of having the call canceled by the client.
* The offset will only be applied if the provided grpc_timeout is greater than the offset. This
* ensures that the offset will only ever decrease the timeout and never set it to 0 (meaning
* infinity).
* @param maxInternalRedirects
* An internal redirect is handled, iff the number of previous internal redirects that a
* downstream request has encountered is lower than this value, and
* :ref:`internal_redirect_action <envoy_api_field_route.RouteAction.internal_redirect_action>`
* is set to :ref:`HANDLE_INTERNAL_REDIRECT
* <envoy_api_enum_value_route.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
* In the case where a downstream request is bounced among multiple routes by internal redirect,
* the first route that hits this threshold, or has
* :ref:`internal_redirect_action <envoy_api_field_route.RouteAction.internal_redirect_action>`
* set to
* :ref:`PASS_THROUGH_INTERNAL_REDIRECT
* <envoy_api_enum_value_route.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
* will pass the redirect back to downstream.
*
* If not specified, at most one redirect will be followed.
* @param hedgePolicy
* Indicates that the route has a hedge policy. Note that if this is set,
* it'll take precedence over the virtual host level hedge policy entirely
* (e.g.: policies are not merged, most internal one becomes the enforced policy).
*/
@SerialVersionUID(0L)
final case class RouteAction(
clusterSpecifier: io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier.Empty,
clusterNotFoundResponseCode: io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterNotFoundResponseCode = io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterNotFoundResponseCode.SERVICE_UNAVAILABLE,
metadataMatch: _root_.scala.Option[io.envoyproxy.envoy.api.v2.core.Metadata] = _root_.scala.None,
prefixRewrite: _root_.scala.Predef.String = "",
regexRewrite: _root_.scala.Option[io.envoyproxy.envoy.`type`.matcher.RegexMatchAndSubstitute] = _root_.scala.None,
hostRewriteSpecifier: io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier.Empty,
timeout: _root_.scala.Option[com.google.protobuf.duration.Duration] = _root_.scala.None,
idleTimeout: _root_.scala.Option[com.google.protobuf.duration.Duration] = _root_.scala.None,
retryPolicy: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RetryPolicy] = _root_.scala.None,
retryPolicyTypedConfig: _root_.scala.Option[com.google.protobuf.any.Any] = _root_.scala.None,
@scala.deprecated(message="Marked as deprecated in proto file", "") requestMirrorPolicy: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy] = _root_.scala.None,
requestMirrorPolicies: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy] = _root_.scala.Seq.empty,
priority: io.envoyproxy.envoy.api.v2.core.RoutingPriority = io.envoyproxy.envoy.api.v2.core.RoutingPriority.DEFAULT,
rateLimits: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.RateLimit] = _root_.scala.Seq.empty,
includeVhRateLimits: _root_.scala.Option[_root_.scala.Boolean] = _root_.scala.None,
hashPolicy: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy] = _root_.scala.Seq.empty,
cors: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.CorsPolicy] = _root_.scala.None,
maxGrpcTimeout: _root_.scala.Option[com.google.protobuf.duration.Duration] = _root_.scala.None,
grpcTimeoutOffset: _root_.scala.Option[com.google.protobuf.duration.Duration] = _root_.scala.None,
upgradeConfigs: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig] = _root_.scala.Seq.empty,
internalRedirectAction: io.envoyproxy.envoy.api.v2.route.RouteAction.InternalRedirectAction = io.envoyproxy.envoy.api.v2.route.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT,
maxInternalRedirects: _root_.scala.Option[_root_.scala.Int] = _root_.scala.None,
hedgePolicy: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.HedgePolicy] = _root_.scala.None,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[RouteAction] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
if (clusterSpecifier.cluster.isDefined) {
val __value = clusterSpecifier.cluster.get
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value)
};
if (clusterSpecifier.clusterHeader.isDefined) {
val __value = clusterSpecifier.clusterHeader.get
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value)
};
if (clusterSpecifier.weightedClusters.isDefined) {
val __value = clusterSpecifier.weightedClusters.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
{
val __value = clusterNotFoundResponseCode.value
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(20, __value)
}
};
if (metadataMatch.isDefined) {
val __value = metadataMatch.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
{
val __value = prefixRewrite
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(5, __value)
}
};
if (regexRewrite.isDefined) {
val __value = regexRewrite.get
__size += 2 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (hostRewriteSpecifier.hostRewrite.isDefined) {
val __value = hostRewriteSpecifier.hostRewrite.get
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(6, __value)
};
if (hostRewriteSpecifier.autoHostRewrite.isDefined) {
val __value = io.envoyproxy.envoy.api.v2.route.RouteAction._typemapper_autoHostRewrite.toBase(hostRewriteSpecifier.autoHostRewrite.get)
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (hostRewriteSpecifier.autoHostRewriteHeader.isDefined) {
val __value = hostRewriteSpecifier.autoHostRewriteHeader.get
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(29, __value)
};
if (timeout.isDefined) {
val __value = timeout.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (idleTimeout.isDefined) {
val __value = idleTimeout.get
__size += 2 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (retryPolicy.isDefined) {
val __value = retryPolicy.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (retryPolicyTypedConfig.isDefined) {
val __value = retryPolicyTypedConfig.get
__size += 2 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (requestMirrorPolicy.isDefined) {
val __value = requestMirrorPolicy.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
requestMirrorPolicies.foreach { __item =>
val __value = __item
__size += 2 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
}
{
val __value = priority.value
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(11, __value)
}
};
rateLimits.foreach { __item =>
val __value = __item
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
}
if (includeVhRateLimits.isDefined) {
val __value = io.envoyproxy.envoy.api.v2.route.RouteAction._typemapper_includeVhRateLimits.toBase(includeVhRateLimits.get)
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
hashPolicy.foreach { __item =>
val __value = __item
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
}
if (cors.isDefined) {
val __value = cors.get
__size += 2 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (maxGrpcTimeout.isDefined) {
val __value = maxGrpcTimeout.get
__size += 2 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (grpcTimeoutOffset.isDefined) {
val __value = grpcTimeoutOffset.get
__size += 2 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
upgradeConfigs.foreach { __item =>
val __value = __item
__size += 2 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
}
{
val __value = internalRedirectAction.value
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(26, __value)
}
};
if (maxInternalRedirects.isDefined) {
val __value = io.envoyproxy.envoy.api.v2.route.RouteAction._typemapper_maxInternalRedirects.toBase(maxInternalRedirects.get)
__size += 2 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (hedgePolicy.isDefined) {
val __value = hedgePolicy.get
__size += 2 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
__size += unknownFields.serializedSize
__size
}
override def serializedSize: _root_.scala.Int = {
var __size = __serializedSizeMemoized
if (__size == 0) {
__size = __computeSerializedSize() + 1
__serializedSizeMemoized = __size
}
__size - 1
}
def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
clusterSpecifier.cluster.foreach { __v =>
val __m = __v
_output__.writeString(1, __m)
};
clusterSpecifier.clusterHeader.foreach { __v =>
val __m = __v
_output__.writeString(2, __m)
};
clusterSpecifier.weightedClusters.foreach { __v =>
val __m = __v
_output__.writeTag(3, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
metadataMatch.foreach { __v =>
val __m = __v
_output__.writeTag(4, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
{
val __v = prefixRewrite
if (!__v.isEmpty) {
_output__.writeString(5, __v)
}
};
hostRewriteSpecifier.hostRewrite.foreach { __v =>
val __m = __v
_output__.writeString(6, __m)
};
hostRewriteSpecifier.autoHostRewrite.foreach { __v =>
val __m = io.envoyproxy.envoy.api.v2.route.RouteAction._typemapper_autoHostRewrite.toBase(__v)
_output__.writeTag(7, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
timeout.foreach { __v =>
val __m = __v
_output__.writeTag(8, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
retryPolicy.foreach { __v =>
val __m = __v
_output__.writeTag(9, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
requestMirrorPolicy.foreach { __v =>
val __m = __v
_output__.writeTag(10, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
{
val __v = priority.value
if (__v != 0) {
_output__.writeEnum(11, __v)
}
};
rateLimits.foreach { __v =>
val __m = __v
_output__.writeTag(13, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
includeVhRateLimits.foreach { __v =>
val __m = io.envoyproxy.envoy.api.v2.route.RouteAction._typemapper_includeVhRateLimits.toBase(__v)
_output__.writeTag(14, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
hashPolicy.foreach { __v =>
val __m = __v
_output__.writeTag(15, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
cors.foreach { __v =>
val __m = __v
_output__.writeTag(17, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
{
val __v = clusterNotFoundResponseCode.value
if (__v != 0) {
_output__.writeEnum(20, __v)
}
};
maxGrpcTimeout.foreach { __v =>
val __m = __v
_output__.writeTag(23, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
idleTimeout.foreach { __v =>
val __m = __v
_output__.writeTag(24, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
upgradeConfigs.foreach { __v =>
val __m = __v
_output__.writeTag(25, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
{
val __v = internalRedirectAction.value
if (__v != 0) {
_output__.writeEnum(26, __v)
}
};
hedgePolicy.foreach { __v =>
val __m = __v
_output__.writeTag(27, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
grpcTimeoutOffset.foreach { __v =>
val __m = __v
_output__.writeTag(28, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
hostRewriteSpecifier.autoHostRewriteHeader.foreach { __v =>
val __m = __v
_output__.writeString(29, __m)
};
requestMirrorPolicies.foreach { __v =>
val __m = __v
_output__.writeTag(30, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
maxInternalRedirects.foreach { __v =>
val __m = io.envoyproxy.envoy.api.v2.route.RouteAction._typemapper_maxInternalRedirects.toBase(__v)
_output__.writeTag(31, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
regexRewrite.foreach { __v =>
val __m = __v
_output__.writeTag(32, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
retryPolicyTypedConfig.foreach { __v =>
val __m = __v
_output__.writeTag(33, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def getCluster: _root_.scala.Predef.String = clusterSpecifier.cluster.getOrElse("")
def withCluster(__v: _root_.scala.Predef.String): RouteAction = copy(clusterSpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier.Cluster(__v))
def getClusterHeader: _root_.scala.Predef.String = clusterSpecifier.clusterHeader.getOrElse("")
def withClusterHeader(__v: _root_.scala.Predef.String): RouteAction = copy(clusterSpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier.ClusterHeader(__v))
def getWeightedClusters: io.envoyproxy.envoy.api.v2.route.WeightedCluster = clusterSpecifier.weightedClusters.getOrElse(io.envoyproxy.envoy.api.v2.route.WeightedCluster.defaultInstance)
def withWeightedClusters(__v: io.envoyproxy.envoy.api.v2.route.WeightedCluster): RouteAction = copy(clusterSpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier.WeightedClusters(__v))
def withClusterNotFoundResponseCode(__v: io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterNotFoundResponseCode): RouteAction = copy(clusterNotFoundResponseCode = __v)
def getMetadataMatch: io.envoyproxy.envoy.api.v2.core.Metadata = metadataMatch.getOrElse(io.envoyproxy.envoy.api.v2.core.Metadata.defaultInstance)
def clearMetadataMatch: RouteAction = copy(metadataMatch = _root_.scala.None)
def withMetadataMatch(__v: io.envoyproxy.envoy.api.v2.core.Metadata): RouteAction = copy(metadataMatch = Option(__v))
def withPrefixRewrite(__v: _root_.scala.Predef.String): RouteAction = copy(prefixRewrite = __v)
def getRegexRewrite: io.envoyproxy.envoy.`type`.matcher.RegexMatchAndSubstitute = regexRewrite.getOrElse(io.envoyproxy.envoy.`type`.matcher.RegexMatchAndSubstitute.defaultInstance)
def clearRegexRewrite: RouteAction = copy(regexRewrite = _root_.scala.None)
def withRegexRewrite(__v: io.envoyproxy.envoy.`type`.matcher.RegexMatchAndSubstitute): RouteAction = copy(regexRewrite = Option(__v))
def getHostRewrite: _root_.scala.Predef.String = hostRewriteSpecifier.hostRewrite.getOrElse("")
def withHostRewrite(__v: _root_.scala.Predef.String): RouteAction = copy(hostRewriteSpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier.HostRewrite(__v))
def getAutoHostRewrite: _root_.scala.Boolean = hostRewriteSpecifier.autoHostRewrite.getOrElse(io.envoyproxy.envoy.api.v2.route.RouteAction._typemapper_autoHostRewrite.toCustom(com.google.protobuf.wrappers.BoolValue.defaultInstance))
def withAutoHostRewrite(__v: _root_.scala.Boolean): RouteAction = copy(hostRewriteSpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier.AutoHostRewrite(__v))
def getAutoHostRewriteHeader: _root_.scala.Predef.String = hostRewriteSpecifier.autoHostRewriteHeader.getOrElse("")
def withAutoHostRewriteHeader(__v: _root_.scala.Predef.String): RouteAction = copy(hostRewriteSpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier.AutoHostRewriteHeader(__v))
def getTimeout: com.google.protobuf.duration.Duration = timeout.getOrElse(com.google.protobuf.duration.Duration.defaultInstance)
def clearTimeout: RouteAction = copy(timeout = _root_.scala.None)
def withTimeout(__v: com.google.protobuf.duration.Duration): RouteAction = copy(timeout = Option(__v))
def getIdleTimeout: com.google.protobuf.duration.Duration = idleTimeout.getOrElse(com.google.protobuf.duration.Duration.defaultInstance)
def clearIdleTimeout: RouteAction = copy(idleTimeout = _root_.scala.None)
def withIdleTimeout(__v: com.google.protobuf.duration.Duration): RouteAction = copy(idleTimeout = Option(__v))
def getRetryPolicy: io.envoyproxy.envoy.api.v2.route.RetryPolicy = retryPolicy.getOrElse(io.envoyproxy.envoy.api.v2.route.RetryPolicy.defaultInstance)
def clearRetryPolicy: RouteAction = copy(retryPolicy = _root_.scala.None)
def withRetryPolicy(__v: io.envoyproxy.envoy.api.v2.route.RetryPolicy): RouteAction = copy(retryPolicy = Option(__v))
def getRetryPolicyTypedConfig: com.google.protobuf.any.Any = retryPolicyTypedConfig.getOrElse(com.google.protobuf.any.Any.defaultInstance)
def clearRetryPolicyTypedConfig: RouteAction = copy(retryPolicyTypedConfig = _root_.scala.None)
def withRetryPolicyTypedConfig(__v: com.google.protobuf.any.Any): RouteAction = copy(retryPolicyTypedConfig = Option(__v))
def getRequestMirrorPolicy: io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy = requestMirrorPolicy.getOrElse(io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy.defaultInstance)
def clearRequestMirrorPolicy: RouteAction = copy(requestMirrorPolicy = _root_.scala.None)
def withRequestMirrorPolicy(__v: io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy): RouteAction = copy(requestMirrorPolicy = Option(__v))
def clearRequestMirrorPolicies = copy(requestMirrorPolicies = _root_.scala.Seq.empty)
def addRequestMirrorPolicies(__vs: io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy *): RouteAction = addAllRequestMirrorPolicies(__vs)
def addAllRequestMirrorPolicies(__vs: Iterable[io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy]): RouteAction = copy(requestMirrorPolicies = requestMirrorPolicies ++ __vs)
def withRequestMirrorPolicies(__v: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy]): RouteAction = copy(requestMirrorPolicies = __v)
def withPriority(__v: io.envoyproxy.envoy.api.v2.core.RoutingPriority): RouteAction = copy(priority = __v)
def clearRateLimits = copy(rateLimits = _root_.scala.Seq.empty)
def addRateLimits(__vs: io.envoyproxy.envoy.api.v2.route.RateLimit *): RouteAction = addAllRateLimits(__vs)
def addAllRateLimits(__vs: Iterable[io.envoyproxy.envoy.api.v2.route.RateLimit]): RouteAction = copy(rateLimits = rateLimits ++ __vs)
def withRateLimits(__v: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.RateLimit]): RouteAction = copy(rateLimits = __v)
def getIncludeVhRateLimits: _root_.scala.Boolean = includeVhRateLimits.getOrElse(io.envoyproxy.envoy.api.v2.route.RouteAction._typemapper_includeVhRateLimits.toCustom(com.google.protobuf.wrappers.BoolValue.defaultInstance))
def clearIncludeVhRateLimits: RouteAction = copy(includeVhRateLimits = _root_.scala.None)
def withIncludeVhRateLimits(__v: _root_.scala.Boolean): RouteAction = copy(includeVhRateLimits = Option(__v))
def clearHashPolicy = copy(hashPolicy = _root_.scala.Seq.empty)
def addHashPolicy(__vs: io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy *): RouteAction = addAllHashPolicy(__vs)
def addAllHashPolicy(__vs: Iterable[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy]): RouteAction = copy(hashPolicy = hashPolicy ++ __vs)
def withHashPolicy(__v: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy]): RouteAction = copy(hashPolicy = __v)
def getCors: io.envoyproxy.envoy.api.v2.route.CorsPolicy = cors.getOrElse(io.envoyproxy.envoy.api.v2.route.CorsPolicy.defaultInstance)
def clearCors: RouteAction = copy(cors = _root_.scala.None)
def withCors(__v: io.envoyproxy.envoy.api.v2.route.CorsPolicy): RouteAction = copy(cors = Option(__v))
def getMaxGrpcTimeout: com.google.protobuf.duration.Duration = maxGrpcTimeout.getOrElse(com.google.protobuf.duration.Duration.defaultInstance)
def clearMaxGrpcTimeout: RouteAction = copy(maxGrpcTimeout = _root_.scala.None)
def withMaxGrpcTimeout(__v: com.google.protobuf.duration.Duration): RouteAction = copy(maxGrpcTimeout = Option(__v))
def getGrpcTimeoutOffset: com.google.protobuf.duration.Duration = grpcTimeoutOffset.getOrElse(com.google.protobuf.duration.Duration.defaultInstance)
def clearGrpcTimeoutOffset: RouteAction = copy(grpcTimeoutOffset = _root_.scala.None)
def withGrpcTimeoutOffset(__v: com.google.protobuf.duration.Duration): RouteAction = copy(grpcTimeoutOffset = Option(__v))
def clearUpgradeConfigs = copy(upgradeConfigs = _root_.scala.Seq.empty)
def addUpgradeConfigs(__vs: io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig *): RouteAction = addAllUpgradeConfigs(__vs)
def addAllUpgradeConfigs(__vs: Iterable[io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig]): RouteAction = copy(upgradeConfigs = upgradeConfigs ++ __vs)
def withUpgradeConfigs(__v: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig]): RouteAction = copy(upgradeConfigs = __v)
def withInternalRedirectAction(__v: io.envoyproxy.envoy.api.v2.route.RouteAction.InternalRedirectAction): RouteAction = copy(internalRedirectAction = __v)
def getMaxInternalRedirects: _root_.scala.Int = maxInternalRedirects.getOrElse(io.envoyproxy.envoy.api.v2.route.RouteAction._typemapper_maxInternalRedirects.toCustom(com.google.protobuf.wrappers.UInt32Value.defaultInstance))
def clearMaxInternalRedirects: RouteAction = copy(maxInternalRedirects = _root_.scala.None)
def withMaxInternalRedirects(__v: _root_.scala.Int): RouteAction = copy(maxInternalRedirects = Option(__v))
def getHedgePolicy: io.envoyproxy.envoy.api.v2.route.HedgePolicy = hedgePolicy.getOrElse(io.envoyproxy.envoy.api.v2.route.HedgePolicy.defaultInstance)
def clearHedgePolicy: RouteAction = copy(hedgePolicy = _root_.scala.None)
def withHedgePolicy(__v: io.envoyproxy.envoy.api.v2.route.HedgePolicy): RouteAction = copy(hedgePolicy = Option(__v))
def clearClusterSpecifier: RouteAction = copy(clusterSpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier.Empty)
def withClusterSpecifier(__v: io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier): RouteAction = copy(clusterSpecifier = __v)
def clearHostRewriteSpecifier: RouteAction = copy(hostRewriteSpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier.Empty)
def withHostRewriteSpecifier(__v: io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier): RouteAction = copy(hostRewriteSpecifier = __v)
def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v)
def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty)
def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = {
(__fieldNumber: @_root_.scala.unchecked) match {
case 1 => clusterSpecifier.cluster.orNull
case 2 => clusterSpecifier.clusterHeader.orNull
case 3 => clusterSpecifier.weightedClusters.orNull
case 20 => {
val __t = clusterNotFoundResponseCode.javaValueDescriptor
if (__t.getNumber() != 0) __t else null
}
case 4 => metadataMatch.orNull
case 5 => {
val __t = prefixRewrite
if (__t != "") __t else null
}
case 32 => regexRewrite.orNull
case 6 => hostRewriteSpecifier.hostRewrite.orNull
case 7 => hostRewriteSpecifier.autoHostRewrite.map(io.envoyproxy.envoy.api.v2.route.RouteAction._typemapper_autoHostRewrite.toBase(_)).orNull
case 29 => hostRewriteSpecifier.autoHostRewriteHeader.orNull
case 8 => timeout.orNull
case 24 => idleTimeout.orNull
case 9 => retryPolicy.orNull
case 33 => retryPolicyTypedConfig.orNull
case 10 => requestMirrorPolicy.orNull
case 30 => requestMirrorPolicies
case 11 => {
val __t = priority.javaValueDescriptor
if (__t.getNumber() != 0) __t else null
}
case 13 => rateLimits
case 14 => includeVhRateLimits.map(io.envoyproxy.envoy.api.v2.route.RouteAction._typemapper_includeVhRateLimits.toBase(_)).orNull
case 15 => hashPolicy
case 17 => cors.orNull
case 23 => maxGrpcTimeout.orNull
case 28 => grpcTimeoutOffset.orNull
case 25 => upgradeConfigs
case 26 => {
val __t = internalRedirectAction.javaValueDescriptor
if (__t.getNumber() != 0) __t else null
}
case 31 => maxInternalRedirects.map(io.envoyproxy.envoy.api.v2.route.RouteAction._typemapper_maxInternalRedirects.toBase(_)).orNull
case 27 => hedgePolicy.orNull
}
}
def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
_root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
(__field.number: @_root_.scala.unchecked) match {
case 1 => clusterSpecifier.cluster.map(_root_.scalapb.descriptors.PString(_)).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 2 => clusterSpecifier.clusterHeader.map(_root_.scalapb.descriptors.PString(_)).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 3 => clusterSpecifier.weightedClusters.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 20 => _root_.scalapb.descriptors.PEnum(clusterNotFoundResponseCode.scalaValueDescriptor)
case 4 => metadataMatch.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 5 => _root_.scalapb.descriptors.PString(prefixRewrite)
case 32 => regexRewrite.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 6 => hostRewriteSpecifier.hostRewrite.map(_root_.scalapb.descriptors.PString(_)).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 7 => hostRewriteSpecifier.autoHostRewrite.map(io.envoyproxy.envoy.api.v2.route.RouteAction._typemapper_autoHostRewrite.toBase(_).toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 29 => hostRewriteSpecifier.autoHostRewriteHeader.map(_root_.scalapb.descriptors.PString(_)).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 8 => timeout.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 24 => idleTimeout.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 9 => retryPolicy.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 33 => retryPolicyTypedConfig.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 10 => requestMirrorPolicy.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 30 => _root_.scalapb.descriptors.PRepeated(requestMirrorPolicies.iterator.map(_.toPMessage).toVector)
case 11 => _root_.scalapb.descriptors.PEnum(priority.scalaValueDescriptor)
case 13 => _root_.scalapb.descriptors.PRepeated(rateLimits.iterator.map(_.toPMessage).toVector)
case 14 => includeVhRateLimits.map(io.envoyproxy.envoy.api.v2.route.RouteAction._typemapper_includeVhRateLimits.toBase(_).toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 15 => _root_.scalapb.descriptors.PRepeated(hashPolicy.iterator.map(_.toPMessage).toVector)
case 17 => cors.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 23 => maxGrpcTimeout.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 28 => grpcTimeoutOffset.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 25 => _root_.scalapb.descriptors.PRepeated(upgradeConfigs.iterator.map(_.toPMessage).toVector)
case 26 => _root_.scalapb.descriptors.PEnum(internalRedirectAction.scalaValueDescriptor)
case 31 => maxInternalRedirects.map(io.envoyproxy.envoy.api.v2.route.RouteAction._typemapper_maxInternalRedirects.toBase(_).toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 27 => hedgePolicy.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: io.envoyproxy.envoy.api.v2.route.RouteAction.type = io.envoyproxy.envoy.api.v2.route.RouteAction
// @@protoc_insertion_point(GeneratedMessage[envoy.api.v2.route.RouteAction])
}
object RouteAction extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RouteAction] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RouteAction] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.api.v2.route.RouteAction = {
var __clusterNotFoundResponseCode: io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterNotFoundResponseCode = io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterNotFoundResponseCode.SERVICE_UNAVAILABLE
var __metadataMatch: _root_.scala.Option[io.envoyproxy.envoy.api.v2.core.Metadata] = _root_.scala.None
var __prefixRewrite: _root_.scala.Predef.String = ""
var __regexRewrite: _root_.scala.Option[io.envoyproxy.envoy.`type`.matcher.RegexMatchAndSubstitute] = _root_.scala.None
var __timeout: _root_.scala.Option[com.google.protobuf.duration.Duration] = _root_.scala.None
var __idleTimeout: _root_.scala.Option[com.google.protobuf.duration.Duration] = _root_.scala.None
var __retryPolicy: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RetryPolicy] = _root_.scala.None
var __retryPolicyTypedConfig: _root_.scala.Option[com.google.protobuf.any.Any] = _root_.scala.None
var __requestMirrorPolicy: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy] = _root_.scala.None
val __requestMirrorPolicies: _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy] = new _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy]
var __priority: io.envoyproxy.envoy.api.v2.core.RoutingPriority = io.envoyproxy.envoy.api.v2.core.RoutingPriority.DEFAULT
val __rateLimits: _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.api.v2.route.RateLimit] = new _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.api.v2.route.RateLimit]
var __includeVhRateLimits: _root_.scala.Option[_root_.scala.Boolean] = _root_.scala.None
val __hashPolicy: _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy] = new _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy]
var __cors: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.CorsPolicy] = _root_.scala.None
var __maxGrpcTimeout: _root_.scala.Option[com.google.protobuf.duration.Duration] = _root_.scala.None
var __grpcTimeoutOffset: _root_.scala.Option[com.google.protobuf.duration.Duration] = _root_.scala.None
val __upgradeConfigs: _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig] = new _root_.scala.collection.immutable.VectorBuilder[io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig]
var __internalRedirectAction: io.envoyproxy.envoy.api.v2.route.RouteAction.InternalRedirectAction = io.envoyproxy.envoy.api.v2.route.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT
var __maxInternalRedirects: _root_.scala.Option[_root_.scala.Int] = _root_.scala.None
var __hedgePolicy: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.HedgePolicy] = _root_.scala.None
var __clusterSpecifier: io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier.Empty
var __hostRewriteSpecifier: io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier.Empty
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 10 =>
__clusterSpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier.Cluster(_input__.readStringRequireUtf8())
case 18 =>
__clusterSpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier.ClusterHeader(_input__.readStringRequireUtf8())
case 26 =>
__clusterSpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier.WeightedClusters(__clusterSpecifier.weightedClusters.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.route.WeightedCluster](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 160 =>
__clusterNotFoundResponseCode = io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterNotFoundResponseCode.fromValue(_input__.readEnum())
case 34 =>
__metadataMatch = Option(__metadataMatch.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.core.Metadata](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 42 =>
__prefixRewrite = _input__.readStringRequireUtf8()
case 258 =>
__regexRewrite = Option(__regexRewrite.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.`type`.matcher.RegexMatchAndSubstitute](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 50 =>
__hostRewriteSpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier.HostRewrite(_input__.readStringRequireUtf8())
case 58 =>
__hostRewriteSpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier.AutoHostRewrite(io.envoyproxy.envoy.api.v2.route.RouteAction._typemapper_autoHostRewrite.toCustom(__hostRewriteSpecifier.autoHostRewrite.map(io.envoyproxy.envoy.api.v2.route.RouteAction._typemapper_autoHostRewrite.toBase(_)).fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.wrappers.BoolValue](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))))
case 234 =>
__hostRewriteSpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier.AutoHostRewriteHeader(_input__.readStringRequireUtf8())
case 66 =>
__timeout = Option(__timeout.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.duration.Duration](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 194 =>
__idleTimeout = Option(__idleTimeout.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.duration.Duration](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 74 =>
__retryPolicy = Option(__retryPolicy.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.route.RetryPolicy](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 266 =>
__retryPolicyTypedConfig = Option(__retryPolicyTypedConfig.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.any.Any](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 82 =>
__requestMirrorPolicy = Option(__requestMirrorPolicy.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 242 =>
__requestMirrorPolicies += _root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy](_input__)
case 88 =>
__priority = io.envoyproxy.envoy.api.v2.core.RoutingPriority.fromValue(_input__.readEnum())
case 106 =>
__rateLimits += _root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.route.RateLimit](_input__)
case 114 =>
__includeVhRateLimits = Option(io.envoyproxy.envoy.api.v2.route.RouteAction._typemapper_includeVhRateLimits.toCustom(__includeVhRateLimits.map(io.envoyproxy.envoy.api.v2.route.RouteAction._typemapper_includeVhRateLimits.toBase(_)).fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.wrappers.BoolValue](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))))
case 122 =>
__hashPolicy += _root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy](_input__)
case 138 =>
__cors = Option(__cors.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.route.CorsPolicy](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 186 =>
__maxGrpcTimeout = Option(__maxGrpcTimeout.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.duration.Duration](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 226 =>
__grpcTimeoutOffset = Option(__grpcTimeoutOffset.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.duration.Duration](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 202 =>
__upgradeConfigs += _root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig](_input__)
case 208 =>
__internalRedirectAction = io.envoyproxy.envoy.api.v2.route.RouteAction.InternalRedirectAction.fromValue(_input__.readEnum())
case 250 =>
__maxInternalRedirects = Option(io.envoyproxy.envoy.api.v2.route.RouteAction._typemapper_maxInternalRedirects.toCustom(__maxInternalRedirects.map(io.envoyproxy.envoy.api.v2.route.RouteAction._typemapper_maxInternalRedirects.toBase(_)).fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.wrappers.UInt32Value](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))))
case 218 =>
__hedgePolicy = Option(__hedgePolicy.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.route.HedgePolicy](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
io.envoyproxy.envoy.api.v2.route.RouteAction(
clusterNotFoundResponseCode = __clusterNotFoundResponseCode,
metadataMatch = __metadataMatch,
prefixRewrite = __prefixRewrite,
regexRewrite = __regexRewrite,
timeout = __timeout,
idleTimeout = __idleTimeout,
retryPolicy = __retryPolicy,
retryPolicyTypedConfig = __retryPolicyTypedConfig,
requestMirrorPolicy = __requestMirrorPolicy,
requestMirrorPolicies = __requestMirrorPolicies.result(),
priority = __priority,
rateLimits = __rateLimits.result(),
includeVhRateLimits = __includeVhRateLimits,
hashPolicy = __hashPolicy.result(),
cors = __cors,
maxGrpcTimeout = __maxGrpcTimeout,
grpcTimeoutOffset = __grpcTimeoutOffset,
upgradeConfigs = __upgradeConfigs.result(),
internalRedirectAction = __internalRedirectAction,
maxInternalRedirects = __maxInternalRedirects,
hedgePolicy = __hedgePolicy,
clusterSpecifier = __clusterSpecifier,
hostRewriteSpecifier = __hostRewriteSpecifier,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.api.v2.route.RouteAction] = _root_.scalapb.descriptors.Reads{
case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
_root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
io.envoyproxy.envoy.api.v2.route.RouteAction(
clusterNotFoundResponseCode = io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterNotFoundResponseCode.fromValue(__fieldsMap.get(scalaDescriptor.findFieldByNumber(20).get).map(_.as[_root_.scalapb.descriptors.EnumValueDescriptor]).getOrElse(io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterNotFoundResponseCode.SERVICE_UNAVAILABLE.scalaValueDescriptor).number),
metadataMatch = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.api.v2.core.Metadata]]),
prefixRewrite = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
regexRewrite = __fieldsMap.get(scalaDescriptor.findFieldByNumber(32).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.`type`.matcher.RegexMatchAndSubstitute]]),
timeout = __fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.duration.Duration]]),
idleTimeout = __fieldsMap.get(scalaDescriptor.findFieldByNumber(24).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.duration.Duration]]),
retryPolicy = __fieldsMap.get(scalaDescriptor.findFieldByNumber(9).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RetryPolicy]]),
retryPolicyTypedConfig = __fieldsMap.get(scalaDescriptor.findFieldByNumber(33).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.any.Any]]),
requestMirrorPolicy = __fieldsMap.get(scalaDescriptor.findFieldByNumber(10).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy]]),
requestMirrorPolicies = __fieldsMap.get(scalaDescriptor.findFieldByNumber(30).get).map(_.as[_root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy]]).getOrElse(_root_.scala.Seq.empty),
priority = io.envoyproxy.envoy.api.v2.core.RoutingPriority.fromValue(__fieldsMap.get(scalaDescriptor.findFieldByNumber(11).get).map(_.as[_root_.scalapb.descriptors.EnumValueDescriptor]).getOrElse(io.envoyproxy.envoy.api.v2.core.RoutingPriority.DEFAULT.scalaValueDescriptor).number),
rateLimits = __fieldsMap.get(scalaDescriptor.findFieldByNumber(13).get).map(_.as[_root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.RateLimit]]).getOrElse(_root_.scala.Seq.empty),
includeVhRateLimits = __fieldsMap.get(scalaDescriptor.findFieldByNumber(14).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.wrappers.BoolValue]]).map(io.envoyproxy.envoy.api.v2.route.RouteAction._typemapper_includeVhRateLimits.toCustom(_)),
hashPolicy = __fieldsMap.get(scalaDescriptor.findFieldByNumber(15).get).map(_.as[_root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy]]).getOrElse(_root_.scala.Seq.empty),
cors = __fieldsMap.get(scalaDescriptor.findFieldByNumber(17).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.api.v2.route.CorsPolicy]]),
maxGrpcTimeout = __fieldsMap.get(scalaDescriptor.findFieldByNumber(23).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.duration.Duration]]),
grpcTimeoutOffset = __fieldsMap.get(scalaDescriptor.findFieldByNumber(28).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.duration.Duration]]),
upgradeConfigs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(25).get).map(_.as[_root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig]]).getOrElse(_root_.scala.Seq.empty),
internalRedirectAction = io.envoyproxy.envoy.api.v2.route.RouteAction.InternalRedirectAction.fromValue(__fieldsMap.get(scalaDescriptor.findFieldByNumber(26).get).map(_.as[_root_.scalapb.descriptors.EnumValueDescriptor]).getOrElse(io.envoyproxy.envoy.api.v2.route.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT.scalaValueDescriptor).number),
maxInternalRedirects = __fieldsMap.get(scalaDescriptor.findFieldByNumber(31).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.wrappers.UInt32Value]]).map(io.envoyproxy.envoy.api.v2.route.RouteAction._typemapper_maxInternalRedirects.toCustom(_)),
hedgePolicy = __fieldsMap.get(scalaDescriptor.findFieldByNumber(27).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.api.v2.route.HedgePolicy]]),
clusterSpecifier = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[_root_.scala.Predef.String]]).map(io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier.Cluster(_))
.orElse[io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier](__fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[_root_.scala.Predef.String]]).map(io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier.ClusterHeader(_)))
.orElse[io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier](__fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.api.v2.route.WeightedCluster]]).map(io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier.WeightedClusters(_)))
.getOrElse(io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier.Empty),
hostRewriteSpecifier = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).flatMap(_.as[_root_.scala.Option[_root_.scala.Predef.String]]).map(io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier.HostRewrite(_))
.orElse[io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier](__fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.wrappers.BoolValue]]).map(__e => io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier.AutoHostRewrite(io.envoyproxy.envoy.api.v2.route.RouteAction._typemapper_autoHostRewrite.toCustom(__e))))
.orElse[io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier](__fieldsMap.get(scalaDescriptor.findFieldByNumber(29).get).flatMap(_.as[_root_.scala.Option[_root_.scala.Predef.String]]).map(io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier.AutoHostRewriteHeader(_)))
.getOrElse(io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier.Empty)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = RouteComponentsProto.javaDescriptor.getMessageTypes().get(6)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = RouteComponentsProto.scalaDescriptor.messages(6)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 3 => __out = io.envoyproxy.envoy.api.v2.route.WeightedCluster
case 4 => __out = io.envoyproxy.envoy.api.v2.core.Metadata
case 32 => __out = io.envoyproxy.envoy.`type`.matcher.RegexMatchAndSubstitute
case 7 => __out = com.google.protobuf.wrappers.BoolValue
case 8 => __out = com.google.protobuf.duration.Duration
case 24 => __out = com.google.protobuf.duration.Duration
case 9 => __out = io.envoyproxy.envoy.api.v2.route.RetryPolicy
case 33 => __out = com.google.protobuf.any.Any
case 10 => __out = io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy
case 30 => __out = io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy
case 13 => __out = io.envoyproxy.envoy.api.v2.route.RateLimit
case 14 => __out = com.google.protobuf.wrappers.BoolValue
case 15 => __out = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy
case 17 => __out = io.envoyproxy.envoy.api.v2.route.CorsPolicy
case 23 => __out = com.google.protobuf.duration.Duration
case 28 => __out = com.google.protobuf.duration.Duration
case 25 => __out = io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig
case 31 => __out = com.google.protobuf.wrappers.UInt32Value
case 27 => __out = io.envoyproxy.envoy.api.v2.route.HedgePolicy
}
__out
}
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] =
Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]](
_root_.io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy,
_root_.io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy,
_root_.io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig
)
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = {
(__fieldNumber: @_root_.scala.unchecked) match {
case 20 => io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterNotFoundResponseCode
case 11 => io.envoyproxy.envoy.api.v2.core.RoutingPriority
case 26 => io.envoyproxy.envoy.api.v2.route.RouteAction.InternalRedirectAction
}
}
lazy val defaultInstance = io.envoyproxy.envoy.api.v2.route.RouteAction(
clusterNotFoundResponseCode = io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterNotFoundResponseCode.SERVICE_UNAVAILABLE,
metadataMatch = _root_.scala.None,
prefixRewrite = "",
regexRewrite = _root_.scala.None,
timeout = _root_.scala.None,
idleTimeout = _root_.scala.None,
retryPolicy = _root_.scala.None,
retryPolicyTypedConfig = _root_.scala.None,
requestMirrorPolicy = _root_.scala.None,
requestMirrorPolicies = _root_.scala.Seq.empty,
priority = io.envoyproxy.envoy.api.v2.core.RoutingPriority.DEFAULT,
rateLimits = _root_.scala.Seq.empty,
includeVhRateLimits = _root_.scala.None,
hashPolicy = _root_.scala.Seq.empty,
cors = _root_.scala.None,
maxGrpcTimeout = _root_.scala.None,
grpcTimeoutOffset = _root_.scala.None,
upgradeConfigs = _root_.scala.Seq.empty,
internalRedirectAction = io.envoyproxy.envoy.api.v2.route.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT,
maxInternalRedirects = _root_.scala.None,
hedgePolicy = _root_.scala.None,
clusterSpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier.Empty,
hostRewriteSpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier.Empty
)
sealed abstract class ClusterNotFoundResponseCode(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum {
type EnumType = ClusterNotFoundResponseCode
def isServiceUnavailable: _root_.scala.Boolean = false
def isNotFound: _root_.scala.Boolean = false
def companion: _root_.scalapb.GeneratedEnumCompanion[ClusterNotFoundResponseCode] = io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterNotFoundResponseCode
final def asRecognized: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterNotFoundResponseCode.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterNotFoundResponseCode.Recognized])
}
object ClusterNotFoundResponseCode extends _root_.scalapb.GeneratedEnumCompanion[ClusterNotFoundResponseCode] {
sealed trait Recognized extends ClusterNotFoundResponseCode
implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[ClusterNotFoundResponseCode] = this
/** HTTP status code - 503 Service Unavailable.
*/
@SerialVersionUID(0L)
case object SERVICE_UNAVAILABLE extends ClusterNotFoundResponseCode(0) with ClusterNotFoundResponseCode.Recognized {
val index = 0
val name = "SERVICE_UNAVAILABLE"
override def isServiceUnavailable: _root_.scala.Boolean = true
}
/** HTTP status code - 404 Not Found.
*/
@SerialVersionUID(0L)
case object NOT_FOUND extends ClusterNotFoundResponseCode(1) with ClusterNotFoundResponseCode.Recognized {
val index = 1
val name = "NOT_FOUND"
override def isNotFound: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends ClusterNotFoundResponseCode(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum
lazy val values = scala.collection.immutable.Seq(SERVICE_UNAVAILABLE, NOT_FOUND)
def fromValue(__value: _root_.scala.Int): ClusterNotFoundResponseCode = __value match {
case 0 => SERVICE_UNAVAILABLE
case 1 => NOT_FOUND
case __other => Unrecognized(__other)
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = io.envoyproxy.envoy.api.v2.route.RouteAction.javaDescriptor.getEnumTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = io.envoyproxy.envoy.api.v2.route.RouteAction.scalaDescriptor.enums(0)
}
/** Configures :ref:`internal redirect <arch_overview_internal_redirects>` behavior.
*/
sealed abstract class InternalRedirectAction(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum {
type EnumType = InternalRedirectAction
def isPassThroughInternalRedirect: _root_.scala.Boolean = false
def isHandleInternalRedirect: _root_.scala.Boolean = false
def companion: _root_.scalapb.GeneratedEnumCompanion[InternalRedirectAction] = io.envoyproxy.envoy.api.v2.route.RouteAction.InternalRedirectAction
final def asRecognized: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteAction.InternalRedirectAction.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[io.envoyproxy.envoy.api.v2.route.RouteAction.InternalRedirectAction.Recognized])
}
object InternalRedirectAction extends _root_.scalapb.GeneratedEnumCompanion[InternalRedirectAction] {
sealed trait Recognized extends InternalRedirectAction
implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[InternalRedirectAction] = this
@SerialVersionUID(0L)
case object PASS_THROUGH_INTERNAL_REDIRECT extends InternalRedirectAction(0) with InternalRedirectAction.Recognized {
val index = 0
val name = "PASS_THROUGH_INTERNAL_REDIRECT"
override def isPassThroughInternalRedirect: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
case object HANDLE_INTERNAL_REDIRECT extends InternalRedirectAction(1) with InternalRedirectAction.Recognized {
val index = 1
val name = "HANDLE_INTERNAL_REDIRECT"
override def isHandleInternalRedirect: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends InternalRedirectAction(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum
lazy val values = scala.collection.immutable.Seq(PASS_THROUGH_INTERNAL_REDIRECT, HANDLE_INTERNAL_REDIRECT)
def fromValue(__value: _root_.scala.Int): InternalRedirectAction = __value match {
case 0 => PASS_THROUGH_INTERNAL_REDIRECT
case 1 => HANDLE_INTERNAL_REDIRECT
case __other => Unrecognized(__other)
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = io.envoyproxy.envoy.api.v2.route.RouteAction.javaDescriptor.getEnumTypes().get(1)
def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = io.envoyproxy.envoy.api.v2.route.RouteAction.scalaDescriptor.enums(1)
}
sealed trait ClusterSpecifier extends _root_.scalapb.GeneratedOneof {
def isEmpty: _root_.scala.Boolean = false
def isDefined: _root_.scala.Boolean = true
def isCluster: _root_.scala.Boolean = false
def isClusterHeader: _root_.scala.Boolean = false
def isWeightedClusters: _root_.scala.Boolean = false
def cluster: _root_.scala.Option[_root_.scala.Predef.String] = _root_.scala.None
def clusterHeader: _root_.scala.Option[_root_.scala.Predef.String] = _root_.scala.None
def weightedClusters: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.WeightedCluster] = _root_.scala.None
}
object ClusterSpecifier {
@SerialVersionUID(0L)
case object Empty extends io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier {
type ValueType = _root_.scala.Nothing
override def isEmpty: _root_.scala.Boolean = true
override def isDefined: _root_.scala.Boolean = false
override def number: _root_.scala.Int = 0
override def value: _root_.scala.Nothing = throw new java.util.NoSuchElementException("Empty.value")
}
@SerialVersionUID(0L)
final case class Cluster(value: _root_.scala.Predef.String) extends io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier {
type ValueType = _root_.scala.Predef.String
override def isCluster: _root_.scala.Boolean = true
override def cluster: _root_.scala.Option[_root_.scala.Predef.String] = Some(value)
override def number: _root_.scala.Int = 1
}
@SerialVersionUID(0L)
final case class ClusterHeader(value: _root_.scala.Predef.String) extends io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier {
type ValueType = _root_.scala.Predef.String
override def isClusterHeader: _root_.scala.Boolean = true
override def clusterHeader: _root_.scala.Option[_root_.scala.Predef.String] = Some(value)
override def number: _root_.scala.Int = 2
}
@SerialVersionUID(0L)
final case class WeightedClusters(value: io.envoyproxy.envoy.api.v2.route.WeightedCluster) extends io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier {
type ValueType = io.envoyproxy.envoy.api.v2.route.WeightedCluster
override def isWeightedClusters: _root_.scala.Boolean = true
override def weightedClusters: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.WeightedCluster] = Some(value)
override def number: _root_.scala.Int = 3
}
}
sealed trait HostRewriteSpecifier extends _root_.scalapb.GeneratedOneof {
def isEmpty: _root_.scala.Boolean = false
def isDefined: _root_.scala.Boolean = true
def isHostRewrite: _root_.scala.Boolean = false
def isAutoHostRewrite: _root_.scala.Boolean = false
def isAutoHostRewriteHeader: _root_.scala.Boolean = false
def hostRewrite: _root_.scala.Option[_root_.scala.Predef.String] = _root_.scala.None
def autoHostRewrite: _root_.scala.Option[_root_.scala.Boolean] = _root_.scala.None
def autoHostRewriteHeader: _root_.scala.Option[_root_.scala.Predef.String] = _root_.scala.None
}
object HostRewriteSpecifier {
@SerialVersionUID(0L)
case object Empty extends io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier {
type ValueType = _root_.scala.Nothing
override def isEmpty: _root_.scala.Boolean = true
override def isDefined: _root_.scala.Boolean = false
override def number: _root_.scala.Int = 0
override def value: _root_.scala.Nothing = throw new java.util.NoSuchElementException("Empty.value")
}
@SerialVersionUID(0L)
final case class HostRewrite(value: _root_.scala.Predef.String) extends io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier {
type ValueType = _root_.scala.Predef.String
override def isHostRewrite: _root_.scala.Boolean = true
override def hostRewrite: _root_.scala.Option[_root_.scala.Predef.String] = Some(value)
override def number: _root_.scala.Int = 6
}
@SerialVersionUID(0L)
final case class AutoHostRewrite(value: _root_.scala.Boolean) extends io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier {
type ValueType = _root_.scala.Boolean
override def isAutoHostRewrite: _root_.scala.Boolean = true
override def autoHostRewrite: _root_.scala.Option[_root_.scala.Boolean] = Some(value)
override def number: _root_.scala.Int = 7
}
@SerialVersionUID(0L)
final case class AutoHostRewriteHeader(value: _root_.scala.Predef.String) extends io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier {
type ValueType = _root_.scala.Predef.String
override def isAutoHostRewriteHeader: _root_.scala.Boolean = true
override def autoHostRewriteHeader: _root_.scala.Option[_root_.scala.Predef.String] = Some(value)
override def number: _root_.scala.Int = 29
}
}
/** The router is capable of shadowing traffic from one cluster to another. The current
* implementation is "fire and forget," meaning Envoy will not wait for the shadow cluster to
* respond before returning the response from the primary cluster. All normal statistics are
* collected for the shadow cluster making this feature useful for testing.
*
* During shadowing, the host/authority header is altered such that *-shadow* is appended. This is
* useful for logging. For example, *cluster1* becomes *cluster1-shadow*.
*
* .. note::
*
* Shadowing will not be triggered if the primary cluster does not exist.
*
* @param cluster
* Specifies the cluster that requests will be mirrored to. The cluster must
* exist in the cluster manager configuration.
* @param runtimeKey
* If not specified, all requests to the target cluster will be mirrored. If
* specified, Envoy will lookup the runtime key to get the % of requests to
* mirror. Valid values are from 0 to 10000, allowing for increments of
* 0.01% of requests to be mirrored. If the runtime key is specified in the
* configuration but not present in runtime, 0 is the default and thus 0% of
* requests will be mirrored.
*
* .. attention::
*
* **This field is deprecated**. Set the
* :ref:`runtime_fraction
* <envoy_api_field_route.RouteAction.RequestMirrorPolicy.runtime_fraction>`
* field instead. Mirroring occurs if both this and
* <envoy_api_field_route.RouteAction.RequestMirrorPolicy.runtime_fraction>`
* are not set.
* @param runtimeFraction
* If not specified, all requests to the target cluster will be mirrored.
*
* If specified, this field takes precedence over the `runtime_key` field and requests must also
* fall under the percentage of matches indicated by this field.
*
* For some fraction N/D, a random number in the range [0,D) is selected. If the
* number is <= the value of the numerator N, or if the key is not present, the default
* value, the request will be mirrored.
* @param traceSampled
* Determines if the trace span should be sampled. Defaults to true.
*/
@SerialVersionUID(0L)
final case class RequestMirrorPolicy(
cluster: _root_.scala.Predef.String = "",
@scala.deprecated(message="Marked as deprecated in proto file", "") runtimeKey: _root_.scala.Predef.String = "",
runtimeFraction: _root_.scala.Option[io.envoyproxy.envoy.api.v2.core.RuntimeFractionalPercent] = _root_.scala.None,
traceSampled: _root_.scala.Option[_root_.scala.Boolean] = _root_.scala.None,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[RequestMirrorPolicy] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = cluster
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value)
}
};
{
val __value = runtimeKey
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value)
}
};
if (runtimeFraction.isDefined) {
val __value = runtimeFraction.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (traceSampled.isDefined) {
val __value = io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy._typemapper_traceSampled.toBase(traceSampled.get)
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
__size += unknownFields.serializedSize
__size
}
override def serializedSize: _root_.scala.Int = {
var __size = __serializedSizeMemoized
if (__size == 0) {
__size = __computeSerializedSize() + 1
__serializedSizeMemoized = __size
}
__size - 1
}
def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
{
val __v = cluster
if (!__v.isEmpty) {
_output__.writeString(1, __v)
}
};
{
val __v = runtimeKey
if (!__v.isEmpty) {
_output__.writeString(2, __v)
}
};
runtimeFraction.foreach { __v =>
val __m = __v
_output__.writeTag(3, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
traceSampled.foreach { __v =>
val __m = io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy._typemapper_traceSampled.toBase(__v)
_output__.writeTag(4, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def withCluster(__v: _root_.scala.Predef.String): RequestMirrorPolicy = copy(cluster = __v)
def withRuntimeKey(__v: _root_.scala.Predef.String): RequestMirrorPolicy = copy(runtimeKey = __v)
def getRuntimeFraction: io.envoyproxy.envoy.api.v2.core.RuntimeFractionalPercent = runtimeFraction.getOrElse(io.envoyproxy.envoy.api.v2.core.RuntimeFractionalPercent.defaultInstance)
def clearRuntimeFraction: RequestMirrorPolicy = copy(runtimeFraction = _root_.scala.None)
def withRuntimeFraction(__v: io.envoyproxy.envoy.api.v2.core.RuntimeFractionalPercent): RequestMirrorPolicy = copy(runtimeFraction = Option(__v))
def getTraceSampled: _root_.scala.Boolean = traceSampled.getOrElse(io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy._typemapper_traceSampled.toCustom(com.google.protobuf.wrappers.BoolValue.defaultInstance))
def clearTraceSampled: RequestMirrorPolicy = copy(traceSampled = _root_.scala.None)
def withTraceSampled(__v: _root_.scala.Boolean): RequestMirrorPolicy = copy(traceSampled = Option(__v))
def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v)
def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty)
def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = {
(__fieldNumber: @_root_.scala.unchecked) match {
case 1 => {
val __t = cluster
if (__t != "") __t else null
}
case 2 => {
val __t = runtimeKey
if (__t != "") __t else null
}
case 3 => runtimeFraction.orNull
case 4 => traceSampled.map(io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy._typemapper_traceSampled.toBase(_)).orNull
}
}
def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
_root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
(__field.number: @_root_.scala.unchecked) match {
case 1 => _root_.scalapb.descriptors.PString(cluster)
case 2 => _root_.scalapb.descriptors.PString(runtimeKey)
case 3 => runtimeFraction.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 4 => traceSampled.map(io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy._typemapper_traceSampled.toBase(_).toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy.type = io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy
// @@protoc_insertion_point(GeneratedMessage[envoy.api.v2.route.RouteAction.RequestMirrorPolicy])
}
object RequestMirrorPolicy extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy = {
var __cluster: _root_.scala.Predef.String = ""
var __runtimeKey: _root_.scala.Predef.String = ""
var __runtimeFraction: _root_.scala.Option[io.envoyproxy.envoy.api.v2.core.RuntimeFractionalPercent] = _root_.scala.None
var __traceSampled: _root_.scala.Option[_root_.scala.Boolean] = _root_.scala.None
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 10 =>
__cluster = _input__.readStringRequireUtf8()
case 18 =>
__runtimeKey = _input__.readStringRequireUtf8()
case 26 =>
__runtimeFraction = Option(__runtimeFraction.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.core.RuntimeFractionalPercent](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 34 =>
__traceSampled = Option(io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy._typemapper_traceSampled.toCustom(__traceSampled.map(io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy._typemapper_traceSampled.toBase(_)).fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.wrappers.BoolValue](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))))
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy(
cluster = __cluster,
runtimeKey = __runtimeKey,
runtimeFraction = __runtimeFraction,
traceSampled = __traceSampled,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy] = _root_.scalapb.descriptors.Reads{
case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
_root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy(
cluster = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
runtimeKey = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
runtimeFraction = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.api.v2.core.RuntimeFractionalPercent]]),
traceSampled = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.wrappers.BoolValue]]).map(io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy._typemapper_traceSampled.toCustom(_))
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RouteAction.javaDescriptor.getNestedTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RouteAction.scalaDescriptor.nestedMessages(0)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 3 => __out = io.envoyproxy.envoy.api.v2.core.RuntimeFractionalPercent
case 4 => __out = com.google.protobuf.wrappers.BoolValue
}
__out
}
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy(
cluster = "",
runtimeKey = "",
runtimeFraction = _root_.scala.None,
traceSampled = _root_.scala.None
)
implicit class RequestMirrorPolicyLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy](_l) {
def cluster: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.cluster)((c_, f_) => c_.copy(cluster = f_))
def runtimeKey: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.runtimeKey)((c_, f_) => c_.copy(runtimeKey = f_))
def runtimeFraction: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.core.RuntimeFractionalPercent] = field(_.getRuntimeFraction)((c_, f_) => c_.copy(runtimeFraction = Option(f_)))
def optionalRuntimeFraction: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[io.envoyproxy.envoy.api.v2.core.RuntimeFractionalPercent]] = field(_.runtimeFraction)((c_, f_) => c_.copy(runtimeFraction = f_))
def traceSampled: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.getTraceSampled)((c_, f_) => c_.copy(traceSampled = Option(f_)))
def optionalTraceSampled: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[_root_.scala.Boolean]] = field(_.traceSampled)((c_, f_) => c_.copy(traceSampled = f_))
}
final val CLUSTER_FIELD_NUMBER = 1
final val RUNTIME_KEY_FIELD_NUMBER = 2
final val RUNTIME_FRACTION_FIELD_NUMBER = 3
final val TRACE_SAMPLED_FIELD_NUMBER = 4
@transient
private[route] val _typemapper_traceSampled: _root_.scalapb.TypeMapper[com.google.protobuf.wrappers.BoolValue, _root_.scala.Boolean] = implicitly[_root_.scalapb.TypeMapper[com.google.protobuf.wrappers.BoolValue, _root_.scala.Boolean]]
def of(
cluster: _root_.scala.Predef.String,
runtimeKey: _root_.scala.Predef.String,
runtimeFraction: _root_.scala.Option[io.envoyproxy.envoy.api.v2.core.RuntimeFractionalPercent],
traceSampled: _root_.scala.Option[_root_.scala.Boolean]
): _root_.io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy = _root_.io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy(
cluster,
runtimeKey,
runtimeFraction,
traceSampled
)
// @@protoc_insertion_point(GeneratedMessageCompanion[envoy.api.v2.route.RouteAction.RequestMirrorPolicy])
}
/** Specifies the route's hashing policy if the upstream cluster uses a hashing :ref:`load balancer
* <arch_overview_load_balancing_types>`.
* [#next-free-field: 7]
*
* @param terminal
* The flag that short-circuits the hash computing. This field provides a
* 'fallback' style of configuration: "if a terminal policy doesn't work,
* fallback to rest of the policy list", it saves time when the terminal
* policy works.
*
* If true, and there is already a hash computed, ignore rest of the
* list of hash polices.
* For example, if the following hash methods are configured:
*
* ========= ========
* specifier terminal
* ========= ========
* Header A true
* Header B false
* Header C false
* ========= ========
*
* The generateHash process ends if policy "header A" generates a hash, as
* it's a terminal policy.
*/
@SerialVersionUID(0L)
final case class HashPolicy(
policySpecifier: io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier.Empty,
terminal: _root_.scala.Boolean = false,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[HashPolicy] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
if (policySpecifier.header.isDefined) {
val __value = policySpecifier.header.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (policySpecifier.cookie.isDefined) {
val __value = policySpecifier.cookie.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (policySpecifier.connectionProperties.isDefined) {
val __value = policySpecifier.connectionProperties.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (policySpecifier.queryParameter.isDefined) {
val __value = policySpecifier.queryParameter.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (policySpecifier.filterState.isDefined) {
val __value = policySpecifier.filterState.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
{
val __value = terminal
if (__value != false) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(4, __value)
}
};
__size += unknownFields.serializedSize
__size
}
override def serializedSize: _root_.scala.Int = {
var __size = __serializedSizeMemoized
if (__size == 0) {
__size = __computeSerializedSize() + 1
__serializedSizeMemoized = __size
}
__size - 1
}
def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
policySpecifier.header.foreach { __v =>
val __m = __v
_output__.writeTag(1, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
policySpecifier.cookie.foreach { __v =>
val __m = __v
_output__.writeTag(2, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
policySpecifier.connectionProperties.foreach { __v =>
val __m = __v
_output__.writeTag(3, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
{
val __v = terminal
if (__v != false) {
_output__.writeBool(4, __v)
}
};
policySpecifier.queryParameter.foreach { __v =>
val __m = __v
_output__.writeTag(5, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
policySpecifier.filterState.foreach { __v =>
val __m = __v
_output__.writeTag(6, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def getHeader: io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header = policySpecifier.header.getOrElse(io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header.defaultInstance)
def withHeader(__v: io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header): HashPolicy = copy(policySpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier.Header(__v))
def getCookie: io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie = policySpecifier.cookie.getOrElse(io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie.defaultInstance)
def withCookie(__v: io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie): HashPolicy = copy(policySpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier.Cookie(__v))
def getConnectionProperties: io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties = policySpecifier.connectionProperties.getOrElse(io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties.defaultInstance)
def withConnectionProperties(__v: io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties): HashPolicy = copy(policySpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier.ConnectionProperties(__v))
def getQueryParameter: io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter = policySpecifier.queryParameter.getOrElse(io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter.defaultInstance)
def withQueryParameter(__v: io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter): HashPolicy = copy(policySpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier.QueryParameter(__v))
def getFilterState: io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState = policySpecifier.filterState.getOrElse(io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState.defaultInstance)
def withFilterState(__v: io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState): HashPolicy = copy(policySpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier.FilterState(__v))
def withTerminal(__v: _root_.scala.Boolean): HashPolicy = copy(terminal = __v)
def clearPolicySpecifier: HashPolicy = copy(policySpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier.Empty)
def withPolicySpecifier(__v: io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier): HashPolicy = copy(policySpecifier = __v)
def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v)
def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty)
def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = {
(__fieldNumber: @_root_.scala.unchecked) match {
case 1 => policySpecifier.header.orNull
case 2 => policySpecifier.cookie.orNull
case 3 => policySpecifier.connectionProperties.orNull
case 5 => policySpecifier.queryParameter.orNull
case 6 => policySpecifier.filterState.orNull
case 4 => {
val __t = terminal
if (__t != false) __t else null
}
}
}
def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
_root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
(__field.number: @_root_.scala.unchecked) match {
case 1 => policySpecifier.header.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 2 => policySpecifier.cookie.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 3 => policySpecifier.connectionProperties.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 5 => policySpecifier.queryParameter.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 6 => policySpecifier.filterState.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 4 => _root_.scalapb.descriptors.PBoolean(terminal)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.type = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy
// @@protoc_insertion_point(GeneratedMessage[envoy.api.v2.route.RouteAction.HashPolicy])
}
object HashPolicy extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy = {
var __terminal: _root_.scala.Boolean = false
var __policySpecifier: io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier.Empty
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 10 =>
__policySpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier.Header(__policySpecifier.header.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 18 =>
__policySpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier.Cookie(__policySpecifier.cookie.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 26 =>
__policySpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier.ConnectionProperties(__policySpecifier.connectionProperties.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 42 =>
__policySpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier.QueryParameter(__policySpecifier.queryParameter.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 50 =>
__policySpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier.FilterState(__policySpecifier.filterState.fold(_root_.scalapb.LiteParser.readMessage[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 32 =>
__terminal = _input__.readBool()
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy(
terminal = __terminal,
policySpecifier = __policySpecifier,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy] = _root_.scalapb.descriptors.Reads{
case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
_root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy(
terminal = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Boolean]).getOrElse(false),
policySpecifier = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header]]).map(io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier.Header(_))
.orElse[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier](__fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie]]).map(io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier.Cookie(_)))
.orElse[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier](__fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties]]).map(io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier.ConnectionProperties(_)))
.orElse[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier](__fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter]]).map(io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier.QueryParameter(_)))
.orElse[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier](__fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).flatMap(_.as[_root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState]]).map(io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier.FilterState(_)))
.getOrElse(io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier.Empty)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RouteAction.javaDescriptor.getNestedTypes().get(1)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RouteAction.scalaDescriptor.nestedMessages(1)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 1 => __out = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header
case 2 => __out = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie
case 3 => __out = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties
case 5 => __out = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter
case 6 => __out = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState
}
__out
}
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] =
Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]](
_root_.io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header,
_root_.io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie,
_root_.io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties,
_root_.io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter,
_root_.io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState
)
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy(
terminal = false,
policySpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier.Empty
)
sealed trait PolicySpecifier extends _root_.scalapb.GeneratedOneof {
def isEmpty: _root_.scala.Boolean = false
def isDefined: _root_.scala.Boolean = true
def isHeader: _root_.scala.Boolean = false
def isCookie: _root_.scala.Boolean = false
def isConnectionProperties: _root_.scala.Boolean = false
def isQueryParameter: _root_.scala.Boolean = false
def isFilterState: _root_.scala.Boolean = false
def header: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header] = _root_.scala.None
def cookie: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie] = _root_.scala.None
def connectionProperties: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties] = _root_.scala.None
def queryParameter: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter] = _root_.scala.None
def filterState: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState] = _root_.scala.None
}
object PolicySpecifier {
@SerialVersionUID(0L)
case object Empty extends io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier {
type ValueType = _root_.scala.Nothing
override def isEmpty: _root_.scala.Boolean = true
override def isDefined: _root_.scala.Boolean = false
override def number: _root_.scala.Int = 0
override def value: _root_.scala.Nothing = throw new java.util.NoSuchElementException("Empty.value")
}
@SerialVersionUID(0L)
final case class Header(value: io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header) extends io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier {
type ValueType = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header
override def isHeader: _root_.scala.Boolean = true
override def header: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header] = Some(value)
override def number: _root_.scala.Int = 1
}
@SerialVersionUID(0L)
final case class Cookie(value: io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie) extends io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier {
type ValueType = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie
override def isCookie: _root_.scala.Boolean = true
override def cookie: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie] = Some(value)
override def number: _root_.scala.Int = 2
}
@SerialVersionUID(0L)
final case class ConnectionProperties(value: io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties) extends io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier {
type ValueType = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties
override def isConnectionProperties: _root_.scala.Boolean = true
override def connectionProperties: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties] = Some(value)
override def number: _root_.scala.Int = 3
}
@SerialVersionUID(0L)
final case class QueryParameter(value: io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter) extends io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier {
type ValueType = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter
override def isQueryParameter: _root_.scala.Boolean = true
override def queryParameter: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter] = Some(value)
override def number: _root_.scala.Int = 5
}
@SerialVersionUID(0L)
final case class FilterState(value: io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState) extends io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier {
type ValueType = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState
override def isFilterState: _root_.scala.Boolean = true
override def filterState: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState] = Some(value)
override def number: _root_.scala.Int = 6
}
}
/** @param headerName
* The name of the request header that will be used to obtain the hash
* key. If the request header is not present, no hash will be produced.
*/
@SerialVersionUID(0L)
final case class Header(
headerName: _root_.scala.Predef.String = "",
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Header] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = headerName
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value)
}
};
__size += unknownFields.serializedSize
__size
}
override def serializedSize: _root_.scala.Int = {
var __size = __serializedSizeMemoized
if (__size == 0) {
__size = __computeSerializedSize() + 1
__serializedSizeMemoized = __size
}
__size - 1
}
def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
{
val __v = headerName
if (!__v.isEmpty) {
_output__.writeString(1, __v)
}
};
unknownFields.writeTo(_output__)
}
def withHeaderName(__v: _root_.scala.Predef.String): Header = copy(headerName = __v)
def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v)
def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty)
def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = {
(__fieldNumber: @_root_.scala.unchecked) match {
case 1 => {
val __t = headerName
if (__t != "") __t else null
}
}
}
def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
_root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
(__field.number: @_root_.scala.unchecked) match {
case 1 => _root_.scalapb.descriptors.PString(headerName)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header.type = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header
// @@protoc_insertion_point(GeneratedMessage[envoy.api.v2.route.RouteAction.HashPolicy.Header])
}
object Header extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header = {
var __headerName: _root_.scala.Predef.String = ""
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 10 =>
__headerName = _input__.readStringRequireUtf8()
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header(
headerName = __headerName,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header] = _root_.scalapb.descriptors.Reads{
case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
_root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header(
headerName = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse("")
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.javaDescriptor.getNestedTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.scalaDescriptor.nestedMessages(0)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = throw new MatchError(__number)
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header(
headerName = ""
)
implicit class HeaderLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header](_l) {
def headerName: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.headerName)((c_, f_) => c_.copy(headerName = f_))
}
final val HEADER_NAME_FIELD_NUMBER = 1
def of(
headerName: _root_.scala.Predef.String
): _root_.io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header = _root_.io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header(
headerName
)
// @@protoc_insertion_point(GeneratedMessageCompanion[envoy.api.v2.route.RouteAction.HashPolicy.Header])
}
/** Envoy supports two types of cookie affinity:
*
* 1. Passive. Envoy takes a cookie that's present in the cookies header and
* hashes on its value.
*
* 2. Generated. Envoy generates and sets a cookie with an expiration (TTL)
* on the first request from the client in its response to the client,
* based on the endpoint the request gets sent to. The client then
* presents this on the next and all subsequent requests. The hash of
* this is sufficient to ensure these requests get sent to the same
* endpoint. The cookie is generated by hashing the source and
* destination ports and addresses so that multiple independent HTTP2
* streams on the same connection will independently receive the same
* cookie, even if they arrive at the Envoy simultaneously.
*
* @param name
* The name of the cookie that will be used to obtain the hash key. If the
* cookie is not present and ttl below is not set, no hash will be
* produced.
* @param ttl
* If specified, a cookie with the TTL will be generated if the cookie is
* not present. If the TTL is present and zero, the generated cookie will
* be a session cookie.
* @param path
* The name of the path for the cookie. If no path is specified here, no path
* will be set for the cookie.
*/
@SerialVersionUID(0L)
final case class Cookie(
name: _root_.scala.Predef.String = "",
ttl: _root_.scala.Option[com.google.protobuf.duration.Duration] = _root_.scala.None,
path: _root_.scala.Predef.String = "",
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Cookie] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = name
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value)
}
};
if (ttl.isDefined) {
val __value = ttl.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
{
val __value = path
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(3, __value)
}
};
__size += unknownFields.serializedSize
__size
}
override def serializedSize: _root_.scala.Int = {
var __size = __serializedSizeMemoized
if (__size == 0) {
__size = __computeSerializedSize() + 1
__serializedSizeMemoized = __size
}
__size - 1
}
def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
{
val __v = name
if (!__v.isEmpty) {
_output__.writeString(1, __v)
}
};
ttl.foreach { __v =>
val __m = __v
_output__.writeTag(2, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
{
val __v = path
if (!__v.isEmpty) {
_output__.writeString(3, __v)
}
};
unknownFields.writeTo(_output__)
}
def withName(__v: _root_.scala.Predef.String): Cookie = copy(name = __v)
def getTtl: com.google.protobuf.duration.Duration = ttl.getOrElse(com.google.protobuf.duration.Duration.defaultInstance)
def clearTtl: Cookie = copy(ttl = _root_.scala.None)
def withTtl(__v: com.google.protobuf.duration.Duration): Cookie = copy(ttl = Option(__v))
def withPath(__v: _root_.scala.Predef.String): Cookie = copy(path = __v)
def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v)
def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty)
def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = {
(__fieldNumber: @_root_.scala.unchecked) match {
case 1 => {
val __t = name
if (__t != "") __t else null
}
case 2 => ttl.orNull
case 3 => {
val __t = path
if (__t != "") __t else null
}
}
}
def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
_root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
(__field.number: @_root_.scala.unchecked) match {
case 1 => _root_.scalapb.descriptors.PString(name)
case 2 => ttl.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 3 => _root_.scalapb.descriptors.PString(path)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie.type = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie
// @@protoc_insertion_point(GeneratedMessage[envoy.api.v2.route.RouteAction.HashPolicy.Cookie])
}
object Cookie extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie = {
var __name: _root_.scala.Predef.String = ""
var __ttl: _root_.scala.Option[com.google.protobuf.duration.Duration] = _root_.scala.None
var __path: _root_.scala.Predef.String = ""
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 10 =>
__name = _input__.readStringRequireUtf8()
case 18 =>
__ttl = Option(__ttl.fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.duration.Duration](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 26 =>
__path = _input__.readStringRequireUtf8()
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie(
name = __name,
ttl = __ttl,
path = __path,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie] = _root_.scalapb.descriptors.Reads{
case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
_root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie(
name = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
ttl = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.duration.Duration]]),
path = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Predef.String]).getOrElse("")
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.javaDescriptor.getNestedTypes().get(1)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.scalaDescriptor.nestedMessages(1)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 2 => __out = com.google.protobuf.duration.Duration
}
__out
}
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie(
name = "",
ttl = _root_.scala.None,
path = ""
)
implicit class CookieLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie](_l) {
def name: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.name)((c_, f_) => c_.copy(name = f_))
def ttl: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.duration.Duration] = field(_.getTtl)((c_, f_) => c_.copy(ttl = Option(f_)))
def optionalTtl: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.duration.Duration]] = field(_.ttl)((c_, f_) => c_.copy(ttl = f_))
def path: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.path)((c_, f_) => c_.copy(path = f_))
}
final val NAME_FIELD_NUMBER = 1
final val TTL_FIELD_NUMBER = 2
final val PATH_FIELD_NUMBER = 3
def of(
name: _root_.scala.Predef.String,
ttl: _root_.scala.Option[com.google.protobuf.duration.Duration],
path: _root_.scala.Predef.String
): _root_.io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie = _root_.io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie(
name,
ttl,
path
)
// @@protoc_insertion_point(GeneratedMessageCompanion[envoy.api.v2.route.RouteAction.HashPolicy.Cookie])
}
/** @param sourceIp
* Hash on source IP address.
*/
@SerialVersionUID(0L)
final case class ConnectionProperties(
sourceIp: _root_.scala.Boolean = false,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ConnectionProperties] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = sourceIp
if (__value != false) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(1, __value)
}
};
__size += unknownFields.serializedSize
__size
}
override def serializedSize: _root_.scala.Int = {
var __size = __serializedSizeMemoized
if (__size == 0) {
__size = __computeSerializedSize() + 1
__serializedSizeMemoized = __size
}
__size - 1
}
def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
{
val __v = sourceIp
if (__v != false) {
_output__.writeBool(1, __v)
}
};
unknownFields.writeTo(_output__)
}
def withSourceIp(__v: _root_.scala.Boolean): ConnectionProperties = copy(sourceIp = __v)
def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v)
def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty)
def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = {
(__fieldNumber: @_root_.scala.unchecked) match {
case 1 => {
val __t = sourceIp
if (__t != false) __t else null
}
}
}
def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
_root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
(__field.number: @_root_.scala.unchecked) match {
case 1 => _root_.scalapb.descriptors.PBoolean(sourceIp)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties.type = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties
// @@protoc_insertion_point(GeneratedMessage[envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties])
}
object ConnectionProperties extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties = {
var __sourceIp: _root_.scala.Boolean = false
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 8 =>
__sourceIp = _input__.readBool()
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties(
sourceIp = __sourceIp,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties] = _root_.scalapb.descriptors.Reads{
case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
_root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties(
sourceIp = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Boolean]).getOrElse(false)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.javaDescriptor.getNestedTypes().get(2)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.scalaDescriptor.nestedMessages(2)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = throw new MatchError(__number)
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties(
sourceIp = false
)
implicit class ConnectionPropertiesLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties](_l) {
def sourceIp: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.sourceIp)((c_, f_) => c_.copy(sourceIp = f_))
}
final val SOURCE_IP_FIELD_NUMBER = 1
def of(
sourceIp: _root_.scala.Boolean
): _root_.io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties = _root_.io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties(
sourceIp
)
// @@protoc_insertion_point(GeneratedMessageCompanion[envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties])
}
/** @param name
* The name of the URL query parameter that will be used to obtain the hash
* key. If the parameter is not present, no hash will be produced. Query
* parameter names are case-sensitive.
*/
@SerialVersionUID(0L)
final case class QueryParameter(
name: _root_.scala.Predef.String = "",
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[QueryParameter] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = name
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value)
}
};
__size += unknownFields.serializedSize
__size
}
override def serializedSize: _root_.scala.Int = {
var __size = __serializedSizeMemoized
if (__size == 0) {
__size = __computeSerializedSize() + 1
__serializedSizeMemoized = __size
}
__size - 1
}
def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
{
val __v = name
if (!__v.isEmpty) {
_output__.writeString(1, __v)
}
};
unknownFields.writeTo(_output__)
}
def withName(__v: _root_.scala.Predef.String): QueryParameter = copy(name = __v)
def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v)
def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty)
def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = {
(__fieldNumber: @_root_.scala.unchecked) match {
case 1 => {
val __t = name
if (__t != "") __t else null
}
}
}
def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
_root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
(__field.number: @_root_.scala.unchecked) match {
case 1 => _root_.scalapb.descriptors.PString(name)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter.type = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter
// @@protoc_insertion_point(GeneratedMessage[envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter])
}
object QueryParameter extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter = {
var __name: _root_.scala.Predef.String = ""
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 10 =>
__name = _input__.readStringRequireUtf8()
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter(
name = __name,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter] = _root_.scalapb.descriptors.Reads{
case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
_root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter(
name = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse("")
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.javaDescriptor.getNestedTypes().get(3)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.scalaDescriptor.nestedMessages(3)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = throw new MatchError(__number)
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter(
name = ""
)
implicit class QueryParameterLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter](_l) {
def name: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.name)((c_, f_) => c_.copy(name = f_))
}
final val NAME_FIELD_NUMBER = 1
def of(
name: _root_.scala.Predef.String
): _root_.io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter = _root_.io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter(
name
)
// @@protoc_insertion_point(GeneratedMessageCompanion[envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter])
}
/** @param key
* The name of the Object in the per-request filterState, which is an
* Envoy::Hashable object. If there is no data associated with the key,
* or the stored object is not Envoy::Hashable, no hash will be produced.
*/
@SerialVersionUID(0L)
final case class FilterState(
key: _root_.scala.Predef.String = "",
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[FilterState] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = key
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value)
}
};
__size += unknownFields.serializedSize
__size
}
override def serializedSize: _root_.scala.Int = {
var __size = __serializedSizeMemoized
if (__size == 0) {
__size = __computeSerializedSize() + 1
__serializedSizeMemoized = __size
}
__size - 1
}
def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
{
val __v = key
if (!__v.isEmpty) {
_output__.writeString(1, __v)
}
};
unknownFields.writeTo(_output__)
}
def withKey(__v: _root_.scala.Predef.String): FilterState = copy(key = __v)
def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v)
def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty)
def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = {
(__fieldNumber: @_root_.scala.unchecked) match {
case 1 => {
val __t = key
if (__t != "") __t else null
}
}
}
def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
_root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
(__field.number: @_root_.scala.unchecked) match {
case 1 => _root_.scalapb.descriptors.PString(key)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState.type = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState
// @@protoc_insertion_point(GeneratedMessage[envoy.api.v2.route.RouteAction.HashPolicy.FilterState])
}
object FilterState extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState = {
var __key: _root_.scala.Predef.String = ""
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 10 =>
__key = _input__.readStringRequireUtf8()
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState(
key = __key,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState] = _root_.scalapb.descriptors.Reads{
case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
_root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState(
key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse("")
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.javaDescriptor.getNestedTypes().get(4)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.scalaDescriptor.nestedMessages(4)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = throw new MatchError(__number)
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState(
key = ""
)
implicit class FilterStateLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState](_l) {
def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_))
}
final val KEY_FIELD_NUMBER = 1
def of(
key: _root_.scala.Predef.String
): _root_.io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState = _root_.io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState(
key
)
// @@protoc_insertion_point(GeneratedMessageCompanion[envoy.api.v2.route.RouteAction.HashPolicy.FilterState])
}
implicit class HashPolicyLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy](_l) {
def header: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Header] = field(_.getHeader)((c_, f_) => c_.copy(policySpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier.Header(f_)))
def cookie: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie] = field(_.getCookie)((c_, f_) => c_.copy(policySpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier.Cookie(f_)))
def connectionProperties: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties] = field(_.getConnectionProperties)((c_, f_) => c_.copy(policySpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier.ConnectionProperties(f_)))
def queryParameter: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter] = field(_.getQueryParameter)((c_, f_) => c_.copy(policySpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier.QueryParameter(f_)))
def filterState: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.FilterState] = field(_.getFilterState)((c_, f_) => c_.copy(policySpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier.FilterState(f_)))
def terminal: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.terminal)((c_, f_) => c_.copy(terminal = f_))
def policySpecifier: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier] = field(_.policySpecifier)((c_, f_) => c_.copy(policySpecifier = f_))
}
final val HEADER_FIELD_NUMBER = 1
final val COOKIE_FIELD_NUMBER = 2
final val CONNECTION_PROPERTIES_FIELD_NUMBER = 3
final val QUERY_PARAMETER_FIELD_NUMBER = 5
final val FILTER_STATE_FIELD_NUMBER = 6
final val TERMINAL_FIELD_NUMBER = 4
def of(
policySpecifier: io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.PolicySpecifier,
terminal: _root_.scala.Boolean
): _root_.io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy = _root_.io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy(
policySpecifier,
terminal
)
// @@protoc_insertion_point(GeneratedMessageCompanion[envoy.api.v2.route.RouteAction.HashPolicy])
}
/** Allows enabling and disabling upgrades on a per-route basis.
* This overrides any enabled/disabled upgrade filter chain specified in the
* HttpConnectionManager
* :ref:`upgrade_configs
* <envoy_api_field_config.filter.network.http_connection_manager.v2.HttpConnectionManager.upgrade_configs>`
* but does not affect any custom filter chain specified there.
*
* @param upgradeType
* The case-insensitive name of this upgrade, e.g. "websocket".
* For each upgrade type present in upgrade_configs, requests with
* Upgrade: [upgrade_type] will be proxied upstream.
* @param enabled
* Determines if upgrades are available on this route. Defaults to true.
*/
@SerialVersionUID(0L)
final case class UpgradeConfig(
upgradeType: _root_.scala.Predef.String = "",
enabled: _root_.scala.Option[_root_.scala.Boolean] = _root_.scala.None,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[UpgradeConfig] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = upgradeType
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value)
}
};
if (enabled.isDefined) {
val __value = io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig._typemapper_enabled.toBase(enabled.get)
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
__size += unknownFields.serializedSize
__size
}
override def serializedSize: _root_.scala.Int = {
var __size = __serializedSizeMemoized
if (__size == 0) {
__size = __computeSerializedSize() + 1
__serializedSizeMemoized = __size
}
__size - 1
}
def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
{
val __v = upgradeType
if (!__v.isEmpty) {
_output__.writeString(1, __v)
}
};
enabled.foreach { __v =>
val __m = io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig._typemapper_enabled.toBase(__v)
_output__.writeTag(2, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def withUpgradeType(__v: _root_.scala.Predef.String): UpgradeConfig = copy(upgradeType = __v)
def getEnabled: _root_.scala.Boolean = enabled.getOrElse(io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig._typemapper_enabled.toCustom(com.google.protobuf.wrappers.BoolValue.defaultInstance))
def clearEnabled: UpgradeConfig = copy(enabled = _root_.scala.None)
def withEnabled(__v: _root_.scala.Boolean): UpgradeConfig = copy(enabled = Option(__v))
def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v)
def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty)
def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = {
(__fieldNumber: @_root_.scala.unchecked) match {
case 1 => {
val __t = upgradeType
if (__t != "") __t else null
}
case 2 => enabled.map(io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig._typemapper_enabled.toBase(_)).orNull
}
}
def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
_root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
(__field.number: @_root_.scala.unchecked) match {
case 1 => _root_.scalapb.descriptors.PString(upgradeType)
case 2 => enabled.map(io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig._typemapper_enabled.toBase(_).toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig.type = io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig
// @@protoc_insertion_point(GeneratedMessage[envoy.api.v2.route.RouteAction.UpgradeConfig])
}
object UpgradeConfig extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig = {
var __upgradeType: _root_.scala.Predef.String = ""
var __enabled: _root_.scala.Option[_root_.scala.Boolean] = _root_.scala.None
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 10 =>
__upgradeType = _input__.readStringRequireUtf8()
case 18 =>
__enabled = Option(io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig._typemapper_enabled.toCustom(__enabled.map(io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig._typemapper_enabled.toBase(_)).fold(_root_.scalapb.LiteParser.readMessage[com.google.protobuf.wrappers.BoolValue](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _))))
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig(
upgradeType = __upgradeType,
enabled = __enabled,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig] = _root_.scalapb.descriptors.Reads{
case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
_root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig(
upgradeType = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
enabled = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[com.google.protobuf.wrappers.BoolValue]]).map(io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig._typemapper_enabled.toCustom(_))
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RouteAction.javaDescriptor.getNestedTypes().get(2)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = io.envoyproxy.envoy.api.v2.route.RouteAction.scalaDescriptor.nestedMessages(2)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 2 => __out = com.google.protobuf.wrappers.BoolValue
}
__out
}
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig(
upgradeType = "",
enabled = _root_.scala.None
)
implicit class UpgradeConfigLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig](_l) {
def upgradeType: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.upgradeType)((c_, f_) => c_.copy(upgradeType = f_))
def enabled: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.getEnabled)((c_, f_) => c_.copy(enabled = Option(f_)))
def optionalEnabled: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[_root_.scala.Boolean]] = field(_.enabled)((c_, f_) => c_.copy(enabled = f_))
}
final val UPGRADE_TYPE_FIELD_NUMBER = 1
final val ENABLED_FIELD_NUMBER = 2
@transient
private[route] val _typemapper_enabled: _root_.scalapb.TypeMapper[com.google.protobuf.wrappers.BoolValue, _root_.scala.Boolean] = implicitly[_root_.scalapb.TypeMapper[com.google.protobuf.wrappers.BoolValue, _root_.scala.Boolean]]
def of(
upgradeType: _root_.scala.Predef.String,
enabled: _root_.scala.Option[_root_.scala.Boolean]
): _root_.io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig = _root_.io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig(
upgradeType,
enabled
)
// @@protoc_insertion_point(GeneratedMessageCompanion[envoy.api.v2.route.RouteAction.UpgradeConfig])
}
implicit class RouteActionLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction](_l) {
def cluster: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.getCluster)((c_, f_) => c_.copy(clusterSpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier.Cluster(f_)))
def clusterHeader: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.getClusterHeader)((c_, f_) => c_.copy(clusterSpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier.ClusterHeader(f_)))
def weightedClusters: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.WeightedCluster] = field(_.getWeightedClusters)((c_, f_) => c_.copy(clusterSpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier.WeightedClusters(f_)))
def clusterNotFoundResponseCode: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterNotFoundResponseCode] = field(_.clusterNotFoundResponseCode)((c_, f_) => c_.copy(clusterNotFoundResponseCode = f_))
def metadataMatch: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.core.Metadata] = field(_.getMetadataMatch)((c_, f_) => c_.copy(metadataMatch = Option(f_)))
def optionalMetadataMatch: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[io.envoyproxy.envoy.api.v2.core.Metadata]] = field(_.metadataMatch)((c_, f_) => c_.copy(metadataMatch = f_))
def prefixRewrite: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.prefixRewrite)((c_, f_) => c_.copy(prefixRewrite = f_))
def regexRewrite: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.`type`.matcher.RegexMatchAndSubstitute] = field(_.getRegexRewrite)((c_, f_) => c_.copy(regexRewrite = Option(f_)))
def optionalRegexRewrite: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[io.envoyproxy.envoy.`type`.matcher.RegexMatchAndSubstitute]] = field(_.regexRewrite)((c_, f_) => c_.copy(regexRewrite = f_))
def hostRewrite: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.getHostRewrite)((c_, f_) => c_.copy(hostRewriteSpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier.HostRewrite(f_)))
def autoHostRewrite: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.getAutoHostRewrite)((c_, f_) => c_.copy(hostRewriteSpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier.AutoHostRewrite(f_)))
def autoHostRewriteHeader: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.getAutoHostRewriteHeader)((c_, f_) => c_.copy(hostRewriteSpecifier = io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier.AutoHostRewriteHeader(f_)))
def timeout: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.duration.Duration] = field(_.getTimeout)((c_, f_) => c_.copy(timeout = Option(f_)))
def optionalTimeout: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.duration.Duration]] = field(_.timeout)((c_, f_) => c_.copy(timeout = f_))
def idleTimeout: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.duration.Duration] = field(_.getIdleTimeout)((c_, f_) => c_.copy(idleTimeout = Option(f_)))
def optionalIdleTimeout: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.duration.Duration]] = field(_.idleTimeout)((c_, f_) => c_.copy(idleTimeout = f_))
def retryPolicy: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RetryPolicy] = field(_.getRetryPolicy)((c_, f_) => c_.copy(retryPolicy = Option(f_)))
def optionalRetryPolicy: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RetryPolicy]] = field(_.retryPolicy)((c_, f_) => c_.copy(retryPolicy = f_))
def retryPolicyTypedConfig: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.any.Any] = field(_.getRetryPolicyTypedConfig)((c_, f_) => c_.copy(retryPolicyTypedConfig = Option(f_)))
def optionalRetryPolicyTypedConfig: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.any.Any]] = field(_.retryPolicyTypedConfig)((c_, f_) => c_.copy(retryPolicyTypedConfig = f_))
def requestMirrorPolicy: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy] = field(_.getRequestMirrorPolicy)((c_, f_) => c_.copy(requestMirrorPolicy = Option(f_)))
def optionalRequestMirrorPolicy: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy]] = field(_.requestMirrorPolicy)((c_, f_) => c_.copy(requestMirrorPolicy = f_))
def requestMirrorPolicies: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy]] = field(_.requestMirrorPolicies)((c_, f_) => c_.copy(requestMirrorPolicies = f_))
def priority: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.core.RoutingPriority] = field(_.priority)((c_, f_) => c_.copy(priority = f_))
def rateLimits: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.RateLimit]] = field(_.rateLimits)((c_, f_) => c_.copy(rateLimits = f_))
def includeVhRateLimits: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.getIncludeVhRateLimits)((c_, f_) => c_.copy(includeVhRateLimits = Option(f_)))
def optionalIncludeVhRateLimits: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[_root_.scala.Boolean]] = field(_.includeVhRateLimits)((c_, f_) => c_.copy(includeVhRateLimits = f_))
def hashPolicy: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy]] = field(_.hashPolicy)((c_, f_) => c_.copy(hashPolicy = f_))
def cors: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.CorsPolicy] = field(_.getCors)((c_, f_) => c_.copy(cors = Option(f_)))
def optionalCors: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.CorsPolicy]] = field(_.cors)((c_, f_) => c_.copy(cors = f_))
def maxGrpcTimeout: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.duration.Duration] = field(_.getMaxGrpcTimeout)((c_, f_) => c_.copy(maxGrpcTimeout = Option(f_)))
def optionalMaxGrpcTimeout: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.duration.Duration]] = field(_.maxGrpcTimeout)((c_, f_) => c_.copy(maxGrpcTimeout = f_))
def grpcTimeoutOffset: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.duration.Duration] = field(_.getGrpcTimeoutOffset)((c_, f_) => c_.copy(grpcTimeoutOffset = Option(f_)))
def optionalGrpcTimeoutOffset: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.duration.Duration]] = field(_.grpcTimeoutOffset)((c_, f_) => c_.copy(grpcTimeoutOffset = f_))
def upgradeConfigs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig]] = field(_.upgradeConfigs)((c_, f_) => c_.copy(upgradeConfigs = f_))
def internalRedirectAction: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.InternalRedirectAction] = field(_.internalRedirectAction)((c_, f_) => c_.copy(internalRedirectAction = f_))
def maxInternalRedirects: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Int] = field(_.getMaxInternalRedirects)((c_, f_) => c_.copy(maxInternalRedirects = Option(f_)))
def optionalMaxInternalRedirects: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[_root_.scala.Int]] = field(_.maxInternalRedirects)((c_, f_) => c_.copy(maxInternalRedirects = f_))
def hedgePolicy: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.HedgePolicy] = field(_.getHedgePolicy)((c_, f_) => c_.copy(hedgePolicy = Option(f_)))
def optionalHedgePolicy: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.HedgePolicy]] = field(_.hedgePolicy)((c_, f_) => c_.copy(hedgePolicy = f_))
def clusterSpecifier: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier] = field(_.clusterSpecifier)((c_, f_) => c_.copy(clusterSpecifier = f_))
def hostRewriteSpecifier: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier] = field(_.hostRewriteSpecifier)((c_, f_) => c_.copy(hostRewriteSpecifier = f_))
}
final val CLUSTER_FIELD_NUMBER = 1
final val CLUSTER_HEADER_FIELD_NUMBER = 2
final val WEIGHTED_CLUSTERS_FIELD_NUMBER = 3
final val CLUSTER_NOT_FOUND_RESPONSE_CODE_FIELD_NUMBER = 20
final val METADATA_MATCH_FIELD_NUMBER = 4
final val PREFIX_REWRITE_FIELD_NUMBER = 5
final val REGEX_REWRITE_FIELD_NUMBER = 32
final val HOST_REWRITE_FIELD_NUMBER = 6
final val AUTO_HOST_REWRITE_FIELD_NUMBER = 7
final val AUTO_HOST_REWRITE_HEADER_FIELD_NUMBER = 29
final val TIMEOUT_FIELD_NUMBER = 8
final val IDLE_TIMEOUT_FIELD_NUMBER = 24
final val RETRY_POLICY_FIELD_NUMBER = 9
final val RETRY_POLICY_TYPED_CONFIG_FIELD_NUMBER = 33
final val REQUEST_MIRROR_POLICY_FIELD_NUMBER = 10
final val REQUEST_MIRROR_POLICIES_FIELD_NUMBER = 30
final val PRIORITY_FIELD_NUMBER = 11
final val RATE_LIMITS_FIELD_NUMBER = 13
final val INCLUDE_VH_RATE_LIMITS_FIELD_NUMBER = 14
final val HASH_POLICY_FIELD_NUMBER = 15
final val CORS_FIELD_NUMBER = 17
final val MAX_GRPC_TIMEOUT_FIELD_NUMBER = 23
final val GRPC_TIMEOUT_OFFSET_FIELD_NUMBER = 28
final val UPGRADE_CONFIGS_FIELD_NUMBER = 25
final val INTERNAL_REDIRECT_ACTION_FIELD_NUMBER = 26
final val MAX_INTERNAL_REDIRECTS_FIELD_NUMBER = 31
final val HEDGE_POLICY_FIELD_NUMBER = 27
@transient
private[route] val _typemapper_autoHostRewrite: _root_.scalapb.TypeMapper[com.google.protobuf.wrappers.BoolValue, _root_.scala.Boolean] = implicitly[_root_.scalapb.TypeMapper[com.google.protobuf.wrappers.BoolValue, _root_.scala.Boolean]]
@transient
private[route] val _typemapper_includeVhRateLimits: _root_.scalapb.TypeMapper[com.google.protobuf.wrappers.BoolValue, _root_.scala.Boolean] = implicitly[_root_.scalapb.TypeMapper[com.google.protobuf.wrappers.BoolValue, _root_.scala.Boolean]]
@transient
private[route] val _typemapper_maxInternalRedirects: _root_.scalapb.TypeMapper[com.google.protobuf.wrappers.UInt32Value, _root_.scala.Int] = implicitly[_root_.scalapb.TypeMapper[com.google.protobuf.wrappers.UInt32Value, _root_.scala.Int]]
def of(
clusterSpecifier: io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterSpecifier,
clusterNotFoundResponseCode: io.envoyproxy.envoy.api.v2.route.RouteAction.ClusterNotFoundResponseCode,
metadataMatch: _root_.scala.Option[io.envoyproxy.envoy.api.v2.core.Metadata],
prefixRewrite: _root_.scala.Predef.String,
regexRewrite: _root_.scala.Option[io.envoyproxy.envoy.`type`.matcher.RegexMatchAndSubstitute],
hostRewriteSpecifier: io.envoyproxy.envoy.api.v2.route.RouteAction.HostRewriteSpecifier,
timeout: _root_.scala.Option[com.google.protobuf.duration.Duration],
idleTimeout: _root_.scala.Option[com.google.protobuf.duration.Duration],
retryPolicy: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RetryPolicy],
retryPolicyTypedConfig: _root_.scala.Option[com.google.protobuf.any.Any],
requestMirrorPolicy: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy],
requestMirrorPolicies: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.RouteAction.RequestMirrorPolicy],
priority: io.envoyproxy.envoy.api.v2.core.RoutingPriority,
rateLimits: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.RateLimit],
includeVhRateLimits: _root_.scala.Option[_root_.scala.Boolean],
hashPolicy: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy],
cors: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.CorsPolicy],
maxGrpcTimeout: _root_.scala.Option[com.google.protobuf.duration.Duration],
grpcTimeoutOffset: _root_.scala.Option[com.google.protobuf.duration.Duration],
upgradeConfigs: _root_.scala.Seq[io.envoyproxy.envoy.api.v2.route.RouteAction.UpgradeConfig],
internalRedirectAction: io.envoyproxy.envoy.api.v2.route.RouteAction.InternalRedirectAction,
maxInternalRedirects: _root_.scala.Option[_root_.scala.Int],
hedgePolicy: _root_.scala.Option[io.envoyproxy.envoy.api.v2.route.HedgePolicy]
): _root_.io.envoyproxy.envoy.api.v2.route.RouteAction = _root_.io.envoyproxy.envoy.api.v2.route.RouteAction(
clusterSpecifier,
clusterNotFoundResponseCode,
metadataMatch,
prefixRewrite,
regexRewrite,
hostRewriteSpecifier,
timeout,
idleTimeout,
retryPolicy,
retryPolicyTypedConfig,
requestMirrorPolicy,
requestMirrorPolicies,
priority,
rateLimits,
includeVhRateLimits,
hashPolicy,
cors,
maxGrpcTimeout,
grpcTimeoutOffset,
upgradeConfigs,
internalRedirectAction,
maxInternalRedirects,
hedgePolicy
)
// @@protoc_insertion_point(GeneratedMessageCompanion[envoy.api.v2.route.RouteAction])
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy