github.com/cloudwan/edgelq-sdk@v1.15.4/iam/resources/v1alpha2/condition/condition.pb.collections.go (about) 1 // Code generated by protoc-gen-goten-resource 2 // Resource: Condition 3 // DO NOT EDIT!!! 4 5 package condition 6 7 import ( 8 gotenresource "github.com/cloudwan/goten-sdk/runtime/resource" 9 ) 10 11 // proto imports 12 import ( 13 organization "github.com/cloudwan/edgelq-sdk/iam/resources/v1alpha2/organization" 14 project "github.com/cloudwan/edgelq-sdk/iam/resources/v1alpha2/project" 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 _ = &organization.Organization{} 26 _ = &project.Project{} 27 _ = &meta.Meta{} 28 ) 29 30 type ConditionList []*Condition 31 32 func (l ConditionList) Append(item gotenresource.Resource) gotenresource.ResourceList { 33 return append(l, item.(*Condition)) 34 } 35 36 func (l ConditionList) AppendList(list gotenresource.ResourceList) gotenresource.ResourceList { 37 return append(l, list.(ConditionList)...) 38 } 39 40 func (l ConditionList) 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 ConditionList) At(idx int) gotenresource.Resource { 52 return l[idx] 53 } 54 55 func (l ConditionList) Set(idx int, res gotenresource.Resource) { 56 l[idx] = res.(*Condition) 57 } 58 59 func (l ConditionList) Length() int { 60 return len(l) 61 } 62 63 type ConditionChangeList []*ConditionChange 64 65 func (l ConditionChangeList) Append(item gotenresource.ResourceChange) gotenresource.ResourceChangeList { 66 return append(l, item.(*ConditionChange)) 67 } 68 69 func (l ConditionChangeList) AppendList(list gotenresource.ResourceChangeList) gotenresource.ResourceChangeList { 70 return append(l, list.(ConditionChangeList)...) 71 } 72 73 func (l ConditionChangeList) 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 ConditionChangeList) At(idx int) gotenresource.ResourceChange { 85 return l[idx] 86 } 87 88 func (l ConditionChangeList) Set(idx int, change gotenresource.ResourceChange) { 89 l[idx] = change.(*ConditionChange) 90 } 91 92 func (l ConditionChangeList) Length() int { 93 return len(l) 94 } 95 96 type ConditionNameList []*Name 97 98 func (l ConditionNameList) Append(name gotenresource.Name) gotenresource.NameList { 99 return append(l, name.(*Name)) 100 } 101 102 func (l ConditionNameList) AppendList(list gotenresource.NameList) gotenresource.NameList { 103 return append(l, list.(ConditionNameList)...) 104 } 105 106 func (l ConditionNameList) 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 ConditionNameList) At(idx int) gotenresource.Name { 118 return l[idx] 119 } 120 121 func (l ConditionNameList) Set(idx int, name gotenresource.Name) { 122 l[idx] = name.(*Name) 123 } 124 125 func (l ConditionNameList) Length() int { 126 return len(l) 127 } 128 129 type ConditionReferenceList []*Reference 130 131 func (l ConditionReferenceList) Append(ref gotenresource.Reference) gotenresource.ReferenceList { 132 return append(l, ref.(*Reference)) 133 } 134 135 func (l ConditionReferenceList) AppendList(list gotenresource.ReferenceList) gotenresource.ReferenceList { 136 return append(l, list.(ConditionReferenceList)...) 137 } 138 139 func (l ConditionReferenceList) 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 ConditionReferenceList) At(idx int) gotenresource.Reference { 151 return l[idx] 152 } 153 154 func (l ConditionReferenceList) Set(idx int, ref gotenresource.Reference) { 155 l[idx] = ref.(*Reference) 156 } 157 158 func (l ConditionReferenceList) Length() int { 159 return len(l) 160 } 161 162 type ConditionParentNameList []*ParentName 163 164 func (l ConditionParentNameList) Append(name gotenresource.Name) gotenresource.ParentNameList { 165 return append(l, name.(*ParentName)) 166 } 167 168 func (l ConditionParentNameList) AppendList(list gotenresource.ParentNameList) gotenresource.ParentNameList { 169 return append(l, list.(ConditionParentNameList)...) 170 } 171 172 func (l ConditionParentNameList) 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 ConditionParentNameList) At(idx int) gotenresource.Name { 184 return l[idx] 185 } 186 187 func (l ConditionParentNameList) Set(idx int, name gotenresource.Name) { 188 l[idx] = name.(*ParentName) 189 } 190 191 func (l ConditionParentNameList) Length() int { 192 return len(l) 193 } 194 195 type ConditionParentReferenceList []*ParentReference 196 197 func (l ConditionParentReferenceList) Append(ref gotenresource.Reference) gotenresource.ParentReferenceList { 198 return append(l, ref.(*ParentReference)) 199 } 200 201 func (l ConditionParentReferenceList) AppendList(list gotenresource.ParentReferenceList) gotenresource.ParentReferenceList { 202 return append(l, list.(ConditionParentReferenceList)...) 203 } 204 205 func (l ConditionParentReferenceList) 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 ConditionParentReferenceList) At(idx int) gotenresource.Reference { 217 return l[idx] 218 } 219 220 func (l ConditionParentReferenceList) Set(idx int, ref gotenresource.Reference) { 221 l[idx] = ref.(*ParentReference) 222 } 223 224 func (l ConditionParentReferenceList) Length() int { 225 return len(l) 226 } 227 228 type ConditionMap map[Name]*Condition 229 230 func (m ConditionMap) Get(name gotenresource.Name) gotenresource.Resource { 231 return m[*name.(*Name)] 232 } 233 234 func (m ConditionMap) Set(res gotenresource.Resource) { 235 tRes := res.(*Condition) 236 m[*tRes.Name] = tRes 237 } 238 239 func (m ConditionMap) Delete(name gotenresource.Name) { 240 delete(m, *name.(*Name)) 241 } 242 243 func (m ConditionMap) Length() int { 244 return len(m) 245 } 246 247 func (m ConditionMap) 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 ConditionChangeMap map[Name]*ConditionChange 256 257 func (m ConditionChangeMap) Get(name gotenresource.Name) gotenresource.ResourceChange { 258 return m[*name.(*Name)] 259 } 260 261 func (m ConditionChangeMap) Set(change gotenresource.ResourceChange) { 262 tChange := change.(*ConditionChange) 263 m[*tChange.GetConditionName()] = tChange 264 } 265 266 func (m ConditionChangeMap) Delete(name gotenresource.Name) { 267 delete(m, *name.(*Name)) 268 } 269 270 func (m ConditionChangeMap) Length() int { 271 return len(m) 272 } 273 274 func (m ConditionChangeMap) ForEach(cb func(gotenresource.Name, gotenresource.ResourceChange) bool) { 275 for name, res := range m { 276 if !cb(&name, res) { 277 break 278 } 279 } 280 }