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

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

Overview

A transformation of a field of the document.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ FieldTransform

Returns a new instance of FieldTransform.



1182
1183
1184
# File 'lib/google/apis/firestore_v1/classes.rb', line 1182

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

Instance Attribute Details

#append_missing_elementsGoogle::Apis::FirestoreV1::ArrayValue

An array value. Corresponds to the JSON property appendMissingElements



1150
1151
1152
# File 'lib/google/apis/firestore_v1/classes.rb', line 1150

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)


1155
1156
1157
# File 'lib/google/apis/firestore_v1/classes.rb', line 1155

def field_path
  @field_path
end

#incrementGoogle::Apis::FirestoreV1::Value

A message that can hold any of the supported value types. Corresponds to the JSON property increment



1160
1161
1162
# File 'lib/google/apis/firestore_v1/classes.rb', line 1160

def increment
  @increment
end

#maximumGoogle::Apis::FirestoreV1::Value

A message that can hold any of the supported value types. Corresponds to the JSON property maximum



1165
1166
1167
# File 'lib/google/apis/firestore_v1/classes.rb', line 1165

def maximum
  @maximum
end

#minimumGoogle::Apis::FirestoreV1::Value

A message that can hold any of the supported value types. Corresponds to the JSON property minimum



1170
1171
1172
# File 'lib/google/apis/firestore_v1/classes.rb', line 1170

def minimum
  @minimum
end

#remove_all_from_arrayGoogle::Apis::FirestoreV1::ArrayValue

An array value. Corresponds to the JSON property removeAllFromArray



1175
1176
1177
# File 'lib/google/apis/firestore_v1/classes.rb', line 1175

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)


1180
1181
1182
# File 'lib/google/apis/firestore_v1/classes.rb', line 1180

def set_to_server_value
  @set_to_server_value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1187
1188
1189
1190
1191
1192
1193
1194
1195
# File 'lib/google/apis/firestore_v1/classes.rb', line 1187

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)
  @increment = args[:increment] if args.key?(:increment)
  @maximum = args[:maximum] if args.key?(:maximum)
  @minimum = args[:minimum] if args.key?(:minimum)
  @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