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