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