Class Pipeline.Mediation.Transformation.Builder (1.55.0)

public static final class Pipeline.Mediation.Transformation.Builder extends GeneratedMessageV3.Builder<Pipeline.Mediation.Transformation.Builder> implements Pipeline.Mediation.TransformationOrBuilder

Transformation defines the way to transform an incoming message.

Protobuf type google.cloud.eventarc.v1.Pipeline.Mediation.Transformation

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Pipeline.Mediation.Transformation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Pipeline.Mediation.Transformation.Builder
Overrides

build()

public Pipeline.Mediation.Transformation build()
Returns
Type Description
Pipeline.Mediation.Transformation

buildPartial()

public Pipeline.Mediation.Transformation buildPartial()
Returns
Type Description
Pipeline.Mediation.Transformation

clear()

public Pipeline.Mediation.Transformation.Builder clear()
Returns
Type Description
Pipeline.Mediation.Transformation.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Pipeline.Mediation.Transformation.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Pipeline.Mediation.Transformation.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public Pipeline.Mediation.Transformation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Pipeline.Mediation.Transformation.Builder
Overrides

clearTransformationTemplate()

public Pipeline.Mediation.Transformation.Builder clearTransformationTemplate()

Optional. The CEL expression template to apply to transform messages. The following CEL extension functions are provided for use in this CEL expression:

  • merge: map1.merge(map2) -> map3
    • Merges the passed CEL map with the existing CEL map the function is applied to.
    • If the same key exists in both maps, if the key's value is type map both maps are merged else the value from the passed map is used.
  • denormalize: map.denormalize() -> map
    • Denormalizes a CEL map such that every value of type map or key in the map is expanded to return a single level map.
    • The resulting keys are "." separated indices of the map keys.
    • For example: { "a": 1, "b": { "c": 2, "d": 3 } "e": [4, 5] } .denormalize() -> { "a": 1, "b.c": 2, "b.d": 3, "e.0": 4, "e.1": 5 }
  • setField: map.setField(key, value) -> message
    • Sets the field of the message with the given key to the given value.
    • If the field is not present it will be added.
    • If the field is present it will be overwritten.
    • The key can be a dot separated path to set a field in a nested message.
    • Key must be of type string.
    • Value may be any valid type.
  • removeFields: map.removeFields([key1, key2, ...]) -> message
    • Removes the fields of the map with the given keys.
    • The keys can be a dot separated path to remove a field in a nested message.
    • If a key is not found it will be ignored.
    • Keys must be of type string.
  • toMap: [map1, map2, ...].toMap() -> map
    • Converts a CEL list of CEL maps to a single CEL map
  • toDestinationPayloadFormat(): message.data.toDestinationPayloadFormat() -> string or bytes
    • Converts the message data to the destination payload format specified in Pipeline.Destination.output_payload_format
    • This function is meant to be applied to the message.data field.
    • If the destination payload format is not set, the function will return the message data unchanged.
  • toCloudEventJsonWithPayloadFormat: message.toCloudEventJsonWithPayloadFormat() -> map
    • Converts a message to the corresponding structure of JSON format for CloudEvents
    • This function applies toDestinationPayloadFormat() to the message data. It also sets the corresponding datacontenttype of the CloudEvent, as indicated by Pipeline.Destination.output_payload_format. If no output_payload_format is set it will use the existing datacontenttype on the CloudEvent if present, else leave datacontenttype absent.
    • This function expects that the content of the message will adhere to the standard CloudEvent format. If it doesn’t then this function will fail.
    • The result is a CEL map that corresponds to the JSON representation of the CloudEvent. To convert that data to a JSON string it can be chained with the toJsonString function.

string transformation_template = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Pipeline.Mediation.Transformation.Builder

This builder for chaining.

clone()

public Pipeline.Mediation.Transformation.Builder clone()
Returns
Type Description
Pipeline.Mediation.Transformation.Builder
Overrides

getDefaultInstanceForType()

public Pipeline.Mediation.Transformation getDefaultInstanceForType()
Returns
Type Description
Pipeline.Mediation.Transformation

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getTransformationTemplate()

public String getTransformationTemplate()

