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