Class: Google::Apis::DataplexV1::GoogleCloudDataplexV1AspectTypeMetadataTemplate

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

Overview

MetadataTemplate definition for an AspectType.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDataplexV1AspectTypeMetadataTemplate

Returns a new instance of GoogleCloudDataplexV1AspectTypeMetadataTemplate.



1010
1011
1012
# File 'lib/google/apis/dataplex_v1/classes.rb', line 1010

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

Instance Attribute Details

#annotationsGoogle::Apis::DataplexV1::GoogleCloudDataplexV1AspectTypeMetadataTemplateAnnotations

Definition of the annotations of a field. Corresponds to the JSON property annotations



944
945
946
# File 'lib/google/apis/dataplex_v1/classes.rb', line 944

def annotations
  @annotations
end

#array_itemsGoogle::Apis::DataplexV1::GoogleCloudDataplexV1AspectTypeMetadataTemplate

MetadataTemplate definition for an AspectType. Corresponds to the JSON property arrayItems



949
950
951
# File 'lib/google/apis/dataplex_v1/classes.rb', line 949

def array_items
  @array_items
end

#constraintsGoogle::Apis::DataplexV1::GoogleCloudDataplexV1AspectTypeMetadataTemplateConstraints

Definition of the constraints of a field. Corresponds to the JSON property constraints



954
955
956
# File 'lib/google/apis/dataplex_v1/classes.rb', line 954

def constraints
  @constraints
end

#enum_valuesArray<Google::Apis::DataplexV1::GoogleCloudDataplexV1AspectTypeMetadataTemplateEnumValue>

Optional. The list of values for an enum type. You must define it if the type is enum. Corresponds to the JSON property enumValues



960
961
962
# File 'lib/google/apis/dataplex_v1/classes.rb', line 960

def enum_values
  @enum_values
end

#indexFixnum

Optional. Index is used to encode Template messages. The value of index can range between 1 and 2,147,483,647. Index must be unique within all fields in a Template. (Nested Templates can reuse indexes). Once a Template is defined, the index cannot be changed, because it identifies the field in the actual storage format. Index is a mandatory field, but it is optional for top level fields, and map/array "values" definitions. Corresponds to the JSON property index

Returns:

  • (Fixnum)


970
971
972
# File 'lib/google/apis/dataplex_v1/classes.rb', line 970

def index
  @index
end

#map_itemsGoogle::Apis::DataplexV1::GoogleCloudDataplexV1AspectTypeMetadataTemplate

MetadataTemplate definition for an AspectType. Corresponds to the JSON property mapItems



975
976
977
# File 'lib/google/apis/dataplex_v1/classes.rb', line 975

def map_items
  @map_items
end

#nameString

Required. The name of the field. Corresponds to the JSON property name

Returns:

  • (String)


980
981
982
# File 'lib/google/apis/dataplex_v1/classes.rb', line 980

def name
  @name
end

#record_fieldsArray<Google::Apis::DataplexV1::GoogleCloudDataplexV1AspectTypeMetadataTemplate>

Optional. Field definition. You must specify it if the type is record. It defines the nested fields. Corresponds to the JSON property recordFields



986
987
988
# File 'lib/google/apis/dataplex_v1/classes.rb', line 986

def record_fields
  @record_fields
end

#typeString

Required. The datatype of this field. The following values are supported: Primitive types: string integer boolean double datetime. Must be of the format RFC3339 UTC "Zulu" (Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23. 045123456Z").Complex types: enum array map record Corresponds to the JSON property type

Returns:

  • (String)


994
995
996
# File 'lib/google/apis/dataplex_v1/classes.rb', line 994

def type
  @type
end

#type_idString

Optional. You can use type id if this definition of the field needs to be reused later. The type id must be unique across the entire template. You can only specify it if the field type is record. Corresponds to the JSON property typeId

Returns:

  • (String)


1001
1002
1003
# File 'lib/google/apis/dataplex_v1/classes.rb', line 1001

def type_id
  @type_id
end

#type_refString

Optional. A reference to another field definition (not an inline definition). The value must be equal to the value of an id field defined elsewhere in the MetadataTemplate. Only fields with record type can refer to other fields. Corresponds to the JSON property typeRef

Returns:

  • (String)


1008
1009
1010
# File 'lib/google/apis/dataplex_v1/classes.rb', line 1008

def type_ref
  @type_ref
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
# File 'lib/google/apis/dataplex_v1/classes.rb', line 1015

def update!(**args)
  @annotations = args[:annotations] if args.key?(:annotations)
  @array_items = args[:array_items] if args.key?(:array_items)
  @constraints = args[:constraints] if args.key?(:constraints)
  @enum_values = args[:enum_values] if args.key?(:enum_values)
  @index = args[:index] if args.key?(:index)
  @map_items = args[:map_items] if args.key?(:map_items)
  @name = args[:name] if args.key?(:name)
  @record_fields = args[:record_fields] if args.key?(:record_fields)
  @type = args[:type] if args.key?(:type)
  @type_id = args[:type_id] if args.key?(:type_id)
  @type_ref = args[:type_ref] if args.key?(:type_ref)
end