Class: Google::Apis::CloudbillingV1beta::ValueProto

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

Overview

This is a copy of storage/googlesql/public/value.proto. ValueProto represents the serialized form of the googlesql::Value. The intention is to support multiple languages including Java and C++, so we must be sensitive to the distinction between Java Strings and byte arrays or ByteStrings. We also want to support use-cases which do not want to serialize a copy of the GoogleSQL type for every instance (which might be very repetitive). Therefore, unlike googlesql::Value, ValueProto does not carry full type information with every instance, and can only be fully interpreted with an associated TypeProto.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ValueProto

Returns a new instance of ValueProto.



2458
2459
2460
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2458

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

Instance Attribute Details

#array_valueGoogle::Apis::CloudbillingV1beta::Array

An ordered collection of elements of arbitrary count. Corresponds to the JSON property arrayValue



2301
2302
2303
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2301

def array_value
  @array_value
end

#bignumeric_valueString

Encoded bignumeric value. For the encoding format see documentation for BigNumericValue::SerializeAsProtoBytes(). Corresponds to the JSON property bignumericValue NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


2308
2309
2310
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2308

def bignumeric_value
  @bignumeric_value
end

#bool_valueBoolean Also known as: bool_value?

Primitive for bool. Corresponds to the JSON property boolValue

Returns:

  • (Boolean)


2313
2314
2315
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2313

def bool_value
  @bool_value
end

#bytes_valueString

Primitive for bytes. Corresponds to the JSON property bytesValue NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


2320
2321
2322
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2320

def bytes_value
  @bytes_value
end

#date_valueFixnum

Primitive for date. Corresponds to the JSON property dateValue

Returns:

  • (Fixnum)


2325
2326
2327
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2325

def date_value
  @date_value
end

#datetime_valueGoogle::Apis::CloudbillingV1beta::Datetime

A datetime value. Corresponds to the JSON property datetimeValue



2330
2331
2332
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2330

def datetime_value
  @datetime_value
end

#double_valueFloat

Primitive for double. Corresponds to the JSON property doubleValue

Returns:

  • (Float)


2335
2336
2337
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2335

def double_value
  @double_value
end

#enum_valueFixnum

Tag 11 was used for specifying micros timestamps as int64, now obsolete. Corresponds to the JSON property enumValue

Returns:

  • (Fixnum)


2340
2341
2342
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2340

def enum_value
  @enum_value
end

#float_valueFloat

Primitive for float. Corresponds to the JSON property floatValue

Returns:

  • (Float)


2345
2346
2347
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2345

def float_value
  @float_value
end

#geography_valueString

Geography encoded using ::stlib::STGeographyEncoder Corresponds to the JSON property geographyValue NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


2351
2352
2353
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2351

def geography_value
  @geography_value
end

#int32_valueFixnum

Primitive value for int32. Corresponds to the JSON property int32Value

Returns:

  • (Fixnum)


2356
2357
2358
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2356

def int32_value
  @int32_value
end

#int64_valueFixnum

Primitive for int64. Corresponds to the JSON property int64Value

Returns:

  • (Fixnum)


2361
2362
2363
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2361

def int64_value
  @int64_value
end

#interval_valueString

Encoded interval value. For the encoding format see documentation for IntervalValue::SerializeAsBytes(). Corresponds to the JSON property intervalValue NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


2368
2369
2370
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2368

def interval_value
  @interval_value
end

#json_valueString

Tag 22 was used for json value as bytes, now obsolete. Json value represented as a string document. Corresponds to the JSON property jsonValue

Returns:

  • (String)


2374
2375
2376
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2374

def json_value
  @json_value
end

#map_valueGoogle::Apis::CloudbillingV1beta::Map

An unordered mapping from key to value, represented as a collection of map entries. Corresponds to the JSON property mapValue



2380
2381
2382
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2380

def map_value
  @map_value
end

#numeric_valueString

Encoded numeric value. For the encoding format see documentation for NumericValue::SerializeAsProtoBytes(). Corresponds to the JSON property numericValue NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


2387
2388
2389
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2387

def numeric_value
  @numeric_value
end

#proto_valueString

Stores a serialized protocol message. Corresponds to the JSON property protoValue NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


2393
2394
2395
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2393

def proto_value
  @proto_value
end

#range_valueGoogle::Apis::CloudbillingV1beta::Range

A range of values, bounded by the values 'start' (inclusive) and 'end' ( exclusive). A range has an element type, and values must be of this element type. A range is contiguous, ie it contains all values of the given element type starting at 'start' and ending before 'end'. A "null" value on start or end represents an unbounded start or end value respectively. Start and end values must always be present. Corresponds to the JSON property rangeValue



2403
2404
2405
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2403

