All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scalapb.fs2.pubsub.grpc.internal.Action.scala Maven / Gradle / Ivy

// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3

package fs2.pubsub.grpc.internal

/** An action that describes the behavior when the form is submitted.
  * For example, you can invoke an Apps Script script to handle the form.
  * If the action is triggered, the form values are sent to the server.
  *
  * [Google Workspace Add-ons and Chat
  * apps](https://developers.google.com/workspace/extend):
  *
  * @param function
  *   A custom function to invoke when the containing element is
  *   clicked or othrwise activated.
  *  
  *   For example usage, see [Read form
  *   data](https://developers.google.com/workspace/chat/read-form-data).
  * @param parameters
  *   List of action parameters.
  * @param loadIndicator
  *   Specifies the loading indicator that the action displays while
  *   making the call to the action.
  * @param persistValues
  *   Indicates whether form values persist after the action. The default value
  *   is `false`.
  *  
  *   If `true`, form values remain after the action is triggered. To let the
  *   user make changes while the action is being processed, set
  *   [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
  *   to `NONE`. For [card
  *   messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create)
  *   in Chat apps, you must also set the action's
  *   [`ResponseType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype)
  *   to `UPDATE_MESSAGE` and use the same
  *   [`card_id`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId)
  *   from the card that contained the action.
  *  
  *   If `false`, the form values are cleared when the action is triggered.
  *   To prevent the user from making changes while the action is being
  *   processed, set
  *   [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
  *   to `SPINNER`.
  * @param interaction
  *   Optional. Required when opening a
  *   [dialog](https://developers.google.com/workspace/chat/dialogs).
  *  
  *   What to do in response to an interaction with a user, such as a user
  *   clicking a button in a card message.
  *  
  *   If unspecified, the app responds by executing an `action`—like opening a
  *   link or running a function—as normal.
  *  
  *   By specifying an `interaction`, the app can respond in special interactive
  *   ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
  *   open a [dialog](https://developers.google.com/workspace/chat/dialogs). When
  *   specified, a loading indicator isn't shown. If specified for
  *   an add-on, the entire card is stripped and nothing is shown in the client.
  *  
  *   [Google Chat apps](https://developers.google.com/workspace/chat):
  */
@SerialVersionUID(0L)
@scala.annotation.nowarn private[grpc]
final case class Action(
    function: _root_.scala.Predef.String = "",
    parameters: _root_.scala.Seq[fs2.pubsub.grpc.internal.Action.ActionParameter] = _root_.scala.Seq.empty,
    loadIndicator: fs2.pubsub.grpc.internal.Action.LoadIndicator = fs2.pubsub.grpc.internal.Action.LoadIndicator.SPINNER,
    persistValues: _root_.scala.Boolean = false,
    interaction: fs2.pubsub.grpc.internal.Action.Interaction = fs2.pubsub.grpc.internal.Action.Interaction.INTERACTION_UNSPECIFIED,
    unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
    ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Action] {
    @transient
    private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
    private[this] def __computeSerializedSize(): _root_.scala.Int = {
      var __size = 0
      
      {
        val __value = function
        if (!__value.isEmpty) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value)
        }
      };
      parameters.foreach { __item =>
        val __value = __item
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      }
      
      {
        val __value = loadIndicator.value
        if (__value != 0) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(3, __value)
        }
      };
      
      {
        val __value = persistValues
        if (__value != false) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(4, __value)
        }
      };
      
      {
        val __value = interaction.value
        if (__value != 0) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(5, __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 = function
        if (!__v.isEmpty) {
          _output__.writeString(1, __v)
        }
      };
      parameters.foreach { __v =>
        val __m = __v
        _output__.writeTag(2, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      {
        val __v = loadIndicator.value
        if (__v != 0) {
          _output__.writeEnum(3, __v)
        }
      };
      {
        val __v = persistValues
        if (__v != false) {
          _output__.writeBool(4, __v)
        }
      };
      {
        val __v = interaction.value
        if (__v != 0) {
          _output__.writeEnum(5, __v)
        }
      };
      unknownFields.writeTo(_output__)
    }
    def withFunction(__v: _root_.scala.Predef.String): Action = copy(function = __v)
    def clearParameters = copy(parameters = _root_.scala.Seq.empty)
    def addParameters(__vs: fs2.pubsub.grpc.internal.Action.ActionParameter *): Action = addAllParameters(__vs)
    def addAllParameters(__vs: Iterable[fs2.pubsub.grpc.internal.Action.ActionParameter]): Action = copy(parameters = parameters ++ __vs)
    def withParameters(__v: _root_.scala.Seq[fs2.pubsub.grpc.internal.Action.ActionParameter]): Action = copy(parameters = __v)
    def withLoadIndicator(__v: fs2.pubsub.grpc.internal.Action.LoadIndicator): Action = copy(loadIndicator = __v)
    def withPersistValues(__v: _root_.scala.Boolean): Action = copy(persistValues = __v)
    def withInteraction(__v: fs2.pubsub.grpc.internal.Action.Interaction): Action = copy(interaction = __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 = function
          if (__t != "") __t else null
        }
        case 2 => parameters
        case 3 => {
          val __t = loadIndicator.javaValueDescriptor
          if (__t.getNumber() != 0) __t else null
        }
        case 4 => {
          val __t = persistValues
          if (__t != false) __t else null
        }
        case 5 => {
          val __t = interaction.javaValueDescriptor
          if (__t.getNumber() != 0) __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(function)
        case 2 => _root_.scalapb.descriptors.PRepeated(parameters.iterator.map(_.toPMessage).toVector)
        case 3 => _root_.scalapb.descriptors.PEnum(loadIndicator.scalaValueDescriptor)
        case 4 => _root_.scalapb.descriptors.PBoolean(persistValues)
        case 5 => _root_.scalapb.descriptors.PEnum(interaction.scalaValueDescriptor)
      }
    }
    def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
    def companion: fs2.pubsub.grpc.internal.Action.type = fs2.pubsub.grpc.internal.Action
    // @@protoc_insertion_point(GeneratedMessage[google.apps.card.v1.Action])
}

