Class: Google::Apis::PubsubV1::MessageTransform

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/pubsub_v1/classes.rb,
lib/google/apis/pubsub_v1/representations.rb,
lib/google/apis/pubsub_v1/representations.rb

Overview

All supported message transforms types.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ MessageTransform

Returns a new instance of MessageTransform.



1222
1223
1224
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1222

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#disabledBoolean Also known as: disabled?

Optional. If true, the transform is disabled and will not be applied to messages. Defaults to false. Corresponds to the JSON property disabled

Returns:

  • (Boolean)


1206
1207
1208
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1206

def disabled
  @disabled
end

#enabledBoolean Also known as: enabled?

Optional. This field is deprecated, use the disabled field to disable transforms. Corresponds to the JSON property enabled

Returns:

  • (Boolean)


1213
1214
1215
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1213

def enabled
  @enabled
end

#javascript_udfGoogle::Apis::PubsubV1::JavaScriptUdf

User-defined JavaScript function that can transform or filter a Pub/Sub message. Corresponds to the JSON property javascriptUdf



1220
1221
1222
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1220

def javascript_udf
  @javascript_udf
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1227
1228
1229
1230
1231
# File 'lib/google/apis/pubsub_v1/classes.rb', line 1227

def update!(**args)
  @disabled = args[:disabled] if args.key?(:disabled)
  @enabled = args[:enabled] if args.key?(:enabled)
  @javascript_udf = args[:javascript_udf] if args.key?(:javascript_udf)
end