| 1 | package Google::Cloud::Securitycenter::V2::IpRules::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 'IpRules', | ||
| 11 | as InstanceOf['Google::Cloud::Securitycenter::V2::IpRules::IpRules']; | ||
| 12 | |||
| 13 | coerce 'IpRules', | ||
| 14 | from HashRef, via { 'Google::Cloud::Securitycenter::V2::IpRules::IpRules'->new($_) }; | ||
| 15 | |||
| 16 | declare 'RepeatedIpRules', | ||
| 17 | as ArrayRef[IpRules()]; | ||
| 18 | |||
| 19 | coerce 'RepeatedIpRules', | ||
| 20 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Securitycenter::V2::IpRules::IpRules'->new($_) } @$_ ] }; | ||
| 21 | |||
| 22 | declare 'MapStringIpRules', | ||
| 23 | as HashRef[IpRules()]; | ||
| 24 | |||
| 25 | declare 'Direction', | ||
| 26 | as (Int | Str); | ||
| 27 | |||
| 28 | declare 'IpRule', | ||
| 29 | as InstanceOf['Google::Cloud::Securitycenter::V2::IpRules::IpRule']; | ||
| 30 | |||
| 31 | coerce 'IpRule', | ||
| 32 | from HashRef, via { 'Google::Cloud::Securitycenter::V2::IpRules::IpRule'->new($_) }; | ||
| 33 | |||
| 34 | declare 'RepeatedIpRule', | ||
| 35 | as ArrayRef[IpRule()]; | ||
| 36 | |||
| 37 | coerce 'RepeatedIpRule', | ||
| 38 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Securitycenter::V2::IpRules::IpRule'->new($_) } @$_ ] }; | ||
| 39 | |||
| 40 | declare 'MapStringIpRule', | ||
| 41 | as HashRef[IpRule()]; | ||
| 42 | |||
| 43 | declare 'PortRange', | ||
| 44 | as InstanceOf['Google::Cloud::Securitycenter::V2::IpRules::IpRule::PortRange']; | ||
| 45 | |||
| 46 | coerce 'PortRange', | ||
| 47 | from HashRef, via { 'Google::Cloud::Securitycenter::V2::IpRules::IpRule::PortRange'->new($_) }; | ||
| 48 | |||
| 49 | declare 'RepeatedPortRange', | ||
| 50 | as ArrayRef[PortRange()]; | ||
| 51 | |||
| 52 | coerce 'RepeatedPortRange', | ||
| 53 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Securitycenter::V2::IpRules::IpRule::PortRange'->new($_) } @$_ ] }; | ||
| 54 | |||
| 55 | declare 'MapStringPortRange', | ||
| 56 | as HashRef[PortRange()]; | ||
| 57 | |||
| 58 | declare 'Allowed', | ||
| 59 | as InstanceOf['Google::Cloud::Securitycenter::V2::IpRules::Allowed']; | ||
| 60 | |||
| 61 | coerce 'Allowed', | ||
| 62 | from HashRef, via { 'Google::Cloud::Securitycenter::V2::IpRules::Allowed'->new($_) }; | ||
| 63 | |||
| 64 | declare 'RepeatedAllowed', | ||
| 65 | as ArrayRef[Allowed()]; | ||
| 66 | |||
| 67 | coerce 'RepeatedAllowed', | ||
| 68 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Securitycenter::V2::IpRules::Allowed'->new($_) } @$_ ] }; | ||
| 69 | |||
| 70 | declare 'MapStringAllowed', | ||
| 71 | as HashRef[Allowed()]; | ||
| 72 | |||
| 73 | declare 'Denied', | ||
| 74 | as InstanceOf['Google::Cloud::Securitycenter::V2::IpRules::Denied']; | ||
| 75 | |||
| 76 | coerce 'Denied', | ||
| 77 | from HashRef, via { 'Google::Cloud::Securitycenter::V2::IpRules::Denied'->new($_) }; | ||
| 78 | |||
| 79 | declare 'RepeatedDenied', | ||
| 80 | as ArrayRef[Denied()]; | ||
| 81 | |||
| 82 | coerce 'RepeatedDenied', | ||
| 83 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Securitycenter::V2::IpRules::Denied'->new($_) } @$_ ] }; | ||
| 84 | |||
| 85 | declare 'MapStringDenied', | ||
| 86 | as HashRef[Denied()]; | ||
| 87 | |||
| 88 | 1; | ||
| 89 | |||
| 90 | __END__ |