| 1 | package Google::Datastore::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 'EntityResult', | ||
| 11 | as InstanceOf['Google::Datastore::V1::Query::EntityResult']; | ||
| 12 | |||
| 13 | coerce 'EntityResult', | ||
| 14 | from HashRef, via { 'Google::Datastore::V1::Query::EntityResult'->new($_) }; | ||
| 15 | |||
| 16 | declare 'RepeatedEntityResult', | ||
| 17 | as ArrayRef[EntityResult()]; | ||
| 18 | |||
| 19 | coerce 'RepeatedEntityResult', | ||
| 20 | from ArrayRef[HashRef], via { [ map { 'Google::Datastore::V1::Query::EntityResult'->new($_) } @$_ ] }; | ||
| 21 | |||
| 22 | declare 'MapStringEntityResult', | ||
| 23 | as HashRef[EntityResult()]; | ||
| 24 | |||
| 25 | declare 'ResultType', | ||
| 26 | as (Int | Str); | ||
| 27 | |||
| 28 | declare 'Query', | ||
| 29 | as InstanceOf['Google::Datastore::V1::Query::Query']; | ||
| 30 | |||
| 31 | coerce 'Query', | ||
| 32 | from HashRef, via { 'Google::Datastore::V1::Query::Query'->new($_) }; | ||
| 33 | |||
| 34 | declare 'RepeatedQuery', | ||
| 35 | as ArrayRef[Query()]; | ||
| 36 | |||
| 37 | coerce 'RepeatedQuery', | ||
| 38 | from ArrayRef[HashRef], via { [ map { 'Google::Datastore::V1::Query::Query'->new($_) } @$_ ] }; | ||
| 39 | |||
| 40 | declare 'MapStringQuery', | ||
| 41 | as HashRef[Query()]; | ||
| 42 | |||
| 43 | declare 'AggregationQuery', | ||
| 44 | as InstanceOf['Google::Datastore::V1::Query::AggregationQuery']; | ||
| 45 | |||
| 46 | coerce 'AggregationQuery', | ||
| 47 | from HashRef, via { 'Google::Datastore::V1::Query::AggregationQuery'->new($_) }; | ||
| 48 | |||
| 49 | declare 'RepeatedAggregationQuery', | ||
| 50 | as ArrayRef[AggregationQuery()]; | ||
| 51 | |||
| 52 | coerce 'RepeatedAggregationQuery', | ||
| 53 | from ArrayRef[HashRef], via { [ map { 'Google::Datastore::V1::Query::AggregationQuery'->new($_) } @$_ ] }; | ||
| 54 | |||
| 55 | declare 'MapStringAggregationQuery', | ||
| 56 | as HashRef[AggregationQuery()]; | ||
| 57 | |||
| 58 | declare 'Aggregation', | ||
| 59 | as InstanceOf['Google::Datastore::V1::Query::AggregationQuery::Aggregation']; | ||
| 60 | |||
| 61 | coerce 'Aggregation', | ||
| 62 | from HashRef, via { 'Google::Datastore::V1::Query::AggregationQuery::Aggregation'->new($_) }; | ||
| 63 | |||
| 64 | declare 'RepeatedAggregation', | ||
| 65 | as ArrayRef[Aggregation()]; | ||
| 66 | |||
| 67 | coerce 'RepeatedAggregation', | ||
| 68 | from ArrayRef[HashRef], via { [ map { 'Google::Datastore::V1::Query::AggregationQuery::Aggregation'->new($_) } @$_ ] }; | ||
| 69 | |||
| 70 | declare 'MapStringAggregation', | ||
| 71 | as HashRef[Aggregation()]; | ||
| 72 | |||
| 73 | declare 'Count', | ||
| 74 | as InstanceOf['Google::Datastore::V1::Query::AggregationQuery::Aggregation::Count']; | ||
| 75 | |||
| 76 | coerce 'Count', | ||
| 77 | from HashRef, via { 'Google::Datastore::V1::Query::AggregationQuery::Aggregation::Count'->new($_) }; | ||
| 78 | |||
| 79 | declare 'RepeatedCount', | ||
| 80 | as ArrayRef[Count()]; | ||
| 81 | |||
| 82 | coerce 'RepeatedCount', | ||
| 83 | from ArrayRef[HashRef], via { [ map { 'Google::Datastore::V1::Query::AggregationQuery::Aggregation::Count'->new($_) } @$_ ] }; | ||
| 84 | |||
| 85 | declare 'MapStringCount', | ||
| 86 | as HashRef[Count()]; | ||
| 87 | |||
| 88 | declare 'Sum', | ||
| 89 | as InstanceOf['Google::Datastore::V1::Query::AggregationQuery::Aggregation::Sum']; | ||
| 90 | |||
| 91 | coerce 'Sum', | ||
| 92 | from HashRef, via { 'Google::Datastore::V1::Query::AggregationQuery::Aggregation::Sum'->new($_) }; | ||
| 93 | |||
| 94 | declare 'RepeatedSum', | ||
| 95 | as ArrayRef[Sum()]; | ||
| 96 | |||
| 97 | coerce 'RepeatedSum', | ||
| 98 | from ArrayRef[HashRef], via { [ map { 'Google::Datastore::V1::Query::AggregationQuery::Aggregation::Sum'->new($_) } @$_ ] }; | ||
| 99 | |||
| 100 | declare 'MapStringSum', | ||
| 101 | as HashRef[Sum()]; | ||
| 102 | |||
| 103 | declare 'Avg', | ||
| 104 | as InstanceOf['Google::Datastore::V1::Query::AggregationQuery::Aggregation::Avg']; | ||
| 105 | |||
| 106 | coerce 'Avg', | ||
| 107 | from HashRef, via { 'Google::Datastore::V1::Query::AggregationQuery::Aggregation::Avg'->new($_) }; | ||
| 108 | |||
| 109 | declare 'RepeatedAvg', | ||
| 110 | as ArrayRef[Avg()]; | ||
| 111 | |||
| 112 | coerce 'RepeatedAvg', | ||
| 113 | from ArrayRef[HashRef], via { [ map { 'Google::Datastore::V1::Query::AggregationQuery::Aggregation::Avg'->new($_) } @$_ ] }; | ||
| 114 | |||
| 115 | declare 'MapStringAvg', | ||
| 116 | as HashRef[Avg()]; | ||
| 117 | |||
| 118 | declare 'KindExpression', | ||
| 119 | as InstanceOf['Google::Datastore::V1::Query::KindExpression']; | ||
| 120 | |||
| 121 | coerce 'KindExpression', | ||
| 122 | from HashRef, via { 'Google::Datastore::V1::Query::KindExpression'->new($_) }; | ||
| 123 | |||
| 124 | declare 'RepeatedKindExpression', | ||
| 125 | as ArrayRef[KindExpression()]; | ||
| 126 | |||
| 127 | coerce 'RepeatedKindExpression', | ||
| 128 | from ArrayRef[HashRef], via { [ map { 'Google::Datastore::V1::Query::KindExpression'->new($_) } @$_ ] }; | ||
| 129 | |||
| 130 | declare 'MapStringKindExpression', | ||
| 131 | as HashRef[KindExpression()]; | ||
| 132 | |||
| 133 | declare 'PropertyReference', | ||
| 134 | as InstanceOf['Google::Datastore::V1::Query::PropertyReference']; | ||
| 135 | |||
| 136 | coerce 'PropertyReference', | ||
| 137 | from HashRef, via { 'Google::Datastore::V1::Query::PropertyReference'->new($_) }; | ||
| 138 | |||
| 139 | declare 'RepeatedPropertyReference', | ||
| 140 | as ArrayRef[PropertyReference()]; | ||
| 141 | |||
| 142 | coerce 'RepeatedPropertyReference', | ||
| 143 | from ArrayRef[HashRef], via { [ map { 'Google::Datastore::V1::Query::PropertyReference'->new($_) } @$_ ] }; | ||
| 144 | |||
| 145 | declare 'MapStringPropertyReference', | ||
| 146 | as HashRef[PropertyReference()]; | ||
| 147 | |||
| 148 | declare 'Projection', | ||
| 149 | as InstanceOf['Google::Datastore::V1::Query::Projection']; | ||
| 150 | |||
| 151 | coerce 'Projection', | ||
| 152 | from HashRef, via { 'Google::Datastore::V1::Query::Projection'->new($_) }; | ||
| 153 | |||
| 154 | declare 'RepeatedProjection', | ||
| 155 | as ArrayRef[Projection()]; | ||
| 156 | |||
| 157 | coerce 'RepeatedProjection', | ||
| 158 | from ArrayRef[HashRef], via { [ map { 'Google::Datastore::V1::Query::Projection'->new($_) } @$_ ] }; | ||
| 159 | |||
| 160 | declare 'MapStringProjection', | ||
| 161 | as HashRef[Projection()]; | ||
| 162 | |||
| 163 | declare 'PropertyOrder', | ||
| 164 | as InstanceOf['Google::Datastore::V1::Query::PropertyOrder']; | ||
| 165 | |||
| 166 | coerce 'PropertyOrder', | ||
| 167 | from HashRef, via { 'Google::Datastore::V1::Query::PropertyOrder'->new($_) }; | ||
| 168 | |||
| 169 | declare 'RepeatedPropertyOrder', | ||
| 170 | as ArrayRef[PropertyOrder()]; | ||
| 171 | |||
| 172 | coerce 'RepeatedPropertyOrder', | ||
| 173 | from ArrayRef[HashRef], via { [ map { 'Google::Datastore::V1::Query::PropertyOrder'->new($_) } @$_ ] }; | ||
| 174 | |||
| 175 | declare 'MapStringPropertyOrder', | ||
| 176 | as HashRef[PropertyOrder()]; | ||
| 177 | |||
| 178 | declare 'Direction', | ||
| 179 | as (Int | Str); | ||
| 180 | |||
| 181 | declare 'Filter', | ||
| 182 | as InstanceOf['Google::Datastore::V1::Query::Filter']; | ||
| 183 | |||
| 184 | coerce 'Filter', | ||
| 185 | from HashRef, via { 'Google::Datastore::V1::Query::Filter'->new($_) }; | ||
| 186 | |||
| 187 | declare 'RepeatedFilter', | ||
| 188 | as ArrayRef[Filter()]; | ||
| 189 | |||
| 190 | coerce 'RepeatedFilter', | ||
| 191 | from ArrayRef[HashRef], via { [ map { 'Google::Datastore::V1::Query::Filter'->new($_) } @$_ ] }; | ||
| 192 | |||
| 193 | declare 'MapStringFilter', | ||
| 194 | as HashRef[Filter()]; | ||
| 195 | |||
| 196 | declare 'CompositeFilter', | ||
| 197 | as InstanceOf['Google::Datastore::V1::Query::CompositeFilter']; | ||
| 198 | |||
| 199 | coerce 'CompositeFilter', | ||
| 200 | from HashRef, via { 'Google::Datastore::V1::Query::CompositeFilter'->new($_) }; | ||
| 201 | |||
| 202 | declare 'RepeatedCompositeFilter', | ||
| 203 | as ArrayRef[CompositeFilter()]; | ||
| 204 | |||
| 205 | coerce 'RepeatedCompositeFilter', | ||
| 206 | from ArrayRef[HashRef], via { [ map { 'Google::Datastore::V1::Query::CompositeFilter'->new($_) } @$_ ] }; | ||
| 207 | |||
| 208 | declare 'MapStringCompositeFilter', | ||
| 209 | as HashRef[CompositeFilter()]; | ||
| 210 | |||
| 211 | declare 'Operator', | ||
| 212 | as (Int | Str); | ||
| 213 | |||
| 214 | declare 'PropertyFilter', | ||
| 215 | as InstanceOf['Google::Datastore::V1::Query::PropertyFilter']; | ||
| 216 | |||
| 217 | coerce 'PropertyFilter', | ||
| 218 | from HashRef, via { 'Google::Datastore::V1::Query::PropertyFilter'->new($_) }; | ||
| 219 | |||
| 220 | declare 'RepeatedPropertyFilter', | ||
| 221 | as ArrayRef[PropertyFilter()]; | ||
| 222 | |||
| 223 | coerce 'RepeatedPropertyFilter', | ||
| 224 | from ArrayRef[HashRef], via { [ map { 'Google::Datastore::V1::Query::PropertyFilter'->new($_) } @$_ ] }; | ||
| 225 | |||
| 226 | declare 'MapStringPropertyFilter', | ||
| 227 | as HashRef[PropertyFilter()]; | ||
| 228 | |||
| 229 | declare 'Operator', | ||
| 230 | as (Int | Str); | ||
| 231 | |||
| 232 | declare 'FindNearest', | ||
| 233 | as InstanceOf['Google::Datastore::V1::Query::FindNearest']; | ||
| 234 | |||
| 235 | coerce 'FindNearest', | ||
| 236 | from HashRef, via { 'Google::Datastore::V1::Query::FindNearest'->new($_) }; | ||
| 237 | |||
| 238 | declare 'RepeatedFindNearest', | ||
| 239 | as ArrayRef[FindNearest()]; | ||
| 240 | |||
| 241 | coerce 'RepeatedFindNearest', | ||
| 242 | from ArrayRef[HashRef], via { [ map { 'Google::Datastore::V1::Query::FindNearest'->new($_) } @$_ ] }; | ||
| 243 | |||
| 244 | declare 'MapStringFindNearest', | ||
| 245 | as HashRef[FindNearest()]; | ||
| 246 | |||
| 247 | declare 'DistanceMeasure', | ||
| 248 | as (Int | Str); | ||
| 249 | |||
| 250 | declare 'GqlQuery', | ||
| 251 | as InstanceOf['Google::Datastore::V1::Query::GqlQuery']; | ||
| 252 | |||
| 253 | coerce 'GqlQuery', | ||
| 254 | from HashRef, via { 'Google::Datastore::V1::Query::GqlQuery'->new($_) }; | ||
| 255 | |||
| 256 | declare 'RepeatedGqlQuery', | ||
| 257 | as ArrayRef[GqlQuery()]; | ||
| 258 | |||
| 259 | coerce 'RepeatedGqlQuery', | ||
| 260 | from ArrayRef[HashRef], via { [ map { 'Google::Datastore::V1::Query::GqlQuery'->new($_) } @$_ ] }; | ||
| 261 | |||
| 262 | declare 'MapStringGqlQuery', | ||
| 263 | as HashRef[GqlQuery()]; | ||
| 264 | |||
| 265 | declare 'NamedBindingsEntry', | ||
| 266 | as InstanceOf['Google::Datastore::V1::Query::GqlQuery::NamedBindingsEntry']; | ||
| 267 | |||
| 268 | coerce 'NamedBindingsEntry', | ||
| 269 | from HashRef, via { 'Google::Datastore::V1::Query::GqlQuery::NamedBindingsEntry'->new($_) }; | ||
| 270 | |||
| 271 | declare 'RepeatedNamedBindingsEntry', | ||
| 272 | as ArrayRef[NamedBindingsEntry()]; | ||
| 273 | |||
| 274 | coerce 'RepeatedNamedBindingsEntry', | ||
| 275 | from ArrayRef[HashRef], via { [ map { 'Google::Datastore::V1::Query::GqlQuery::NamedBindingsEntry'->new($_) } @$_ ] }; | ||
| 276 | |||
| 277 | declare 'MapStringNamedBindingsEntry', | ||
| 278 | as HashRef[NamedBindingsEntry()]; | ||
| 279 | |||
| 280 | declare 'GqlQueryParameter', | ||
| 281 | as InstanceOf['Google::Datastore::V1::Query::GqlQueryParameter']; | ||
| 282 | |||
| 283 | coerce 'GqlQueryParameter', | ||
| 284 | from HashRef, via { 'Google::Datastore::V1::Query::GqlQueryParameter'->new($_) }; | ||
| 285 | |||
| 286 | declare 'RepeatedGqlQueryParameter', | ||
| 287 | as ArrayRef[GqlQueryParameter()]; | ||
| 288 | |||
| 289 | coerce 'RepeatedGqlQueryParameter', | ||
| 290 | from ArrayRef[HashRef], via { [ map { 'Google::Datastore::V1::Query::GqlQueryParameter'->new($_) } @$_ ] }; | ||
| 291 | |||
| 292 | declare 'MapStringGqlQueryParameter', | ||
| 293 | as HashRef[GqlQueryParameter()]; | ||
| 294 | |||
| 295 | declare 'QueryResultBatch', | ||
| 296 | as InstanceOf['Google::Datastore::V1::Query::QueryResultBatch']; | ||
| 297 | |||
| 298 | coerce 'QueryResultBatch', | ||
| 299 | from HashRef, via { 'Google::Datastore::V1::Query::QueryResultBatch'->new($_) }; | ||
| 300 | |||
| 301 | declare 'RepeatedQueryResultBatch', | ||
| 302 | as ArrayRef[QueryResultBatch()]; | ||
| 303 | |||
| 304 | coerce 'RepeatedQueryResultBatch', | ||
| 305 | from ArrayRef[HashRef], via { [ map { 'Google::Datastore::V1::Query::QueryResultBatch'->new($_) } @$_ ] }; | ||
| 306 | |||
| 307 | declare 'MapStringQueryResultBatch', | ||
| 308 | as HashRef[QueryResultBatch()]; | ||
| 309 | |||
| 310 | declare 'MoreResultsType', | ||
| 311 | as (Int | Str); | ||
| 312 | |||
| 313 | 1; | ||
| 314 | |||
| 315 | __END__ |