Class: Google::Apis::DatastoreV1::PropertyTransform

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

Overview

A transformation of an entity property.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PropertyTransform

Returns a new instance of PropertyTransform.



2224
2225
2226
# File 'lib/google/apis/datastore_v1/classes.rb', line 2224

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

Instance Attribute Details

#append_missing_elementsGoogle::Apis::DatastoreV1::ArrayValue

An array value. Corresponds to the JSON property appendMissingElements



2185
2186
2187
# File 'lib/google/apis/datastore_v1/classes.rb', line 2185

def append_missing_elements
  @append_missing_elements
end

#incrementGoogle::Apis::DatastoreV1::Value

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



2191
2192
2193
# File 'lib/google/apis/datastore_v1/classes.rb', line 2191

def increment
  @increment
end

#maximumGoogle::Apis::DatastoreV1::Value

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



2197
2198
2199
# File 'lib/google/apis/datastore_v1/classes.rb', line 2197

def maximum
  @maximum
end

#minimumGoogle::Apis::DatastoreV1::Value

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



2203
2204
2205
# File 'lib/google/apis/datastore_v1/classes.rb', line 2203

def minimum
  @minimum
end

#propertyString

Optional. The name of the property. Property paths (a list of property names separated by dots (.)) may be used to refer to properties inside entity values. For example foo.bar means the property bar inside the entity property foo. If a property name contains a dot . or a backlslash \, then that name must be escaped. Corresponds to the JSON property property

Returns:

  • (String)


2212
2213
2214
# File 'lib/google/apis/datastore_v1/classes.rb', line 2212

def property
  @property
end

#remove_all_from_arrayGoogle::Apis::DatastoreV1::ArrayValue

An array value. Corresponds to the JSON property removeAllFromArray



2217
2218
2219
# File 'lib/google/apis/datastore_v1/classes.rb', line 2217

def remove_all_from_array
  @remove_all_from_array
end

#set_to_server_valueString

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

Returns:

  • (String)


2222
2223
2224
# File 'lib/google/apis/datastore_v1/classes.rb', line 2222

def set_to_server_value
  @set_to_server_value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2229
2230
2231
2232
2233
2234
2235
2236
2237
# File 'lib/google/apis/datastore_v1/classes.rb', line 2229

def update!(**args)
  @append_missing_elements = args[:append_missing_elements] if args.key?(:append_missing_elements)
  @increment = args[:increment] if args.key?(:increment)
  @maximum = args[:maximum] if args.key?(:maximum)
  @minimum = args[:minimum] if args.key?(:minimum)
  @property = args[:property] if args.key?(:property)
  @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