| 1 | package Google::Spanner::V1::QueryPlan::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 'PlanNode', | ||
| 11 | as InstanceOf['Google::Spanner::V1::QueryPlan::PlanNode']; | ||
| 12 | |||
| 13 | coerce 'PlanNode', | ||
| 14 | from HashRef, via { 'Google::Spanner::V1::QueryPlan::PlanNode'->new($_) }; | ||
| 15 | |||
| 16 | declare 'RepeatedPlanNode', | ||
| 17 | as ArrayRef[PlanNode()]; | ||
| 18 | |||
| 19 | coerce 'RepeatedPlanNode', | ||
| 20 | from ArrayRef[HashRef], via { [ map { 'Google::Spanner::V1::QueryPlan::PlanNode'->new($_) } @$_ ] }; | ||
| 21 | |||
| 22 | declare 'MapStringPlanNode', | ||
| 23 | as HashRef[PlanNode()]; | ||
| 24 | |||
| 25 | declare 'Kind', | ||
| 26 | as (Int | Str); | ||
| 27 | |||
| 28 | declare 'ChildLink', | ||
| 29 | as InstanceOf['Google::Spanner::V1::QueryPlan::PlanNode::ChildLink']; | ||
| 30 | |||
| 31 | coerce 'ChildLink', | ||
| 32 | from HashRef, via { 'Google::Spanner::V1::QueryPlan::PlanNode::ChildLink'->new($_) }; | ||
| 33 | |||
| 34 | declare 'RepeatedChildLink', | ||
| 35 | as ArrayRef[ChildLink()]; | ||
| 36 | |||
| 37 | coerce 'RepeatedChildLink', | ||
| 38 | from ArrayRef[HashRef], via { [ map { 'Google::Spanner::V1::QueryPlan::PlanNode::ChildLink'->new($_) } @$_ ] }; | ||
| 39 | |||
| 40 | declare 'MapStringChildLink', | ||
| 41 | as HashRef[ChildLink()]; | ||
| 42 | |||
| 43 | declare 'ShortRepresentation', | ||
| 44 | as InstanceOf['Google::Spanner::V1::QueryPlan::PlanNode::ShortRepresentation']; | ||
| 45 | |||
| 46 | coerce 'ShortRepresentation', | ||
| 47 | from HashRef, via { 'Google::Spanner::V1::QueryPlan::PlanNode::ShortRepresentation'->new($_) }; | ||
| 48 | |||
| 49 | declare 'RepeatedShortRepresentation', | ||
| 50 | as ArrayRef[ShortRepresentation()]; | ||
| 51 | |||
| 52 | coerce 'RepeatedShortRepresentation', | ||
| 53 | from ArrayRef[HashRef], via { [ map { 'Google::Spanner::V1::QueryPlan::PlanNode::ShortRepresentation'->new($_) } @$_ ] }; | ||
| 54 | |||
| 55 | declare 'MapStringShortRepresentation', | ||
| 56 | as HashRef[ShortRepresentation()]; | ||
| 57 | |||
| 58 | declare 'SubqueriesEntry', | ||
| 59 | as InstanceOf['Google::Spanner::V1::QueryPlan::PlanNode::ShortRepresentation::SubqueriesEntry']; | ||
| 60 | |||
| 61 | coerce 'SubqueriesEntry', | ||
| 62 | from HashRef, via { 'Google::Spanner::V1::QueryPlan::PlanNode::ShortRepresentation::SubqueriesEntry'->new($_) }; | ||
| 63 | |||
| 64 | declare 'RepeatedSubqueriesEntry', | ||
| 65 | as ArrayRef[SubqueriesEntry()]; | ||
| 66 | |||
| 67 | coerce 'RepeatedSubqueriesEntry', | ||
| 68 | from ArrayRef[HashRef], via { [ map { 'Google::Spanner::V1::QueryPlan::PlanNode::ShortRepresentation::SubqueriesEntry'->new($_) } @$_ ] }; | ||
| 69 | |||
| 70 | declare 'MapStringSubqueriesEntry', | ||
| 71 | as HashRef[SubqueriesEntry()]; | ||
| 72 | |||
| 73 | declare 'QueryAdvisorResult', | ||
| 74 | as InstanceOf['Google::Spanner::V1::QueryPlan::QueryAdvisorResult']; | ||
| 75 | |||
| 76 | coerce 'QueryAdvisorResult', | ||
| 77 | from HashRef, via { 'Google::Spanner::V1::QueryPlan::QueryAdvisorResult'->new($_) }; | ||
| 78 | |||
| 79 | declare 'RepeatedQueryAdvisorResult', | ||
| 80 | as ArrayRef[QueryAdvisorResult()]; | ||
| 81 | |||
| 82 | coerce 'RepeatedQueryAdvisorResult', | ||
| 83 | from ArrayRef[HashRef], via { [ map { 'Google::Spanner::V1::QueryPlan::QueryAdvisorResult'->new($_) } @$_ ] }; | ||
| 84 | |||
| 85 | declare 'MapStringQueryAdvisorResult', | ||
| 86 | as HashRef[QueryAdvisorResult()]; | ||
| 87 | |||
| 88 | declare 'IndexAdvice', | ||
| 89 | as InstanceOf['Google::Spanner::V1::QueryPlan::QueryAdvisorResult::IndexAdvice']; | ||
| 90 | |||
| 91 | coerce 'IndexAdvice', | ||
| 92 | from HashRef, via { 'Google::Spanner::V1::QueryPlan::QueryAdvisorResult::IndexAdvice'->new($_) }; | ||
| 93 | |||
| 94 | declare 'RepeatedIndexAdvice', | ||
| 95 | as ArrayRef[IndexAdvice()]; | ||
| 96 | |||
| 97 | coerce 'RepeatedIndexAdvice', | ||
| 98 | from ArrayRef[HashRef], via { [ map { 'Google::Spanner::V1::QueryPlan::QueryAdvisorResult::IndexAdvice'->new($_) } @$_ ] }; | ||
| 99 | |||
| 100 | declare 'MapStringIndexAdvice', | ||
| 101 | as HashRef[IndexAdvice()]; | ||
| 102 | |||
| 103 | declare 'QueryPlan', | ||
| 104 | as InstanceOf['Google::Spanner::V1::QueryPlan::QueryPlan']; | ||
| 105 | |||
| 106 | coerce 'QueryPlan', | ||
| 107 | from HashRef, via { 'Google::Spanner::V1::QueryPlan::QueryPlan'->new($_) }; | ||
| 108 | |||
| 109 | declare 'RepeatedQueryPlan', | ||
| 110 | as ArrayRef[QueryPlan()]; | ||
| 111 | |||
| 112 | coerce 'RepeatedQueryPlan', | ||
| 113 | from ArrayRef[HashRef], via { [ map { 'Google::Spanner::V1::QueryPlan::QueryPlan'->new($_) } @$_ ] }; | ||
| 114 | |||
| 115 | declare 'MapStringQueryPlan', | ||
| 116 | as HashRef[QueryPlan()]; | ||
| 117 | |||
| 118 | 1; | ||
| 119 | |||
| 120 | __END__ |