| 1 | package Google::Cloud::Datacatalog::V1::TableSpec::Types; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | use Type::Library -base; | ||
| 7 | use Type::Utils -all; | ||
| 8 | use Types::Standard -types; | ||
| 9 | |||
| 10 | declare 'TableSourceType', | ||
| 11 | as (Int | Str); | ||
| 12 | |||
| 13 | declare 'BigQueryTableSpec', | ||
| 14 | as InstanceOf['Google::Cloud::Datacatalog::V1::TableSpec::BigQueryTableSpec']; | ||
| 15 | |||
| 16 | coerce 'BigQueryTableSpec', | ||
| 17 | from HashRef, via { 'Google::Cloud::Datacatalog::V1::TableSpec::BigQueryTableSpec'->new($_) }; | ||
| 18 | |||
| 19 | declare 'RepeatedBigQueryTableSpec', | ||
| 20 | as ArrayRef[BigQueryTableSpec()]; | ||
| 21 | |||
| 22 | coerce 'RepeatedBigQueryTableSpec', | ||
| 23 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Datacatalog::V1::TableSpec::BigQueryTableSpec'->new($_) } @$_ ] }; | ||
| 24 | |||
| 25 | declare 'MapStringBigQueryTableSpec', | ||
| 26 | as HashRef[BigQueryTableSpec()]; | ||
| 27 | |||
| 28 | declare 'ViewSpec', | ||
| 29 | as InstanceOf['Google::Cloud::Datacatalog::V1::TableSpec::ViewSpec']; | ||
| 30 | |||
| 31 | coerce 'ViewSpec', | ||
| 32 | from HashRef, via { 'Google::Cloud::Datacatalog::V1::TableSpec::ViewSpec'->new($_) }; | ||
| 33 | |||
| 34 | declare 'RepeatedViewSpec', | ||
| 35 | as ArrayRef[ViewSpec()]; | ||
| 36 | |||
| 37 | coerce 'RepeatedViewSpec', | ||
| 38 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Datacatalog::V1::TableSpec::ViewSpec'->new($_) } @$_ ] }; | ||
| 39 | |||
| 40 | declare 'MapStringViewSpec', | ||
| 41 | as HashRef[ViewSpec()]; | ||
| 42 | |||
| 43 | declare 'TableSpec', | ||
| 44 | as InstanceOf['Google::Cloud::Datacatalog::V1::TableSpec::TableSpec']; | ||
| 45 | |||
| 46 | coerce 'TableSpec', | ||
| 47 | from HashRef, via { 'Google::Cloud::Datacatalog::V1::TableSpec::TableSpec'->new($_) }; | ||
| 48 | |||
| 49 | declare 'RepeatedTableSpec', | ||
| 50 | as ArrayRef[TableSpec()]; | ||
| 51 | |||
| 52 | coerce 'RepeatedTableSpec', | ||
| 53 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Datacatalog::V1::TableSpec::TableSpec'->new($_) } @$_ ] }; | ||
| 54 | |||
| 55 | declare 'MapStringTableSpec', | ||
| 56 | as HashRef[TableSpec()]; | ||
| 57 | |||
| 58 | declare 'BigQueryDateShardedSpec', | ||
| 59 | as InstanceOf['Google::Cloud::Datacatalog::V1::TableSpec::BigQueryDateShardedSpec']; | ||
| 60 | |||
| 61 | coerce 'BigQueryDateShardedSpec', | ||
| 62 | from HashRef, via { 'Google::Cloud::Datacatalog::V1::TableSpec::BigQueryDateShardedSpec'->new($_) }; | ||
| 63 | |||
| 64 | declare 'RepeatedBigQueryDateShardedSpec', | ||
| 65 | as ArrayRef[BigQueryDateShardedSpec()]; | ||
| 66 | |||
| 67 | coerce 'RepeatedBigQueryDateShardedSpec', | ||
| 68 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Datacatalog::V1::TableSpec::BigQueryDateShardedSpec'->new($_) } @$_ ] }; | ||
| 69 | |||
| 70 | declare 'MapStringBigQueryDateShardedSpec', | ||
| 71 | as HashRef[BigQueryDateShardedSpec()]; | ||
| 72 | |||
| 73 | 1; | ||
| 74 | |||
| 75 | __END__ |