Class: Google::Apis::FirestoreV1::FieldTransform

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

Overview

A transformation of a field of the document.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ FieldTransform

Returns a new instance of FieldTransform



684
685
686
# File 'generated/google/apis/firestore_v1/classes.rb', line 684

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

Instance Attribute Details

#append_missing_elementsGoogle::Apis::FirestoreV1::ArrayValue

An array value. Corresponds to the JSON property appendMissingElements



666
667
668
# File 'generated/google/apis/firestore_v1/classes.rb', line 666

def append_missing_elements
  @append_missing_elements
end

#field_pathString

The path of the field. See Document.fields for the field path syntax reference. Corresponds to the JSON property fieldPath

Returns:

  • (String)


672
673
674
# File 'generated/google/apis/firestore_v1/classes.rb', line 672

def field_path
  @field_path
end

#remove_all_from_arrayGoogle::Apis::FirestoreV1::ArrayValue

An array value. Corresponds to the JSON property removeAllFromArray



677
678
679
# File 'generated/google/apis/firestore_v1/classes.rb', line 677

def remove_all_from_array
  @remove_all_from_array
end

#set_to_server_valueString

Sets the field to the given server value. Corresponds to the JSON property setToServerValue

Returns:

  • (String)


682
683
684
# File 'generated/google/apis/firestore_v1/classes.rb', line 682

def set_to_server_value
  @set_to_server_value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



689
690
691
692
693
694
# File 'generated/google/apis/firestore_v1/classes.rb', line 689

def update!(**args)
  @append_missing_elements = args[:append_missing_elements] if args.key?(:append_missing_elements)
  @field_path = args[:field_path] if args.key?(:field_path)
  @remove_all_from_array = args[:remove_all_from_array] if args.key?(:remove_all_from_array)
  @set_to_server_value = args[:set_to_server_value] if args.key?(:set_to_server_value)
end