github.com/cloudwan/edgelq-sdk@v1.15.4/iam/resources/v1/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 attestation_domain "github.com/cloudwan/edgelq-sdk/iam/resources/v1/attestation_domain" 14 organization "github.com/cloudwan/edgelq-sdk/iam/resources/v1/organization" 15 permission "github.com/cloudwan/edgelq-sdk/iam/resources/v1/permission" 16 project "github.com/cloudwan/edgelq-sdk/iam/resources/v1/project" 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 _ = &attestation_domain.AttestationDomain{} 29 _ = &organization.Organization{} 30 _ = &permission.Permission{} 31 _ = &project.Project{} 32 _ = &meta_service.Service{} 33 _ = &meta.Meta{} 34 ) 35 36 type ConditionList []*Condition 37 38 func (l ConditionList) Append(item gotenresource.Resource) gotenresource.ResourceList { 39 return append(l, item.(*Condition)) 40 } 41 42 func (l ConditionList) AppendList(list gotenresource.ResourceList) gotenresource.ResourceList { 43 return append(l, list.(ConditionList)...) 44 } 45 46 func (l ConditionList) 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 ConditionList) At(idx int) gotenresource.Resource { 58 return l[idx] 59 } 60 61 func (l ConditionList) Set(idx int, res gotenresource.Resource) { 62 l[idx] = res.(*Condition) 63 } 64 65 func (l ConditionList) Length() int { 66 return len(l) 67 } 68 69 type ConditionChangeList []*ConditionChange 70 71 func (l ConditionChangeList) Append(item gotenresource.ResourceChange) gotenresource.ResourceChangeList { 72 return append(l, item.(*ConditionChange)) 73 } 74 75 func (l ConditionChangeList) AppendList(list gotenresource.ResourceChangeList) gotenresource.ResourceChangeList { 76 return append(l, list.(ConditionChangeList)...) 77 } 78 79 func (l ConditionChangeList) 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 ConditionChangeList) At(idx int) gotenresource.ResourceChange { 91 return l[idx] 92 } 93 94 func (l ConditionChangeList) Set(idx int, change gotenresource.ResourceChange) { 95 l[idx] = change.(*ConditionChange) 96 } 97 98 func (l ConditionChangeList) Length() int { 99 return len(l) 100 } 101 102 type ConditionNameList []*Name 103 104 func (l ConditionNameList) Append(name gotenresource.Name) gotenresource.NameList { 105 return append(l, name.(*Name)) 106 } 107 108 func (l ConditionNameList) AppendList(list gotenresource.NameList) gotenresource.NameList { 109 return append(l, list.(ConditionNameList)...) 110 } 111 112 func (l ConditionNameList) 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 ConditionNameList) At(idx int) gotenresource.Name { 124 return l[idx] 125 } 126 127 func (l ConditionNameList) Set(idx int, name gotenresource.Name) { 128 l[idx] = name.(*Name) 129 } 130 131 func (l ConditionNameList) Length() int { 132 return len(l) 133 } 134 135 type ConditionReferenceList []*Reference 136 137 func (l ConditionReferenceList) Append(ref gotenresource.Reference) gotenresource.ReferenceList { 138 return append(l, ref.(*Reference)) 139 } 140 141 func (l ConditionReferenceList) AppendList(list gotenresource.ReferenceList) gotenresource.ReferenceList { 142 return append(l, list.(ConditionReferenceList)...) 143 } 144 145 func (l ConditionReferenceList) 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 ConditionReferenceList) At(idx int) gotenresource.Reference { 157 return l[idx] 158 } 159 160 func (l ConditionReferenceList) Set(idx int, ref gotenresource.Reference) { 161 l[idx] = ref.(*Reference) 162 } 163 164 func (l ConditionReferenceList) Length() int { 165 return len(l) 166 } 167 168 type ConditionParentNameList []*ParentName 169 170 func (l ConditionParentNameList) Append(name gotenresource.Name) gotenresource.ParentNameList { 171 return append(l, name.(*ParentName)) 172 } 173 174 func (l ConditionParentNameList) AppendList(list gotenresource.ParentNameList) gotenresource.ParentNameList { 175 return append(l, list.(ConditionParentNameList)...) 176 } 177 178 func (l ConditionParentNameList) 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 ConditionParentNameList) At(idx int) gotenresource.Name { 190 return l[idx] 191 } 192 193 func (l ConditionParentNameList) Set(idx int, name gotenresource.Name) { 194 l[idx] = name.(*ParentName) 195 } 196 197 func (l ConditionParentNameList) Length() int { 198 return len(l) 199 } 200 201 type ConditionParentReferenceList []*ParentReference 202 203 func (l ConditionParentReferenceList) Append(ref gotenresource.Reference) gotenresource.ParentReferenceList { 204 return append(l, ref.(*ParentReference)) 205 } 206 207 func (l ConditionParentReferenceList) AppendList(list gotenresource.ParentReferenceList) gotenresource.ParentReferenceList { 208 return append(l, list.(ConditionParentReferenceList)...) 209 } 210 211 func (l ConditionParentReferenceList) 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 ConditionParentReferenceList) At(idx int) gotenresource.Reference { 223 return l[idx] 224 } 225 226 func (l ConditionParentReferenceList) Set(idx int, ref gotenresource.Reference) { 227 l[idx] = ref.(*ParentReference) 228 } 229 230 func (l ConditionParentReferenceList) Length() int { 231 return len(l) 232 } 233 234 type ConditionMap map[Name]*Condition 235 236 func (m ConditionMap) Get(name gotenresource.Name) gotenresource.Resource { 237 return m[*name.(*Name)] 238 } 239 240 func (m ConditionMap) Set(res gotenresource.Resource) { 241 tRes := res.(*Condition) 242 m[*tRes.Name] = tRes 243 } 244 245 func (m ConditionMap) Delete(name gotenresource.Name) { 246 delete(m, *name.(*Name)) 247 } 248 249 func (m ConditionMap) Length() int { 250 return len(m) 251 } 252 253 func (m ConditionMap) 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 ConditionChangeMap map[Name]*ConditionChange 262 263 func (m ConditionChangeMap) Get(name gotenresource.Name) gotenresource.ResourceChange { 264 return m[*name.(*Name)] 265 } 266 267 func (m ConditionChangeMap) Set(change gotenresource.ResourceChange) { 268 tChange := change.(*ConditionChange) 269 m[*tChange.GetConditionName()] = tChange 270 } 271 272 func (m ConditionChangeMap) Delete(name gotenresource.Name) { 273 delete(m, *name.(*Name)) 274 } 275 276 func (m ConditionChangeMap) Length() int { 277 return len(m) 278 } 279 280 func (m ConditionChangeMap) ForEach(cb func(gotenresource.Name, gotenresource.ResourceChange) bool) { 281 for name, res := range m { 282 if !cb(&name, res) { 283 break 284 } 285 } 286 }