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
more...

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.

[View source]

2286
2287
2288
# File 'lib/google/apis/datastore_v1/classes.rb', line 2286

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

Instance Attribute Details

#append_missing_elementsGoogle::Apis::DatastoreV1::ArrayValue

An array value. Corresponds to the JSON property appendMissingElements


2247
2248
2249
# File 'lib/google/apis/datastore_v1/classes.rb', line 2247

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


2253
2254
2255
# File 'lib/google/apis/datastore_v1/classes.rb', line 2253

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


2259
2260
2261
# File 'lib/google/apis/datastore_v1/classes.rb', line 2259

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


2265
2266
2267
# File 'lib/google/apis/datastore_v1/classes.rb', line 2265

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)

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

def property
  @property
end

#remove_all_from_arrayGoogle::Apis::DatastoreV1::ArrayValue

An array value. Corresponds to the JSON property removeAllFromArray


2279
2280
2281
# File 'lib/google/apis/datastore_v1/classes.rb', line 2279

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)

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

def set_to_server_value
  @set_to_server_value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object

[View source]

2291
2292
2293
2294
2295
2296
2297
2298
2299
# File 'lib/google/apis/datastore_v1/classes.rb', line 2291

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