Class: Google::Apis::DatastoreV1beta2::Value

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

Overview

A message that can hold any of the supported value types and associated metadata.

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) ⇒ Value

Returns a new instance of Value.


1164
1165
1166
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 1164

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

Instance Attribute Details

#blob_key_valueString

A blob key value. Corresponds to the JSON property blobKeyValue

Returns:

  • (String)

1096
1097
1098
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 1096

def blob_key_value
  @blob_key_value
end

#blob_valueString

A blob value. May be a maximum of 1,000,000 bytes. When indexed is true, may have at most 500 bytes. Corresponds to the JSON property blobValue

Returns:

  • (String)

1102
1103
1104
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 1102

def blob_value
  @blob_value
end

#boolean_valueBoolean Also known as: boolean_value?

A boolean value. Corresponds to the JSON property booleanValue

Returns:

  • (Boolean)

1107
1108
1109
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 1107

def boolean_value
  @boolean_value
end

#date_time_valueDateTime

A timestamp value. Corresponds to the JSON property dateTimeValue

Returns:

  • (DateTime)

1113
1114
1115
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 1113

def date_time_value
  @date_time_value
end

#double_valueFloat

A double value. Corresponds to the JSON property doubleValue

Returns:

  • (Float)

1118
1119
1120
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 1118

def double_value
  @double_value
end

#entity_valueGoogle::Apis::DatastoreV1beta2::Entity

An entity. Corresponds to the JSON property entityValue


1123
1124
1125
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 1123

def entity_value
  @entity_value
end

#indexedBoolean Also known as: indexed?

If the value should be indexed. The indexed property may be set for a null value. When indexed is true, stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true.) If a value is itself an entity, it cannot have indexed set to true. Corresponds to the JSON property indexed

Returns:

  • (Boolean)

1134
1135
1136
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 1134

def indexed
  @indexed
end

#integer_valueString

An integer value. Corresponds to the JSON property integerValue

Returns:

  • (String)

1140
1141
1142
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 1140

def integer_value
  @integer_value
end

#key_valueGoogle::Apis::DatastoreV1beta2::Key

A unique identifier for an entity. Corresponds to the JSON property keyValue


1145
1146
1147
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 1145

def key_value
  @key_value
end

#list_valueArray<Google::Apis::DatastoreV1beta2::Value>

A list value. Cannot contain another list value. A Value instance that sets field list_value must not set field meaning or field indexed. Corresponds to the JSON property listValue


1151
1152
1153
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 1151

def list_value
  @list_value
end

#meaningFixnum

The meaning field is reserved and should not be used. Corresponds to the JSON property meaning

Returns:

  • (Fixnum)

1156
1157
1158
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 1156

def meaning
  @meaning
end

#string_valueString

A UTF-8 encoded string value. When indexed is true, may have at most 500 characters. Corresponds to the JSON property stringValue

Returns:

  • (String)

1162
1163
1164
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 1162

def string_value
  @string_value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 1169

def update!(**args)
  @blob_key_value = args[:blob_key_value] if args.key?(:blob_key_value)
  @blob_value = args[:blob_value] if args.key?(:blob_value)
  @boolean_value = args[:boolean_value] if args.key?(:boolean_value)
  @date_time_value = args[:date_time_value] if args.key?(:date_time_value)
  @double_value = args[:double_value] if args.key?(:double_value)
  @entity_value = args[:entity_value] if args.key?(:entity_value)
  @indexed = args[:indexed] if args.key?(:indexed)
  @integer_value = args[:integer_value] if args.key?(:integer_value)
  @key_value = args[:key_value] if args.key?(:key_value)
  @list_value = args[:list_value] if args.key?(:list_value)
  @meaning = args[:meaning] if args.key?(:meaning)
  @string_value = args[:string_value] if args.key?(:string_value)
end