final case class JavaScriptUDF(functionName: String = "", code: String = "", unknownFields: UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty) extends GeneratedMessage with Updatable[JavaScriptUDF] with Product with Serializable

User-defined JavaScript function that can transform or filter a Pub/Sub message.

functionName

Required. Name of the JavasScript function that should applied to Pub/Sub messages.

code

Required. JavaScript code that contains a function function_name with the below signature: /** * Transforms a Pub/Sub message. * @return {(Object<string, (string | Object<string, string>)>|null)} - To * filter a message, return null. To transform a message return a map * with the following keys: * - (required) 'data' : {string} * - (optional) 'attributes' : {Object<string, string>} * Returning empty attributes will remove all attributes from the * message. * * @param {(Object<string, (string | Object<string, string>)>} Pub/Sub * message. Keys: * - (required) 'data' : {string} * - (required) 'attributes' : {Object<string, string>} * * @param {Object<string, any>} metadata - Pub/Sub message metadata. * Keys: * - (optional) 'message_id' : {string} * - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format * - (optional) 'ordering_key': {string} */ function <function_name>(message, metadata) { }

Annotations
@SerialVersionUID()
Source
JavaScriptUDF.scala
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JavaScriptUDF
  2. Updatable
  3. GeneratedMessage
  4. Serializable
  5. Product
  6. Equals
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new JavaScriptUDF(functionName: String = "", code: String = "", unknownFields: UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty)

    functionName

    Required. Name of the JavasScript function that should applied to Pub/Sub messages.

    code

    Required. JavaScript code that contains a function function_name with the below signature: /** * Transforms a Pub/Sub message. * @return {(Object<string, (string | Object<string, string>)>|null)} - To * filter a message, return null. To transform a message return a map * with the following keys: * - (required) 'data' : {string} * - (optional) 'attributes' : {Object<string, string>} * Returning empty attributes will remove all attributes from the * message. * * @param {(Object<string, (string | Object<string, string>)>} Pub/Sub * message. Keys: * - (required) 'data' : {string} * - (required) 'attributes' : {Object<string, string>} * * @param {Object<string, any>} metadata - Pub/Sub message metadata. * Keys: * - (optional) 'message_id' : {string} * - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format * - (optional) 'ordering_key': {string} */ function <function_name>(message, metadata) { }

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. val code: String
  7. def companion: JavaScriptUDF.type
    Definition Classes
    JavaScriptUDF → GeneratedMessage
  8. def discardUnknownFields: JavaScriptUDF
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  11. val functionName: String
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def getField(__field: FieldDescriptor): PValue
    Definition Classes
    JavaScriptUDF → GeneratedMessage
  14. def getFieldByNumber(__fieldNumber: Int): Any
    Definition Classes
    JavaScriptUDF → GeneratedMessage
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. def productElementNames: Iterator[String]
    Definition Classes
    Product
  20. def serializedSize: Int
    Definition Classes
    JavaScriptUDF → GeneratedMessage
  21. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  22. final def toByteArray: Array[Byte]
    Definition Classes
    GeneratedMessage
  23. final def toByteString: ByteString
    Definition Classes
    GeneratedMessage
  24. final def toPMessage: PMessage
    Definition Classes
    GeneratedMessage
  25. def toProtoString: String
    Definition Classes
    JavaScriptUDF → GeneratedMessage
  26. val unknownFields: UnknownFieldSet
  27. def update(ms: (Lens[JavaScriptUDF, JavaScriptUDF]) => Mutation[JavaScriptUDF]*): JavaScriptUDF
    Definition Classes
    Updatable
  28. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  29. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  30. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  31. def withCode(__v: String): JavaScriptUDF
  32. def withFunctionName(__v: String): JavaScriptUDF
  33. def withUnknownFields(__v: UnknownFieldSet): JavaScriptUDF
  34. final def writeDelimitedTo(output: OutputStream): Unit
    Definition Classes
    GeneratedMessage
  35. def writeTo(_output__: CodedOutputStream): Unit
    Definition Classes
    JavaScriptUDF → GeneratedMessage
  36. final def writeTo(output: OutputStream): Unit
    Definition Classes
    GeneratedMessage

Inherited from Updatable[JavaScriptUDF]

Inherited from GeneratedMessage

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped