| 1 | package Google::Cloud::Orgpolicy::V2::Constraint::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 'Constraint', | ||
| 11 | as InstanceOf['Google::Cloud::Orgpolicy::V2::Constraint::Constraint']; | ||
| 12 | |||
| 13 | coerce 'Constraint', | ||
| 14 | from HashRef, via { 'Google::Cloud::Orgpolicy::V2::Constraint::Constraint'->new($_) }; | ||
| 15 | |||
| 16 | declare 'RepeatedConstraint', | ||
| 17 | as ArrayRef[Constraint()]; | ||
| 18 | |||
| 19 | coerce 'RepeatedConstraint', | ||
| 20 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Orgpolicy::V2::Constraint::Constraint'->new($_) } @$_ ] }; | ||
| 21 | |||
| 22 | declare 'MapStringConstraint', | ||
| 23 | as HashRef[Constraint()]; | ||
| 24 | |||
| 25 | declare 'ConstraintDefault', | ||
| 26 | as (Int | Str); | ||
| 27 | |||
| 28 | declare 'ListConstraint', | ||
| 29 | as InstanceOf['Google::Cloud::Orgpolicy::V2::Constraint::Constraint::ListConstraint']; | ||
| 30 | |||
| 31 | coerce 'ListConstraint', | ||
| 32 | from HashRef, via { 'Google::Cloud::Orgpolicy::V2::Constraint::Constraint::ListConstraint'->new($_) }; | ||
| 33 | |||
| 34 | declare 'RepeatedListConstraint', | ||
| 35 | as ArrayRef[ListConstraint()]; | ||
| 36 | |||
| 37 | coerce 'RepeatedListConstraint', | ||
| 38 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Orgpolicy::V2::Constraint::Constraint::ListConstraint'->new($_) } @$_ ] }; | ||
| 39 | |||
| 40 | declare 'MapStringListConstraint', | ||
| 41 | as HashRef[ListConstraint()]; | ||
| 42 | |||
| 43 | declare 'CustomConstraintDefinition', | ||
| 44 | as InstanceOf['Google::Cloud::Orgpolicy::V2::Constraint::Constraint::CustomConstraintDefinition']; | ||
| 45 | |||
| 46 | coerce 'CustomConstraintDefinition', | ||
| 47 | from HashRef, via { 'Google::Cloud::Orgpolicy::V2::Constraint::Constraint::CustomConstraintDefinition'->new($_) }; | ||
| 48 | |||
| 49 | declare 'RepeatedCustomConstraintDefinition', | ||
| 50 | as ArrayRef[CustomConstraintDefinition()]; | ||
| 51 | |||
| 52 | coerce 'RepeatedCustomConstraintDefinition', | ||
| 53 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Orgpolicy::V2::Constraint::Constraint::CustomConstraintDefinition'->new($_) } @$_ ] }; | ||
| 54 | |||
| 55 | declare 'MapStringCustomConstraintDefinition', | ||
| 56 | as HashRef[CustomConstraintDefinition()]; | ||
| 57 | |||
| 58 | declare 'MethodType', | ||
| 59 | as (Int | Str); | ||
| 60 | |||
| 61 | declare 'ActionType', | ||
| 62 | as (Int | Str); | ||
| 63 | |||
| 64 | declare 'Parameter', | ||
| 65 | as InstanceOf['Google::Cloud::Orgpolicy::V2::Constraint::Constraint::CustomConstraintDefinition::Parameter']; | ||
| 66 | |||
| 67 | coerce 'Parameter', | ||
| 68 | from HashRef, via { 'Google::Cloud::Orgpolicy::V2::Constraint::Constraint::CustomConstraintDefinition::Parameter'->new($_) }; | ||
| 69 | |||
| 70 | declare 'RepeatedParameter', | ||
| 71 | as ArrayRef[Parameter()]; | ||
| 72 | |||
| 73 | coerce 'RepeatedParameter', | ||
| 74 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Orgpolicy::V2::Constraint::Constraint::CustomConstraintDefinition::Parameter'->new($_) } @$_ ] }; | ||
| 75 | |||
| 76 | declare 'MapStringParameter', | ||
| 77 | as HashRef[Parameter()]; | ||
| 78 | |||
| 79 | declare 'Type', | ||
| 80 | as (Int | Str); | ||
| 81 | |||
| 82 | declare 'Metadata', | ||
| 83 | as InstanceOf['Google::Cloud::Orgpolicy::V2::Constraint::Constraint::CustomConstraintDefinition::Parameter::Metadata']; | ||
| 84 | |||
| 85 | coerce 'Metadata', | ||
| 86 | from HashRef, via { 'Google::Cloud::Orgpolicy::V2::Constraint::Constraint::CustomConstraintDefinition::Parameter::Metadata'->new($_) }; | ||
| 87 | |||
| 88 | declare 'RepeatedMetadata', | ||
| 89 | as ArrayRef[Metadata()]; | ||
| 90 | |||
| 91 | coerce 'RepeatedMetadata', | ||
| 92 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Orgpolicy::V2::Constraint::Constraint::CustomConstraintDefinition::Parameter::Metadata'->new($_) } @$_ ] }; | ||
| 93 | |||
| 94 | declare 'MapStringMetadata', | ||
| 95 | as HashRef[Metadata()]; | ||
| 96 | |||
| 97 | declare 'ParametersEntry', | ||
| 98 | as InstanceOf['Google::Cloud::Orgpolicy::V2::Constraint::Constraint::CustomConstraintDefinition::ParametersEntry']; | ||
| 99 | |||
| 100 | coerce 'ParametersEntry', | ||
| 101 | from HashRef, via { 'Google::Cloud::Orgpolicy::V2::Constraint::Constraint::CustomConstraintDefinition::ParametersEntry'->new($_) }; | ||
| 102 | |||
| 103 | declare 'RepeatedParametersEntry', | ||
| 104 | as ArrayRef[ParametersEntry()]; | ||
| 105 | |||
| 106 | coerce 'RepeatedParametersEntry', | ||
| 107 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Orgpolicy::V2::Constraint::Constraint::CustomConstraintDefinition::ParametersEntry'->new($_) } @$_ ] }; | ||
| 108 | |||
| 109 | declare 'MapStringParametersEntry', | ||
| 110 | as HashRef[ParametersEntry()]; | ||
| 111 | |||
| 112 | declare 'BooleanConstraint', | ||
| 113 | as InstanceOf['Google::Cloud::Orgpolicy::V2::Constraint::Constraint::BooleanConstraint']; | ||
| 114 | |||
| 115 | coerce 'BooleanConstraint', | ||
| 116 | from HashRef, via { 'Google::Cloud::Orgpolicy::V2::Constraint::Constraint::BooleanConstraint'->new($_) }; | ||
| 117 | |||
| 118 | declare 'RepeatedBooleanConstraint', | ||
| 119 | as ArrayRef[BooleanConstraint()]; | ||
| 120 | |||
| 121 | coerce 'RepeatedBooleanConstraint', | ||
| 122 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Orgpolicy::V2::Constraint::Constraint::BooleanConstraint'->new($_) } @$_ ] }; | ||
| 123 | |||
| 124 | declare 'MapStringBooleanConstraint', | ||
| 125 | as HashRef[BooleanConstraint()]; | ||
| 126 | |||
| 127 | declare 'CustomConstraint', | ||
| 128 | as InstanceOf['Google::Cloud::Orgpolicy::V2::Constraint::CustomConstraint']; | ||
| 129 | |||
| 130 | coerce 'CustomConstraint', | ||
| 131 | from HashRef, via { 'Google::Cloud::Orgpolicy::V2::Constraint::CustomConstraint'->new($_) }; | ||
| 132 | |||
| 133 | declare 'RepeatedCustomConstraint', | ||
| 134 | as ArrayRef[CustomConstraint()]; | ||
| 135 | |||
| 136 | coerce 'RepeatedCustomConstraint', | ||
| 137 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Orgpolicy::V2::Constraint::CustomConstraint'->new($_) } @$_ ] }; | ||
| 138 | |||
| 139 | declare 'MapStringCustomConstraint', | ||
| 140 | as HashRef[CustomConstraint()]; | ||
| 141 | |||
| 142 | declare 'MethodType', | ||
| 143 | as (Int | Str); | ||
| 144 | |||
| 145 | declare 'ActionType', | ||
| 146 | as (Int | Str); | ||
| 147 | |||
| 148 | 1; | ||
| 149 | |||
| 150 | __END__ |