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.



2295
2296
2297
# File 'lib/google/apis/datastore_v1/classes.rb', line 2295

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

Instance Attribute Details

#append_missing_elementsGoogle::Apis::DatastoreV1::ArrayValue

An array value. Corresponds to the JSON property appendMissingElements



2256
2257
2258
# File 'lib/google/apis/datastore_v1/classes.rb', line 2256

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



2262
2263
2264
# File 'lib/google/apis/datastore_v1/classes.rb', line 2262

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



2268
2269
2270
# File 'lib/google/apis/datastore_v1/classes.rb', line 2268

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



2274
2275
2276
# File 'lib/google/apis/datastore_v1/classes.rb', line 2274

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)


2283
2284
2285
# File 'lib/google/apis/datastore_v1/classes.rb', line 2283

def property
  @property
end

#remove_all_from_arrayGoogle::Apis::DatastoreV1::ArrayValue

An array value. Corresponds to the JSON property removeAllFromArray



2288
2289
2290
# File 'lib/google/apis/datastore_v1/classes.rb', line 2288

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)


2293
2294
2295
# File 'lib/google/apis/datastore_v1/classes.rb', line 2293

def set_to_server_value
  @set_to_server_value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2300
2301
2302
2303
2304
2305
2306
2307
2308
# File 'lib/google/apis/datastore_v1/classes.rb', line 2300

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