| 1 | package Google::Cloud::Ces::V1beta::Conversation::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 'Conversation', | ||
| 11 | as InstanceOf['Google::Cloud::Ces::V1beta::Conversation::Conversation']; | ||
| 12 | |||
| 13 | coerce 'Conversation', | ||
| 14 | from HashRef, via { 'Google::Cloud::Ces::V1beta::Conversation::Conversation'->new($_) }; | ||
| 15 | |||
| 16 | declare 'RepeatedConversation', | ||
| 17 | as ArrayRef[Conversation()]; | ||
| 18 | |||
| 19 | coerce 'RepeatedConversation', | ||
| 20 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Ces::V1beta::Conversation::Conversation'->new($_) } @$_ ] }; | ||
| 21 | |||
| 22 | declare 'MapStringConversation', | ||
| 23 | as HashRef[Conversation()]; | ||
| 24 | |||
| 25 | declare 'ChannelType', | ||
| 26 | as (Int | Str); | ||
| 27 | |||
| 28 | declare 'Source', | ||
| 29 | as (Int | Str); | ||
| 30 | |||
| 31 | declare 'InputType', | ||
| 32 | as (Int | Str); | ||
| 33 | |||
| 34 | declare 'Turn', | ||
| 35 | as InstanceOf['Google::Cloud::Ces::V1beta::Conversation::Conversation::Turn']; | ||
| 36 | |||
| 37 | coerce 'Turn', | ||
| 38 | from HashRef, via { 'Google::Cloud::Ces::V1beta::Conversation::Conversation::Turn'->new($_) }; | ||
| 39 | |||
| 40 | declare 'RepeatedTurn', | ||
| 41 | as ArrayRef[Turn()]; | ||
| 42 | |||
| 43 | coerce 'RepeatedTurn', | ||
| 44 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Ces::V1beta::Conversation::Conversation::Turn'->new($_) } @$_ ] }; | ||
| 45 | |||
| 46 | declare 'MapStringTurn', | ||
| 47 | as HashRef[Turn()]; | ||
| 48 | |||
| 49 | 1; | ||
| 50 | |||
| 51 | __END__ |