| 1 | package Google::Cloud::Notebooks::V2::Instance::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 'State', | ||
| 11 | as (Int | Str); | ||
| 12 | |||
| 13 | declare 'HealthState', | ||
| 14 | as (Int | Str); | ||
| 15 | |||
| 16 | declare 'UpgradeHistoryEntry', | ||
| 17 | as InstanceOf['Google::Cloud::Notebooks::V2::Instance::UpgradeHistoryEntry']; | ||
| 18 | |||
| 19 | coerce 'UpgradeHistoryEntry', | ||
| 20 | from HashRef, via { 'Google::Cloud::Notebooks::V2::Instance::UpgradeHistoryEntry'->new($_) }; | ||
| 21 | |||
| 22 | declare 'RepeatedUpgradeHistoryEntry', | ||
| 23 | as ArrayRef[UpgradeHistoryEntry()]; | ||
| 24 | |||
| 25 | coerce 'RepeatedUpgradeHistoryEntry', | ||
| 26 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Notebooks::V2::Instance::UpgradeHistoryEntry'->new($_) } @$_ ] }; | ||
| 27 | |||
| 28 | declare 'MapStringUpgradeHistoryEntry', | ||
| 29 | as HashRef[UpgradeHistoryEntry()]; | ||
| 30 | |||
| 31 | declare 'State', | ||
| 32 | as (Int | Str); | ||
| 33 | |||
| 34 | declare 'Action', | ||
| 35 | as (Int | Str); | ||
| 36 | |||
| 37 | declare 'Instance', | ||
| 38 | as InstanceOf['Google::Cloud::Notebooks::V2::Instance::Instance']; | ||
| 39 | |||
| 40 | coerce 'Instance', | ||
| 41 | from HashRef, via { 'Google::Cloud::Notebooks::V2::Instance::Instance'->new($_) }; | ||
| 42 | |||
| 43 | declare 'RepeatedInstance', | ||
| 44 | as ArrayRef[Instance()]; | ||
| 45 | |||
| 46 | coerce 'RepeatedInstance', | ||
| 47 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Notebooks::V2::Instance::Instance'->new($_) } @$_ ] }; | ||
| 48 | |||
| 49 | declare 'MapStringInstance', | ||
| 50 | as HashRef[Instance()]; | ||
| 51 | |||
| 52 | declare 'HealthInfoEntry', | ||
| 53 | as InstanceOf['Google::Cloud::Notebooks::V2::Instance::Instance::HealthInfoEntry']; | ||
| 54 | |||
| 55 | coerce 'HealthInfoEntry', | ||
| 56 | from HashRef, via { 'Google::Cloud::Notebooks::V2::Instance::Instance::HealthInfoEntry'->new($_) }; | ||
| 57 | |||
| 58 | declare 'RepeatedHealthInfoEntry', | ||
| 59 | as ArrayRef[HealthInfoEntry()]; | ||
| 60 | |||
| 61 | coerce 'RepeatedHealthInfoEntry', | ||
| 62 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Notebooks::V2::Instance::Instance::HealthInfoEntry'->new($_) } @$_ ] }; | ||
| 63 | |||
| 64 | declare 'MapStringHealthInfoEntry', | ||
| 65 | as HashRef[HealthInfoEntry()]; | ||
| 66 | |||
| 67 | declare 'LabelsEntry', | ||
| 68 | as InstanceOf['Google::Cloud::Notebooks::V2::Instance::Instance::LabelsEntry']; | ||
| 69 | |||
| 70 | coerce 'LabelsEntry', | ||
| 71 | from HashRef, via { 'Google::Cloud::Notebooks::V2::Instance::Instance::LabelsEntry'->new($_) }; | ||
| 72 | |||
| 73 | declare 'RepeatedLabelsEntry', | ||
| 74 | as ArrayRef[LabelsEntry()]; | ||
| 75 | |||
| 76 | coerce 'RepeatedLabelsEntry', | ||
| 77 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Notebooks::V2::Instance::Instance::LabelsEntry'->new($_) } @$_ ] }; | ||
| 78 | |||
| 79 | declare 'MapStringLabelsEntry', | ||
| 80 | as HashRef[LabelsEntry()]; | ||
| 81 | |||
| 82 | 1; | ||
| 83 | |||
| 84 | __END__ |