| 1 | package Google::Cloud::Discoveryengine::V1alpha::Schema::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 'Schema', | ||
| 11 | as InstanceOf['Google::Cloud::Discoveryengine::V1alpha::Schema::Schema']; | ||
| 12 | |||
| 13 | coerce 'Schema', | ||
| 14 | from HashRef, via { 'Google::Cloud::Discoveryengine::V1alpha::Schema::Schema'->new($_) }; | ||
| 15 | |||
| 16 | declare 'RepeatedSchema', | ||
| 17 | as ArrayRef[Schema()]; | ||
| 18 | |||
| 19 | coerce 'RepeatedSchema', | ||
| 20 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Discoveryengine::V1alpha::Schema::Schema'->new($_) } @$_ ] }; | ||
| 21 | |||
| 22 | declare 'MapStringSchema', | ||
| 23 | as HashRef[Schema()]; | ||
| 24 | |||
| 25 | declare 'FieldConfig', | ||
| 26 | as InstanceOf['Google::Cloud::Discoveryengine::V1alpha::Schema::FieldConfig']; | ||
| 27 | |||
| 28 | coerce 'FieldConfig', | ||
| 29 | from HashRef, via { 'Google::Cloud::Discoveryengine::V1alpha::Schema::FieldConfig'->new($_) }; | ||
| 30 | |||
| 31 | declare 'RepeatedFieldConfig', | ||
| 32 | as ArrayRef[FieldConfig()]; | ||
| 33 | |||
| 34 | coerce 'RepeatedFieldConfig', | ||
| 35 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Discoveryengine::V1alpha::Schema::FieldConfig'->new($_) } @$_ ] }; | ||
| 36 | |||
| 37 | declare 'MapStringFieldConfig', | ||
| 38 | as HashRef[FieldConfig()]; | ||
| 39 | |||
| 40 | declare 'FieldType', | ||
| 41 | as (Int | Str); | ||
| 42 | |||
| 43 | declare 'IndexableOption', | ||
| 44 | as (Int | Str); | ||
| 45 | |||
| 46 | declare 'DynamicFacetableOption', | ||
| 47 | as (Int | Str); | ||
| 48 | |||
| 49 | declare 'SearchableOption', | ||
| 50 | as (Int | Str); | ||
| 51 | |||
| 52 | declare 'RetrievableOption', | ||
| 53 | as (Int | Str); | ||
| 54 | |||
| 55 | declare 'CompletableOption', | ||
| 56 | as (Int | Str); | ||
| 57 | |||
| 58 | declare 'FilterableOption', | ||
| 59 | as (Int | Str); | ||
| 60 | |||
| 61 | declare 'AdvancedSiteSearchDataSource', | ||
| 62 | as (Int | Str); | ||
| 63 | |||
| 64 | 1; | ||
| 65 | |||
| 66 | __END__ |