@scala.annotation.nowarn private[grpc]
object Action extends scalapb.GeneratedMessageCompanion[fs2.pubsub.grpc.internal.Action] {
  implicit def messageCompanion: scalapb.GeneratedMessageCompanion[fs2.pubsub.grpc.internal.Action] = this
  def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): fs2.pubsub.grpc.internal.Action = {
    var __function: _root_.scala.Predef.String = ""
    val __parameters: _root_.scala.collection.immutable.VectorBuilder[fs2.pubsub.grpc.internal.Action.ActionParameter] = new _root_.scala.collection.immutable.VectorBuilder[fs2.pubsub.grpc.internal.Action.ActionParameter]
    var __loadIndicator: fs2.pubsub.grpc.internal.Action.LoadIndicator = fs2.pubsub.grpc.internal.Action.LoadIndicator.SPINNER
    var __persistValues: _root_.scala.Boolean = false
    var __interaction: fs2.pubsub.grpc.internal.Action.Interaction = fs2.pubsub.grpc.internal.Action.Interaction.INTERACTION_UNSPECIFIED
    var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
    var _done__ = false
    while (!_done__) {
      val _tag__ = _input__.readTag()
      _tag__ match {
        case 0 => _done__ = true
        case 10 =>
          __function = _input__.readStringRequireUtf8()
        case 18 =>
          __parameters += _root_.scalapb.LiteParser.readMessage[fs2.pubsub.grpc.internal.Action.ActionParameter](_input__)
        case 24 =>
          __loadIndicator = fs2.pubsub.grpc.internal.Action.LoadIndicator.fromValue(_input__.readEnum())
        case 32 =>
          __persistValues = _input__.readBool()
        case 40 =>
          __interaction = fs2.pubsub.grpc.internal.Action.Interaction.fromValue(_input__.readEnum())
        case tag =>
          if (_unknownFields__ == null) {
            _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
          }
          _unknownFields__.parseField(tag, _input__)
      }
    }
    fs2.pubsub.grpc.internal.Action(
        function = __function,
        parameters = __parameters.result(),
        loadIndicator = __loadIndicator,
        persistValues = __persistValues,
        interaction = __interaction,
        unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
    )
  }
  implicit def messageReads: _root_.scalapb.descriptors.Reads[fs2.pubsub.grpc.internal.Action] = _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.")
      fs2.pubsub.grpc.internal.Action(
        function = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
        parameters = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Seq[fs2.pubsub.grpc.internal.Action.ActionParameter]]).getOrElse(_root_.scala.Seq.empty),
        loadIndicator = fs2.pubsub.grpc.internal.Action.LoadIndicator.fromValue(__fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scalapb.descriptors.EnumValueDescriptor]).getOrElse(fs2.pubsub.grpc.internal.Action.LoadIndicator.SPINNER.scalaValueDescriptor).number),
        persistValues = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Boolean]).getOrElse(false),
        interaction = fs2.pubsub.grpc.internal.Action.Interaction.fromValue(__fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scalapb.descriptors.EnumValueDescriptor]).getOrElse(fs2.pubsub.grpc.internal.Action.Interaction.INTERACTION_UNSPECIFIED.scalaValueDescriptor).number)
      )
    case _ => throw new RuntimeException("Expected PMessage")
  }
  def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = CardProto.javaDescriptor.getMessageTypes().get(21)
  def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = CardProto.scalaDescriptor.messages(21)
  def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
    var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
    (__number: @_root_.scala.unchecked) match {
      case 2 => __out = fs2.pubsub.grpc.internal.Action.ActionParameter
    }
    __out
  }
  lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] =
    Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]](
      _root_.fs2.pubsub.grpc.internal.Action.ActionParameter
    )
  def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = {
    (__fieldNumber: @_root_.scala.unchecked) match {
      case 3 => fs2.pubsub.grpc.internal.Action.LoadIndicator
      case 5 => fs2.pubsub.grpc.internal.Action.Interaction
    }
  }
  lazy val defaultInstance = fs2.pubsub.grpc.internal.Action(
    function = "",
    parameters = _root_.scala.Seq.empty,
    loadIndicator = fs2.pubsub.grpc.internal.Action.LoadIndicator.SPINNER,
    persistValues = false,
    interaction = fs2.pubsub.grpc.internal.Action.Interaction.INTERACTION_UNSPECIFIED
  )
  /** Specifies the loading indicator that the action displays while
    * making the call to the action.
    *
    * [Google Workspace Add-ons and Chat
    * apps](https://developers.google.com/workspace/extend):
    */
  sealed abstract class LoadIndicator(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum {
    type EnumType = fs2.pubsub.grpc.internal.Action.LoadIndicator
    type RecognizedType = fs2.pubsub.grpc.internal.Action.LoadIndicator.Recognized
    def isSpinner: _root_.scala.Boolean = false
    def isNone: _root_.scala.Boolean = false
    def companion: _root_.scalapb.GeneratedEnumCompanion[LoadIndicator] = fs2.pubsub.grpc.internal.Action.LoadIndicator
    final def asRecognized: _root_.scala.Option[fs2.pubsub.grpc.internal.Action.LoadIndicator.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[fs2.pubsub.grpc.internal.Action.LoadIndicator.Recognized])
  }
  
  object LoadIndicator extends _root_.scalapb.GeneratedEnumCompanion[LoadIndicator] {
    sealed trait Recognized extends LoadIndicator
    implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[LoadIndicator] = this
    
    /** Displays a spinner to indicate that content is loading.
      */
    @SerialVersionUID(0L)
    case object SPINNER extends LoadIndicator(0) with LoadIndicator.Recognized {
      val index = 0
      val name = "SPINNER"
      override def isSpinner: _root_.scala.Boolean = true
    }
    
    /** Nothing is displayed.
      */
    @SerialVersionUID(0L)
    case object NONE extends LoadIndicator(1) with LoadIndicator.Recognized {
      val index = 1
      val name = "NONE"
      override def isNone: _root_.scala.Boolean = true
    }
    
    @SerialVersionUID(0L)
    final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends LoadIndicator(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum
    lazy val values: scala.collection.immutable.Seq[ValueType] = scala.collection.immutable.Seq(SPINNER, NONE)
    def fromValue(__value: _root_.scala.Int): LoadIndicator = __value match {
      case 0 => SPINNER
      case 1 => NONE
      case __other => Unrecognized(__other)
    }
    def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = fs2.pubsub.grpc.internal.Action.javaDescriptor.getEnumTypes().get(0)
    def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = fs2.pubsub.grpc.internal.Action.scalaDescriptor.enums(0)
  }
  /** Optional. Required when opening a
    * [dialog](https://developers.google.com/workspace/chat/dialogs).
    *
    * What to do in response to an interaction with a user, such as a user
    * clicking a button in a card message.
    *
    * If unspecified, the app responds by executing an `action`—like opening a
    * link or running a function—as normal.
    *
    * By specifying an `interaction`, the app can respond in special interactive
    * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
    * open a [dialog](https://developers.google.com/workspace/chat/dialogs).
    *
    * When specified, a loading indicator isn't shown. If specified for
    * an add-on, the entire card is stripped and nothing is shown in the client.
    *
    * [Google Chat apps](https://developers.google.com/workspace/chat):
    */
  sealed abstract class Interaction(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum {
    type EnumType = fs2.pubsub.grpc.internal.Action.Interaction
    type RecognizedType = fs2.pubsub.grpc.internal.Action.Interaction.Recognized
    def isInteractionUnspecified: _root_.scala.Boolean = false
    def isOpenDialog: _root_.scala.Boolean = false
    def companion: _root_.scalapb.GeneratedEnumCompanion[Interaction] = fs2.pubsub.grpc.internal.Action.Interaction
    final def asRecognized: _root_.scala.Option[fs2.pubsub.grpc.internal.Action.Interaction.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[fs2.pubsub.grpc.internal.Action.Interaction.Recognized])
  }
  
  object Interaction extends _root_.scalapb.GeneratedEnumCompanion[Interaction] {
    sealed trait Recognized extends Interaction
    implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[Interaction] = this
    
    /** Default value. The `action` executes as normal.
      */
    @SerialVersionUID(0L)
    case object INTERACTION_UNSPECIFIED extends Interaction(0) with Interaction.Recognized {
      val index = 0
      val name = "INTERACTION_UNSPECIFIED"
      override def isInteractionUnspecified: _root_.scala.Boolean = true
    }
    
    /** Opens a [dialog](https://developers.google.com/workspace/chat/dialogs), a
      * windowed, card-based interface that Chat apps use to interact with users.
      *
      * Only supported by Chat apps in response to button-clicks on card
      * messages. If specified for
      * an add-on, the entire card is stripped and nothing is shown in the
      * client.
      *
      * [Google Chat apps](https://developers.google.com/workspace/chat):
      */
    @SerialVersionUID(0L)
    case object OPEN_DIALOG extends Interaction(1) with Interaction.Recognized {
      val index = 1
      val name = "OPEN_DIALOG"
      override def isOpenDialog: _root_.scala.Boolean = true
    }
    
    @SerialVersionUID(0L)
    final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends Interaction(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum
    lazy val values: scala.collection.immutable.Seq[ValueType] = scala.collection.immutable.Seq(INTERACTION_UNSPECIFIED, OPEN_DIALOG)
    def fromValue(__value: _root_.scala.Int): Interaction = __value match {
      case 0 => INTERACTION_UNSPECIFIED
      case 1 => OPEN_DIALOG
      case __other => Unrecognized(__other)
    }
    def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = fs2.pubsub.grpc.internal.Action.javaDescriptor.getEnumTypes().get(1)
    def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = fs2.pubsub.grpc.internal.Action.scalaDescriptor.enums(1)
  }
  /** List of string parameters to supply when the action method is invoked.
    * For example, consider three snooze buttons: snooze now, snooze one day,
    * or snooze next week. You might use `action method = snooze()`, passing the
    * snooze type and snooze time in the list of string parameters.
    *
    * To learn more, see
    * [`CommonEventObject`](https://developers.google.com/workspace/chat/api/reference/rest/v1/Event#commoneventobject).
    *
    * [Google Workspace Add-ons and Chat
    * apps](https://developers.google.com/workspace/extend):
    *
    * @param key
    *   The name of the parameter for the action script.
    * @param value
    *   The value of the parameter.
    */
  @SerialVersionUID(0L)
  @scala.annotation.nowarn private[grpc]
  final case class ActionParameter(
      key: _root_.scala.Predef.String = "",
      value: _root_.scala.Predef.String = "",
      unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
      ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ActionParameter] {
      @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)
          }
        };
        
        {
          val __value = value
          if (!__value.isEmpty) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __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)
          }
        };
        {
          val __v = value
          if (!__v.isEmpty) {
            _output__.writeString(2, __v)
          }
        };
        unknownFields.writeTo(_output__)
      }
      def withKey(__v: _root_.scala.Predef.String): ActionParameter = copy(key = __v)
      def withValue(__v: _root_.scala.Predef.String): ActionParameter = copy(value = __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 => {
            val __t = value
            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)
          case 2 => _root_.scalapb.descriptors.PString(value)
        }
      }
      def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
      def companion: fs2.pubsub.grpc.internal.Action.ActionParameter.type = fs2.pubsub.grpc.internal.Action.ActionParameter
      // @@protoc_insertion_point(GeneratedMessage[google.apps.card.v1.Action.ActionParameter])
  }
  
  @scala.annotation.nowarn private[grpc]
  object ActionParameter extends scalapb.GeneratedMessageCompanion[fs2.pubsub.grpc.internal.Action.ActionParameter] {
    implicit def messageCompanion: scalapb.GeneratedMessageCompanion[fs2.pubsub.grpc.internal.Action.ActionParameter] = this
    def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): fs2.pubsub.grpc.internal.Action.ActionParameter = {
      var __key: _root_.scala.Predef.String = ""
      var __value: _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 18 =>
            __value = _input__.readStringRequireUtf8()
          case tag =>
            if (_unknownFields__ == null) {
              _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
            }
            _unknownFields__.parseField(tag, _input__)
        }
      }
      fs2.pubsub.grpc.internal.Action.ActionParameter(
          key = __key,
          value = __value,
          unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
      )
    }
    implicit def messageReads: _root_.scalapb.descriptors.Reads[fs2.pubsub.grpc.internal.Action.ActionParameter] = _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.")
        fs2.pubsub.grpc.internal.Action.ActionParameter(
          key = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
          value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse("")
        )
      case _ => throw new RuntimeException("Expected PMessage")
    }
    def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = fs2.pubsub.grpc.internal.Action.javaDescriptor.getNestedTypes().get(0)
    def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = fs2.pubsub.grpc.internal.Action.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 = fs2.pubsub.grpc.internal.Action.ActionParameter(
      key = "",
      value = ""
    )
    implicit class ActionParameterLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, fs2.pubsub.grpc.internal.Action.ActionParameter]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, fs2.pubsub.grpc.internal.Action.ActionParameter](_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, _root_.scala.Predef.String] = field(_.value)((c_, f_) => c_.copy(value = f_))
    }
    final val KEY_FIELD_NUMBER = 1
    final val VALUE_FIELD_NUMBER = 2
    def of(
      key: _root_.scala.Predef.String,
      value: _root_.scala.Predef.String
    ): _root_.fs2.pubsub.grpc.internal.Action.ActionParameter = _root_.fs2.pubsub.grpc.internal.Action.ActionParameter(
      key,
      value
    )
    // @@protoc_insertion_point(GeneratedMessageCompanion[google.apps.card.v1.Action.ActionParameter])
  }
  
  implicit class ActionLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, fs2.pubsub.grpc.internal.Action]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, fs2.pubsub.grpc.internal.Action](_l) {
    def function: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.function)((c_, f_) => c_.copy(function = f_))
    def parameters: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[fs2.pubsub.grpc.internal.Action.ActionParameter]] = field(_.parameters)((c_, f_) => c_.copy(parameters = f_))
    def loadIndicator: _root_.scalapb.lenses.Lens[UpperPB, fs2.pubsub.grpc.internal.Action.LoadIndicator] = field(_.loadIndicator)((c_, f_) => c_.copy(loadIndicator = f_))
    def persistValues: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.persistValues)((c_, f_) => c_.copy(persistValues = f_))
    def interaction: _root_.scalapb.lenses.Lens[UpperPB, fs2.pubsub.grpc.internal.Action.Interaction] = field(_.interaction)((c_, f_) => c_.copy(interaction = f_))
  }
  final val FUNCTION_FIELD_NUMBER = 1
  final val PARAMETERS_FIELD_NUMBER = 2
  final val LOAD_INDICATOR_FIELD_NUMBER = 3
  final val PERSIST_VALUES_FIELD_NUMBER = 4
  final val INTERACTION_FIELD_NUMBER = 5
  def of(
    function: _root_.scala.Predef.String,
    parameters: _root_.scala.Seq[fs2.pubsub.grpc.internal.Action.ActionParameter],
    loadIndicator: fs2.pubsub.grpc.internal.Action.LoadIndicator,
    persistValues: _root_.scala.Boolean,
    interaction: fs2.pubsub.grpc.internal.Action.Interaction
  ): _root_.fs2.pubsub.grpc.internal.Action = _root_.fs2.pubsub.grpc.internal.Action(
    function,
    parameters,
    loadIndicator,
    persistValues,
    interaction
  )
  // @@protoc_insertion_point(GeneratedMessageCompanion[google.apps.card.v1.Action])
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy