| 1 | package Google::Cloud::Dialogflow::Cx::V3::ParameterDefinition::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 'DataType', | ||
| 11 | as (Int | Str); | ||
| 12 | |||
| 13 | declare 'ParameterDefinition', | ||
| 14 | as InstanceOf['Google::Cloud::Dialogflow::Cx::V3::ParameterDefinition::ParameterDefinition']; | ||
| 15 | |||
| 16 | coerce 'ParameterDefinition', | ||
| 17 | from HashRef, via { 'Google::Cloud::Dialogflow::Cx::V3::ParameterDefinition::ParameterDefinition'->new($_) }; | ||
| 18 | |||
| 19 | declare 'RepeatedParameterDefinition', | ||
| 20 | as ArrayRef[ParameterDefinition()]; | ||
| 21 | |||
| 22 | coerce 'RepeatedParameterDefinition', | ||
| 23 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Dialogflow::Cx::V3::ParameterDefinition::ParameterDefinition'->new($_) } @$_ ] }; | ||
| 24 | |||
| 25 | declare 'MapStringParameterDefinition', | ||
| 26 | as HashRef[ParameterDefinition()]; | ||
| 27 | |||
| 28 | declare 'ParameterType', | ||
| 29 | as (Int | Str); | ||
| 30 | |||
| 31 | declare 'TypeSchema', | ||
| 32 | as InstanceOf['Google::Cloud::Dialogflow::Cx::V3::ParameterDefinition::TypeSchema']; | ||
| 33 | |||
| 34 | coerce 'TypeSchema', | ||
| 35 | from HashRef, via { 'Google::Cloud::Dialogflow::Cx::V3::ParameterDefinition::TypeSchema'->new($_) }; | ||
| 36 | |||
| 37 | declare 'RepeatedTypeSchema', | ||
| 38 | as ArrayRef[TypeSchema()]; | ||
| 39 | |||
| 40 | coerce 'RepeatedTypeSchema', | ||
| 41 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Dialogflow::Cx::V3::ParameterDefinition::TypeSchema'->new($_) } @$_ ] }; | ||
| 42 | |||
| 43 | declare 'MapStringTypeSchema', | ||
| 44 | as HashRef[TypeSchema()]; | ||
| 45 | |||
| 46 | declare 'SchemaReference', | ||
| 47 | as InstanceOf['Google::Cloud::Dialogflow::Cx::V3::ParameterDefinition::TypeSchema::SchemaReference']; | ||
| 48 | |||
| 49 | coerce 'SchemaReference', | ||
| 50 | from HashRef, via { 'Google::Cloud::Dialogflow::Cx::V3::ParameterDefinition::TypeSchema::SchemaReference'->new($_) }; | ||
| 51 | |||
| 52 | declare 'RepeatedSchemaReference', | ||
| 53 | as ArrayRef[SchemaReference()]; | ||
| 54 | |||
| 55 | coerce 'RepeatedSchemaReference', | ||
| 56 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Dialogflow::Cx::V3::ParameterDefinition::TypeSchema::SchemaReference'->new($_) } @$_ ] }; | ||
| 57 | |||
| 58 | declare 'MapStringSchemaReference', | ||
| 59 | as HashRef[SchemaReference()]; | ||
| 60 | |||
| 61 | declare 'InlineSchema', | ||
| 62 | as InstanceOf['Google::Cloud::Dialogflow::Cx::V3::ParameterDefinition::InlineSchema']; | ||
| 63 | |||
| 64 | coerce 'InlineSchema', | ||
| 65 | from HashRef, via { 'Google::Cloud::Dialogflow::Cx::V3::ParameterDefinition::InlineSchema'->new($_) }; | ||
| 66 | |||
| 67 | declare 'RepeatedInlineSchema', | ||
| 68 | as ArrayRef[InlineSchema()]; | ||
| 69 | |||
| 70 | coerce 'RepeatedInlineSchema', | ||
| 71 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Dialogflow::Cx::V3::ParameterDefinition::InlineSchema'->new($_) } @$_ ] }; | ||
| 72 | |||
| 73 | declare 'MapStringInlineSchema', | ||
| 74 | as HashRef[InlineSchema()]; | ||
| 75 | |||
| 76 | 1; | ||
| 77 | |||
| 78 | __END__ |