| 1 | package Google::Spanner::V1::Transaction::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 'TransactionOptions', | ||
| 11 | as InstanceOf['Google::Spanner::V1::Transaction::TransactionOptions']; | ||
| 12 | |||
| 13 | coerce 'TransactionOptions', | ||
| 14 | from HashRef, via { 'Google::Spanner::V1::Transaction::TransactionOptions'->new($_) }; | ||
| 15 | |||
| 16 | declare 'RepeatedTransactionOptions', | ||
| 17 | as ArrayRef[TransactionOptions()]; | ||
| 18 | |||
| 19 | coerce 'RepeatedTransactionOptions', | ||
| 20 | from ArrayRef[HashRef], via { [ map { 'Google::Spanner::V1::Transaction::TransactionOptions'->new($_) } @$_ ] }; | ||
| 21 | |||
| 22 | declare 'MapStringTransactionOptions', | ||
| 23 | as HashRef[TransactionOptions()]; | ||
| 24 | |||
| 25 | declare 'IsolationLevel', | ||
| 26 | as (Int | Str); | ||
| 27 | |||
| 28 | declare 'ReadWrite', | ||
| 29 | as InstanceOf['Google::Spanner::V1::Transaction::TransactionOptions::ReadWrite']; | ||
| 30 | |||
| 31 | coerce 'ReadWrite', | ||
| 32 | from HashRef, via { 'Google::Spanner::V1::Transaction::TransactionOptions::ReadWrite'->new($_) }; | ||
| 33 | |||
| 34 | declare 'RepeatedReadWrite', | ||
| 35 | as ArrayRef[ReadWrite()]; | ||
| 36 | |||
| 37 | coerce 'RepeatedReadWrite', | ||
| 38 | from ArrayRef[HashRef], via { [ map { 'Google::Spanner::V1::Transaction::TransactionOptions::ReadWrite'->new($_) } @$_ ] }; | ||
| 39 | |||
| 40 | declare 'MapStringReadWrite', | ||
| 41 | as HashRef[ReadWrite()]; | ||
| 42 | |||
| 43 | declare 'ReadLockMode', | ||
| 44 | as (Int | Str); | ||
| 45 | |||
| 46 | declare 'PartitionedDml', | ||
| 47 | as InstanceOf['Google::Spanner::V1::Transaction::TransactionOptions::PartitionedDml']; | ||
| 48 | |||
| 49 | coerce 'PartitionedDml', | ||
| 50 | from HashRef, via { 'Google::Spanner::V1::Transaction::TransactionOptions::PartitionedDml'->new($_) }; | ||
| 51 | |||
| 52 | declare 'RepeatedPartitionedDml', | ||
| 53 | as ArrayRef[PartitionedDml()]; | ||
| 54 | |||
| 55 | coerce 'RepeatedPartitionedDml', | ||
| 56 | from ArrayRef[HashRef], via { [ map { 'Google::Spanner::V1::Transaction::TransactionOptions::PartitionedDml'->new($_) } @$_ ] }; | ||
| 57 | |||
| 58 | declare 'MapStringPartitionedDml', | ||
| 59 | as HashRef[PartitionedDml()]; | ||
| 60 | |||
| 61 | declare 'ReadOnly', | ||
| 62 | as InstanceOf['Google::Spanner::V1::Transaction::TransactionOptions::ReadOnly']; | ||
| 63 | |||
| 64 | coerce 'ReadOnly', | ||
| 65 | from HashRef, via { 'Google::Spanner::V1::Transaction::TransactionOptions::ReadOnly'->new($_) }; | ||
| 66 | |||
| 67 | declare 'RepeatedReadOnly', | ||
| 68 | as ArrayRef[ReadOnly()]; | ||
| 69 | |||
| 70 | coerce 'RepeatedReadOnly', | ||
| 71 | from ArrayRef[HashRef], via { [ map { 'Google::Spanner::V1::Transaction::TransactionOptions::ReadOnly'->new($_) } @$_ ] }; | ||
| 72 | |||
| 73 | declare 'MapStringReadOnly', | ||
| 74 | as HashRef[ReadOnly()]; | ||
| 75 | |||
| 76 | declare 'Transaction', | ||
| 77 | as InstanceOf['Google::Spanner::V1::Transaction::Transaction']; | ||
| 78 | |||
| 79 | coerce 'Transaction', | ||
| 80 | from HashRef, via { 'Google::Spanner::V1::Transaction::Transaction'->new($_) }; | ||
| 81 | |||
| 82 | declare 'RepeatedTransaction', | ||
| 83 | as ArrayRef[Transaction()]; | ||
| 84 | |||
| 85 | coerce 'RepeatedTransaction', | ||
| 86 | from ArrayRef[HashRef], via { [ map { 'Google::Spanner::V1::Transaction::Transaction'->new($_) } @$_ ] }; | ||
| 87 | |||
| 88 | declare 'MapStringTransaction', | ||
| 89 | as HashRef[Transaction()]; | ||
| 90 | |||
| 91 | declare 'TransactionSelector', | ||
| 92 | as InstanceOf['Google::Spanner::V1::Transaction::TransactionSelector']; | ||
| 93 | |||
| 94 | coerce 'TransactionSelector', | ||
| 95 | from HashRef, via { 'Google::Spanner::V1::Transaction::TransactionSelector'->new($_) }; | ||
| 96 | |||
| 97 | declare 'RepeatedTransactionSelector', | ||
| 98 | as ArrayRef[TransactionSelector()]; | ||
| 99 | |||
| 100 | coerce 'RepeatedTransactionSelector', | ||
| 101 | from ArrayRef[HashRef], via { [ map { 'Google::Spanner::V1::Transaction::TransactionSelector'->new($_) } @$_ ] }; | ||
| 102 | |||
| 103 | declare 'MapStringTransactionSelector', | ||
| 104 | as HashRef[TransactionSelector()]; | ||
| 105 | |||
| 106 | declare 'MultiplexedSessionPrecommitToken', | ||
| 107 | as InstanceOf['Google::Spanner::V1::Transaction::MultiplexedSessionPrecommitToken']; | ||
| 108 | |||
| 109 | coerce 'MultiplexedSessionPrecommitToken', | ||
| 110 | from HashRef, via { 'Google::Spanner::V1::Transaction::MultiplexedSessionPrecommitToken'->new($_) }; | ||
| 111 | |||
| 112 | declare 'RepeatedMultiplexedSessionPrecommitToken', | ||
| 113 | as ArrayRef[MultiplexedSessionPrecommitToken()]; | ||
| 114 | |||
| 115 | coerce 'RepeatedMultiplexedSessionPrecommitToken', | ||
| 116 | from ArrayRef[HashRef], via { [ map { 'Google::Spanner::V1::Transaction::MultiplexedSessionPrecommitToken'->new($_) } @$_ ] }; | ||
| 117 | |||
| 118 | declare 'MapStringMultiplexedSessionPrecommitToken', | ||
| 119 | as HashRef[MultiplexedSessionPrecommitToken()]; | ||
| 120 | |||
| 121 | 1; | ||
| 122 | |||
| 123 | __END__ |