github.com/cloudwan/edgelq-sdk@v1.15.4/devices/resources/v1alpha2/provisioning_approval_request/provisioning_approval_request.pb.collections.go (about) 1 // Code generated by protoc-gen-goten-resource 2 // Resource: ProvisioningApprovalRequest 3 // DO NOT EDIT!!! 4 5 package provisioning_approval_request 6 7 import ( 8 gotenresource "github.com/cloudwan/goten-sdk/runtime/resource" 9 ) 10 11 // proto imports 12 import ( 13 provisioning_policy "github.com/cloudwan/edgelq-sdk/devices/resources/v1alpha2/provisioning_policy" 14 iam_service_account "github.com/cloudwan/edgelq-sdk/iam/resources/v1alpha2/service_account" 15 meta "github.com/cloudwan/goten-sdk/types/meta" 16 ) 17 18 // ensure the imports are used 19 var ( 20 _ = new(gotenresource.ListQuery) 21 ) 22 23 // make sure we're using proto imports 24 var ( 25 _ = &provisioning_policy.ProvisioningPolicy{} 26 _ = &iam_service_account.ServiceAccount{} 27 _ = &meta.Meta{} 28 ) 29 30 type ProvisioningApprovalRequestList []*ProvisioningApprovalRequest 31 32 func (l ProvisioningApprovalRequestList) Append(item gotenresource.Resource) gotenresource.ResourceList { 33 return append(l, item.(*ProvisioningApprovalRequest)) 34 } 35 36 func (l ProvisioningApprovalRequestList) AppendList(list gotenresource.ResourceList) gotenresource.ResourceList { 37 return append(l, list.(ProvisioningApprovalRequestList)...) 38 } 39 40 func (l ProvisioningApprovalRequestList) Slice(first, second int) gotenresource.ResourceList { 41 if first > 0 && second > 0 { 42 return l[first:second] 43 } else if first > 0 { 44 return l[first:] 45 } else if second > 0 { 46 return l[:second] 47 } 48 return l[:] 49 } 50 51 func (l ProvisioningApprovalRequestList) At(idx int) gotenresource.Resource { 52 return l[idx] 53 } 54 55 func (l ProvisioningApprovalRequestList) Set(idx int, res gotenresource.Resource) { 56 l[idx] = res.(*ProvisioningApprovalRequest) 57 } 58 59 func (l ProvisioningApprovalRequestList) Length() int { 60 return len(l) 61 } 62 63 type ProvisioningApprovalRequestChangeList []*ProvisioningApprovalRequestChange 64 65 func (l ProvisioningApprovalRequestChangeList) Append(item gotenresource.ResourceChange) gotenresource.ResourceChangeList { 66 return append(l, item.(*ProvisioningApprovalRequestChange)) 67 } 68 69 func (l ProvisioningApprovalRequestChangeList) AppendList(list gotenresource.ResourceChangeList) gotenresource.ResourceChangeList { 70 return append(l, list.(ProvisioningApprovalRequestChangeList)...) 71 } 72 73 func (l ProvisioningApprovalRequestChangeList) Slice(first, second int) gotenresource.ResourceChangeList { 74 if first > 0 && second > 0 { 75 return l[first:second] 76 } else if first > 0 { 77 return l[first:] 78 } else if second > 0 { 79 return l[:second] 80 } 81 return l[:] 82 } 83 84 func (l ProvisioningApprovalRequestChangeList) At(idx int) gotenresource.ResourceChange { 85 return l[idx] 86 } 87 88 func (l ProvisioningApprovalRequestChangeList) Set(idx int, change gotenresource.ResourceChange) { 89 l[idx] = change.(*ProvisioningApprovalRequestChange) 90 } 91 92 func (l ProvisioningApprovalRequestChangeList) Length() int { 93 return len(l) 94 } 95 96 type ProvisioningApprovalRequestNameList []*Name 97 98 func (l ProvisioningApprovalRequestNameList) Append(name gotenresource.Name) gotenresource.NameList { 99 return append(l, name.(*Name)) 100 } 101 102 func (l ProvisioningApprovalRequestNameList) AppendList(list gotenresource.NameList) gotenresource.NameList { 103 return append(l, list.(ProvisioningApprovalRequestNameList)...) 104 } 105 106 func (l ProvisioningApprovalRequestNameList) Slice(first, second int) gotenresource.NameList { 107 if first > 0 && second > 0 { 108 return l[first:second] 109 } else if first > 0 { 110 return l[first:] 111 } else if second > 0 { 112 return l[:second] 113 } 114 return l[:] 115 } 116 117 func (l ProvisioningApprovalRequestNameList) At(idx int) gotenresource.Name { 118 return l[idx] 119 } 120 121 func (l ProvisioningApprovalRequestNameList) Set(idx int, name gotenresource.Name) { 122 l[idx] = name.(*Name) 123 } 124 125 func (l ProvisioningApprovalRequestNameList) Length() int { 126 return len(l) 127 } 128 129 type ProvisioningApprovalRequestReferenceList []*Reference 130 131 func (l ProvisioningApprovalRequestReferenceList) Append(ref gotenresource.Reference) gotenresource.ReferenceList { 132 return append(l, ref.(*Reference)) 133 } 134 135 func (l ProvisioningApprovalRequestReferenceList) AppendList(list gotenresource.ReferenceList) gotenresource.ReferenceList { 136 return append(l, list.(ProvisioningApprovalRequestReferenceList)...) 137 } 138 139 func (l ProvisioningApprovalRequestReferenceList) Slice(first, second int) gotenresource.ReferenceList { 140 if first > 0 && second > 0 { 141 return l[first:second] 142 } else if first > 0 { 143 return l[first:] 144 } else if second > 0 { 145 return l[:second] 146 } 147 return l[:] 148 } 149 150 func (l ProvisioningApprovalRequestReferenceList) At(idx int) gotenresource.Reference { 151 return l[idx] 152 } 153 154 func (l ProvisioningApprovalRequestReferenceList) Set(idx int, ref gotenresource.Reference) { 155 l[idx] = ref.(*Reference) 156 } 157 158 func (l ProvisioningApprovalRequestReferenceList) Length() int { 159 return len(l) 160 } 161 162 type ProvisioningApprovalRequestParentNameList []*ParentName 163 164 func (l ProvisioningApprovalRequestParentNameList) Append(name gotenresource.Name) gotenresource.ParentNameList { 165 return append(l, name.(*ParentName)) 166 } 167 168 func (l ProvisioningApprovalRequestParentNameList) AppendList(list gotenresource.ParentNameList) gotenresource.ParentNameList { 169 return append(l, list.(ProvisioningApprovalRequestParentNameList)...) 170 } 171 172 func (l ProvisioningApprovalRequestParentNameList) Slice(first, second int) gotenresource.ParentNameList { 173 if first > 0 && second > 0 { 174 return l[first:second] 175 } else if first > 0 { 176 return l[first:] 177 } else if second > 0 { 178 return l[:second] 179 } 180 return l[:] 181 } 182 183 func (l ProvisioningApprovalRequestParentNameList) At(idx int) gotenresource.Name { 184 return l[idx] 185 } 186 187 func (l ProvisioningApprovalRequestParentNameList) Set(idx int, name gotenresource.Name) { 188 l[idx] = name.(*ParentName) 189 } 190 191 func (l ProvisioningApprovalRequestParentNameList) Length() int { 192 return len(l) 193 } 194 195 type ProvisioningApprovalRequestParentReferenceList []*ParentReference 196 197 func (l ProvisioningApprovalRequestParentReferenceList) Append(ref gotenresource.Reference) gotenresource.ParentReferenceList { 198 return append(l, ref.(*ParentReference)) 199 } 200 201 func (l ProvisioningApprovalRequestParentReferenceList) AppendList(list gotenresource.ParentReferenceList) gotenresource.ParentReferenceList { 202 return append(l, list.(ProvisioningApprovalRequestParentReferenceList)...) 203 } 204 205 func (l ProvisioningApprovalRequestParentReferenceList) Slice(first, second int) gotenresource.ParentReferenceList { 206 if first > 0 && second > 0 { 207 return l[first:second] 208 } else if first > 0 { 209 return l[first:] 210 } else if second > 0 { 211 return l[:second] 212 } 213 return l[:] 214 } 215 216 func (l ProvisioningApprovalRequestParentReferenceList) At(idx int) gotenresource.Reference { 217 return l[idx] 218 } 219 220 func (l ProvisioningApprovalRequestParentReferenceList) Set(idx int, ref gotenresource.Reference) { 221 l[idx] = ref.(*ParentReference) 222 } 223 224 func (l ProvisioningApprovalRequestParentReferenceList) Length() int { 225 return len(l) 226 } 227 228 type ProvisioningApprovalRequestMap map[Name]*ProvisioningApprovalRequest 229 230 func (m ProvisioningApprovalRequestMap) Get(name gotenresource.Name) gotenresource.Resource { 231 return m[*name.(*Name)] 232 } 233 234 func (m ProvisioningApprovalRequestMap) Set(res gotenresource.Resource) { 235 tRes := res.(*ProvisioningApprovalRequest) 236 m[*tRes.Name] = tRes 237 } 238 239 func (m ProvisioningApprovalRequestMap) Delete(name gotenresource.Name) { 240 delete(m, *name.(*Name)) 241 } 242 243 func (m ProvisioningApprovalRequestMap) Length() int { 244 return len(m) 245 } 246 247 func (m ProvisioningApprovalRequestMap) ForEach(cb func(gotenresource.Name, gotenresource.Resource) bool) { 248 for name, res := range m { 249 if !cb(&name, res) { 250 break 251 } 252 } 253 } 254 255 type ProvisioningApprovalRequestChangeMap map[Name]*ProvisioningApprovalRequestChange 256 257 func (m ProvisioningApprovalRequestChangeMap) Get(name gotenresource.Name) gotenresource.ResourceChange { 258 return m[*name.(*Name)] 259 } 260 261 func (m ProvisioningApprovalRequestChangeMap) Set(change gotenresource.ResourceChange) { 262 tChange := change.(*ProvisioningApprovalRequestChange) 263 m[*tChange.GetProvisioningApprovalRequestName()] = tChange 264 } 265 266 func (m ProvisioningApprovalRequestChangeMap) Delete(name gotenresource.Name) { 267 delete(m, *name.(*Name)) 268 } 269 270 func (m ProvisioningApprovalRequestChangeMap) Length() int { 271 return len(m) 272 } 273 274 func (m ProvisioningApprovalRequestChangeMap) ForEach(cb func(gotenresource.Name, gotenresource.ResourceChange) bool) { 275 for name, res := range m { 276 if !cb(&name, res) { 277 break 278 } 279 } 280 }