| 1 | package Google::Cloud::Automl::V1beta1::DataTypes::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 'TypeCode', | ||
| 11 | as (Int | Str); | ||
| 12 | |||
| 13 | declare 'DataType', | ||
| 14 | as InstanceOf['Google::Cloud::Automl::V1beta1::DataTypes::DataType']; | ||
| 15 | |||
| 16 | coerce 'DataType', | ||
| 17 | from HashRef, via { 'Google::Cloud::Automl::V1beta1::DataTypes::DataType'->new($_) }; | ||
| 18 | |||
| 19 | declare 'RepeatedDataType', | ||
| 20 | as ArrayRef[DataType()]; | ||
| 21 | |||
| 22 | coerce 'RepeatedDataType', | ||
| 23 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Automl::V1beta1::DataTypes::DataType'->new($_) } @$_ ] }; | ||
| 24 | |||
| 25 | declare 'MapStringDataType', | ||
| 26 | as HashRef[DataType()]; | ||
| 27 | |||
| 28 | declare 'StructType', | ||
| 29 | as InstanceOf['Google::Cloud::Automl::V1beta1::DataTypes::StructType']; | ||
| 30 | |||
| 31 | coerce 'StructType', | ||
| 32 | from HashRef, via { 'Google::Cloud::Automl::V1beta1::DataTypes::StructType'->new($_) }; | ||
| 33 | |||
| 34 | declare 'RepeatedStructType', | ||
| 35 | as ArrayRef[StructType()]; | ||
| 36 | |||
| 37 | coerce 'RepeatedStructType', | ||
| 38 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Automl::V1beta1::DataTypes::StructType'->new($_) } @$_ ] }; | ||
| 39 | |||
| 40 | declare 'MapStringStructType', | ||
| 41 | as HashRef[StructType()]; | ||
| 42 | |||
| 43 | declare 'FieldsEntry', | ||
| 44 | as InstanceOf['Google::Cloud::Automl::V1beta1::DataTypes::StructType::FieldsEntry']; | ||
| 45 | |||
| 46 | coerce 'FieldsEntry', | ||
| 47 | from HashRef, via { 'Google::Cloud::Automl::V1beta1::DataTypes::StructType::FieldsEntry'->new($_) }; | ||
| 48 | |||
| 49 | declare 'RepeatedFieldsEntry', | ||
| 50 | as ArrayRef[FieldsEntry()]; | ||
| 51 | |||
| 52 | coerce 'RepeatedFieldsEntry', | ||
| 53 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Automl::V1beta1::DataTypes::StructType::FieldsEntry'->new($_) } @$_ ] }; | ||
| 54 | |||
| 55 | declare 'MapStringFieldsEntry', | ||
| 56 | as HashRef[FieldsEntry()]; | ||
| 57 | |||
| 58 | 1; | ||
| 59 | |||
| 60 | __END__ |