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