Optional. The CEL expression template to apply to transform messages. The following CEL extension functions are provided for use in this CEL expression:

  • merge: map1.merge(map2) -> map3
    • Merges the passed CEL map with the existing CEL map the function is applied to.
    • If the same key exists in both maps, if the key's value is type map both maps are merged else the value from the passed map is used.
  • denormalize: map.denormalize() -> map
    • Denormalizes a CEL map such that every value of type map or key in the map is expanded to return a single level map.
    • The resulting keys are "." separated indices of the map keys.
    • For example: { "a": 1, "b": { "c": 2, "d": 3 } "e": [4, 5] } .denormalize() -> { "a": 1, "b.c": 2, "b.d": 3, "e.0": 4, "e.1": 5 }
  • setField: map.setField(key, value) -> message
    • Sets the field of the message with the given key to the given value.
    • If the field is not present it will be added.
    • If the field is present it will be overwritten.
    • The key can be a dot separated path to set a field in a nested message.
    • Key must be of type string.
    • Value may be any valid type.
  • removeFields: map.removeFields([key1, key2, ...]) -> message
    • Removes the fields of the map with the given keys.
    • The keys can be a dot separated path to remove a field in a nested message.
    • If a key is not found it will be ignored.
    • Keys must be of type string.
  • toMap: [map1, map2, ...].toMap() -> map
    • Converts a CEL list of CEL maps to a single CEL map
  • toDestinationPayloadFormat(): message.data.toDestinationPayloadFormat() -> string or bytes
    • Converts the message data to the destination payload format specified in Pipeline.Destination.output_payload_format
    • This function is meant to be applied to the message.data field.
    • If the destination payload format is not set, the function will return the message data unchanged.
  • toCloudEventJsonWithPayloadFormat: message.toCloudEventJsonWithPayloadFormat() -> map
    • Converts a message to the corresponding structure of JSON format for CloudEvents
    • This function applies toDestinationPayloadFormat() to the message data. It also sets the corresponding datacontenttype of the CloudEvent, as indicated by Pipeline.Destination.output_payload_format. If no output_payload_format is set it will use the existing datacontenttype on the CloudEvent if present, else leave datacontenttype absent.
    • This function expects that the content of the message will adhere to the standard CloudEvent format. If it doesn’t then this function will fail.
    • The result is a CEL map that corresponds to the JSON representation of the CloudEvent. To convert that data to a JSON string it can be chained with the toJsonString function.

string transformation_template = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The transformationTemplate.

getTransformationTemplateBytes()

public ByteString getTransformationTemplateBytes()

Optional. The CEL expression template to apply to transform messages. The following CEL extension functions are provided for use in this CEL expression:

  • merge: map1.merge(map2) -> map3
    • Merges the passed CEL map with the existing CEL map the function is applied to.
    • If the same key exists in both maps, if the key's value is type map both maps are merged else the value from the passed map is used.
  • denormalize: map.denormalize() -> map
    • Denormalizes a CEL map such that every value of type map or key in the map is expanded to return a single level map.
    • The resulting keys are "." separated indices of the map keys.
    • For example: { "a": 1, "b": { "c": 2, "d": 3 } "e": [4, 5] } .denormalize() -> { "a": 1, "b.c": 2, "b.d": 3, "e.0": 4, "e.1": 5 }
  • setField: map.setField(key, value) -> message
    • Sets the field of the message with the given key to the given value.
    • If the field is not present it will be added.
    • If the field is present it will be overwritten.
    • The key can be a dot separated path to set a field in a nested message.
    • Key must be of type string.
    • Value may be any valid type.
  • removeFields: map.removeFields([key1, key2, ...]) -> message
    • Removes the fields of the map with the given keys.
    • The keys can be a dot separated path to remove a field in a nested message.
    • If a key is not found it will be ignored.
    • Keys must be of type string.
  • toMap: [map1, map2, ...].toMap() -> map
    • Converts a CEL list of CEL maps to a single CEL map
  • toDestinationPayloadFormat(): message.data.toDestinationPayloadFormat() -> string or bytes
    • Converts the message data to the destination payload format specified in Pipeline.Destination.output_payload_format
    • This function is meant to be applied to the message.data field.
    • If the destination payload format is not set, the function will return the message data unchanged.
  • toCloudEventJsonWithPayloadFormat: message.toCloudEventJsonWithPayloadFormat() -> map
    • Converts a message to the corresponding structure of JSON format for CloudEvents
    • This function applies toDestinationPayloadFormat() to the message data. It also sets the corresponding datacontenttype of the CloudEvent, as indicated by Pipeline.Destination.output_payload_format. If no output_payload_format is set it will use the existing datacontenttype on the CloudEvent if present, else leave datacontenttype absent.
    • This function expects that the content of the message will adhere to the standard CloudEvent format. If it doesn’t then this function will fail.
    • The result is a CEL map that corresponds to the JSON representation of the CloudEvent. To convert that data to a JSON string it can be chained with the toJsonString function.

string transformation_template = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for transformationTemplate.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Pipeline.Mediation.Transformation other)

public Pipeline.Mediation.Transformation.Builder mergeFrom(Pipeline.Mediation.Transformation other)
Parameter
Name Description
other Pipeline.Mediation.Transformation
Returns
Type Description
Pipeline.Mediation.Transformation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Pipeline.Mediation.Transformation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Pipeline.Mediation.Transformation.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Pipeline.Mediation.Transformation.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Pipeline.Mediation.Transformation.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Pipeline.Mediation.Transformation.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Pipeline.Mediation.Transformation.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public Pipeline.Mediation.Transformation.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Pipeline.Mediation.Transformation.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Pipeline.Mediation.Transformation.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Pipeline.Mediation.Transformation.Builder
Overrides

setTransformationTemplate(String value)

public Pipeline.Mediation.Transformation.Builder setTransformationTemplate(String value)

Optional. The CEL expression template to apply to transform messages. The following CEL extension functions are provided for use in this CEL expression:

  • merge: map1.merge(map2) -> map3
    • Merges the passed CEL map with the existing CEL map the function is applied to.
    • If the same key exists in both maps, if the key's value is type map both maps are merged else the value from the passed map is used.
  • denormalize: map.denormalize() -> map
    • Denormalizes a CEL map such that every value of type map or key in the map is expanded to return a single level map.
    • The resulting keys are "." separated indices of the map keys.
    • For example: { "a": 1, "b": { "c": 2, "d": 3 } "e": [4, 5] } .denormalize() -> { "a": 1, "b.c": 2, "b.d": 3, "e.0": 4, "e.1": 5 }
  • setField: map.setField(key, value) -> message
    • Sets the field of the message with the given key to the given value.
    • If the field is not present it will be added.
    • If the field is present it will be overwritten.
    • The key can be a dot separated path to set a field in a nested message.
    • Key must be of type string.
    • Value may be any valid type.
  • removeFields: map.removeFields([key1, key2, ...]) -> message
    • Removes the fields of the map with the given keys.
    • The keys can be a dot separated path to remove a field in a nested message.
    • If a key is not found it will be ignored.
    • Keys must be of type string.
  • toMap: [map1, map2, ...].toMap() -> map
    • Converts a CEL list of CEL maps to a single CEL map
  • toDestinationPayloadFormat(): message.data.toDestinationPayloadFormat() -> string or bytes
    • Converts the message data to the destination payload format specified in Pipeline.Destination.output_payload_format
    • This function is meant to be applied to the message.data field.
    • If the destination payload format is not set, the function will return the message data unchanged.
  • toCloudEventJsonWithPayloadFormat: message.toCloudEventJsonWithPayloadFormat() -> map
    • Converts a message to the corresponding structure of JSON format for CloudEvents
    • This function applies toDestinationPayloadFormat() to the message data. It also sets the corresponding datacontenttype of the CloudEvent, as indicated by Pipeline.Destination.output_payload_format. If no output_payload_format is set it will use the existing datacontenttype on the CloudEvent if present, else leave datacontenttype absent.
    • This function expects that the content of the message will adhere to the standard CloudEvent format. If it doesn’t then this function will fail.
    • The result is a CEL map that corresponds to the JSON representation of the CloudEvent. To convert that data to a JSON string it can be chained with the toJsonString function.

string transformation_template = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The transformationTemplate to set.

Returns
Type Description
Pipeline.Mediation.Transformation.Builder

This builder for chaining.

setTransformationTemplateBytes(ByteString value)

public Pipeline.Mediation.Transformation.Builder setTransformationTemplateBytes(ByteString value)

Optional. The CEL expression template to apply to transform messages. The following CEL extension functions are provided for use in this CEL expression:

  • merge: map1.merge(map2) -> map3
    • Merges the passed CEL map with the existing CEL map the function is applied to.
    • If the same key exists in both maps, if the key's value is type map both maps are merged else the value from the passed map is used.
  • denormalize: map.denormalize() -> map
    • Denormalizes a CEL map such that every value of type map or key in the map is expanded to return a single level map.
    • The resulting keys are "." separated indices of the map keys.
    • For example: { "a": 1, "b": { "c": 2, "d": 3 } "e": [4, 5] } .denormalize() -> { "a": 1, "b.c": 2, "b.d": 3, "e.0": 4, "e.1": 5 }
  • setField: map.setField(key, value) -> message
    • Sets the field of the message with the given key to the given value.
    • If the field is not present it will be added.
    • If the field is present it will be overwritten.
    • The key can be a dot separated path to set a field in a nested message.
    • Key must be of type string.
    • Value may be any valid type.
  • removeFields: map.removeFields([key1, key2, ...]) -> message
    • Removes the fields of the map with the given keys.
    • The keys can be a dot separated path to remove a field in a nested message.
    • If a key is not found it will be ignored.
    • Keys must be of type string.
  • toMap: [map1, map2, ...].toMap() -> map
    • Converts a CEL list of CEL maps to a single CEL map
  • toDestinationPayloadFormat(): message.data.toDestinationPayloadFormat() -> string or bytes
    • Converts the message data to the destination payload format specified in Pipeline.Destination.output_payload_format
    • This function is meant to be applied to the message.data field.
    • If the destination payload format is not set, the function will return the message data unchanged.
  • toCloudEventJsonWithPayloadFormat: message.toCloudEventJsonWithPayloadFormat() -> map
    • Converts a message to the corresponding structure of JSON format for CloudEvents
    • This function applies toDestinationPayloadFormat() to the message data. It also sets the corresponding datacontenttype of the CloudEvent, as indicated by Pipeline.Destination.output_payload_format. If no output_payload_format is set it will use the existing datacontenttype on the CloudEvent if present, else leave datacontenttype absent.
    • This function expects that the content of the message will adhere to the standard CloudEvent format. If it doesn’t then this function will fail.
    • The result is a CEL map that corresponds to the JSON representation of the CloudEvent. To convert that data to a JSON string it can be chained with the toJsonString function.

string transformation_template = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for transformationTemplate to set.

Returns
Type Description
Pipeline.Mediation.Transformation.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Pipeline.Mediation.Transformation.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Pipeline.Mediation.Transformation.Builder
Overrides