| 1 | package Google::Cloud::Bigquery::Storage::V1::Arrow::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 'ArrowSchema', | ||
| 11 | as InstanceOf['Google::Cloud::Bigquery::Storage::V1::Arrow::ArrowSchema']; | ||
| 12 | |||
| 13 | coerce 'ArrowSchema', | ||
| 14 | from HashRef, via { 'Google::Cloud::Bigquery::Storage::V1::Arrow::ArrowSchema'->new($_) }; | ||
| 15 | |||
| 16 | declare 'RepeatedArrowSchema', | ||
| 17 | as ArrayRef[ArrowSchema()]; | ||
| 18 | |||
| 19 | coerce 'RepeatedArrowSchema', | ||
| 20 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Bigquery::Storage::V1::Arrow::ArrowSchema'->new($_) } @$_ ] }; | ||
| 21 | |||
| 22 | declare 'MapStringArrowSchema', | ||
| 23 | as HashRef[ArrowSchema()]; | ||
| 24 | |||
| 25 | declare 'ArrowRecordBatch', | ||
| 26 | as InstanceOf['Google::Cloud::Bigquery::Storage::V1::Arrow::ArrowRecordBatch']; | ||
| 27 | |||
| 28 | coerce 'ArrowRecordBatch', | ||
| 29 | from HashRef, via { 'Google::Cloud::Bigquery::Storage::V1::Arrow::ArrowRecordBatch'->new($_) }; | ||
| 30 | |||
| 31 | declare 'RepeatedArrowRecordBatch', | ||
| 32 | as ArrayRef[ArrowRecordBatch()]; | ||
| 33 | |||
| 34 | coerce 'RepeatedArrowRecordBatch', | ||
| 35 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Bigquery::Storage::V1::Arrow::ArrowRecordBatch'->new($_) } @$_ ] }; | ||
| 36 | |||
| 37 | declare 'MapStringArrowRecordBatch', | ||
| 38 | as HashRef[ArrowRecordBatch()]; | ||
| 39 | |||
| 40 | declare 'ArrowSerializationOptions', | ||
| 41 | as InstanceOf['Google::Cloud::Bigquery::Storage::V1::Arrow::ArrowSerializationOptions']; | ||
| 42 | |||
| 43 | coerce 'ArrowSerializationOptions', | ||
| 44 | from HashRef, via { 'Google::Cloud::Bigquery::Storage::V1::Arrow::ArrowSerializationOptions'->new($_) }; | ||
| 45 | |||
| 46 | declare 'RepeatedArrowSerializationOptions', | ||
| 47 | as ArrayRef[ArrowSerializationOptions()]; | ||
| 48 | |||
| 49 | coerce 'RepeatedArrowSerializationOptions', | ||
| 50 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Bigquery::Storage::V1::Arrow::ArrowSerializationOptions'->new($_) } @$_ ] }; | ||
| 51 | |||
| 52 | declare 'MapStringArrowSerializationOptions', | ||
| 53 | as HashRef[ArrowSerializationOptions()]; | ||
| 54 | |||
| 55 | declare 'CompressionCodec', | ||
| 56 | as (Int | Str); | ||
| 57 | |||
| 58 | declare 'PicosTimestampPrecision', | ||
| 59 | as (Int | Str); | ||
| 60 | |||
| 61 | 1; | ||
| 62 | |||
| 63 | __END__ |