| 1 | package Google::Cloud::Apptopology::V1::Query::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 'GraphPattern', | ||
| 11 | as InstanceOf['Google::Cloud::Apptopology::V1::Query::GraphPattern']; | ||
| 12 | |||
| 13 | coerce 'GraphPattern', | ||
| 14 | from HashRef, via { 'Google::Cloud::Apptopology::V1::Query::GraphPattern'->new($_) }; | ||
| 15 | |||
| 16 | declare 'RepeatedGraphPattern', | ||
| 17 | as ArrayRef[GraphPattern()]; | ||
| 18 | |||
| 19 | coerce 'RepeatedGraphPattern', | ||
| 20 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Apptopology::V1::Query::GraphPattern'->new($_) } @$_ ] }; | ||
| 21 | |||
| 22 | declare 'MapStringGraphPattern', | ||
| 23 | as HashRef[GraphPattern()]; | ||
| 24 | |||
| 25 | declare 'NodePattern', | ||
| 26 | as InstanceOf['Google::Cloud::Apptopology::V1::Query::NodePattern']; | ||
| 27 | |||
| 28 | coerce 'NodePattern', | ||
| 29 | from HashRef, via { 'Google::Cloud::Apptopology::V1::Query::NodePattern'->new($_) }; | ||
| 30 | |||
| 31 | declare 'RepeatedNodePattern', | ||
| 32 | as ArrayRef[NodePattern()]; | ||
| 33 | |||
| 34 | coerce 'RepeatedNodePattern', | ||
| 35 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Apptopology::V1::Query::NodePattern'->new($_) } @$_ ] }; | ||
| 36 | |||
| 37 | declare 'MapStringNodePattern', | ||
| 38 | as HashRef[NodePattern()]; | ||
| 39 | |||
| 40 | declare 'EdgePattern', | ||
| 41 | as InstanceOf['Google::Cloud::Apptopology::V1::Query::EdgePattern']; | ||
| 42 | |||
| 43 | coerce 'EdgePattern', | ||
| 44 | from HashRef, via { 'Google::Cloud::Apptopology::V1::Query::EdgePattern'->new($_) }; | ||
| 45 | |||
| 46 | declare 'RepeatedEdgePattern', | ||
| 47 | as ArrayRef[EdgePattern()]; | ||
| 48 | |||
| 49 | coerce 'RepeatedEdgePattern', | ||
| 50 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Apptopology::V1::Query::EdgePattern'->new($_) } @$_ ] }; | ||
| 51 | |||
| 52 | declare 'MapStringEdgePattern', | ||
| 53 | as HashRef[EdgePattern()]; | ||
| 54 | |||
| 55 | declare 'Direction', | ||
| 56 | as (Int | Str); | ||
| 57 | |||
| 58 | declare 'ConnectedNodePattern', | ||
| 59 | as InstanceOf['Google::Cloud::Apptopology::V1::Query::ConnectedNodePattern']; | ||
| 60 | |||
| 61 | coerce 'ConnectedNodePattern', | ||
| 62 | from HashRef, via { 'Google::Cloud::Apptopology::V1::Query::ConnectedNodePattern'->new($_) }; | ||
| 63 | |||
| 64 | declare 'RepeatedConnectedNodePattern', | ||
| 65 | as ArrayRef[ConnectedNodePattern()]; | ||
| 66 | |||
| 67 | coerce 'RepeatedConnectedNodePattern', | ||
| 68 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Apptopology::V1::Query::ConnectedNodePattern'->new($_) } @$_ ] }; | ||
| 69 | |||
| 70 | declare 'MapStringConnectedNodePattern', | ||
| 71 | as HashRef[ConnectedNodePattern()]; | ||
| 72 | |||
| 73 | declare 'LabelPropertiesPattern', | ||
| 74 | as InstanceOf['Google::Cloud::Apptopology::V1::Query::LabelPropertiesPattern']; | ||
| 75 | |||
| 76 | coerce 'LabelPropertiesPattern', | ||
| 77 | from HashRef, via { 'Google::Cloud::Apptopology::V1::Query::LabelPropertiesPattern'->new($_) }; | ||
| 78 | |||
| 79 | declare 'RepeatedLabelPropertiesPattern', | ||
| 80 | as ArrayRef[LabelPropertiesPattern()]; | ||
| 81 | |||
| 82 | coerce 'RepeatedLabelPropertiesPattern', | ||
| 83 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Apptopology::V1::Query::LabelPropertiesPattern'->new($_) } @$_ ] }; | ||
| 84 | |||
| 85 | declare 'MapStringLabelPropertiesPattern', | ||
| 86 | as HashRef[LabelPropertiesPattern()]; | ||
| 87 | |||
| 88 | 1; | ||
| 89 | |||
| 90 | __END__ |