def range_value
  @range_value
end

#string_valueString

Primitive for string. Corresponds to the JSON property stringValue

Returns:

  • (String)


2408
2409
2410
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2408

def string_value
  @string_value
end

#struct_valueGoogle::Apis::CloudbillingV1beta::Struct

A collection of fields. The count, order, and type of the fields is determined by the type associated with this value. Corresponds to the JSON property structValue



2414
2415
2416
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2414

def struct_value
  @struct_value
end

#time_valueFixnum

Bit field encoding of hour/minute/second/nanos. See TimeValue class for details. Corresponds to the JSON property timeValue

Returns:

  • (Fixnum)


2420
2421
2422
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2420

def time_value
  @time_value
end

#timestamp_pico_valueString

Encoded timestamp_pico value. For the encoding format see documentation for googlesql::TimestampPico::SerializeAsBytes(). Corresponds to the JSON property timestampPicoValue NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


2427
2428
2429
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2427

def timestamp_pico_value
  @timestamp_pico_value
end

#timestamp_valueString

primitive for timestamp Corresponds to the JSON property timestampValue

Returns:

  • (String)


2432
2433
2434
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2432

def timestamp_value
  @timestamp_value
end

#tokenlist_valueString

Encoded tokenlist value. copybara:strip_begin(internal-comment) See //search/ tokens:token_list. copybara:strip_end Corresponds to the JSON property tokenlistValue NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


2439
2440
2441
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2439

def tokenlist_value
  @tokenlist_value
end

#uint32_valueFixnum

Primitive for uint32. Corresponds to the JSON property uint32Value

Returns:

  • (Fixnum)


2444
2445
2446
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2444

def uint32_value
  @uint32_value
end

#uint64_valueFixnum

Primitive for uint64. Corresponds to the JSON property uint64Value

Returns:

  • (Fixnum)


2449
2450
2451
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2449

def uint64_value
  @uint64_value
end

#uuid_valueString

Encoded uuid value. For the encoding format see documentation for UuidValue:: SerializeAsBytes(). Corresponds to the JSON property uuidValue NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


2456
2457
2458
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2456

def uuid_value
  @uuid_value
end

#value_proto_switch_must_have_a_defaultBoolean Also known as: value_proto_switch_must_have_a_default?

User code that switches on this oneoff enum must have a default case so builds won't break when new fields are added. Corresponds to the JSON property ValueProtoSwitchMustHaveADefault

Returns:

  • (Boolean)


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

def value_proto_switch_must_have_a_default
  @value_proto_switch_must_have_a_default
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 2463

def update!(**args)
  @value_proto_switch_must_have_a_default = args[:value_proto_switch_must_have_a_default] if args.key?(:value_proto_switch_must_have_a_default)
  @array_value = args[:array_value] if args.key?(:array_value)
  @bignumeric_value = args[:bignumeric_value] if args.key?(:bignumeric_value)
  @bool_value = args[:bool_value] if args.key?(:bool_value)
  @bytes_value = args[:bytes_value] if args.key?(:bytes_value)
  @date_value = args[:date_value] if args.key?(:date_value)
  @datetime_value = args[:datetime_value] if args.key?(:datetime_value)
  @double_value = args[:double_value] if args.key?(:double_value)
  @enum_value = args[:enum_value] if args.key?(:enum_value)
  @float_value = args[:float_value] if args.key?(:float_value)
  @geography_value = args[:geography_value] if args.key?(:geography_value)
  @int32_value = args[:int32_value] if args.key?(:int32_value)
  @int64_value = args[:int64_value] if args.key?(:int64_value)
  @interval_value = args[:interval_value] if args.key?(:interval_value)
  @json_value = args[:json_value] if args.key?(:json_value)
  @map_value = args[:map_value] if args.key?(:map_value)
  @numeric_value = args[:numeric_value] if args.key?(:numeric_value)
  @proto_value = args[:proto_value] if args.key?(:proto_value)
  @range_value = args[:range_value] if args.key?(:range_value)
  @string_value = args[:string_value] if args.key?(:string_value)
  @struct_value = args[:struct_value] if args.key?(:struct_value)
  @time_value = args[:time_value] if args.key?(:time_value)
  @timestamp_pico_value = args[:timestamp_pico_value] if args.key?(:timestamp_pico_value)
  @timestamp_value = args[:timestamp_value] if args.key?(:timestamp_value)
  @tokenlist_value = args[:tokenlist_value] if args.key?(:tokenlist_value)
  @uint32_value = args[:uint32_value] if args.key?(:uint32_value)
  @uint64_value = args[:uint64_value] if args.key?(:uint64_value)
  @uuid_value = args[:uuid_value] if args.key?(:uuid_value)
end