
com.google.api.backend.BackendRule.scala Maven / Gradle / Ivy
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3
package com.google.api.backend
/** A backend rule provides configuration for an individual API element.
*
* @param selector
* Selects the methods to which this rule applies.
*
* Refer to [selector][google.api.DocumentationRule.selector] for syntax
* details.
* @param address
* The address of the API backend.
*
* The scheme is used to determine the backend protocol and security.
* The following schemes are accepted:
*
* SCHEME PROTOCOL SECURITY
* http:// HTTP None
* https:// HTTP TLS
* grpc:// gRPC None
* grpcs:// gRPC TLS
*
* It is recommended to explicitly include a scheme. Leaving out the scheme
* may cause constrasting behaviors across platforms.
*
* If the port is unspecified, the default is:
* - 80 for schemes without TLS
* - 443 for schemes with TLS
*
* For HTTP backends, use [protocol][google.api.BackendRule.protocol]
* to specify the protocol version.
* @param deadline
* The number of seconds to wait for a response from a request. The default
* varies based on the request protocol and deployment environment.
* @param minDeadline
* Deprecated, do not use.
* @param operationDeadline
* The number of seconds to wait for the completion of a long running
* operation. The default is no deadline.
* @param protocol
* The protocol used for sending a request to the backend.
* The supported values are "http/1.1" and "h2".
*
* The default value is inferred from the scheme in the
* [address][google.api.BackendRule.address] field:
*
* SCHEME PROTOCOL
* http:// http/1.1
* https:// http/1.1
* grpc:// h2
* grpcs:// h2
*
* For secure HTTP backends (https://) that support HTTP/2, set this field
* to "h2" for improved performance.
*
* Configuring this field to non-default values is only supported for secure
* HTTP backends. This field will be ignored for all other backends.
*
* See
* https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
* for more details on the supported values.
* @param overridesByRequestProtocol
* The map between request protocol and the backend address.
*/
@SerialVersionUID(0L)
final case class BackendRule(
selector: _root_.scala.Predef.String = "",
address: _root_.scala.Predef.String = "",
deadline: _root_.scala.Double = 0.0,
@scala.deprecated(message="Marked as deprecated in proto file", "") minDeadline: _root_.scala.Double = 0.0,
operationDeadline: _root_.scala.Double = 0.0,
pathTranslation: com.google.api.backend.BackendRule.PathTranslation = com.google.api.backend.BackendRule.PathTranslation.PATH_TRANSLATION_UNSPECIFIED,
authentication: com.google.api.backend.BackendRule.Authentication = com.google.api.backend.BackendRule.Authentication.Empty,
protocol: _root_.scala.Predef.String = "",
overridesByRequestProtocol: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, com.google.api.backend.BackendRule] = _root_.scala.collection.immutable.Map.empty,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[BackendRule] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = selector
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value)
}
};
{
val __value = address
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value)
}
};
{
val __value = deadline
if (__value != 0.0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeDoubleSize(3, __value)
}
};
{
val __value = minDeadline
if (__value != 0.0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeDoubleSize(4, __value)
}
};
{
val __value = operationDeadline
if (__value != 0.0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeDoubleSize(5, __value)
}
};
{
val __value = pathTranslation.value
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(6, __value)
}
};
if (authentication.jwtAudience.isDefined) {
val __value = authentication.jwtAudience.get
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(7, __value)
};
if (authentication.disableAuth.isDefined) {
val __value = authentication.disableAuth.get
__size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(8, __value)
};
{
val __value = protocol
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(9, __value)
}
};
overridesByRequestProtocol.foreach { __item =>
val __value = com.google.api.backend.BackendRule._typemapper_overridesByRequestProtocol.toBase(__item)
__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 = selector
if (!__v.isEmpty) {
_output__.writeString(1, __v)
}
};
{
val __v = address
if (!__v.isEmpty) {
_output__.writeString(2, __v)
}
};
{
val __v = deadline
if (__v != 0.0) {
_output__.writeDouble(3, __v)
}
};
{
val __v = minDeadline
if (__v != 0.0) {
_output__.writeDouble(4, __v)
}
};
{
val __v = operationDeadline
if (__v != 0.0) {
_output__.writeDouble(5, __v)
}
};
{
val __v = pathTranslation.value
if (__v != 0) {
_output__.writeEnum(6, __v)
}
};
authentication.jwtAudience.foreach { __v =>
val __m = __v
_output__.writeString(7, __m)
};
authentication.disableAuth.foreach { __v =>
val __m = __v
_output__.writeBool(8, __m)
};
{
val __v = protocol
if (!__v.isEmpty) {
_output__.writeString(9, __v)
}
};
overridesByRequestProtocol.foreach { __v =>
val __m = com.google.api.backend.BackendRule._typemapper_overridesByRequestProtocol.toBase(__v)
_output__.writeTag(10, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def withSelector(__v: _root_.scala.Predef.String): BackendRule = copy(selector = __v)
def withAddress(__v: _root_.scala.Predef.String): BackendRule = copy(address = __v)
def withDeadline(__v: _root_.scala.Double): BackendRule = copy(deadline = __v)
def withMinDeadline(__v: _root_.scala.Double): BackendRule = copy(minDeadline = __v)
def withOperationDeadline(__v: _root_.scala.Double): BackendRule = copy(operationDeadline = __v)
def withPathTranslation(__v: com.google.api.backend.BackendRule.PathTranslation): BackendRule = copy(pathTranslation = __v)
def getJwtAudience: _root_.scala.Predef.String = authentication.jwtAudience.getOrElse("")
def withJwtAudience(__v: _root_.scala.Predef.String): BackendRule = copy(authentication = com.google.api.backend.BackendRule.Authentication.JwtAudience(__v))
def getDisableAuth: _root_.scala.Boolean = authentication.disableAuth.getOrElse(false)
def withDisableAuth(__v: _root_.scala.Boolean): BackendRule = copy(authentication = com.google.api.backend.BackendRule.Authentication.DisableAuth(__v))
def withProtocol(__v: _root_.scala.Predef.String): BackendRule = copy(protocol = __v)
def clearOverridesByRequestProtocol = copy(overridesByRequestProtocol = _root_.scala.collection.immutable.Map.empty)
def addOverridesByRequestProtocol(__vs: (_root_.scala.Predef.String, com.google.api.backend.BackendRule) *): BackendRule = addAllOverridesByRequestProtocol(__vs)
def addAllOverridesByRequestProtocol(__vs: Iterable[(_root_.scala.Predef.String, com.google.api.backend.BackendRule)]): BackendRule = copy(overridesByRequestProtocol = overridesByRequestProtocol ++ __vs)
def withOverridesByRequestProtocol(__v: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, com.google.api.backend.BackendRule]): BackendRule = copy(overridesByRequestProtocol = __v)
def clearAuthentication: BackendRule = copy(authentication = com.google.api.backend.BackendRule.Authentication.Empty)
def withAuthentication(__v: com.google.api.backend.BackendRule.Authentication): BackendRule = copy(authentication = __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 = selector
if (__t != "") __t else null
}
case 2 => {
val __t = address
if (__t != "") __t else null
}
case 3 => {
val __t = deadline
if (__t != 0.0) __t else null
}
case 4 => {
val __t = minDeadline
if (__t != 0.0) __t else null
}
case 5 => {
val __t = operationDeadline
if (__t != 0.0) __t else null
}
case 6 => {
val __t = pathTranslation.javaValueDescriptor
if (__t.getNumber() != 0) __t else null
}
case 7 => authentication.jwtAudience.orNull
case 8 => authentication.disableAuth.orNull
case 9 => {
val __t = protocol
if (__t != "") __t else null
}
case 10 => overridesByRequestProtocol.iterator.map(com.google.api.backend.BackendRule._typemapper_overridesByRequestProtocol.toBase(_)).toSeq
}
}
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(selector)
case 2 => _root_.scalapb.descriptors.PString(address)
case 3 => _root_.scalapb.descriptors.PDouble(deadline)
case 4 => _root_.scalapb.descriptors.PDouble(minDeadline)
case 5 => _root_.scalapb.descriptors.PDouble(operationDeadline)
case 6 => _root_.scalapb.descriptors.PEnum(pathTranslation.scalaValueDescriptor)
case 7 => authentication.jwtAudience.map(_root_.scalapb.descriptors.PString(_)).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 8 => authentication.disableAuth.map(_root_.scalapb.descriptors.PBoolean(_)).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 9 => _root_.scalapb.descriptors.PString(protocol)
case 10 => _root_.scalapb.descriptors.PRepeated(overridesByRequestProtocol.iterator.map(com.google.api.backend.BackendRule._typemapper_overridesByRequestProtocol.toBase(_).toPMessage).toVector)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: com.google.api.backend.BackendRule.type = com.google.api.backend.BackendRule
// @@protoc_insertion_point(GeneratedMessage[google.api.BackendRule])
}
object BackendRule extends scalapb.GeneratedMessageCompanion[com.google.api.backend.BackendRule] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[com.google.api.backend.BackendRule] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): com.google.api.backend.BackendRule = {
var __selector: _root_.scala.Predef.String = ""
var __address: _root_.scala.Predef.String = ""
var __deadline: _root_.scala.Double = 0.0
var __minDeadline: _root_.scala.Double = 0.0
var __operationDeadline: _root_.scala.Double = 0.0
var __pathTranslation: com.google.api.backend.BackendRule.PathTranslation = com.google.api.backend.BackendRule.PathTranslation.PATH_TRANSLATION_UNSPECIFIED
var __protocol: _root_.scala.Predef.String = ""
val __overridesByRequestProtocol: _root_.scala.collection.mutable.Builder[(_root_.scala.Predef.String, com.google.api.backend.BackendRule), _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, com.google.api.backend.BackendRule]] = _root_.scala.collection.immutable.Map.newBuilder[_root_.scala.Predef.String, com.google.api.backend.BackendRule]
var __authentication: com.google.api.backend.BackendRule.Authentication = com.google.api.backend.BackendRule.Authentication.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 =>
__selector = _input__.readStringRequireUtf8()
case 18 =>
__address = _input__.readStringRequireUtf8()
case 25 =>
__deadline = _input__.readDouble()
case 33 =>
__minDeadline = _input__.readDouble()
case 41 =>
__operationDeadline = _input__.readDouble()
case 48 =>
__pathTranslation = com.google.api.backend.BackendRule.PathTranslation.fromValue(_input__.readEnum())
case 58 =>
__authentication = com.google.api.backend.BackendRule.Authentication.JwtAudience(_input__.readStringRequireUtf8())
case 64 =>
__authentication = com.google.api.backend.BackendRule.Authentication.DisableAuth(_input__.readBool())
case 74 =>
__protocol = _input__.readStringRequireUtf8()
case 82 =>
__overridesByRequestProtocol += com.google.api.backend.BackendRule._typemapper_overridesByRequestProtocol.toCustom(_root_.scalapb.LiteParser.readMessage[com.google.api.backend.BackendRule.OverridesByRequestProtocolEntry](_input__))
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
com.google.api.backend.BackendRule(
selector = __selector,
address = __address,
deadline = __deadline,
minDeadline = __minDeadline,
operationDeadline = __operationDeadline,
pathTranslation = __pathTranslation,
protocol = __protocol,
overridesByRequestProtocol = __overridesByRequestProtocol.result(),
authentication = __authentication,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[com.google.api.backend.BackendRule] = _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.")
com.google.api.backend.BackendRule(
selector = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
address = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
deadline = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Double]).getOrElse(0.0),
minDeadline = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Double]).getOrElse(0.0),
operationDeadline = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Double]).getOrElse(0.0),
pathTranslation = com.google.api.backend.BackendRule.PathTranslation.fromValue(__fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scalapb.descriptors.EnumValueDescriptor]).getOrElse(com.google.api.backend.BackendRule.PathTranslation.PATH_TRANSLATION_UNSPECIFIED.scalaValueDescriptor).number),
protocol = __fieldsMap.get(scalaDescriptor.findFieldByNumber(9).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
overridesByRequestProtocol = __fieldsMap.get(scalaDescriptor.findFieldByNumber(10).get).map(_.as[_root_.scala.Seq[com.google.api.backend.BackendRule.OverridesByRequestProtocolEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(com.google.api.backend.BackendRule._typemapper_overridesByRequestProtocol.toCustom(_)).toMap,
authentication = __fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).flatMap(_.as[_root_.scala.Option[_root_.scala.Predef.String]]).map(com.google.api.backend.BackendRule.Authentication.JwtAudience(_))
.orElse[com.google.api.backend.BackendRule.Authentication](__fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).flatMap(_.as[_root_.scala.Option[_root_.scala.Boolean]]).map(com.google.api.backend.BackendRule.Authentication.DisableAuth(_)))
.getOrElse(com.google.api.backend.BackendRule.Authentication.Empty)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = BackendProto.javaDescriptor.getMessageTypes().get(1)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = BackendProto.scalaDescriptor.messages(1)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 10 => __out = com.google.api.backend.BackendRule.OverridesByRequestProtocolEntry
}
__out
}
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] =
Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]](
_root_.com.google.api.backend.BackendRule.OverridesByRequestProtocolEntry
)
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = {
(__fieldNumber: @_root_.scala.unchecked) match {
case 6 => com.google.api.backend.BackendRule.PathTranslation
}
}
lazy val defaultInstance = com.google.api.backend.BackendRule(
selector = "",
address = "",
deadline = 0.0,
minDeadline = 0.0,
operationDeadline = 0.0,
pathTranslation = com.google.api.backend.BackendRule.PathTranslation.PATH_TRANSLATION_UNSPECIFIED,
protocol = "",
overridesByRequestProtocol = _root_.scala.collection.immutable.Map.empty,
authentication = com.google.api.backend.BackendRule.Authentication.Empty
)
/** Path Translation specifies how to combine the backend address with the
* request path in order to produce the appropriate forwarding URL for the
* request.
*
* Path Translation is applicable only to HTTP-based backends. Backends which
* do not accept requests over HTTP/HTTPS should leave `path_translation`
* unspecified.
*/
sealed abstract class PathTranslation(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum {
type EnumType = com.google.api.backend.BackendRule.PathTranslation
type RecognizedType = com.google.api.backend.BackendRule.PathTranslation.Recognized
def isPathTranslationUnspecified: _root_.scala.Boolean = false
def isConstantAddress: _root_.scala.Boolean = false
def isAppendPathToAddress: _root_.scala.Boolean = false
def companion: _root_.scalapb.GeneratedEnumCompanion[PathTranslation] = com.google.api.backend.BackendRule.PathTranslation
final def asRecognized: _root_.scala.Option[com.google.api.backend.BackendRule.PathTranslation.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[com.google.api.backend.BackendRule.PathTranslation.Recognized])
}
object PathTranslation extends _root_.scalapb.GeneratedEnumCompanion[PathTranslation] {
sealed trait Recognized extends PathTranslation
implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[PathTranslation] = this
@SerialVersionUID(0L)
case object PATH_TRANSLATION_UNSPECIFIED extends PathTranslation(0) with PathTranslation.Recognized {
val index = 0
val name = "PATH_TRANSLATION_UNSPECIFIED"
override def isPathTranslationUnspecified: _root_.scala.Boolean = true
}
/** Use the backend address as-is, with no modification to the path. If the
* URL pattern contains variables, the variable names and values will be
* appended to the query string. If a query string parameter and a URL
* pattern variable have the same name, this may result in duplicate keys in
* the query string.
*
* # Examples
*
* Given the following operation config:
*
* Method path: /api/company/{cid}/user/{uid}
* Backend address: https://example.cloudfunctions.net/getUser
*
* Requests to the following request paths will call the backend at the
* translated path:
*
* Request path: /api/company/widgetworks/user/johndoe
* Translated:
* https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe
*
* Request path: /api/company/widgetworks/user/johndoe?timezone=EST
* Translated:
* https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe
*/
@SerialVersionUID(0L)
case object CONSTANT_ADDRESS extends PathTranslation(1) with PathTranslation.Recognized {
val index = 1
val name = "CONSTANT_ADDRESS"
override def isConstantAddress: _root_.scala.Boolean = true
}
/** The request path will be appended to the backend address.
*
* # Examples
*
* Given the following operation config:
*
* Method path: /api/company/{cid}/user/{uid}
* Backend address: https://example.appspot.com
*
* Requests to the following request paths will call the backend at the
* translated path:
*
* Request path: /api/company/widgetworks/user/johndoe
* Translated:
* https://example.appspot.com/api/company/widgetworks/user/johndoe
*
* Request path: /api/company/widgetworks/user/johndoe?timezone=EST
* Translated:
* https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST
*/
@SerialVersionUID(0L)
case object APPEND_PATH_TO_ADDRESS extends PathTranslation(2) with PathTranslation.Recognized {
val index = 2
val name = "APPEND_PATH_TO_ADDRESS"
override def isAppendPathToAddress: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends PathTranslation(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum
lazy val values: scala.collection.immutable.Seq[ValueType] = scala.collection.immutable.Seq(PATH_TRANSLATION_UNSPECIFIED, CONSTANT_ADDRESS, APPEND_PATH_TO_ADDRESS)
def fromValue(__value: _root_.scala.Int): PathTranslation = __value match {
case 0 => PATH_TRANSLATION_UNSPECIFIED
case 1 => CONSTANT_ADDRESS
case 2 => APPEND_PATH_TO_ADDRESS
case __other => Unrecognized(__other)
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = com.google.api.backend.BackendRule.javaDescriptor.getEnumTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = com.google.api.backend.BackendRule.scalaDescriptor.enums(0)
}
sealed trait Authentication extends _root_.scalapb.GeneratedOneof {
def isEmpty: _root_.scala.Boolean = false
def isDefined: _root_.scala.Boolean = true
def isJwtAudience: _root_.scala.Boolean = false
def isDisableAuth: _root_.scala.Boolean = false
def jwtAudience: _root_.scala.Option[_root_.scala.Predef.String] = _root_.scala.None
def disableAuth: _root_.scala.Option[_root_.scala.Boolean] = _root_.scala.None
}
object Authentication {
@SerialVersionUID(0L)
case object Empty extends com.google.api.backend.BackendRule.Authentication {
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 JwtAudience(value: _root_.scala.Predef.String) extends com.google.api.backend.BackendRule.Authentication {
type ValueType = _root_.scala.Predef.String
override def isJwtAudience: _root_.scala.Boolean = true
override def jwtAudience: _root_.scala.Option[_root_.scala.Predef.String] = Some(value)
override def number: _root_.scala.Int = 7
}
@SerialVersionUID(0L)
final case class DisableAuth(value: _root_.scala.Boolean) extends com.google.api.backend.BackendRule.Authentication {
type ValueType = _root_.scala.Boolean
override def isDisableAuth: _root_.scala.Boolean = true
override def disableAuth: _root_.scala.Option[_root_.scala.Boolean] = Some(value)
override def number: _root_.scala.Int = 8
}
}
@SerialVersionUID(0L)
final case class OverridesByRequestProtocolEntry(
key: _root_.scala.Predef.String = "",
value: _root_.scala.Option[com.google.api.backend.BackendRule] = _root_.scala.None,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[OverridesByRequestProtocolEntry] {
@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)
}
};
if (value.isDefined) {
val __value = value.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 = key
if (!__v.isEmpty) {
_output__.writeString(1, __v)
}
};
value.foreach { __v =>
val __m = __v
_output__.writeTag(2, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def withKey(__v: _root_.scala.Predef.String): OverridesByRequestProtocolEntry = copy(key = __v)
def getValue: com.google.api.backend.BackendRule = value.getOrElse(com.google.api.backend.BackendRule.defaultInstance)
def clearValue: OverridesByRequestProtocolEntry = copy(value = _root_.scala.None)
def withValue(__v: com.google.api.backend.BackendRule): OverridesByRequestProtocolEntry = copy(value = 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 = key
if (__t != "") __t else null
}
case 2 => value.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(key)
case 2 => value.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: com.google.api.backend.BackendRule.OverridesByRequestProtocolEntry.type = com.google.api.backend.BackendRule.OverridesByRequestProtocolEntry
// @@protoc_insertion_point(GeneratedMessage[google.api.BackendRule.OverridesByRequestProtocolEntry])
}
object OverridesByRequestProtocolEntry extends scalapb.GeneratedMessageCompanion[com.google.api.backend.BackendRule.OverridesByRequestProtocolEntry] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[com.google.api.backend.BackendRule.OverridesByRequestProtocolEntry] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): com.google.api.backend.BackendRule.OverridesByRequestProtocolEntry = {
var __key: _root_.scala.Predef.String = ""
var __value: _root_.scala.Option[com.google.api.backend.BackendRule] = _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 =>
__key = _input__.readStringRequireUtf8()
case 18 =>
__value = _root_.scala.Option(__value.fold(_root_.scalapb.LiteParser.readMessage[com.google.api.backend.BackendRule](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
com.google.api.backend.BackendRule.OverridesByRequestProtocolEntry(
key = __key,
value = __value,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[com.google.api.backend.BackendRule.OverridesByRequestProtocolEntry] = _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.")
com.google.api.backend.BackendRule.OverridesByRequestProtocolEntry(
key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[com.google.api.backend.BackendRule]])
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = com.google.api.backend.BackendRule.javaDescriptor.getNestedTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = com.google.api.backend.BackendRule.scalaDescriptor.nestedMessages(0)
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.api.backend.BackendRule
}
__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 = com.google.api.backend.BackendRule.OverridesByRequestProtocolEntry(
key = "",
value = _root_.scala.None
)
implicit class OverridesByRequestProtocolEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, com.google.api.backend.BackendRule.OverridesByRequestProtocolEntry]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, com.google.api.backend.BackendRule.OverridesByRequestProtocolEntry](_l) {
def key: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.key)((c_, f_) => c_.copy(key = f_))
def value: _root_.scalapb.lenses.Lens[UpperPB, com.google.api.backend.BackendRule] = field(_.getValue)((c_, f_) => c_.copy(value = _root_.scala.Option(f_)))
def optionalValue: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.api.backend.BackendRule]] = field(_.value)((c_, f_) => c_.copy(value = f_))
}
final val KEY_FIELD_NUMBER = 1
final val VALUE_FIELD_NUMBER = 2
@transient
implicit val keyValueMapper: _root_.scalapb.TypeMapper[com.google.api.backend.BackendRule.OverridesByRequestProtocolEntry, (_root_.scala.Predef.String, com.google.api.backend.BackendRule)] =
_root_.scalapb.TypeMapper[com.google.api.backend.BackendRule.OverridesByRequestProtocolEntry, (_root_.scala.Predef.String, com.google.api.backend.BackendRule)](__m => (__m.key, __m.getValue))(__p => com.google.api.backend.BackendRule.OverridesByRequestProtocolEntry(__p._1, Some(__p._2)))
def of(
key: _root_.scala.Predef.String,
value: _root_.scala.Option[com.google.api.backend.BackendRule]
): _root_.com.google.api.backend.BackendRule.OverridesByRequestProtocolEntry = _root_.com.google.api.backend.BackendRule.OverridesByRequestProtocolEntry(
key,
value
)
// @@protoc_insertion_point(GeneratedMessageCompanion[google.api.BackendRule.OverridesByRequestProtocolEntry])
}
implicit class BackendRuleLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, com.google.api.backend.BackendRule]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, com.google.api.backend.BackendRule](_l) {
def selector: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.selector)((c_, f_) => c_.copy(selector = f_))
def address: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.address)((c_, f_) => c_.copy(address = f_))
def deadline: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Double] = field(_.deadline)((c_, f_) => c_.copy(deadline = f_))
def minDeadline: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Double] = field(_.minDeadline)((c_, f_) => c_.copy(minDeadline = f_))
def operationDeadline: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Double] = field(_.operationDeadline)((c_, f_) => c_.copy(operationDeadline = f_))
def pathTranslation: _root_.scalapb.lenses.Lens[UpperPB, com.google.api.backend.BackendRule.PathTranslation] = field(_.pathTranslation)((c_, f_) => c_.copy(pathTranslation = f_))
def jwtAudience: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.getJwtAudience)((c_, f_) => c_.copy(authentication = com.google.api.backend.BackendRule.Authentication.JwtAudience(f_)))
def disableAuth: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.getDisableAuth)((c_, f_) => c_.copy(authentication = com.google.api.backend.BackendRule.Authentication.DisableAuth(f_)))
def protocol: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.protocol)((c_, f_) => c_.copy(protocol = f_))
def overridesByRequestProtocol: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, com.google.api.backend.BackendRule]] = field(_.overridesByRequestProtocol)((c_, f_) => c_.copy(overridesByRequestProtocol = f_))
def authentication: _root_.scalapb.lenses.Lens[UpperPB, com.google.api.backend.BackendRule.Authentication] = field(_.authentication)((c_, f_) => c_.copy(authentication = f_))
}
final val SELECTOR_FIELD_NUMBER = 1
final val ADDRESS_FIELD_NUMBER = 2
final val DEADLINE_FIELD_NUMBER = 3
final val MIN_DEADLINE_FIELD_NUMBER = 4
final val OPERATION_DEADLINE_FIELD_NUMBER = 5
final val PATH_TRANSLATION_FIELD_NUMBER = 6
final val JWT_AUDIENCE_FIELD_NUMBER = 7
final val DISABLE_AUTH_FIELD_NUMBER = 8
final val PROTOCOL_FIELD_NUMBER = 9
final val OVERRIDES_BY_REQUEST_PROTOCOL_FIELD_NUMBER = 10
@transient
private[backend] val _typemapper_overridesByRequestProtocol: _root_.scalapb.TypeMapper[com.google.api.backend.BackendRule.OverridesByRequestProtocolEntry, (_root_.scala.Predef.String, com.google.api.backend.BackendRule)] = implicitly[_root_.scalapb.TypeMapper[com.google.api.backend.BackendRule.OverridesByRequestProtocolEntry, (_root_.scala.Predef.String, com.google.api.backend.BackendRule)]]
def of(
selector: _root_.scala.Predef.String,
address: _root_.scala.Predef.String,
deadline: _root_.scala.Double,
minDeadline: _root_.scala.Double,
operationDeadline: _root_.scala.Double,
pathTranslation: com.google.api.backend.BackendRule.PathTranslation,
authentication: com.google.api.backend.BackendRule.Authentication,
protocol: _root_.scala.Predef.String,
overridesByRequestProtocol: _root_.scala.collection.immutable.Map[_root_.scala.Predef.String, com.google.api.backend.BackendRule]
): _root_.com.google.api.backend.BackendRule = _root_.com.google.api.backend.BackendRule(
selector,
address,
deadline,
minDeadline,
operationDeadline,
pathTranslation,
authentication,
protocol,
overridesByRequestProtocol
)
// @@protoc_insertion_point(GeneratedMessageCompanion[google.api.BackendRule])
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy