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