Class: Google::Apis::LanguageV2::XpsDataType

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

Overview

Indicated the type of data that can be stored in a structured data entity (e.g. a table).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ XpsDataType

Returns a new instance of XpsDataType.



1806
1807
1808
# File 'lib/google/apis/language_v2/classes.rb', line 1806

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

Instance Attribute Details

#compatible_data_typesArray<Google::Apis::LanguageV2::XpsDataType>

The highly compatible data types to this data type. Corresponds to the JSON property compatibleDataTypes



1774
1775
1776
# File 'lib/google/apis/language_v2/classes.rb', line 1774

def compatible_data_types
  @compatible_data_types
end

#list_element_typeGoogle::Apis::LanguageV2::XpsDataType

Indicated the type of data that can be stored in a structured data entity (e.g. a table). Corresponds to the JSON property listElementType



1780
1781
1782
# File 'lib/google/apis/language_v2/classes.rb', line 1780

def list_element_type
  @list_element_type
end

#nullableBoolean Also known as: nullable?

If true, this DataType can also be null. Corresponds to the JSON property nullable

Returns:

  • (Boolean)


1785
1786
1787
# File 'lib/google/apis/language_v2/classes.rb', line 1785

def nullable
  @nullable
end

#struct_typeGoogle::Apis::LanguageV2::XpsStructType

StructType defines the DataType-s of a STRUCT type. Corresponds to the JSON property structType



1791
1792
1793
# File 'lib/google/apis/language_v2/classes.rb', line 1791

def struct_type
  @struct_type
end

#time_formatString

If type_code == TIMESTAMP then time_format provides the format in which that time field is expressed. The time_format must be written in strftime syntax. If time_format is not set, then the default format as described on the field is used. Corresponds to the JSON property timeFormat

Returns:

  • (String)


1799
1800
1801
# File 'lib/google/apis/language_v2/classes.rb', line 1799

def time_format
  @time_format
end

#type_codeString

Required. The TypeCode for this type. Corresponds to the JSON property typeCode

Returns:

  • (String)


1804
1805
1806
# File 'lib/google/apis/language_v2/classes.rb', line 1804

def type_code
  @type_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1811
1812
1813
1814
1815
1816
1817
1818
# File 'lib/google/apis/language_v2/classes.rb', line 1811

def update!(**args)
  @compatible_data_types = args[:compatible_data_types] if args.key?(:compatible_data_types)
  @list_element_type = args[:list_element_type] if args.key?(:list_element_type)
  @nullable = args[:nullable] if args.key?(:nullable)
  @struct_type = args[:struct_type] if args.key?(:struct_type)
  @time_format = args[:time_format] if args.key?(:time_format)
  @type_code = args[:type_code] if args.key?(:type_code)
end