| 1 | package Google::Cloud::Retail::V2::Model::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 'Model', | ||
| 11 | as InstanceOf['Google::Cloud::Retail::V2::Model::Model']; | ||
| 12 | |||
| 13 | coerce 'Model', | ||
| 14 | from HashRef, via { 'Google::Cloud::Retail::V2::Model::Model'->new($_) }; | ||
| 15 | |||
| 16 | declare 'RepeatedModel', | ||
| 17 | as ArrayRef[Model()]; | ||
| 18 | |||
| 19 | coerce 'RepeatedModel', | ||
| 20 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Retail::V2::Model::Model'->new($_) } @$_ ] }; | ||
| 21 | |||
| 22 | declare 'MapStringModel', | ||
| 23 | as HashRef[Model()]; | ||
| 24 | |||
| 25 | declare 'ServingState', | ||
| 26 | as (Int | Str); | ||
| 27 | |||
| 28 | declare 'TrainingState', | ||
| 29 | as (Int | Str); | ||
| 30 | |||
| 31 | declare 'PeriodicTuningState', | ||
| 32 | as (Int | Str); | ||
| 33 | |||
| 34 | declare 'DataState', | ||
| 35 | as (Int | Str); | ||
| 36 | |||
| 37 | declare 'ContextProductsType', | ||
| 38 | as (Int | Str); | ||
| 39 | |||
| 40 | declare 'ServingConfigList', | ||
| 41 | as InstanceOf['Google::Cloud::Retail::V2::Model::Model::ServingConfigList']; | ||
| 42 | |||
| 43 | coerce 'ServingConfigList', | ||
| 44 | from HashRef, via { 'Google::Cloud::Retail::V2::Model::Model::ServingConfigList'->new($_) }; | ||
| 45 | |||
| 46 | declare 'RepeatedServingConfigList', | ||
| 47 | as ArrayRef[ServingConfigList()]; | ||
| 48 | |||
| 49 | coerce 'RepeatedServingConfigList', | ||
| 50 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Retail::V2::Model::Model::ServingConfigList'->new($_) } @$_ ] }; | ||
| 51 | |||
| 52 | declare 'MapStringServingConfigList', | ||
| 53 | as HashRef[ServingConfigList()]; | ||
| 54 | |||
| 55 | declare 'FrequentlyBoughtTogetherFeaturesConfig', | ||
| 56 | as InstanceOf['Google::Cloud::Retail::V2::Model::Model::FrequentlyBoughtTogetherFeaturesConfig']; | ||
| 57 | |||
| 58 | coerce 'FrequentlyBoughtTogetherFeaturesConfig', | ||
| 59 | from HashRef, via { 'Google::Cloud::Retail::V2::Model::Model::FrequentlyBoughtTogetherFeaturesConfig'->new($_) }; | ||
| 60 | |||
| 61 | declare 'RepeatedFrequentlyBoughtTogetherFeaturesConfig', | ||
| 62 | as ArrayRef[FrequentlyBoughtTogetherFeaturesConfig()]; | ||
| 63 | |||
| 64 | coerce 'RepeatedFrequentlyBoughtTogetherFeaturesConfig', | ||
| 65 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Retail::V2::Model::Model::FrequentlyBoughtTogetherFeaturesConfig'->new($_) } @$_ ] }; | ||
| 66 | |||
| 67 | declare 'MapStringFrequentlyBoughtTogetherFeaturesConfig', | ||
| 68 | as HashRef[FrequentlyBoughtTogetherFeaturesConfig()]; | ||
| 69 | |||
| 70 | declare 'ModelFeaturesConfig', | ||
| 71 | as InstanceOf['Google::Cloud::Retail::V2::Model::Model::ModelFeaturesConfig']; | ||
| 72 | |||
| 73 | coerce 'ModelFeaturesConfig', | ||
| 74 | from HashRef, via { 'Google::Cloud::Retail::V2::Model::Model::ModelFeaturesConfig'->new($_) }; | ||
| 75 | |||
| 76 | declare 'RepeatedModelFeaturesConfig', | ||
| 77 | as ArrayRef[ModelFeaturesConfig()]; | ||
| 78 | |||
| 79 | coerce 'RepeatedModelFeaturesConfig', | ||
| 80 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Retail::V2::Model::Model::ModelFeaturesConfig'->new($_) } @$_ ] }; | ||
| 81 | |||
| 82 | declare 'MapStringModelFeaturesConfig', | ||
| 83 | as HashRef[ModelFeaturesConfig()]; | ||
| 84 | |||
| 85 | 1; | ||
| 86 | |||
| 87 | __END__ |