github.com/gravitational/teleport/api@v0.0.0-20240507183017-3110591cbafc/types/device.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: teleport/legacy/types/device.proto 3 4 package types 5 6 import ( 7 fmt "fmt" 8 _ "github.com/gogo/protobuf/gogoproto" 9 proto "github.com/gogo/protobuf/proto" 10 github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" 11 _ "google.golang.org/protobuf/types/known/timestamppb" 12 io "io" 13 math "math" 14 math_bits "math/bits" 15 time "time" 16 ) 17 18 // Reference imports to suppress errors if they are not otherwise used. 19 var _ = proto.Marshal 20 var _ = fmt.Errorf 21 var _ = math.Inf 22 var _ = time.Kitchen 23 24 // This is a compile-time assertion to ensure that this generated file 25 // is compatible with the proto package it is being compiled against. 26 // A compilation error at this line likely means your copy of the 27 // proto package needs to be updated. 28 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 29 30 // DeviceV1 is the resource representation of teleport.devicetrust.v1.Device. 31 type DeviceV1 struct { 32 // Header is the common resource header. 33 // 34 // - Kind is always "device". 35 // - SubKind is unused. 36 // - Version is equivalent to teleport.devicetrust.v1.Device.api_version. 37 // - Metadata.Name is equivalent to teleport.devicetrust.v1.Device.Id. 38 ResourceHeader `protobuf:"bytes,1,opt,name=Header,proto3,embedded=Header" json:""` 39 // Specification of the device. 40 Spec *DeviceSpec `protobuf:"bytes,5,opt,name=spec,proto3" json:"spec"` 41 XXX_NoUnkeyedLiteral struct{} `json:"-"` 42 XXX_unrecognized []byte `json:"-"` 43 XXX_sizecache int32 `json:"-"` 44 } 45 46 func (m *DeviceV1) Reset() { *m = DeviceV1{} } 47 func (m *DeviceV1) String() string { return proto.CompactTextString(m) } 48 func (*DeviceV1) ProtoMessage() {} 49 func (*DeviceV1) Descriptor() ([]byte, []int) { 50 return fileDescriptor_aceaef1b58496e7d, []int{0} 51 } 52 func (m *DeviceV1) XXX_Unmarshal(b []byte) error { 53 return m.Unmarshal(b) 54 } 55 func (m *DeviceV1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 56 if deterministic { 57 return xxx_messageInfo_DeviceV1.Marshal(b, m, deterministic) 58 } else { 59 b = b[:cap(b)] 60 n, err := m.MarshalToSizedBuffer(b) 61 if err != nil { 62 return nil, err 63 } 64 return b[:n], nil 65 } 66 } 67 func (m *DeviceV1) XXX_Merge(src proto.Message) { 68 xxx_messageInfo_DeviceV1.Merge(m, src) 69 } 70 func (m *DeviceV1) XXX_Size() int { 71 return m.Size() 72 } 73 func (m *DeviceV1) XXX_DiscardUnknown() { 74 xxx_messageInfo_DeviceV1.DiscardUnknown(m) 75 } 76 77 var xxx_messageInfo_DeviceV1 proto.InternalMessageInfo 78 79 // DeviceSpec is a device specification. 80 // Roughly matches teleport.devicetrust.v1.Device, with some fields changed for 81 // better UX. 82 type DeviceSpec struct { 83 OsType string `protobuf:"bytes,1,opt,name=os_type,json=osType,proto3" json:"os_type"` 84 AssetTag string `protobuf:"bytes,2,opt,name=asset_tag,json=assetTag,proto3" json:"asset_tag"` 85 CreateTime *time.Time `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3,stdtime" json:"create_time"` 86 UpdateTime *time.Time `protobuf:"bytes,4,opt,name=update_time,json=updateTime,proto3,stdtime" json:"update_time"` 87 EnrollStatus string `protobuf:"bytes,5,opt,name=enroll_status,json=enrollStatus,proto3" json:"enroll_status"` 88 Credential *DeviceCredential `protobuf:"bytes,6,opt,name=credential,proto3" json:"credential,omitempty"` 89 CollectedData []*DeviceCollectedData `protobuf:"bytes,7,rep,name=collected_data,json=collectedData,proto3" json:"collected_data,omitempty"` 90 Source *DeviceSource `protobuf:"bytes,8,opt,name=source,proto3" json:"source,omitempty"` 91 Profile *DeviceProfile `protobuf:"bytes,9,opt,name=profile,proto3" json:"profile,omitempty"` 92 Owner string `protobuf:"bytes,10,opt,name=owner,proto3" json:"owner,omitempty"` 93 XXX_NoUnkeyedLiteral struct{} `json:"-"` 94 XXX_unrecognized []byte `json:"-"` 95 XXX_sizecache int32 `json:"-"` 96 } 97 98 func (m *DeviceSpec) Reset() { *m = DeviceSpec{} } 99 func (m *DeviceSpec) String() string { return proto.CompactTextString(m) } 100 func (*DeviceSpec) ProtoMessage() {} 101 func (*DeviceSpec) Descriptor() ([]byte, []int) { 102 return fileDescriptor_aceaef1b58496e7d, []int{1} 103 } 104 func (m *DeviceSpec) XXX_Unmarshal(b []byte) error { 105 return m.Unmarshal(b) 106 } 107 func (m *DeviceSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 108 if deterministic { 109 return xxx_messageInfo_DeviceSpec.Marshal(b, m, deterministic) 110 } else { 111 b = b[:cap(b)] 112 n, err := m.MarshalToSizedBuffer(b) 113 if err != nil { 114 return nil, err 115 } 116 return b[:n], nil 117 } 118 } 119 func (m *DeviceSpec) XXX_Merge(src proto.Message) { 120 xxx_messageInfo_DeviceSpec.Merge(m, src) 121 } 122 func (m *DeviceSpec) XXX_Size() int { 123 return m.Size() 124 } 125 func (m *DeviceSpec) XXX_DiscardUnknown() { 126 xxx_messageInfo_DeviceSpec.DiscardUnknown(m) 127 } 128 129 var xxx_messageInfo_DeviceSpec proto.InternalMessageInfo 130 131 // DeviceCredential is the resource representation of 132 // teleport.devicetrust.v1.DeviceCredential. 133 type DeviceCredential struct { 134 Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` 135 PublicKeyDer []byte `protobuf:"bytes,2,opt,name=public_key_der,json=publicKeyDer,proto3" json:"public_key_der,omitempty"` 136 DeviceAttestationType string `protobuf:"bytes,3,opt,name=device_attestation_type,json=deviceAttestationType,proto3" json:"device_attestation_type,omitempty"` 137 TpmEkcertSerial string `protobuf:"bytes,4,opt,name=tpm_ekcert_serial,json=tpmEkcertSerial,proto3" json:"tpm_ekcert_serial,omitempty"` 138 TpmAkPublic []byte `protobuf:"bytes,5,opt,name=tpm_ak_public,json=tpmAkPublic,proto3" json:"tpm_ak_public,omitempty"` 139 XXX_NoUnkeyedLiteral struct{} `json:"-"` 140 XXX_unrecognized []byte `json:"-"` 141 XXX_sizecache int32 `json:"-"` 142 } 143 144 func (m *DeviceCredential) Reset() { *m = DeviceCredential{} } 145 func (m *DeviceCredential) String() string { return proto.CompactTextString(m) } 146 func (*DeviceCredential) ProtoMessage() {} 147 func (*DeviceCredential) Descriptor() ([]byte, []int) { 148 return fileDescriptor_aceaef1b58496e7d, []int{2} 149 } 150 func (m *DeviceCredential) XXX_Unmarshal(b []byte) error { 151 return m.Unmarshal(b) 152 } 153 func (m *DeviceCredential) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 154 if deterministic { 155 return xxx_messageInfo_DeviceCredential.Marshal(b, m, deterministic) 156 } else { 157 b = b[:cap(b)] 158 n, err := m.MarshalToSizedBuffer(b) 159 if err != nil { 160 return nil, err 161 } 162 return b[:n], nil 163 } 164 } 165 func (m *DeviceCredential) XXX_Merge(src proto.Message) { 166 xxx_messageInfo_DeviceCredential.Merge(m, src) 167 } 168 func (m *DeviceCredential) XXX_Size() int { 169 return m.Size() 170 } 171 func (m *DeviceCredential) XXX_DiscardUnknown() { 172 xxx_messageInfo_DeviceCredential.DiscardUnknown(m) 173 } 174 175 var xxx_messageInfo_DeviceCredential proto.InternalMessageInfo 176 177 // DeviceCollectedData is the resource representation of 178 // teleport.devicetrust.v1.DeviceCollectedData. 179 type DeviceCollectedData struct { 180 CollectTime *time.Time `protobuf:"bytes,1,opt,name=collect_time,json=collectTime,proto3,stdtime" json:"collect_time"` 181 RecordTime *time.Time `protobuf:"bytes,2,opt,name=record_time,json=recordTime,proto3,stdtime" json:"record_time"` 182 OsType string `protobuf:"bytes,3,opt,name=os_type,json=osType,proto3" json:"os_type"` 183 SerialNumber string `protobuf:"bytes,4,opt,name=serial_number,json=serialNumber,proto3" json:"serial_number,omitempty"` 184 ModelIdentifier string `protobuf:"bytes,5,opt,name=model_identifier,json=modelIdentifier,proto3" json:"model_identifier,omitempty"` 185 OsVersion string `protobuf:"bytes,6,opt,name=os_version,json=osVersion,proto3" json:"os_version,omitempty"` 186 OsBuild string `protobuf:"bytes,7,opt,name=os_build,json=osBuild,proto3" json:"os_build,omitempty"` 187 OsUsername string `protobuf:"bytes,8,opt,name=os_username,json=osUsername,proto3" json:"os_username,omitempty"` 188 JamfBinaryVersion string `protobuf:"bytes,9,opt,name=jamf_binary_version,json=jamfBinaryVersion,proto3" json:"jamf_binary_version,omitempty"` 189 MacosEnrollmentProfiles string `protobuf:"bytes,10,opt,name=macos_enrollment_profiles,json=macosEnrollmentProfiles,proto3" json:"macos_enrollment_profiles,omitempty"` 190 ReportedAssetTag string `protobuf:"bytes,11,opt,name=reported_asset_tag,json=reportedAssetTag,proto3" json:"reported_asset_tag,omitempty"` 191 SystemSerialNumber string `protobuf:"bytes,12,opt,name=system_serial_number,json=systemSerialNumber,proto3" json:"system_serial_number,omitempty"` 192 BaseBoardSerialNumber string `protobuf:"bytes,13,opt,name=base_board_serial_number,json=baseBoardSerialNumber,proto3" json:"base_board_serial_number,omitempty"` 193 TpmPlatformAttestation *TPMPlatformAttestation `protobuf:"bytes,14,opt,name=tpm_platform_attestation,json=tpmPlatformAttestation,proto3" json:"tpm_platform_attestation,omitempty"` 194 OsId string `protobuf:"bytes,15,opt,name=os_id,json=osId,proto3" json:"os_id,omitempty"` 195 XXX_NoUnkeyedLiteral struct{} `json:"-"` 196 XXX_unrecognized []byte `json:"-"` 197 XXX_sizecache int32 `json:"-"` 198 } 199 200 func (m *DeviceCollectedData) Reset() { *m = DeviceCollectedData{} } 201 func (m *DeviceCollectedData) String() string { return proto.CompactTextString(m) } 202 func (*DeviceCollectedData) ProtoMessage() {} 203 func (*DeviceCollectedData) Descriptor() ([]byte, []int) { 204 return fileDescriptor_aceaef1b58496e7d, []int{3} 205 } 206 func (m *DeviceCollectedData) XXX_Unmarshal(b []byte) error { 207 return m.Unmarshal(b) 208 } 209 func (m *DeviceCollectedData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 210 if deterministic { 211 return xxx_messageInfo_DeviceCollectedData.Marshal(b, m, deterministic) 212 } else { 213 b = b[:cap(b)] 214 n, err := m.MarshalToSizedBuffer(b) 215 if err != nil { 216 return nil, err 217 } 218 return b[:n], nil 219 } 220 } 221 func (m *DeviceCollectedData) XXX_Merge(src proto.Message) { 222 xxx_messageInfo_DeviceCollectedData.Merge(m, src) 223 } 224 func (m *DeviceCollectedData) XXX_Size() int { 225 return m.Size() 226 } 227 func (m *DeviceCollectedData) XXX_DiscardUnknown() { 228 xxx_messageInfo_DeviceCollectedData.DiscardUnknown(m) 229 } 230 231 var xxx_messageInfo_DeviceCollectedData proto.InternalMessageInfo 232 233 // TPMPCR is the resource representation of teleport.devicetrust.v1.TPMPCR. 234 type TPMPCR struct { 235 Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index"` 236 Digest []byte `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest"` 237 DigestAlg uint64 `protobuf:"varint,3,opt,name=digest_alg,json=digestAlg,proto3" json:"digest_alg"` 238 XXX_NoUnkeyedLiteral struct{} `json:"-"` 239 XXX_unrecognized []byte `json:"-"` 240 XXX_sizecache int32 `json:"-"` 241 } 242 243 func (m *TPMPCR) Reset() { *m = TPMPCR{} } 244 func (m *TPMPCR) String() string { return proto.CompactTextString(m) } 245 func (*TPMPCR) ProtoMessage() {} 246 func (*TPMPCR) Descriptor() ([]byte, []int) { 247 return fileDescriptor_aceaef1b58496e7d, []int{4} 248 } 249 func (m *TPMPCR) XXX_Unmarshal(b []byte) error { 250 return m.Unmarshal(b) 251 } 252 func (m *TPMPCR) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 253 if deterministic { 254 return xxx_messageInfo_TPMPCR.Marshal(b, m, deterministic) 255 } else { 256 b = b[:cap(b)] 257 n, err := m.MarshalToSizedBuffer(b) 258 if err != nil { 259 return nil, err 260 } 261 return b[:n], nil 262 } 263 } 264 func (m *TPMPCR) XXX_Merge(src proto.Message) { 265 xxx_messageInfo_TPMPCR.Merge(m, src) 266 } 267 func (m *TPMPCR) XXX_Size() int { 268 return m.Size() 269 } 270 func (m *TPMPCR) XXX_DiscardUnknown() { 271 xxx_messageInfo_TPMPCR.DiscardUnknown(m) 272 } 273 274 var xxx_messageInfo_TPMPCR proto.InternalMessageInfo 275 276 // TPMQuote is the resource representation of teleport.devicetrust.v1.TPMQuote. 277 type TPMQuote struct { 278 Quote []byte `protobuf:"bytes,1,opt,name=quote,proto3" json:"quote"` 279 Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature"` 280 XXX_NoUnkeyedLiteral struct{} `json:"-"` 281 XXX_unrecognized []byte `json:"-"` 282 XXX_sizecache int32 `json:"-"` 283 } 284 285 func (m *TPMQuote) Reset() { *m = TPMQuote{} } 286 func (m *TPMQuote) String() string { return proto.CompactTextString(m) } 287 func (*TPMQuote) ProtoMessage() {} 288 func (*TPMQuote) Descriptor() ([]byte, []int) { 289 return fileDescriptor_aceaef1b58496e7d, []int{5} 290 } 291 func (m *TPMQuote) XXX_Unmarshal(b []byte) error { 292 return m.Unmarshal(b) 293 } 294 func (m *TPMQuote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 295 if deterministic { 296 return xxx_messageInfo_TPMQuote.Marshal(b, m, deterministic) 297 } else { 298 b = b[:cap(b)] 299 n, err := m.MarshalToSizedBuffer(b) 300 if err != nil { 301 return nil, err 302 } 303 return b[:n], nil 304 } 305 } 306 func (m *TPMQuote) XXX_Merge(src proto.Message) { 307 xxx_messageInfo_TPMQuote.Merge(m, src) 308 } 309 func (m *TPMQuote) XXX_Size() int { 310 return m.Size() 311 } 312 func (m *TPMQuote) XXX_DiscardUnknown() { 313 xxx_messageInfo_TPMQuote.DiscardUnknown(m) 314 } 315 316 var xxx_messageInfo_TPMQuote proto.InternalMessageInfo 317 318 // TPMPlatformParameters is the resource representation of 319 // teleport.devicetrust.v1.TPMPlatformParameters. 320 type TPMPlatformParameters struct { 321 Quotes []*TPMQuote `protobuf:"bytes,1,rep,name=quotes,proto3" json:"quotes"` 322 Pcrs []*TPMPCR `protobuf:"bytes,2,rep,name=pcrs,proto3" json:"pcrs"` 323 EventLog []byte `protobuf:"bytes,3,opt,name=event_log,json=eventLog,proto3" json:"event_log"` 324 XXX_NoUnkeyedLiteral struct{} `json:"-"` 325 XXX_unrecognized []byte `json:"-"` 326 XXX_sizecache int32 `json:"-"` 327 } 328 329 func (m *TPMPlatformParameters) Reset() { *m = TPMPlatformParameters{} } 330 func (m *TPMPlatformParameters) String() string { return proto.CompactTextString(m) } 331 func (*TPMPlatformParameters) ProtoMessage() {} 332 func (*TPMPlatformParameters) Descriptor() ([]byte, []int) { 333 return fileDescriptor_aceaef1b58496e7d, []int{6} 334 } 335 func (m *TPMPlatformParameters) XXX_Unmarshal(b []byte) error { 336 return m.Unmarshal(b) 337 } 338 func (m *TPMPlatformParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 339 if deterministic { 340 return xxx_messageInfo_TPMPlatformParameters.Marshal(b, m, deterministic) 341 } else { 342 b = b[:cap(b)] 343 n, err := m.MarshalToSizedBuffer(b) 344 if err != nil { 345 return nil, err 346 } 347 return b[:n], nil 348 } 349 } 350 func (m *TPMPlatformParameters) XXX_Merge(src proto.Message) { 351 xxx_messageInfo_TPMPlatformParameters.Merge(m, src) 352 } 353 func (m *TPMPlatformParameters) XXX_Size() int { 354 return m.Size() 355 } 356 func (m *TPMPlatformParameters) XXX_DiscardUnknown() { 357 xxx_messageInfo_TPMPlatformParameters.DiscardUnknown(m) 358 } 359 360 var xxx_messageInfo_TPMPlatformParameters proto.InternalMessageInfo 361 362 // TPMPlatformAttestation is the resource representation of 363 // teleport.devicetrust.v1.TPMPlatformAttestation. 364 type TPMPlatformAttestation struct { 365 Nonce []byte `protobuf:"bytes,1,opt,name=nonce,proto3" json:"nonce,omitempty"` 366 PlatformParameters *TPMPlatformParameters `protobuf:"bytes,2,opt,name=platform_parameters,json=platformParameters,proto3" json:"platform_parameters,omitempty"` 367 XXX_NoUnkeyedLiteral struct{} `json:"-"` 368 XXX_unrecognized []byte `json:"-"` 369 XXX_sizecache int32 `json:"-"` 370 } 371 372 func (m *TPMPlatformAttestation) Reset() { *m = TPMPlatformAttestation{} } 373 func (m *TPMPlatformAttestation) String() string { return proto.CompactTextString(m) } 374 func (*TPMPlatformAttestation) ProtoMessage() {} 375 func (*TPMPlatformAttestation) Descriptor() ([]byte, []int) { 376 return fileDescriptor_aceaef1b58496e7d, []int{7} 377 } 378 func (m *TPMPlatformAttestation) XXX_Unmarshal(b []byte) error { 379 return m.Unmarshal(b) 380 } 381 func (m *TPMPlatformAttestation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 382 if deterministic { 383 return xxx_messageInfo_TPMPlatformAttestation.Marshal(b, m, deterministic) 384 } else { 385 b = b[:cap(b)] 386 n, err := m.MarshalToSizedBuffer(b) 387 if err != nil { 388 return nil, err 389 } 390 return b[:n], nil 391 } 392 } 393 func (m *TPMPlatformAttestation) XXX_Merge(src proto.Message) { 394 xxx_messageInfo_TPMPlatformAttestation.Merge(m, src) 395 } 396 func (m *TPMPlatformAttestation) XXX_Size() int { 397 return m.Size() 398 } 399 func (m *TPMPlatformAttestation) XXX_DiscardUnknown() { 400 xxx_messageInfo_TPMPlatformAttestation.DiscardUnknown(m) 401 } 402 403 var xxx_messageInfo_TPMPlatformAttestation proto.InternalMessageInfo 404 405 // DeviceSource is the resource representation of 406 // teleport.devicetrust.v1.DeviceSource.. 407 type DeviceSource struct { 408 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"` 409 Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin"` 410 XXX_NoUnkeyedLiteral struct{} `json:"-"` 411 XXX_unrecognized []byte `json:"-"` 412 XXX_sizecache int32 `json:"-"` 413 } 414 415 func (m *DeviceSource) Reset() { *m = DeviceSource{} } 416 func (m *DeviceSource) String() string { return proto.CompactTextString(m) } 417 func (*DeviceSource) ProtoMessage() {} 418 func (*DeviceSource) Descriptor() ([]byte, []int) { 419 return fileDescriptor_aceaef1b58496e7d, []int{8} 420 } 421 func (m *DeviceSource) XXX_Unmarshal(b []byte) error { 422 return m.Unmarshal(b) 423 } 424 func (m *DeviceSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 425 if deterministic { 426 return xxx_messageInfo_DeviceSource.Marshal(b, m, deterministic) 427 } else { 428 b = b[:cap(b)] 429 n, err := m.MarshalToSizedBuffer(b) 430 if err != nil { 431 return nil, err 432 } 433 return b[:n], nil 434 } 435 } 436 func (m *DeviceSource) XXX_Merge(src proto.Message) { 437 xxx_messageInfo_DeviceSource.Merge(m, src) 438 } 439 func (m *DeviceSource) XXX_Size() int { 440 return m.Size() 441 } 442 func (m *DeviceSource) XXX_DiscardUnknown() { 443 xxx_messageInfo_DeviceSource.DiscardUnknown(m) 444 } 445 446 var xxx_messageInfo_DeviceSource proto.InternalMessageInfo 447 448 // DeviceProfile is the resource representation of 449 // teleport.devicetrust.v1.DeviceProfile. 450 type DeviceProfile struct { 451 UpdateTime *time.Time `protobuf:"bytes,1,opt,name=update_time,json=updateTime,proto3,stdtime" json:"update_time,omitempty"` 452 ModelIdentifier string `protobuf:"bytes,2,opt,name=model_identifier,json=modelIdentifier,proto3" json:"model_identifier,omitempty"` 453 OsVersion string `protobuf:"bytes,3,opt,name=os_version,json=osVersion,proto3" json:"os_version,omitempty"` 454 OsBuild string `protobuf:"bytes,4,opt,name=os_build,json=osBuild,proto3" json:"os_build,omitempty"` 455 OsUsernames []string `protobuf:"bytes,5,rep,name=os_usernames,json=osUsernames,proto3" json:"os_usernames,omitempty"` 456 JamfBinaryVersion string `protobuf:"bytes,6,opt,name=jamf_binary_version,json=jamfBinaryVersion,proto3" json:"jamf_binary_version,omitempty"` 457 ExternalId string `protobuf:"bytes,7,opt,name=external_id,json=externalId,proto3" json:"external_id,omitempty"` 458 OsBuildSupplemental string `protobuf:"bytes,8,opt,name=os_build_supplemental,json=osBuildSupplemental,proto3" json:"os_build_supplemental,omitempty"` 459 OsId string `protobuf:"bytes,9,opt,name=os_id,json=osId,proto3" json:"os_id,omitempty"` 460 XXX_NoUnkeyedLiteral struct{} `json:"-"` 461 XXX_unrecognized []byte `json:"-"` 462 XXX_sizecache int32 `json:"-"` 463 } 464 465 func (m *DeviceProfile) Reset() { *m = DeviceProfile{} } 466 func (m *DeviceProfile) String() string { return proto.CompactTextString(m) } 467 func (*DeviceProfile) ProtoMessage() {} 468 func (*DeviceProfile) Descriptor() ([]byte, []int) { 469 return fileDescriptor_aceaef1b58496e7d, []int{9} 470 } 471 func (m *DeviceProfile) XXX_Unmarshal(b []byte) error { 472 return m.Unmarshal(b) 473 } 474 func (m *DeviceProfile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 475 if deterministic { 476 return xxx_messageInfo_DeviceProfile.Marshal(b, m, deterministic) 477 } else { 478 b = b[:cap(b)] 479 n, err := m.MarshalToSizedBuffer(b) 480 if err != nil { 481 return nil, err 482 } 483 return b[:n], nil 484 } 485 } 486 func (m *DeviceProfile) XXX_Merge(src proto.Message) { 487 xxx_messageInfo_DeviceProfile.Merge(m, src) 488 } 489 func (m *DeviceProfile) XXX_Size() int { 490 return m.Size() 491 } 492 func (m *DeviceProfile) XXX_DiscardUnknown() { 493 xxx_messageInfo_DeviceProfile.DiscardUnknown(m) 494 } 495 496 var xxx_messageInfo_DeviceProfile proto.InternalMessageInfo 497 498 func init() { 499 proto.RegisterType((*DeviceV1)(nil), "types.DeviceV1") 500 proto.RegisterType((*DeviceSpec)(nil), "types.DeviceSpec") 501 proto.RegisterType((*DeviceCredential)(nil), "types.DeviceCredential") 502 proto.RegisterType((*DeviceCollectedData)(nil), "types.DeviceCollectedData") 503 proto.RegisterType((*TPMPCR)(nil), "types.TPMPCR") 504 proto.RegisterType((*TPMQuote)(nil), "types.TPMQuote") 505 proto.RegisterType((*TPMPlatformParameters)(nil), "types.TPMPlatformParameters") 506 proto.RegisterType((*TPMPlatformAttestation)(nil), "types.TPMPlatformAttestation") 507 proto.RegisterType((*DeviceSource)(nil), "types.DeviceSource") 508 proto.RegisterType((*DeviceProfile)(nil), "types.DeviceProfile") 509 } 510 511 func init() { 512 proto.RegisterFile("teleport/legacy/types/device.proto", fileDescriptor_aceaef1b58496e7d) 513 } 514 515 var fileDescriptor_aceaef1b58496e7d = []byte{ 516 // 1495 bytes of a gzipped FileDescriptorProto 517 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xdd, 0x6e, 0x1b, 0xc5, 518 0x17, 0xaf, 0x1d, 0xc7, 0x89, 0xc7, 0x76, 0x3e, 0x26, 0x5f, 0xdb, 0x34, 0xcd, 0xb4, 0xee, 0xff, 519 0xa3, 0x50, 0x88, 0x55, 0x2a, 0x81, 0x54, 0x54, 0x41, 0xb6, 0xad, 0x44, 0x54, 0x5a, 0xb9, 0x9b, 520 0x50, 0x50, 0x25, 0xb4, 0x1a, 0xef, 0x4e, 0xcc, 0x92, 0x5d, 0xcf, 0xb2, 0x33, 0x0e, 0xb5, 0x84, 521 0x84, 0x78, 0x03, 0xde, 0x01, 0xf1, 0x08, 0xbc, 0x43, 0x2f, 0x7b, 0x8f, 0x34, 0x40, 0x2f, 0xf7, 522 0x96, 0x17, 0x40, 0x73, 0x66, 0x6d, 0x8f, 0x1b, 0x47, 0xad, 0x80, 0x1b, 0xef, 0xee, 0xef, 0x77, 523 0xce, 0x6f, 0x66, 0xcf, 0x9e, 0x8f, 0x31, 0x6a, 0x49, 0x16, 0xb3, 0x94, 0x67, 0xb2, 0x1d, 0xb3, 524 0x1e, 0x0d, 0x86, 0x6d, 0x39, 0x4c, 0x99, 0x68, 0x87, 0xec, 0x34, 0x0a, 0xd8, 0x5e, 0x9a, 0x71, 525 0xc9, 0xf1, 0x3c, 0x60, 0xdb, 0xeb, 0x3d, 0xde, 0xe3, 0x80, 0xb4, 0xf5, 0x9d, 0x21, 0xb7, 0x49, 526 0x8f, 0xf3, 0x5e, 0xcc, 0xda, 0xf0, 0xd4, 0x1d, 0x1c, 0xb7, 0x65, 0x94, 0x30, 0x21, 0x69, 0x92, 527 0x16, 0x06, 0x57, 0x67, 0xaf, 0x00, 0xbf, 0xc6, 0xa4, 0xf5, 0x0c, 0x2d, 0xde, 0x83, 0x05, 0x9f, 528 0xdc, 0xc4, 0x1f, 0xa2, 0xea, 0x27, 0x8c, 0x86, 0x2c, 0x73, 0x4a, 0x57, 0x4a, 0xd7, 0xeb, 0xef, 529 0x6d, 0xec, 0x19, 0x4b, 0x8f, 0x09, 0x3e, 0xc8, 0x02, 0x66, 0x48, 0xb7, 0xf1, 0x5c, 0x91, 0x0b, 530 0x2f, 0x14, 0x29, 0xe5, 0x8a, 0x5c, 0xf0, 0x0a, 0x17, 0xdc, 0x46, 0x15, 0x91, 0xb2, 0xc0, 0x99, 531 0x07, 0xd7, 0xd5, 0xc2, 0xd5, 0x68, 0x1f, 0xa6, 0x2c, 0x70, 0x17, 0x73, 0x45, 0xc0, 0xc4, 0x83, 532 0xdf, 0xd6, 0x4f, 0xf3, 0x08, 0x4d, 0x68, 0xfc, 0x1f, 0xb4, 0xc0, 0x85, 0xaf, 0xbd, 0x60, 0xf5, 533 0x9a, 0x5b, 0xcf, 0x15, 0x19, 0x41, 0x5e, 0x95, 0x8b, 0xa3, 0x61, 0xca, 0xf0, 0xdb, 0xa8, 0x46, 534 0x85, 0x60, 0xd2, 0x97, 0xb4, 0xe7, 0x94, 0xc1, 0xae, 0x99, 0x2b, 0x32, 0x01, 0xbd, 0x45, 0xb8, 535 0x3d, 0xa2, 0x3d, 0xdc, 0x41, 0xf5, 0x20, 0x63, 0x54, 0x32, 0x5f, 0xc7, 0xc5, 0x99, 0x83, 0x8d, 536 0x6d, 0xef, 0x99, 0xa0, 0xed, 0x8d, 0x82, 0xb6, 0x77, 0x34, 0x0a, 0x9a, 0xbb, 0x96, 0x2b, 0x62, 537 0xbb, 0xfc, 0xf8, 0x1b, 0x29, 0x79, 0xc8, 0x00, 0xda, 0x4a, 0x2b, 0x0e, 0xd2, 0x70, 0xac, 0x58, 538 0x79, 0x33, 0x45, 0xcb, 0xc5, 0x28, 0x1a, 0x00, 0x14, 0xdf, 0x47, 0x4d, 0xd6, 0xcf, 0x78, 0x1c, 539 0xfb, 0x42, 0x52, 0x39, 0x10, 0x10, 0xbe, 0x9a, 0xbb, 0x9a, 0x2b, 0x32, 0x4d, 0x78, 0x0d, 0xf3, 540 0x78, 0x08, 0x4f, 0xf8, 0x31, 0xd2, 0xfb, 0x0a, 0x59, 0x5f, 0x46, 0x34, 0x76, 0xaa, 0xb0, 0x91, 541 0xad, 0xa9, 0x98, 0xdf, 0x1d, 0xd3, 0xae, 0x93, 0x2b, 0xb2, 0x3e, 0x31, 0x7f, 0x87, 0x27, 0x91, 542 0x64, 0x49, 0x2a, 0x87, 0x9e, 0x25, 0x82, 0x7d, 0xb4, 0x14, 0xf0, 0x38, 0x66, 0x81, 0x64, 0xa1, 543 0x1f, 0x52, 0x49, 0x9d, 0x85, 0x2b, 0x73, 0xf0, 0x7e, 0x53, 0xb2, 0x23, 0x93, 0x7b, 0x54, 0x52, 544 0x77, 0x27, 0x57, 0xc4, 0x99, 0xf6, 0xb2, 0xd4, 0x9b, 0x81, 0x6d, 0x8c, 0xf7, 0x51, 0xd5, 0xe4, 545 0x91, 0xb3, 0x08, 0xfb, 0x5d, 0x9b, 0xce, 0x11, 0xa0, 0xdc, 0xf5, 0x5c, 0x91, 0x15, 0x63, 0x66, 546 0x29, 0x15, 0x8e, 0xf8, 0x3e, 0x5a, 0x48, 0x33, 0x7e, 0x1c, 0xc5, 0xcc, 0xa9, 0x81, 0xc6, 0xfa, 547 0x94, 0x46, 0xc7, 0x70, 0xee, 0x46, 0xae, 0xc8, 0x6a, 0x61, 0x68, 0xa9, 0x8c, 0x7c, 0xf1, 0x5b, 548 0x68, 0x9e, 0x7f, 0xdb, 0x67, 0x99, 0x83, 0x20, 0xda, 0xfa, 0x2b, 0x2d, 0x03, 0x60, 0x19, 0x1b, 549 0x8b, 0xd6, 0xaf, 0x65, 0xb4, 0xf2, 0x6a, 0x40, 0xf1, 0x26, 0x2a, 0x47, 0x61, 0x91, 0xa6, 0xd5, 550 0x5c, 0x91, 0x72, 0x14, 0x7a, 0xe5, 0x28, 0xc4, 0x2e, 0x5a, 0x4a, 0x07, 0xdd, 0x38, 0x0a, 0xfc, 551 0x13, 0x36, 0xf4, 0x75, 0x21, 0xe9, 0x14, 0x6d, 0x98, 0x30, 0x4d, 0x33, 0xd6, 0x4a, 0x0d, 0xc3, 552 0x3c, 0x60, 0xc3, 0x7b, 0x2c, 0xc3, 0x5f, 0xa2, 0x2d, 0xd3, 0x01, 0x7c, 0x2a, 0xa5, 0x4e, 0x23, 553 0x19, 0xf1, 0xbe, 0xa9, 0x8b, 0x39, 0x58, 0xf0, 0xbf, 0xb9, 0x22, 0x57, 0xcf, 0x31, 0xb1, 0x54, 554 0x37, 0x8c, 0xc9, 0xfe, 0xc4, 0x02, 0x0a, 0xe8, 0x01, 0x5a, 0x95, 0x69, 0xe2, 0xb3, 0x93, 0x80, 555 0x65, 0xd2, 0x17, 0x2c, 0xd3, 0xf9, 0x53, 0x01, 0x61, 0x92, 0x2b, 0x72, 0xe9, 0x0c, 0x69, 0x49, 556 0x2e, 0xcb, 0x34, 0xb9, 0x0f, 0xdc, 0x21, 0x50, 0xf8, 0x23, 0xd4, 0xd4, 0xf6, 0xf4, 0xc4, 0x37, 557 0xaf, 0x00, 0xd9, 0xdb, 0x70, 0x2f, 0xe5, 0x8a, 0x6c, 0x4d, 0x11, 0x96, 0x48, 0x5d, 0xa6, 0xc9, 558 0xfe, 0x49, 0x07, 0xe0, 0xd6, 0x0f, 0x35, 0xb4, 0x36, 0x23, 0xaf, 0xf0, 0x21, 0x6a, 0x14, 0xb9, 559 0x63, 0x2a, 0xad, 0xf4, 0xda, 0x4a, 0xd3, 0x79, 0x33, 0xe5, 0x03, 0xa5, 0x56, 0x2f, 0x90, 0x51, 560 0xf5, 0x66, 0x2c, 0xe0, 0x59, 0x68, 0x34, 0xcb, 0x6f, 0x56, 0xbd, 0x96, 0x8b, 0xa9, 0x5e, 0x03, 561 0x80, 0xa2, 0xd5, 0xb3, 0xe6, 0xce, 0xef, 0x59, 0x1f, 0xa3, 0xa6, 0x09, 0xa5, 0xdf, 0x1f, 0x24, 562 0x5d, 0x96, 0x15, 0xe1, 0x86, 0x28, 0x4d, 0x11, 0x76, 0x4e, 0x18, 0xe2, 0x11, 0xe0, 0xf8, 0x00, 563 0xad, 0x24, 0x3c, 0x64, 0xb1, 0x1f, 0x41, 0x06, 0x1e, 0x47, 0x2c, 0x2b, 0x1a, 0xc5, 0x6e, 0xae, 564 0xc8, 0xf6, 0xab, 0x9c, 0xfd, 0xc9, 0x80, 0x3b, 0x18, 0x53, 0xf8, 0x03, 0x84, 0xb8, 0xf0, 0x4f, 565 0x59, 0x26, 0x22, 0xde, 0x87, 0xc6, 0x51, 0x33, 0xfd, 0x61, 0x82, 0x5a, 0xee, 0x35, 0x2e, 0x9e, 566 0x18, 0x10, 0xdf, 0x44, 0x8b, 0x5c, 0xf8, 0xdd, 0x41, 0x14, 0x87, 0xce, 0x02, 0xb8, 0x6d, 0xe6, 567 0x8a, 0xe0, 0x11, 0x66, 0x97, 0x19, 0x17, 0xae, 0x86, 0xf0, 0x6d, 0x54, 0xe7, 0xc2, 0x1f, 0x08, 568 0x96, 0xf5, 0x69, 0x62, 0xaa, 0xbe, 0xe6, 0x5e, 0xcc, 0x15, 0xd9, 0xb0, 0x60, 0xbb, 0x1b, 0x71, 569 0xf1, 0x59, 0x81, 0xe2, 0xc7, 0x68, 0xed, 0x6b, 0x9a, 0x1c, 0xfb, 0xdd, 0xa8, 0x4f, 0xb3, 0xe1, 570 0x78, 0xc3, 0x35, 0xd0, 0xb8, 0x9a, 0x2b, 0x72, 0x79, 0x06, 0x6d, 0x69, 0xad, 0x6a, 0xda, 0x05, 571 0x76, 0xf4, 0x06, 0x01, 0xba, 0x98, 0xd0, 0x80, 0x0b, 0xdf, 0x74, 0xd2, 0x84, 0xf5, 0xa5, 0x5f, 572 0x74, 0x04, 0x51, 0x74, 0x82, 0xff, 0xe7, 0x8a, 0x5c, 0x3b, 0xd7, 0xc8, 0x92, 0xdf, 0x02, 0xa3, 573 0xfb, 0x63, 0x9b, 0xa2, 0xf3, 0x08, 0xfc, 0x08, 0xe1, 0x0c, 0x46, 0x2e, 0x0b, 0xfd, 0xc9, 0xa4, 574 0xaa, 0x83, 0xfa, 0x95, 0x5c, 0x91, 0x9d, 0xb3, 0xac, 0x25, 0xbb, 0x32, 0x62, 0xf7, 0x47, 0x43, 575 0xec, 0x08, 0xad, 0x8b, 0xa1, 0x90, 0x2c, 0xf1, 0xa7, 0x73, 0xa8, 0x01, 0x8a, 0xad, 0x5c, 0x91, 576 0xdd, 0x59, 0xbc, 0xa5, 0x89, 0x0d, 0x7f, 0x68, 0x27, 0x94, 0x8f, 0x9c, 0x2e, 0x15, 0xcc, 0xef, 577 0x72, 0x9a, 0x85, 0xaf, 0x28, 0x37, 0x41, 0xf9, 0x7f, 0xb9, 0x22, 0xad, 0xf3, 0x6c, 0xec, 0x36, 578 0xa3, 0x6d, 0x5c, 0x6d, 0x32, 0xb5, 0xc0, 0xf7, 0xc8, 0xd1, 0x0d, 0x20, 0x8d, 0xa9, 0x3c, 0xe6, 579 0x59, 0x62, 0x37, 0x2a, 0x67, 0x09, 0x0a, 0xef, 0x72, 0xd1, 0xb9, 0x8f, 0x3a, 0x0f, 0x3b, 0x85, 580 0x95, 0xd5, 0xab, 0xcc, 0xfa, 0xe7, 0x49, 0x58, 0xeb, 0x6f, 0xca, 0x34, 0x99, 0xe1, 0x8f, 0xaf, 581 0xa3, 0x79, 0x2e, 0xfc, 0x28, 0x74, 0x96, 0xad, 0x16, 0xaf, 0x01, 0xcb, 0xb7, 0xc2, 0xc5, 0x41, 582 0xd8, 0xfa, 0x0e, 0x55, 0xf5, 0x1e, 0xee, 0x7a, 0x98, 0xa0, 0xf9, 0xa8, 0x1f, 0xb2, 0x67, 0xd0, 583 0x6e, 0xe6, 0xdd, 0x5a, 0xae, 0x88, 0x01, 0x3c, 0x73, 0xc1, 0x2d, 0x54, 0x0d, 0xa3, 0x1e, 0x13, 584 0xb2, 0xe8, 0xeb, 0x28, 0x57, 0xa4, 0x40, 0xbc, 0xe2, 0x8a, 0xdf, 0x45, 0xc8, 0xdc, 0xf9, 0x34, 585 0xee, 0x41, 0x5b, 0xa8, 0xb8, 0x4b, 0xb9, 0x22, 0x16, 0xea, 0xd5, 0xcc, 0xfd, 0x7e, 0xdc, 0x6b, 586 0x7d, 0x81, 0x16, 0x8f, 0x3a, 0x0f, 0x1f, 0x0f, 0xb8, 0x64, 0x7a, 0xfd, 0x6f, 0xf4, 0x0d, 0xac, 587 0xdf, 0x30, 0xeb, 0x03, 0xe0, 0x99, 0x0b, 0xbe, 0x81, 0x6a, 0x22, 0xea, 0xf5, 0xa9, 0x1c, 0x64, 588 0xac, 0xd8, 0x02, 0x9c, 0x7e, 0xc6, 0xa0, 0x37, 0xb9, 0x6d, 0xfd, 0x5c, 0x42, 0x1b, 0x56, 0x70, 589 0x3b, 0x34, 0xa3, 0x09, 0x93, 0x2c, 0x13, 0xf8, 0x16, 0xaa, 0x82, 0x9e, 0x70, 0x4a, 0x30, 0xe1, 590 0x97, 0x27, 0x9f, 0x02, 0x36, 0x62, 0xde, 0xcb, 0x98, 0x78, 0xc5, 0x15, 0xdf, 0x40, 0x95, 0x34, 591 0xc8, 0x84, 0x53, 0x06, 0x97, 0xa6, 0xf5, 0xf5, 0xee, 0x7a, 0xe6, 0x6c, 0xa7, 0x69, 0x0f, 0x7e, 592 0xf5, 0x31, 0x8d, 0x9d, 0xea, 0xd2, 0x89, 0xb9, 0x89, 0x41, 0xb1, 0xd1, 0x31, 0xe8, 0x2d, 0xc2, 593 0xed, 0xa7, 0xbc, 0xd7, 0xfa, 0xa5, 0x84, 0x36, 0x67, 0x27, 0x81, 0x9e, 0xd3, 0x7d, 0xde, 0x0f, 594 0x46, 0x01, 0x81, 0x8f, 0x08, 0x80, 0x3d, 0xa7, 0x01, 0xc0, 0x29, 0x5a, 0x1b, 0x67, 0x4a, 0x3a, 595 0x7e, 0xd5, 0xa2, 0xc9, 0xef, 0x9c, 0xcd, 0xb5, 0x49, 0x38, 0x4c, 0x37, 0x99, 0xe1, 0x6c, 0xd7, 596 0x50, 0x7a, 0xc6, 0xad, 0xd5, 0x41, 0x0d, 0xfb, 0xe4, 0x82, 0x77, 0x50, 0x05, 0xda, 0x9c, 0x39, 597 0x16, 0x40, 0x44, 0xf4, 0xb3, 0x07, 0xbf, 0x3a, 0x75, 0x78, 0x16, 0xf5, 0xa2, 0x7e, 0x71, 0x6a, 598 0x85, 0x10, 0x1b, 0xc4, 0x2b, 0xae, 0xad, 0x3f, 0x2b, 0xa8, 0x39, 0x75, 0x90, 0xc1, 0x4f, 0xa7, 599 0x0f, 0x9c, 0xaf, 0x1f, 0x83, 0x97, 0x75, 0x77, 0xb5, 0x5c, 0x26, 0xef, 0x70, 0xe6, 0xe8, 0x39, 600 0x6b, 0xa8, 0x94, 0xff, 0x8d, 0xa1, 0x32, 0xf7, 0xf7, 0x86, 0x4a, 0xe5, 0xcd, 0x86, 0xca, 0x1d, 601 0xd4, 0xb0, 0xa6, 0x87, 0x3e, 0x30, 0xcf, 0x5d, 0xaf, 0xb9, 0xdb, 0xb9, 0x22, 0x9b, 0x36, 0x6e, 602 0x9f, 0x38, 0x26, 0x63, 0x45, 0x9c, 0x37, 0x57, 0xaa, 0xff, 0x60, 0xae, 0xdc, 0x46, 0x75, 0xf6, 603 0x4c, 0xea, 0x05, 0x74, 0xbc, 0x8a, 0xe1, 0x08, 0x63, 0xce, 0x82, 0xed, 0x31, 0x37, 0x82, 0x0f, 604 0x42, 0xfc, 0x39, 0xda, 0x18, 0xbd, 0xac, 0x2f, 0x06, 0x69, 0x1a, 0x33, 0x3d, 0x4d, 0x68, 0x5c, 605 0x0c, 0xcb, 0x6b, 0xb9, 0x22, 0x64, 0xa6, 0x81, 0xa5, 0xb7, 0x56, 0x84, 0xe6, 0xd0, 0xa2, 0x27, 606 0xfd, 0xaf, 0xf6, 0x9a, 0xfe, 0xe7, 0xde, 0x79, 0xfe, 0xc7, 0xee, 0x85, 0xe7, 0x2f, 0x77, 0x4b, 607 0x2f, 0x5e, 0xee, 0x96, 0x7e, 0x7f, 0xb9, 0x5b, 0x7a, 0x7a, 0xa3, 0x17, 0xc9, 0xaf, 0x06, 0xdd, 608 0xbd, 0x80, 0x27, 0xed, 0x5e, 0x46, 0x4f, 0x23, 0x53, 0x8e, 0x34, 0x6e, 0x8f, 0xff, 0x4f, 0xd2, 609 0x34, 0x32, 0x7f, 0x23, 0xbb, 0x55, 0xc8, 0xc2, 0x5b, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x81, 610 0x57, 0x28, 0xe7, 0xce, 0x0e, 0x00, 0x00, 611 } 612 613 func (m *DeviceV1) Marshal() (dAtA []byte, err error) { 614 size := m.Size() 615 dAtA = make([]byte, size) 616 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 617 if err != nil { 618 return nil, err 619 } 620 return dAtA[:n], nil 621 } 622 623 func (m *DeviceV1) MarshalTo(dAtA []byte) (int, error) { 624 size := m.Size() 625 return m.MarshalToSizedBuffer(dAtA[:size]) 626 } 627 628 func (m *DeviceV1) MarshalToSizedBuffer(dAtA []byte) (int, error) { 629 i := len(dAtA) 630 _ = i 631 var l int 632 _ = l 633 if m.XXX_unrecognized != nil { 634 i -= len(m.XXX_unrecognized) 635 copy(dAtA[i:], m.XXX_unrecognized) 636 } 637 if m.Spec != nil { 638 { 639 size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) 640 if err != nil { 641 return 0, err 642 } 643 i -= size 644 i = encodeVarintDevice(dAtA, i, uint64(size)) 645 } 646 i-- 647 dAtA[i] = 0x2a 648 } 649 { 650 size, err := m.ResourceHeader.MarshalToSizedBuffer(dAtA[:i]) 651 if err != nil { 652 return 0, err 653 } 654 i -= size 655 i = encodeVarintDevice(dAtA, i, uint64(size)) 656 } 657 i-- 658 dAtA[i] = 0xa 659 return len(dAtA) - i, nil 660 } 661 662 func (m *DeviceSpec) Marshal() (dAtA []byte, err error) { 663 size := m.Size() 664 dAtA = make([]byte, size) 665 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 666 if err != nil { 667 return nil, err 668 } 669 return dAtA[:n], nil 670 } 671 672 func (m *DeviceSpec) MarshalTo(dAtA []byte) (int, error) { 673 size := m.Size() 674 return m.MarshalToSizedBuffer(dAtA[:size]) 675 } 676 677 func (m *DeviceSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { 678 i := len(dAtA) 679 _ = i 680 var l int 681 _ = l 682 if m.XXX_unrecognized != nil { 683 i -= len(m.XXX_unrecognized) 684 copy(dAtA[i:], m.XXX_unrecognized) 685 } 686 if len(m.Owner) > 0 { 687 i -= len(m.Owner) 688 copy(dAtA[i:], m.Owner) 689 i = encodeVarintDevice(dAtA, i, uint64(len(m.Owner))) 690 i-- 691 dAtA[i] = 0x52 692 } 693 if m.Profile != nil { 694 { 695 size, err := m.Profile.MarshalToSizedBuffer(dAtA[:i]) 696 if err != nil { 697 return 0, err 698 } 699 i -= size 700 i = encodeVarintDevice(dAtA, i, uint64(size)) 701 } 702 i-- 703 dAtA[i] = 0x4a 704 } 705 if m.Source != nil { 706 { 707 size, err := m.Source.MarshalToSizedBuffer(dAtA[:i]) 708 if err != nil { 709 return 0, err 710 } 711 i -= size 712 i = encodeVarintDevice(dAtA, i, uint64(size)) 713 } 714 i-- 715 dAtA[i] = 0x42 716 } 717 if len(m.CollectedData) > 0 { 718 for iNdEx := len(m.CollectedData) - 1; iNdEx >= 0; iNdEx-- { 719 { 720 size, err := m.CollectedData[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 721 if err != nil { 722 return 0, err 723 } 724 i -= size 725 i = encodeVarintDevice(dAtA, i, uint64(size)) 726 } 727 i-- 728 dAtA[i] = 0x3a 729 } 730 } 731 if m.Credential != nil { 732 { 733 size, err := m.Credential.MarshalToSizedBuffer(dAtA[:i]) 734 if err != nil { 735 return 0, err 736 } 737 i -= size 738 i = encodeVarintDevice(dAtA, i, uint64(size)) 739 } 740 i-- 741 dAtA[i] = 0x32 742 } 743 if len(m.EnrollStatus) > 0 { 744 i -= len(m.EnrollStatus) 745 copy(dAtA[i:], m.EnrollStatus) 746 i = encodeVarintDevice(dAtA, i, uint64(len(m.EnrollStatus))) 747 i-- 748 dAtA[i] = 0x2a 749 } 750 if m.UpdateTime != nil { 751 n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.UpdateTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.UpdateTime):]) 752 if err6 != nil { 753 return 0, err6 754 } 755 i -= n6 756 i = encodeVarintDevice(dAtA, i, uint64(n6)) 757 i-- 758 dAtA[i] = 0x22 759 } 760 if m.CreateTime != nil { 761 n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.CreateTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.CreateTime):]) 762 if err7 != nil { 763 return 0, err7 764 } 765 i -= n7 766 i = encodeVarintDevice(dAtA, i, uint64(n7)) 767 i-- 768 dAtA[i] = 0x1a 769 } 770 if len(m.AssetTag) > 0 { 771 i -= len(m.AssetTag) 772 copy(dAtA[i:], m.AssetTag) 773 i = encodeVarintDevice(dAtA, i, uint64(len(m.AssetTag))) 774 i-- 775 dAtA[i] = 0x12 776 } 777 if len(m.OsType) > 0 { 778 i -= len(m.OsType) 779 copy(dAtA[i:], m.OsType) 780 i = encodeVarintDevice(dAtA, i, uint64(len(m.OsType))) 781 i-- 782 dAtA[i] = 0xa 783 } 784 return len(dAtA) - i, nil 785 } 786 787 func (m *DeviceCredential) Marshal() (dAtA []byte, err error) { 788 size := m.Size() 789 dAtA = make([]byte, size) 790 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 791 if err != nil { 792 return nil, err 793 } 794 return dAtA[:n], nil 795 } 796 797 func (m *DeviceCredential) MarshalTo(dAtA []byte) (int, error) { 798 size := m.Size() 799 return m.MarshalToSizedBuffer(dAtA[:size]) 800 } 801 802 func (m *DeviceCredential) MarshalToSizedBuffer(dAtA []byte) (int, error) { 803 i := len(dAtA) 804 _ = i 805 var l int 806 _ = l 807 if m.XXX_unrecognized != nil { 808 i -= len(m.XXX_unrecognized) 809 copy(dAtA[i:], m.XXX_unrecognized) 810 } 811 if len(m.TpmAkPublic) > 0 { 812 i -= len(m.TpmAkPublic) 813 copy(dAtA[i:], m.TpmAkPublic) 814 i = encodeVarintDevice(dAtA, i, uint64(len(m.TpmAkPublic))) 815 i-- 816 dAtA[i] = 0x2a 817 } 818 if len(m.TpmEkcertSerial) > 0 { 819 i -= len(m.TpmEkcertSerial) 820 copy(dAtA[i:], m.TpmEkcertSerial) 821 i = encodeVarintDevice(dAtA, i, uint64(len(m.TpmEkcertSerial))) 822 i-- 823 dAtA[i] = 0x22 824 } 825 if len(m.DeviceAttestationType) > 0 { 826 i -= len(m.DeviceAttestationType) 827 copy(dAtA[i:], m.DeviceAttestationType) 828 i = encodeVarintDevice(dAtA, i, uint64(len(m.DeviceAttestationType))) 829 i-- 830 dAtA[i] = 0x1a 831 } 832 if len(m.PublicKeyDer) > 0 { 833 i -= len(m.PublicKeyDer) 834 copy(dAtA[i:], m.PublicKeyDer) 835 i = encodeVarintDevice(dAtA, i, uint64(len(m.PublicKeyDer))) 836 i-- 837 dAtA[i] = 0x12 838 } 839 if len(m.Id) > 0 { 840 i -= len(m.Id) 841 copy(dAtA[i:], m.Id) 842 i = encodeVarintDevice(dAtA, i, uint64(len(m.Id))) 843 i-- 844 dAtA[i] = 0xa 845 } 846 return len(dAtA) - i, nil 847 } 848 849 func (m *DeviceCollectedData) Marshal() (dAtA []byte, err error) { 850 size := m.Size() 851 dAtA = make([]byte, size) 852 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 853 if err != nil { 854 return nil, err 855 } 856 return dAtA[:n], nil 857 } 858 859 func (m *DeviceCollectedData) MarshalTo(dAtA []byte) (int, error) { 860 size := m.Size() 861 return m.MarshalToSizedBuffer(dAtA[:size]) 862 } 863 864 func (m *DeviceCollectedData) MarshalToSizedBuffer(dAtA []byte) (int, error) { 865 i := len(dAtA) 866 _ = i 867 var l int 868 _ = l 869 if m.XXX_unrecognized != nil { 870 i -= len(m.XXX_unrecognized) 871 copy(dAtA[i:], m.XXX_unrecognized) 872 } 873 if len(m.OsId) > 0 { 874 i -= len(m.OsId) 875 copy(dAtA[i:], m.OsId) 876 i = encodeVarintDevice(dAtA, i, uint64(len(m.OsId))) 877 i-- 878 dAtA[i] = 0x7a 879 } 880 if m.TpmPlatformAttestation != nil { 881 { 882 size, err := m.TpmPlatformAttestation.MarshalToSizedBuffer(dAtA[:i]) 883 if err != nil { 884 return 0, err 885 } 886 i -= size 887 i = encodeVarintDevice(dAtA, i, uint64(size)) 888 } 889 i-- 890 dAtA[i] = 0x72 891 } 892 if len(m.BaseBoardSerialNumber) > 0 { 893 i -= len(m.BaseBoardSerialNumber) 894 copy(dAtA[i:], m.BaseBoardSerialNumber) 895 i = encodeVarintDevice(dAtA, i, uint64(len(m.BaseBoardSerialNumber))) 896 i-- 897 dAtA[i] = 0x6a 898 } 899 if len(m.SystemSerialNumber) > 0 { 900 i -= len(m.SystemSerialNumber) 901 copy(dAtA[i:], m.SystemSerialNumber) 902 i = encodeVarintDevice(dAtA, i, uint64(len(m.SystemSerialNumber))) 903 i-- 904 dAtA[i] = 0x62 905 } 906 if len(m.ReportedAssetTag) > 0 { 907 i -= len(m.ReportedAssetTag) 908 copy(dAtA[i:], m.ReportedAssetTag) 909 i = encodeVarintDevice(dAtA, i, uint64(len(m.ReportedAssetTag))) 910 i-- 911 dAtA[i] = 0x5a 912 } 913 if len(m.MacosEnrollmentProfiles) > 0 { 914 i -= len(m.MacosEnrollmentProfiles) 915 copy(dAtA[i:], m.MacosEnrollmentProfiles) 916 i = encodeVarintDevice(dAtA, i, uint64(len(m.MacosEnrollmentProfiles))) 917 i-- 918 dAtA[i] = 0x52 919 } 920 if len(m.JamfBinaryVersion) > 0 { 921 i -= len(m.JamfBinaryVersion) 922 copy(dAtA[i:], m.JamfBinaryVersion) 923 i = encodeVarintDevice(dAtA, i, uint64(len(m.JamfBinaryVersion))) 924 i-- 925 dAtA[i] = 0x4a 926 } 927 if len(m.OsUsername) > 0 { 928 i -= len(m.OsUsername) 929 copy(dAtA[i:], m.OsUsername) 930 i = encodeVarintDevice(dAtA, i, uint64(len(m.OsUsername))) 931 i-- 932 dAtA[i] = 0x42 933 } 934 if len(m.OsBuild) > 0 { 935 i -= len(m.OsBuild) 936 copy(dAtA[i:], m.OsBuild) 937 i = encodeVarintDevice(dAtA, i, uint64(len(m.OsBuild))) 938 i-- 939 dAtA[i] = 0x3a 940 } 941 if len(m.OsVersion) > 0 { 942 i -= len(m.OsVersion) 943 copy(dAtA[i:], m.OsVersion) 944 i = encodeVarintDevice(dAtA, i, uint64(len(m.OsVersion))) 945 i-- 946 dAtA[i] = 0x32 947 } 948 if len(m.ModelIdentifier) > 0 { 949 i -= len(m.ModelIdentifier) 950 copy(dAtA[i:], m.ModelIdentifier) 951 i = encodeVarintDevice(dAtA, i, uint64(len(m.ModelIdentifier))) 952 i-- 953 dAtA[i] = 0x2a 954 } 955 if len(m.SerialNumber) > 0 { 956 i -= len(m.SerialNumber) 957 copy(dAtA[i:], m.SerialNumber) 958 i = encodeVarintDevice(dAtA, i, uint64(len(m.SerialNumber))) 959 i-- 960 dAtA[i] = 0x22 961 } 962 if len(m.OsType) > 0 { 963 i -= len(m.OsType) 964 copy(dAtA[i:], m.OsType) 965 i = encodeVarintDevice(dAtA, i, uint64(len(m.OsType))) 966 i-- 967 dAtA[i] = 0x1a 968 } 969 if m.RecordTime != nil { 970 n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.RecordTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.RecordTime):]) 971 if err9 != nil { 972 return 0, err9 973 } 974 i -= n9 975 i = encodeVarintDevice(dAtA, i, uint64(n9)) 976 i-- 977 dAtA[i] = 0x12 978 } 979 if m.CollectTime != nil { 980 n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.CollectTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.CollectTime):]) 981 if err10 != nil { 982 return 0, err10 983 } 984 i -= n10 985 i = encodeVarintDevice(dAtA, i, uint64(n10)) 986 i-- 987 dAtA[i] = 0xa 988 } 989 return len(dAtA) - i, nil 990 } 991 992 func (m *TPMPCR) Marshal() (dAtA []byte, err error) { 993 size := m.Size() 994 dAtA = make([]byte, size) 995 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 996 if err != nil { 997 return nil, err 998 } 999 return dAtA[:n], nil 1000 } 1001 1002 func (m *TPMPCR) MarshalTo(dAtA []byte) (int, error) { 1003 size := m.Size() 1004 return m.MarshalToSizedBuffer(dAtA[:size]) 1005 } 1006 1007 func (m *TPMPCR) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1008 i := len(dAtA) 1009 _ = i 1010 var l int 1011 _ = l 1012 if m.XXX_unrecognized != nil { 1013 i -= len(m.XXX_unrecognized) 1014 copy(dAtA[i:], m.XXX_unrecognized) 1015 } 1016 if m.DigestAlg != 0 { 1017 i = encodeVarintDevice(dAtA, i, uint64(m.DigestAlg)) 1018 i-- 1019 dAtA[i] = 0x18 1020 } 1021 if len(m.Digest) > 0 { 1022 i -= len(m.Digest) 1023 copy(dAtA[i:], m.Digest) 1024 i = encodeVarintDevice(dAtA, i, uint64(len(m.Digest))) 1025 i-- 1026 dAtA[i] = 0x12 1027 } 1028 if m.Index != 0 { 1029 i = encodeVarintDevice(dAtA, i, uint64(m.Index)) 1030 i-- 1031 dAtA[i] = 0x8 1032 } 1033 return len(dAtA) - i, nil 1034 } 1035 1036 func (m *TPMQuote) Marshal() (dAtA []byte, err error) { 1037 size := m.Size() 1038 dAtA = make([]byte, size) 1039 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1040 if err != nil { 1041 return nil, err 1042 } 1043 return dAtA[:n], nil 1044 } 1045 1046 func (m *TPMQuote) MarshalTo(dAtA []byte) (int, error) { 1047 size := m.Size() 1048 return m.MarshalToSizedBuffer(dAtA[:size]) 1049 } 1050 1051 func (m *TPMQuote) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1052 i := len(dAtA) 1053 _ = i 1054 var l int 1055 _ = l 1056 if m.XXX_unrecognized != nil { 1057 i -= len(m.XXX_unrecognized) 1058 copy(dAtA[i:], m.XXX_unrecognized) 1059 } 1060 if len(m.Signature) > 0 { 1061 i -= len(m.Signature) 1062 copy(dAtA[i:], m.Signature) 1063 i = encodeVarintDevice(dAtA, i, uint64(len(m.Signature))) 1064 i-- 1065 dAtA[i] = 0x12 1066 } 1067 if len(m.Quote) > 0 { 1068 i -= len(m.Quote) 1069 copy(dAtA[i:], m.Quote) 1070 i = encodeVarintDevice(dAtA, i, uint64(len(m.Quote))) 1071 i-- 1072 dAtA[i] = 0xa 1073 } 1074 return len(dAtA) - i, nil 1075 } 1076 1077 func (m *TPMPlatformParameters) Marshal() (dAtA []byte, err error) { 1078 size := m.Size() 1079 dAtA = make([]byte, size) 1080 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1081 if err != nil { 1082 return nil, err 1083 } 1084 return dAtA[:n], nil 1085 } 1086 1087 func (m *TPMPlatformParameters) MarshalTo(dAtA []byte) (int, error) { 1088 size := m.Size() 1089 return m.MarshalToSizedBuffer(dAtA[:size]) 1090 } 1091 1092 func (m *TPMPlatformParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1093 i := len(dAtA) 1094 _ = i 1095 var l int 1096 _ = l 1097 if m.XXX_unrecognized != nil { 1098 i -= len(m.XXX_unrecognized) 1099 copy(dAtA[i:], m.XXX_unrecognized) 1100 } 1101 if len(m.EventLog) > 0 { 1102 i -= len(m.EventLog) 1103 copy(dAtA[i:], m.EventLog) 1104 i = encodeVarintDevice(dAtA, i, uint64(len(m.EventLog))) 1105 i-- 1106 dAtA[i] = 0x1a 1107 } 1108 if len(m.Pcrs) > 0 { 1109 for iNdEx := len(m.Pcrs) - 1; iNdEx >= 0; iNdEx-- { 1110 { 1111 size, err := m.Pcrs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1112 if err != nil { 1113 return 0, err 1114 } 1115 i -= size 1116 i = encodeVarintDevice(dAtA, i, uint64(size)) 1117 } 1118 i-- 1119 dAtA[i] = 0x12 1120 } 1121 } 1122 if len(m.Quotes) > 0 { 1123 for iNdEx := len(m.Quotes) - 1; iNdEx >= 0; iNdEx-- { 1124 { 1125 size, err := m.Quotes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1126 if err != nil { 1127 return 0, err 1128 } 1129 i -= size 1130 i = encodeVarintDevice(dAtA, i, uint64(size)) 1131 } 1132 i-- 1133 dAtA[i] = 0xa 1134 } 1135 } 1136 return len(dAtA) - i, nil 1137 } 1138 1139 func (m *TPMPlatformAttestation) Marshal() (dAtA []byte, err error) { 1140 size := m.Size() 1141 dAtA = make([]byte, size) 1142 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1143 if err != nil { 1144 return nil, err 1145 } 1146 return dAtA[:n], nil 1147 } 1148 1149 func (m *TPMPlatformAttestation) MarshalTo(dAtA []byte) (int, error) { 1150 size := m.Size() 1151 return m.MarshalToSizedBuffer(dAtA[:size]) 1152 } 1153 1154 func (m *TPMPlatformAttestation) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1155 i := len(dAtA) 1156 _ = i 1157 var l int 1158 _ = l 1159 if m.XXX_unrecognized != nil { 1160 i -= len(m.XXX_unrecognized) 1161 copy(dAtA[i:], m.XXX_unrecognized) 1162 } 1163 if m.PlatformParameters != nil { 1164 { 1165 size, err := m.PlatformParameters.MarshalToSizedBuffer(dAtA[:i]) 1166 if err != nil { 1167 return 0, err 1168 } 1169 i -= size 1170 i = encodeVarintDevice(dAtA, i, uint64(size)) 1171 } 1172 i-- 1173 dAtA[i] = 0x12 1174 } 1175 if len(m.Nonce) > 0 { 1176 i -= len(m.Nonce) 1177 copy(dAtA[i:], m.Nonce) 1178 i = encodeVarintDevice(dAtA, i, uint64(len(m.Nonce))) 1179 i-- 1180 dAtA[i] = 0xa 1181 } 1182 return len(dAtA) - i, nil 1183 } 1184 1185 func (m *DeviceSource) Marshal() (dAtA []byte, err error) { 1186 size := m.Size() 1187 dAtA = make([]byte, size) 1188 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1189 if err != nil { 1190 return nil, err 1191 } 1192 return dAtA[:n], nil 1193 } 1194 1195 func (m *DeviceSource) MarshalTo(dAtA []byte) (int, error) { 1196 size := m.Size() 1197 return m.MarshalToSizedBuffer(dAtA[:size]) 1198 } 1199 1200 func (m *DeviceSource) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1201 i := len(dAtA) 1202 _ = i 1203 var l int 1204 _ = l 1205 if m.XXX_unrecognized != nil { 1206 i -= len(m.XXX_unrecognized) 1207 copy(dAtA[i:], m.XXX_unrecognized) 1208 } 1209 if len(m.Origin) > 0 { 1210 i -= len(m.Origin) 1211 copy(dAtA[i:], m.Origin) 1212 i = encodeVarintDevice(dAtA, i, uint64(len(m.Origin))) 1213 i-- 1214 dAtA[i] = 0x12 1215 } 1216 if len(m.Name) > 0 { 1217 i -= len(m.Name) 1218 copy(dAtA[i:], m.Name) 1219 i = encodeVarintDevice(dAtA, i, uint64(len(m.Name))) 1220 i-- 1221 dAtA[i] = 0xa 1222 } 1223 return len(dAtA) - i, nil 1224 } 1225 1226 func (m *DeviceProfile) Marshal() (dAtA []byte, err error) { 1227 size := m.Size() 1228 dAtA = make([]byte, size) 1229 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1230 if err != nil { 1231 return nil, err 1232 } 1233 return dAtA[:n], nil 1234 } 1235 1236 func (m *DeviceProfile) MarshalTo(dAtA []byte) (int, error) { 1237 size := m.Size() 1238 return m.MarshalToSizedBuffer(dAtA[:size]) 1239 } 1240 1241 func (m *DeviceProfile) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1242 i := len(dAtA) 1243 _ = i 1244 var l int 1245 _ = l 1246 if m.XXX_unrecognized != nil { 1247 i -= len(m.XXX_unrecognized) 1248 copy(dAtA[i:], m.XXX_unrecognized) 1249 } 1250 if len(m.OsId) > 0 { 1251 i -= len(m.OsId) 1252 copy(dAtA[i:], m.OsId) 1253 i = encodeVarintDevice(dAtA, i, uint64(len(m.OsId))) 1254 i-- 1255 dAtA[i] = 0x4a 1256 } 1257 if len(m.OsBuildSupplemental) > 0 { 1258 i -= len(m.OsBuildSupplemental) 1259 copy(dAtA[i:], m.OsBuildSupplemental) 1260 i = encodeVarintDevice(dAtA, i, uint64(len(m.OsBuildSupplemental))) 1261 i-- 1262 dAtA[i] = 0x42 1263 } 1264 if len(m.ExternalId) > 0 { 1265 i -= len(m.ExternalId) 1266 copy(dAtA[i:], m.ExternalId) 1267 i = encodeVarintDevice(dAtA, i, uint64(len(m.ExternalId))) 1268 i-- 1269 dAtA[i] = 0x3a 1270 } 1271 if len(m.JamfBinaryVersion) > 0 { 1272 i -= len(m.JamfBinaryVersion) 1273 copy(dAtA[i:], m.JamfBinaryVersion) 1274 i = encodeVarintDevice(dAtA, i, uint64(len(m.JamfBinaryVersion))) 1275 i-- 1276 dAtA[i] = 0x32 1277 } 1278 if len(m.OsUsernames) > 0 { 1279 for iNdEx := len(m.OsUsernames) - 1; iNdEx >= 0; iNdEx-- { 1280 i -= len(m.OsUsernames[iNdEx]) 1281 copy(dAtA[i:], m.OsUsernames[iNdEx]) 1282 i = encodeVarintDevice(dAtA, i, uint64(len(m.OsUsernames[iNdEx]))) 1283 i-- 1284 dAtA[i] = 0x2a 1285 } 1286 } 1287 if len(m.OsBuild) > 0 { 1288 i -= len(m.OsBuild) 1289 copy(dAtA[i:], m.OsBuild) 1290 i = encodeVarintDevice(dAtA, i, uint64(len(m.OsBuild))) 1291 i-- 1292 dAtA[i] = 0x22 1293 } 1294 if len(m.OsVersion) > 0 { 1295 i -= len(m.OsVersion) 1296 copy(dAtA[i:], m.OsVersion) 1297 i = encodeVarintDevice(dAtA, i, uint64(len(m.OsVersion))) 1298 i-- 1299 dAtA[i] = 0x1a 1300 } 1301 if len(m.ModelIdentifier) > 0 { 1302 i -= len(m.ModelIdentifier) 1303 copy(dAtA[i:], m.ModelIdentifier) 1304 i = encodeVarintDevice(dAtA, i, uint64(len(m.ModelIdentifier))) 1305 i-- 1306 dAtA[i] = 0x12 1307 } 1308 if m.UpdateTime != nil { 1309 n12, err12 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.UpdateTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.UpdateTime):]) 1310 if err12 != nil { 1311 return 0, err12 1312 } 1313 i -= n12 1314 i = encodeVarintDevice(dAtA, i, uint64(n12)) 1315 i-- 1316 dAtA[i] = 0xa 1317 } 1318 return len(dAtA) - i, nil 1319 } 1320 1321 func encodeVarintDevice(dAtA []byte, offset int, v uint64) int { 1322 offset -= sovDevice(v) 1323 base := offset 1324 for v >= 1<<7 { 1325 dAtA[offset] = uint8(v&0x7f | 0x80) 1326 v >>= 7 1327 offset++ 1328 } 1329 dAtA[offset] = uint8(v) 1330 return base 1331 } 1332 func (m *DeviceV1) Size() (n int) { 1333 if m == nil { 1334 return 0 1335 } 1336 var l int 1337 _ = l 1338 l = m.ResourceHeader.Size() 1339 n += 1 + l + sovDevice(uint64(l)) 1340 if m.Spec != nil { 1341 l = m.Spec.Size() 1342 n += 1 + l + sovDevice(uint64(l)) 1343 } 1344 if m.XXX_unrecognized != nil { 1345 n += len(m.XXX_unrecognized) 1346 } 1347 return n 1348 } 1349 1350 func (m *DeviceSpec) Size() (n int) { 1351 if m == nil { 1352 return 0 1353 } 1354 var l int 1355 _ = l 1356 l = len(m.OsType) 1357 if l > 0 { 1358 n += 1 + l + sovDevice(uint64(l)) 1359 } 1360 l = len(m.AssetTag) 1361 if l > 0 { 1362 n += 1 + l + sovDevice(uint64(l)) 1363 } 1364 if m.CreateTime != nil { 1365 l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.CreateTime) 1366 n += 1 + l + sovDevice(uint64(l)) 1367 } 1368 if m.UpdateTime != nil { 1369 l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.UpdateTime) 1370 n += 1 + l + sovDevice(uint64(l)) 1371 } 1372 l = len(m.EnrollStatus) 1373 if l > 0 { 1374 n += 1 + l + sovDevice(uint64(l)) 1375 } 1376 if m.Credential != nil { 1377 l = m.Credential.Size() 1378 n += 1 + l + sovDevice(uint64(l)) 1379 } 1380 if len(m.CollectedData) > 0 { 1381 for _, e := range m.CollectedData { 1382 l = e.Size() 1383 n += 1 + l + sovDevice(uint64(l)) 1384 } 1385 } 1386 if m.Source != nil { 1387 l = m.Source.Size() 1388 n += 1 + l + sovDevice(uint64(l)) 1389 } 1390 if m.Profile != nil { 1391 l = m.Profile.Size() 1392 n += 1 + l + sovDevice(uint64(l)) 1393 } 1394 l = len(m.Owner) 1395 if l > 0 { 1396 n += 1 + l + sovDevice(uint64(l)) 1397 } 1398 if m.XXX_unrecognized != nil { 1399 n += len(m.XXX_unrecognized) 1400 } 1401 return n 1402 } 1403 1404 func (m *DeviceCredential) Size() (n int) { 1405 if m == nil { 1406 return 0 1407 } 1408 var l int 1409 _ = l 1410 l = len(m.Id) 1411 if l > 0 { 1412 n += 1 + l + sovDevice(uint64(l)) 1413 } 1414 l = len(m.PublicKeyDer) 1415 if l > 0 { 1416 n += 1 + l + sovDevice(uint64(l)) 1417 } 1418 l = len(m.DeviceAttestationType) 1419 if l > 0 { 1420 n += 1 + l + sovDevice(uint64(l)) 1421 } 1422 l = len(m.TpmEkcertSerial) 1423 if l > 0 { 1424 n += 1 + l + sovDevice(uint64(l)) 1425 } 1426 l = len(m.TpmAkPublic) 1427 if l > 0 { 1428 n += 1 + l + sovDevice(uint64(l)) 1429 } 1430 if m.XXX_unrecognized != nil { 1431 n += len(m.XXX_unrecognized) 1432 } 1433 return n 1434 } 1435 1436 func (m *DeviceCollectedData) Size() (n int) { 1437 if m == nil { 1438 return 0 1439 } 1440 var l int 1441 _ = l 1442 if m.CollectTime != nil { 1443 l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.CollectTime) 1444 n += 1 + l + sovDevice(uint64(l)) 1445 } 1446 if m.RecordTime != nil { 1447 l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.RecordTime) 1448 n += 1 + l + sovDevice(uint64(l)) 1449 } 1450 l = len(m.OsType) 1451 if l > 0 { 1452 n += 1 + l + sovDevice(uint64(l)) 1453 } 1454 l = len(m.SerialNumber) 1455 if l > 0 { 1456 n += 1 + l + sovDevice(uint64(l)) 1457 } 1458 l = len(m.ModelIdentifier) 1459 if l > 0 { 1460 n += 1 + l + sovDevice(uint64(l)) 1461 } 1462 l = len(m.OsVersion) 1463 if l > 0 { 1464 n += 1 + l + sovDevice(uint64(l)) 1465 } 1466 l = len(m.OsBuild) 1467 if l > 0 { 1468 n += 1 + l + sovDevice(uint64(l)) 1469 } 1470 l = len(m.OsUsername) 1471 if l > 0 { 1472 n += 1 + l + sovDevice(uint64(l)) 1473 } 1474 l = len(m.JamfBinaryVersion) 1475 if l > 0 { 1476 n += 1 + l + sovDevice(uint64(l)) 1477 } 1478 l = len(m.MacosEnrollmentProfiles) 1479 if l > 0 { 1480 n += 1 + l + sovDevice(uint64(l)) 1481 } 1482 l = len(m.ReportedAssetTag) 1483 if l > 0 { 1484 n += 1 + l + sovDevice(uint64(l)) 1485 } 1486 l = len(m.SystemSerialNumber) 1487 if l > 0 { 1488 n += 1 + l + sovDevice(uint64(l)) 1489 } 1490 l = len(m.BaseBoardSerialNumber) 1491 if l > 0 { 1492 n += 1 + l + sovDevice(uint64(l)) 1493 } 1494 if m.TpmPlatformAttestation != nil { 1495 l = m.TpmPlatformAttestation.Size() 1496 n += 1 + l + sovDevice(uint64(l)) 1497 } 1498 l = len(m.OsId) 1499 if l > 0 { 1500 n += 1 + l + sovDevice(uint64(l)) 1501 } 1502 if m.XXX_unrecognized != nil { 1503 n += len(m.XXX_unrecognized) 1504 } 1505 return n 1506 } 1507 1508 func (m *TPMPCR) Size() (n int) { 1509 if m == nil { 1510 return 0 1511 } 1512 var l int 1513 _ = l 1514 if m.Index != 0 { 1515 n += 1 + sovDevice(uint64(m.Index)) 1516 } 1517 l = len(m.Digest) 1518 if l > 0 { 1519 n += 1 + l + sovDevice(uint64(l)) 1520 } 1521 if m.DigestAlg != 0 { 1522 n += 1 + sovDevice(uint64(m.DigestAlg)) 1523 } 1524 if m.XXX_unrecognized != nil { 1525 n += len(m.XXX_unrecognized) 1526 } 1527 return n 1528 } 1529 1530 func (m *TPMQuote) Size() (n int) { 1531 if m == nil { 1532 return 0 1533 } 1534 var l int 1535 _ = l 1536 l = len(m.Quote) 1537 if l > 0 { 1538 n += 1 + l + sovDevice(uint64(l)) 1539 } 1540 l = len(m.Signature) 1541 if l > 0 { 1542 n += 1 + l + sovDevice(uint64(l)) 1543 } 1544 if m.XXX_unrecognized != nil { 1545 n += len(m.XXX_unrecognized) 1546 } 1547 return n 1548 } 1549 1550 func (m *TPMPlatformParameters) Size() (n int) { 1551 if m == nil { 1552 return 0 1553 } 1554 var l int 1555 _ = l 1556 if len(m.Quotes) > 0 { 1557 for _, e := range m.Quotes { 1558 l = e.Size() 1559 n += 1 + l + sovDevice(uint64(l)) 1560 } 1561 } 1562 if len(m.Pcrs) > 0 { 1563 for _, e := range m.Pcrs { 1564 l = e.Size() 1565 n += 1 + l + sovDevice(uint64(l)) 1566 } 1567 } 1568 l = len(m.EventLog) 1569 if l > 0 { 1570 n += 1 + l + sovDevice(uint64(l)) 1571 } 1572 if m.XXX_unrecognized != nil { 1573 n += len(m.XXX_unrecognized) 1574 } 1575 return n 1576 } 1577 1578 func (m *TPMPlatformAttestation) Size() (n int) { 1579 if m == nil { 1580 return 0 1581 } 1582 var l int 1583 _ = l 1584 l = len(m.Nonce) 1585 if l > 0 { 1586 n += 1 + l + sovDevice(uint64(l)) 1587 } 1588 if m.PlatformParameters != nil { 1589 l = m.PlatformParameters.Size() 1590 n += 1 + l + sovDevice(uint64(l)) 1591 } 1592 if m.XXX_unrecognized != nil { 1593 n += len(m.XXX_unrecognized) 1594 } 1595 return n 1596 } 1597 1598 func (m *DeviceSource) Size() (n int) { 1599 if m == nil { 1600 return 0 1601 } 1602 var l int 1603 _ = l 1604 l = len(m.Name) 1605 if l > 0 { 1606 n += 1 + l + sovDevice(uint64(l)) 1607 } 1608 l = len(m.Origin) 1609 if l > 0 { 1610 n += 1 + l + sovDevice(uint64(l)) 1611 } 1612 if m.XXX_unrecognized != nil { 1613 n += len(m.XXX_unrecognized) 1614 } 1615 return n 1616 } 1617 1618 func (m *DeviceProfile) Size() (n int) { 1619 if m == nil { 1620 return 0 1621 } 1622 var l int 1623 _ = l 1624 if m.UpdateTime != nil { 1625 l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.UpdateTime) 1626 n += 1 + l + sovDevice(uint64(l)) 1627 } 1628 l = len(m.ModelIdentifier) 1629 if l > 0 { 1630 n += 1 + l + sovDevice(uint64(l)) 1631 } 1632 l = len(m.OsVersion) 1633 if l > 0 { 1634 n += 1 + l + sovDevice(uint64(l)) 1635 } 1636 l = len(m.OsBuild) 1637 if l > 0 { 1638 n += 1 + l + sovDevice(uint64(l)) 1639 } 1640 if len(m.OsUsernames) > 0 { 1641 for _, s := range m.OsUsernames { 1642 l = len(s) 1643 n += 1 + l + sovDevice(uint64(l)) 1644 } 1645 } 1646 l = len(m.JamfBinaryVersion) 1647 if l > 0 { 1648 n += 1 + l + sovDevice(uint64(l)) 1649 } 1650 l = len(m.ExternalId) 1651 if l > 0 { 1652 n += 1 + l + sovDevice(uint64(l)) 1653 } 1654 l = len(m.OsBuildSupplemental) 1655 if l > 0 { 1656 n += 1 + l + sovDevice(uint64(l)) 1657 } 1658 l = len(m.OsId) 1659 if l > 0 { 1660 n += 1 + l + sovDevice(uint64(l)) 1661 } 1662 if m.XXX_unrecognized != nil { 1663 n += len(m.XXX_unrecognized) 1664 } 1665 return n 1666 } 1667 1668 func sovDevice(x uint64) (n int) { 1669 return (math_bits.Len64(x|1) + 6) / 7 1670 } 1671 func sozDevice(x uint64) (n int) { 1672 return sovDevice(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 1673 } 1674 func (m *DeviceV1) Unmarshal(dAtA []byte) error { 1675 l := len(dAtA) 1676 iNdEx := 0 1677 for iNdEx < l { 1678 preIndex := iNdEx 1679 var wire uint64 1680 for shift := uint(0); ; shift += 7 { 1681 if shift >= 64 { 1682 return ErrIntOverflowDevice 1683 } 1684 if iNdEx >= l { 1685 return io.ErrUnexpectedEOF 1686 } 1687 b := dAtA[iNdEx] 1688 iNdEx++ 1689 wire |= uint64(b&0x7F) << shift 1690 if b < 0x80 { 1691 break 1692 } 1693 } 1694 fieldNum := int32(wire >> 3) 1695 wireType := int(wire & 0x7) 1696 if wireType == 4 { 1697 return fmt.Errorf("proto: DeviceV1: wiretype end group for non-group") 1698 } 1699 if fieldNum <= 0 { 1700 return fmt.Errorf("proto: DeviceV1: illegal tag %d (wire type %d)", fieldNum, wire) 1701 } 1702 switch fieldNum { 1703 case 1: 1704 if wireType != 2 { 1705 return fmt.Errorf("proto: wrong wireType = %d for field ResourceHeader", wireType) 1706 } 1707 var msglen int 1708 for shift := uint(0); ; shift += 7 { 1709 if shift >= 64 { 1710 return ErrIntOverflowDevice 1711 } 1712 if iNdEx >= l { 1713 return io.ErrUnexpectedEOF 1714 } 1715 b := dAtA[iNdEx] 1716 iNdEx++ 1717 msglen |= int(b&0x7F) << shift 1718 if b < 0x80 { 1719 break 1720 } 1721 } 1722 if msglen < 0 { 1723 return ErrInvalidLengthDevice 1724 } 1725 postIndex := iNdEx + msglen 1726 if postIndex < 0 { 1727 return ErrInvalidLengthDevice 1728 } 1729 if postIndex > l { 1730 return io.ErrUnexpectedEOF 1731 } 1732 if err := m.ResourceHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1733 return err 1734 } 1735 iNdEx = postIndex 1736 case 5: 1737 if wireType != 2 { 1738 return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) 1739 } 1740 var msglen int 1741 for shift := uint(0); ; shift += 7 { 1742 if shift >= 64 { 1743 return ErrIntOverflowDevice 1744 } 1745 if iNdEx >= l { 1746 return io.ErrUnexpectedEOF 1747 } 1748 b := dAtA[iNdEx] 1749 iNdEx++ 1750 msglen |= int(b&0x7F) << shift 1751 if b < 0x80 { 1752 break 1753 } 1754 } 1755 if msglen < 0 { 1756 return ErrInvalidLengthDevice 1757 } 1758 postIndex := iNdEx + msglen 1759 if postIndex < 0 { 1760 return ErrInvalidLengthDevice 1761 } 1762 if postIndex > l { 1763 return io.ErrUnexpectedEOF 1764 } 1765 if m.Spec == nil { 1766 m.Spec = &DeviceSpec{} 1767 } 1768 if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1769 return err 1770 } 1771 iNdEx = postIndex 1772 default: 1773 iNdEx = preIndex 1774 skippy, err := skipDevice(dAtA[iNdEx:]) 1775 if err != nil { 1776 return err 1777 } 1778 if (skippy < 0) || (iNdEx+skippy) < 0 { 1779 return ErrInvalidLengthDevice 1780 } 1781 if (iNdEx + skippy) > l { 1782 return io.ErrUnexpectedEOF 1783 } 1784 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1785 iNdEx += skippy 1786 } 1787 } 1788 1789 if iNdEx > l { 1790 return io.ErrUnexpectedEOF 1791 } 1792 return nil 1793 } 1794 func (m *DeviceSpec) Unmarshal(dAtA []byte) error { 1795 l := len(dAtA) 1796 iNdEx := 0 1797 for iNdEx < l { 1798 preIndex := iNdEx 1799 var wire uint64 1800 for shift := uint(0); ; shift += 7 { 1801 if shift >= 64 { 1802 return ErrIntOverflowDevice 1803 } 1804 if iNdEx >= l { 1805 return io.ErrUnexpectedEOF 1806 } 1807 b := dAtA[iNdEx] 1808 iNdEx++ 1809 wire |= uint64(b&0x7F) << shift 1810 if b < 0x80 { 1811 break 1812 } 1813 } 1814 fieldNum := int32(wire >> 3) 1815 wireType := int(wire & 0x7) 1816 if wireType == 4 { 1817 return fmt.Errorf("proto: DeviceSpec: wiretype end group for non-group") 1818 } 1819 if fieldNum <= 0 { 1820 return fmt.Errorf("proto: DeviceSpec: illegal tag %d (wire type %d)", fieldNum, wire) 1821 } 1822 switch fieldNum { 1823 case 1: 1824 if wireType != 2 { 1825 return fmt.Errorf("proto: wrong wireType = %d for field OsType", wireType) 1826 } 1827 var stringLen uint64 1828 for shift := uint(0); ; shift += 7 { 1829 if shift >= 64 { 1830 return ErrIntOverflowDevice 1831 } 1832 if iNdEx >= l { 1833 return io.ErrUnexpectedEOF 1834 } 1835 b := dAtA[iNdEx] 1836 iNdEx++ 1837 stringLen |= uint64(b&0x7F) << shift 1838 if b < 0x80 { 1839 break 1840 } 1841 } 1842 intStringLen := int(stringLen) 1843 if intStringLen < 0 { 1844 return ErrInvalidLengthDevice 1845 } 1846 postIndex := iNdEx + intStringLen 1847 if postIndex < 0 { 1848 return ErrInvalidLengthDevice 1849 } 1850 if postIndex > l { 1851 return io.ErrUnexpectedEOF 1852 } 1853 m.OsType = string(dAtA[iNdEx:postIndex]) 1854 iNdEx = postIndex 1855 case 2: 1856 if wireType != 2 { 1857 return fmt.Errorf("proto: wrong wireType = %d for field AssetTag", wireType) 1858 } 1859 var stringLen uint64 1860 for shift := uint(0); ; shift += 7 { 1861 if shift >= 64 { 1862 return ErrIntOverflowDevice 1863 } 1864 if iNdEx >= l { 1865 return io.ErrUnexpectedEOF 1866 } 1867 b := dAtA[iNdEx] 1868 iNdEx++ 1869 stringLen |= uint64(b&0x7F) << shift 1870 if b < 0x80 { 1871 break 1872 } 1873 } 1874 intStringLen := int(stringLen) 1875 if intStringLen < 0 { 1876 return ErrInvalidLengthDevice 1877 } 1878 postIndex := iNdEx + intStringLen 1879 if postIndex < 0 { 1880 return ErrInvalidLengthDevice 1881 } 1882 if postIndex > l { 1883 return io.ErrUnexpectedEOF 1884 } 1885 m.AssetTag = string(dAtA[iNdEx:postIndex]) 1886 iNdEx = postIndex 1887 case 3: 1888 if wireType != 2 { 1889 return fmt.Errorf("proto: wrong wireType = %d for field CreateTime", wireType) 1890 } 1891 var msglen int 1892 for shift := uint(0); ; shift += 7 { 1893 if shift >= 64 { 1894 return ErrIntOverflowDevice 1895 } 1896 if iNdEx >= l { 1897 return io.ErrUnexpectedEOF 1898 } 1899 b := dAtA[iNdEx] 1900 iNdEx++ 1901 msglen |= int(b&0x7F) << shift 1902 if b < 0x80 { 1903 break 1904 } 1905 } 1906 if msglen < 0 { 1907 return ErrInvalidLengthDevice 1908 } 1909 postIndex := iNdEx + msglen 1910 if postIndex < 0 { 1911 return ErrInvalidLengthDevice 1912 } 1913 if postIndex > l { 1914 return io.ErrUnexpectedEOF 1915 } 1916 if m.CreateTime == nil { 1917 m.CreateTime = new(time.Time) 1918 } 1919 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.CreateTime, dAtA[iNdEx:postIndex]); err != nil { 1920 return err 1921 } 1922 iNdEx = postIndex 1923 case 4: 1924 if wireType != 2 { 1925 return fmt.Errorf("proto: wrong wireType = %d for field UpdateTime", wireType) 1926 } 1927 var msglen int 1928 for shift := uint(0); ; shift += 7 { 1929 if shift >= 64 { 1930 return ErrIntOverflowDevice 1931 } 1932 if iNdEx >= l { 1933 return io.ErrUnexpectedEOF 1934 } 1935 b := dAtA[iNdEx] 1936 iNdEx++ 1937 msglen |= int(b&0x7F) << shift 1938 if b < 0x80 { 1939 break 1940 } 1941 } 1942 if msglen < 0 { 1943 return ErrInvalidLengthDevice 1944 } 1945 postIndex := iNdEx + msglen 1946 if postIndex < 0 { 1947 return ErrInvalidLengthDevice 1948 } 1949 if postIndex > l { 1950 return io.ErrUnexpectedEOF 1951 } 1952 if m.UpdateTime == nil { 1953 m.UpdateTime = new(time.Time) 1954 } 1955 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.UpdateTime, dAtA[iNdEx:postIndex]); err != nil { 1956 return err 1957 } 1958 iNdEx = postIndex 1959 case 5: 1960 if wireType != 2 { 1961 return fmt.Errorf("proto: wrong wireType = %d for field EnrollStatus", wireType) 1962 } 1963 var stringLen uint64 1964 for shift := uint(0); ; shift += 7 { 1965 if shift >= 64 { 1966 return ErrIntOverflowDevice 1967 } 1968 if iNdEx >= l { 1969 return io.ErrUnexpectedEOF 1970 } 1971 b := dAtA[iNdEx] 1972 iNdEx++ 1973 stringLen |= uint64(b&0x7F) << shift 1974 if b < 0x80 { 1975 break 1976 } 1977 } 1978 intStringLen := int(stringLen) 1979 if intStringLen < 0 { 1980 return ErrInvalidLengthDevice 1981 } 1982 postIndex := iNdEx + intStringLen 1983 if postIndex < 0 { 1984 return ErrInvalidLengthDevice 1985 } 1986 if postIndex > l { 1987 return io.ErrUnexpectedEOF 1988 } 1989 m.EnrollStatus = string(dAtA[iNdEx:postIndex]) 1990 iNdEx = postIndex 1991 case 6: 1992 if wireType != 2 { 1993 return fmt.Errorf("proto: wrong wireType = %d for field Credential", wireType) 1994 } 1995 var msglen int 1996 for shift := uint(0); ; shift += 7 { 1997 if shift >= 64 { 1998 return ErrIntOverflowDevice 1999 } 2000 if iNdEx >= l { 2001 return io.ErrUnexpectedEOF 2002 } 2003 b := dAtA[iNdEx] 2004 iNdEx++ 2005 msglen |= int(b&0x7F) << shift 2006 if b < 0x80 { 2007 break 2008 } 2009 } 2010 if msglen < 0 { 2011 return ErrInvalidLengthDevice 2012 } 2013 postIndex := iNdEx + msglen 2014 if postIndex < 0 { 2015 return ErrInvalidLengthDevice 2016 } 2017 if postIndex > l { 2018 return io.ErrUnexpectedEOF 2019 } 2020 if m.Credential == nil { 2021 m.Credential = &DeviceCredential{} 2022 } 2023 if err := m.Credential.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2024 return err 2025 } 2026 iNdEx = postIndex 2027 case 7: 2028 if wireType != 2 { 2029 return fmt.Errorf("proto: wrong wireType = %d for field CollectedData", wireType) 2030 } 2031 var msglen int 2032 for shift := uint(0); ; shift += 7 { 2033 if shift >= 64 { 2034 return ErrIntOverflowDevice 2035 } 2036 if iNdEx >= l { 2037 return io.ErrUnexpectedEOF 2038 } 2039 b := dAtA[iNdEx] 2040 iNdEx++ 2041 msglen |= int(b&0x7F) << shift 2042 if b < 0x80 { 2043 break 2044 } 2045 } 2046 if msglen < 0 { 2047 return ErrInvalidLengthDevice 2048 } 2049 postIndex := iNdEx + msglen 2050 if postIndex < 0 { 2051 return ErrInvalidLengthDevice 2052 } 2053 if postIndex > l { 2054 return io.ErrUnexpectedEOF 2055 } 2056 m.CollectedData = append(m.CollectedData, &DeviceCollectedData{}) 2057 if err := m.CollectedData[len(m.CollectedData)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2058 return err 2059 } 2060 iNdEx = postIndex 2061 case 8: 2062 if wireType != 2 { 2063 return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) 2064 } 2065 var msglen int 2066 for shift := uint(0); ; shift += 7 { 2067 if shift >= 64 { 2068 return ErrIntOverflowDevice 2069 } 2070 if iNdEx >= l { 2071 return io.ErrUnexpectedEOF 2072 } 2073 b := dAtA[iNdEx] 2074 iNdEx++ 2075 msglen |= int(b&0x7F) << shift 2076 if b < 0x80 { 2077 break 2078 } 2079 } 2080 if msglen < 0 { 2081 return ErrInvalidLengthDevice 2082 } 2083 postIndex := iNdEx + msglen 2084 if postIndex < 0 { 2085 return ErrInvalidLengthDevice 2086 } 2087 if postIndex > l { 2088 return io.ErrUnexpectedEOF 2089 } 2090 if m.Source == nil { 2091 m.Source = &DeviceSource{} 2092 } 2093 if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2094 return err 2095 } 2096 iNdEx = postIndex 2097 case 9: 2098 if wireType != 2 { 2099 return fmt.Errorf("proto: wrong wireType = %d for field Profile", wireType) 2100 } 2101 var msglen int 2102 for shift := uint(0); ; shift += 7 { 2103 if shift >= 64 { 2104 return ErrIntOverflowDevice 2105 } 2106 if iNdEx >= l { 2107 return io.ErrUnexpectedEOF 2108 } 2109 b := dAtA[iNdEx] 2110 iNdEx++ 2111 msglen |= int(b&0x7F) << shift 2112 if b < 0x80 { 2113 break 2114 } 2115 } 2116 if msglen < 0 { 2117 return ErrInvalidLengthDevice 2118 } 2119 postIndex := iNdEx + msglen 2120 if postIndex < 0 { 2121 return ErrInvalidLengthDevice 2122 } 2123 if postIndex > l { 2124 return io.ErrUnexpectedEOF 2125 } 2126 if m.Profile == nil { 2127 m.Profile = &DeviceProfile{} 2128 } 2129 if err := m.Profile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2130 return err 2131 } 2132 iNdEx = postIndex 2133 case 10: 2134 if wireType != 2 { 2135 return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) 2136 } 2137 var stringLen uint64 2138 for shift := uint(0); ; shift += 7 { 2139 if shift >= 64 { 2140 return ErrIntOverflowDevice 2141 } 2142 if iNdEx >= l { 2143 return io.ErrUnexpectedEOF 2144 } 2145 b := dAtA[iNdEx] 2146 iNdEx++ 2147 stringLen |= uint64(b&0x7F) << shift 2148 if b < 0x80 { 2149 break 2150 } 2151 } 2152 intStringLen := int(stringLen) 2153 if intStringLen < 0 { 2154 return ErrInvalidLengthDevice 2155 } 2156 postIndex := iNdEx + intStringLen 2157 if postIndex < 0 { 2158 return ErrInvalidLengthDevice 2159 } 2160 if postIndex > l { 2161 return io.ErrUnexpectedEOF 2162 } 2163 m.Owner = string(dAtA[iNdEx:postIndex]) 2164 iNdEx = postIndex 2165 default: 2166 iNdEx = preIndex 2167 skippy, err := skipDevice(dAtA[iNdEx:]) 2168 if err != nil { 2169 return err 2170 } 2171 if (skippy < 0) || (iNdEx+skippy) < 0 { 2172 return ErrInvalidLengthDevice 2173 } 2174 if (iNdEx + skippy) > l { 2175 return io.ErrUnexpectedEOF 2176 } 2177 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2178 iNdEx += skippy 2179 } 2180 } 2181 2182 if iNdEx > l { 2183 return io.ErrUnexpectedEOF 2184 } 2185 return nil 2186 } 2187 func (m *DeviceCredential) Unmarshal(dAtA []byte) error { 2188 l := len(dAtA) 2189 iNdEx := 0 2190 for iNdEx < l { 2191 preIndex := iNdEx 2192 var wire uint64 2193 for shift := uint(0); ; shift += 7 { 2194 if shift >= 64 { 2195 return ErrIntOverflowDevice 2196 } 2197 if iNdEx >= l { 2198 return io.ErrUnexpectedEOF 2199 } 2200 b := dAtA[iNdEx] 2201 iNdEx++ 2202 wire |= uint64(b&0x7F) << shift 2203 if b < 0x80 { 2204 break 2205 } 2206 } 2207 fieldNum := int32(wire >> 3) 2208 wireType := int(wire & 0x7) 2209 if wireType == 4 { 2210 return fmt.Errorf("proto: DeviceCredential: wiretype end group for non-group") 2211 } 2212 if fieldNum <= 0 { 2213 return fmt.Errorf("proto: DeviceCredential: illegal tag %d (wire type %d)", fieldNum, wire) 2214 } 2215 switch fieldNum { 2216 case 1: 2217 if wireType != 2 { 2218 return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) 2219 } 2220 var stringLen uint64 2221 for shift := uint(0); ; shift += 7 { 2222 if shift >= 64 { 2223 return ErrIntOverflowDevice 2224 } 2225 if iNdEx >= l { 2226 return io.ErrUnexpectedEOF 2227 } 2228 b := dAtA[iNdEx] 2229 iNdEx++ 2230 stringLen |= uint64(b&0x7F) << shift 2231 if b < 0x80 { 2232 break 2233 } 2234 } 2235 intStringLen := int(stringLen) 2236 if intStringLen < 0 { 2237 return ErrInvalidLengthDevice 2238 } 2239 postIndex := iNdEx + intStringLen 2240 if postIndex < 0 { 2241 return ErrInvalidLengthDevice 2242 } 2243 if postIndex > l { 2244 return io.ErrUnexpectedEOF 2245 } 2246 m.Id = string(dAtA[iNdEx:postIndex]) 2247 iNdEx = postIndex 2248 case 2: 2249 if wireType != 2 { 2250 return fmt.Errorf("proto: wrong wireType = %d for field PublicKeyDer", wireType) 2251 } 2252 var byteLen int 2253 for shift := uint(0); ; shift += 7 { 2254 if shift >= 64 { 2255 return ErrIntOverflowDevice 2256 } 2257 if iNdEx >= l { 2258 return io.ErrUnexpectedEOF 2259 } 2260 b := dAtA[iNdEx] 2261 iNdEx++ 2262 byteLen |= int(b&0x7F) << shift 2263 if b < 0x80 { 2264 break 2265 } 2266 } 2267 if byteLen < 0 { 2268 return ErrInvalidLengthDevice 2269 } 2270 postIndex := iNdEx + byteLen 2271 if postIndex < 0 { 2272 return ErrInvalidLengthDevice 2273 } 2274 if postIndex > l { 2275 return io.ErrUnexpectedEOF 2276 } 2277 m.PublicKeyDer = append(m.PublicKeyDer[:0], dAtA[iNdEx:postIndex]...) 2278 if m.PublicKeyDer == nil { 2279 m.PublicKeyDer = []byte{} 2280 } 2281 iNdEx = postIndex 2282 case 3: 2283 if wireType != 2 { 2284 return fmt.Errorf("proto: wrong wireType = %d for field DeviceAttestationType", wireType) 2285 } 2286 var stringLen uint64 2287 for shift := uint(0); ; shift += 7 { 2288 if shift >= 64 { 2289 return ErrIntOverflowDevice 2290 } 2291 if iNdEx >= l { 2292 return io.ErrUnexpectedEOF 2293 } 2294 b := dAtA[iNdEx] 2295 iNdEx++ 2296 stringLen |= uint64(b&0x7F) << shift 2297 if b < 0x80 { 2298 break 2299 } 2300 } 2301 intStringLen := int(stringLen) 2302 if intStringLen < 0 { 2303 return ErrInvalidLengthDevice 2304 } 2305 postIndex := iNdEx + intStringLen 2306 if postIndex < 0 { 2307 return ErrInvalidLengthDevice 2308 } 2309 if postIndex > l { 2310 return io.ErrUnexpectedEOF 2311 } 2312 m.DeviceAttestationType = string(dAtA[iNdEx:postIndex]) 2313 iNdEx = postIndex 2314 case 4: 2315 if wireType != 2 { 2316 return fmt.Errorf("proto: wrong wireType = %d for field TpmEkcertSerial", wireType) 2317 } 2318 var stringLen uint64 2319 for shift := uint(0); ; shift += 7 { 2320 if shift >= 64 { 2321 return ErrIntOverflowDevice 2322 } 2323 if iNdEx >= l { 2324 return io.ErrUnexpectedEOF 2325 } 2326 b := dAtA[iNdEx] 2327 iNdEx++ 2328 stringLen |= uint64(b&0x7F) << shift 2329 if b < 0x80 { 2330 break 2331 } 2332 } 2333 intStringLen := int(stringLen) 2334 if intStringLen < 0 { 2335 return ErrInvalidLengthDevice 2336 } 2337 postIndex := iNdEx + intStringLen 2338 if postIndex < 0 { 2339 return ErrInvalidLengthDevice 2340 } 2341 if postIndex > l { 2342 return io.ErrUnexpectedEOF 2343 } 2344 m.TpmEkcertSerial = string(dAtA[iNdEx:postIndex]) 2345 iNdEx = postIndex 2346 case 5: 2347 if wireType != 2 { 2348 return fmt.Errorf("proto: wrong wireType = %d for field TpmAkPublic", wireType) 2349 } 2350 var byteLen int 2351 for shift := uint(0); ; shift += 7 { 2352 if shift >= 64 { 2353 return ErrIntOverflowDevice 2354 } 2355 if iNdEx >= l { 2356 return io.ErrUnexpectedEOF 2357 } 2358 b := dAtA[iNdEx] 2359 iNdEx++ 2360 byteLen |= int(b&0x7F) << shift 2361 if b < 0x80 { 2362 break 2363 } 2364 } 2365 if byteLen < 0 { 2366 return ErrInvalidLengthDevice 2367 } 2368 postIndex := iNdEx + byteLen 2369 if postIndex < 0 { 2370 return ErrInvalidLengthDevice 2371 } 2372 if postIndex > l { 2373 return io.ErrUnexpectedEOF 2374 } 2375 m.TpmAkPublic = append(m.TpmAkPublic[:0], dAtA[iNdEx:postIndex]...) 2376 if m.TpmAkPublic == nil { 2377 m.TpmAkPublic = []byte{} 2378 } 2379 iNdEx = postIndex 2380 default: 2381 iNdEx = preIndex 2382 skippy, err := skipDevice(dAtA[iNdEx:]) 2383 if err != nil { 2384 return err 2385 } 2386 if (skippy < 0) || (iNdEx+skippy) < 0 { 2387 return ErrInvalidLengthDevice 2388 } 2389 if (iNdEx + skippy) > l { 2390 return io.ErrUnexpectedEOF 2391 } 2392 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2393 iNdEx += skippy 2394 } 2395 } 2396 2397 if iNdEx > l { 2398 return io.ErrUnexpectedEOF 2399 } 2400 return nil 2401 } 2402 func (m *DeviceCollectedData) Unmarshal(dAtA []byte) error { 2403 l := len(dAtA) 2404 iNdEx := 0 2405 for iNdEx < l { 2406 preIndex := iNdEx 2407 var wire uint64 2408 for shift := uint(0); ; shift += 7 { 2409 if shift >= 64 { 2410 return ErrIntOverflowDevice 2411 } 2412 if iNdEx >= l { 2413 return io.ErrUnexpectedEOF 2414 } 2415 b := dAtA[iNdEx] 2416 iNdEx++ 2417 wire |= uint64(b&0x7F) << shift 2418 if b < 0x80 { 2419 break 2420 } 2421 } 2422 fieldNum := int32(wire >> 3) 2423 wireType := int(wire & 0x7) 2424 if wireType == 4 { 2425 return fmt.Errorf("proto: DeviceCollectedData: wiretype end group for non-group") 2426 } 2427 if fieldNum <= 0 { 2428 return fmt.Errorf("proto: DeviceCollectedData: illegal tag %d (wire type %d)", fieldNum, wire) 2429 } 2430 switch fieldNum { 2431 case 1: 2432 if wireType != 2 { 2433 return fmt.Errorf("proto: wrong wireType = %d for field CollectTime", wireType) 2434 } 2435 var msglen int 2436 for shift := uint(0); ; shift += 7 { 2437 if shift >= 64 { 2438 return ErrIntOverflowDevice 2439 } 2440 if iNdEx >= l { 2441 return io.ErrUnexpectedEOF 2442 } 2443 b := dAtA[iNdEx] 2444 iNdEx++ 2445 msglen |= int(b&0x7F) << shift 2446 if b < 0x80 { 2447 break 2448 } 2449 } 2450 if msglen < 0 { 2451 return ErrInvalidLengthDevice 2452 } 2453 postIndex := iNdEx + msglen 2454 if postIndex < 0 { 2455 return ErrInvalidLengthDevice 2456 } 2457 if postIndex > l { 2458 return io.ErrUnexpectedEOF 2459 } 2460 if m.CollectTime == nil { 2461 m.CollectTime = new(time.Time) 2462 } 2463 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.CollectTime, dAtA[iNdEx:postIndex]); err != nil { 2464 return err 2465 } 2466 iNdEx = postIndex 2467 case 2: 2468 if wireType != 2 { 2469 return fmt.Errorf("proto: wrong wireType = %d for field RecordTime", wireType) 2470 } 2471 var msglen int 2472 for shift := uint(0); ; shift += 7 { 2473 if shift >= 64 { 2474 return ErrIntOverflowDevice 2475 } 2476 if iNdEx >= l { 2477 return io.ErrUnexpectedEOF 2478 } 2479 b := dAtA[iNdEx] 2480 iNdEx++ 2481 msglen |= int(b&0x7F) << shift 2482 if b < 0x80 { 2483 break 2484 } 2485 } 2486 if msglen < 0 { 2487 return ErrInvalidLengthDevice 2488 } 2489 postIndex := iNdEx + msglen 2490 if postIndex < 0 { 2491 return ErrInvalidLengthDevice 2492 } 2493 if postIndex > l { 2494 return io.ErrUnexpectedEOF 2495 } 2496 if m.RecordTime == nil { 2497 m.RecordTime = new(time.Time) 2498 } 2499 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.RecordTime, dAtA[iNdEx:postIndex]); err != nil { 2500 return err 2501 } 2502 iNdEx = postIndex 2503 case 3: 2504 if wireType != 2 { 2505 return fmt.Errorf("proto: wrong wireType = %d for field OsType", wireType) 2506 } 2507 var stringLen uint64 2508 for shift := uint(0); ; shift += 7 { 2509 if shift >= 64 { 2510 return ErrIntOverflowDevice 2511 } 2512 if iNdEx >= l { 2513 return io.ErrUnexpectedEOF 2514 } 2515 b := dAtA[iNdEx] 2516 iNdEx++ 2517 stringLen |= uint64(b&0x7F) << shift 2518 if b < 0x80 { 2519 break 2520 } 2521 } 2522 intStringLen := int(stringLen) 2523 if intStringLen < 0 { 2524 return ErrInvalidLengthDevice 2525 } 2526 postIndex := iNdEx + intStringLen 2527 if postIndex < 0 { 2528 return ErrInvalidLengthDevice 2529 } 2530 if postIndex > l { 2531 return io.ErrUnexpectedEOF 2532 } 2533 m.OsType = string(dAtA[iNdEx:postIndex]) 2534 iNdEx = postIndex 2535 case 4: 2536 if wireType != 2 { 2537 return fmt.Errorf("proto: wrong wireType = %d for field SerialNumber", wireType) 2538 } 2539 var stringLen uint64 2540 for shift := uint(0); ; shift += 7 { 2541 if shift >= 64 { 2542 return ErrIntOverflowDevice 2543 } 2544 if iNdEx >= l { 2545 return io.ErrUnexpectedEOF 2546 } 2547 b := dAtA[iNdEx] 2548 iNdEx++ 2549 stringLen |= uint64(b&0x7F) << shift 2550 if b < 0x80 { 2551 break 2552 } 2553 } 2554 intStringLen := int(stringLen) 2555 if intStringLen < 0 { 2556 return ErrInvalidLengthDevice 2557 } 2558 postIndex := iNdEx + intStringLen 2559 if postIndex < 0 { 2560 return ErrInvalidLengthDevice 2561 } 2562 if postIndex > l { 2563 return io.ErrUnexpectedEOF 2564 } 2565 m.SerialNumber = string(dAtA[iNdEx:postIndex]) 2566 iNdEx = postIndex 2567 case 5: 2568 if wireType != 2 { 2569 return fmt.Errorf("proto: wrong wireType = %d for field ModelIdentifier", wireType) 2570 } 2571 var stringLen uint64 2572 for shift := uint(0); ; shift += 7 { 2573 if shift >= 64 { 2574 return ErrIntOverflowDevice 2575 } 2576 if iNdEx >= l { 2577 return io.ErrUnexpectedEOF 2578 } 2579 b := dAtA[iNdEx] 2580 iNdEx++ 2581 stringLen |= uint64(b&0x7F) << shift 2582 if b < 0x80 { 2583 break 2584 } 2585 } 2586 intStringLen := int(stringLen) 2587 if intStringLen < 0 { 2588 return ErrInvalidLengthDevice 2589 } 2590 postIndex := iNdEx + intStringLen 2591 if postIndex < 0 { 2592 return ErrInvalidLengthDevice 2593 } 2594 if postIndex > l { 2595 return io.ErrUnexpectedEOF 2596 } 2597 m.ModelIdentifier = string(dAtA[iNdEx:postIndex]) 2598 iNdEx = postIndex 2599 case 6: 2600 if wireType != 2 { 2601 return fmt.Errorf("proto: wrong wireType = %d for field OsVersion", wireType) 2602 } 2603 var stringLen uint64 2604 for shift := uint(0); ; shift += 7 { 2605 if shift >= 64 { 2606 return ErrIntOverflowDevice 2607 } 2608 if iNdEx >= l { 2609 return io.ErrUnexpectedEOF 2610 } 2611 b := dAtA[iNdEx] 2612 iNdEx++ 2613 stringLen |= uint64(b&0x7F) << shift 2614 if b < 0x80 { 2615 break 2616 } 2617 } 2618 intStringLen := int(stringLen) 2619 if intStringLen < 0 { 2620 return ErrInvalidLengthDevice 2621 } 2622 postIndex := iNdEx + intStringLen 2623 if postIndex < 0 { 2624 return ErrInvalidLengthDevice 2625 } 2626 if postIndex > l { 2627 return io.ErrUnexpectedEOF 2628 } 2629 m.OsVersion = string(dAtA[iNdEx:postIndex]) 2630 iNdEx = postIndex 2631 case 7: 2632 if wireType != 2 { 2633 return fmt.Errorf("proto: wrong wireType = %d for field OsBuild", wireType) 2634 } 2635 var stringLen uint64 2636 for shift := uint(0); ; shift += 7 { 2637 if shift >= 64 { 2638 return ErrIntOverflowDevice 2639 } 2640 if iNdEx >= l { 2641 return io.ErrUnexpectedEOF 2642 } 2643 b := dAtA[iNdEx] 2644 iNdEx++ 2645 stringLen |= uint64(b&0x7F) << shift 2646 if b < 0x80 { 2647 break 2648 } 2649 } 2650 intStringLen := int(stringLen) 2651 if intStringLen < 0 { 2652 return ErrInvalidLengthDevice 2653 } 2654 postIndex := iNdEx + intStringLen 2655 if postIndex < 0 { 2656 return ErrInvalidLengthDevice 2657 } 2658 if postIndex > l { 2659 return io.ErrUnexpectedEOF 2660 } 2661 m.OsBuild = string(dAtA[iNdEx:postIndex]) 2662 iNdEx = postIndex 2663 case 8: 2664 if wireType != 2 { 2665 return fmt.Errorf("proto: wrong wireType = %d for field OsUsername", wireType) 2666 } 2667 var stringLen uint64 2668 for shift := uint(0); ; shift += 7 { 2669 if shift >= 64 { 2670 return ErrIntOverflowDevice 2671 } 2672 if iNdEx >= l { 2673 return io.ErrUnexpectedEOF 2674 } 2675 b := dAtA[iNdEx] 2676 iNdEx++ 2677 stringLen |= uint64(b&0x7F) << shift 2678 if b < 0x80 { 2679 break 2680 } 2681 } 2682 intStringLen := int(stringLen) 2683 if intStringLen < 0 { 2684 return ErrInvalidLengthDevice 2685 } 2686 postIndex := iNdEx + intStringLen 2687 if postIndex < 0 { 2688 return ErrInvalidLengthDevice 2689 } 2690 if postIndex > l { 2691 return io.ErrUnexpectedEOF 2692 } 2693 m.OsUsername = string(dAtA[iNdEx:postIndex]) 2694 iNdEx = postIndex 2695 case 9: 2696 if wireType != 2 { 2697 return fmt.Errorf("proto: wrong wireType = %d for field JamfBinaryVersion", wireType) 2698 } 2699 var stringLen uint64 2700 for shift := uint(0); ; shift += 7 { 2701 if shift >= 64 { 2702 return ErrIntOverflowDevice 2703 } 2704 if iNdEx >= l { 2705 return io.ErrUnexpectedEOF 2706 } 2707 b := dAtA[iNdEx] 2708 iNdEx++ 2709 stringLen |= uint64(b&0x7F) << shift 2710 if b < 0x80 { 2711 break 2712 } 2713 } 2714 intStringLen := int(stringLen) 2715 if intStringLen < 0 { 2716 return ErrInvalidLengthDevice 2717 } 2718 postIndex := iNdEx + intStringLen 2719 if postIndex < 0 { 2720 return ErrInvalidLengthDevice 2721 } 2722 if postIndex > l { 2723 return io.ErrUnexpectedEOF 2724 } 2725 m.JamfBinaryVersion = string(dAtA[iNdEx:postIndex]) 2726 iNdEx = postIndex 2727 case 10: 2728 if wireType != 2 { 2729 return fmt.Errorf("proto: wrong wireType = %d for field MacosEnrollmentProfiles", wireType) 2730 } 2731 var stringLen uint64 2732 for shift := uint(0); ; shift += 7 { 2733 if shift >= 64 { 2734 return ErrIntOverflowDevice 2735 } 2736 if iNdEx >= l { 2737 return io.ErrUnexpectedEOF 2738 } 2739 b := dAtA[iNdEx] 2740 iNdEx++ 2741 stringLen |= uint64(b&0x7F) << shift 2742 if b < 0x80 { 2743 break 2744 } 2745 } 2746 intStringLen := int(stringLen) 2747 if intStringLen < 0 { 2748 return ErrInvalidLengthDevice 2749 } 2750 postIndex := iNdEx + intStringLen 2751 if postIndex < 0 { 2752 return ErrInvalidLengthDevice 2753 } 2754 if postIndex > l { 2755 return io.ErrUnexpectedEOF 2756 } 2757 m.MacosEnrollmentProfiles = string(dAtA[iNdEx:postIndex]) 2758 iNdEx = postIndex 2759 case 11: 2760 if wireType != 2 { 2761 return fmt.Errorf("proto: wrong wireType = %d for field ReportedAssetTag", wireType) 2762 } 2763 var stringLen uint64 2764 for shift := uint(0); ; shift += 7 { 2765 if shift >= 64 { 2766 return ErrIntOverflowDevice 2767 } 2768 if iNdEx >= l { 2769 return io.ErrUnexpectedEOF 2770 } 2771 b := dAtA[iNdEx] 2772 iNdEx++ 2773 stringLen |= uint64(b&0x7F) << shift 2774 if b < 0x80 { 2775 break 2776 } 2777 } 2778 intStringLen := int(stringLen) 2779 if intStringLen < 0 { 2780 return ErrInvalidLengthDevice 2781 } 2782 postIndex := iNdEx + intStringLen 2783 if postIndex < 0 { 2784 return ErrInvalidLengthDevice 2785 } 2786 if postIndex > l { 2787 return io.ErrUnexpectedEOF 2788 } 2789 m.ReportedAssetTag = string(dAtA[iNdEx:postIndex]) 2790 iNdEx = postIndex 2791 case 12: 2792 if wireType != 2 { 2793 return fmt.Errorf("proto: wrong wireType = %d for field SystemSerialNumber", wireType) 2794 } 2795 var stringLen uint64 2796 for shift := uint(0); ; shift += 7 { 2797 if shift >= 64 { 2798 return ErrIntOverflowDevice 2799 } 2800 if iNdEx >= l { 2801 return io.ErrUnexpectedEOF 2802 } 2803 b := dAtA[iNdEx] 2804 iNdEx++ 2805 stringLen |= uint64(b&0x7F) << shift 2806 if b < 0x80 { 2807 break 2808 } 2809 } 2810 intStringLen := int(stringLen) 2811 if intStringLen < 0 { 2812 return ErrInvalidLengthDevice 2813 } 2814 postIndex := iNdEx + intStringLen 2815 if postIndex < 0 { 2816 return ErrInvalidLengthDevice 2817 } 2818 if postIndex > l { 2819 return io.ErrUnexpectedEOF 2820 } 2821 m.SystemSerialNumber = string(dAtA[iNdEx:postIndex]) 2822 iNdEx = postIndex 2823 case 13: 2824 if wireType != 2 { 2825 return fmt.Errorf("proto: wrong wireType = %d for field BaseBoardSerialNumber", wireType) 2826 } 2827 var stringLen uint64 2828 for shift := uint(0); ; shift += 7 { 2829 if shift >= 64 { 2830 return ErrIntOverflowDevice 2831 } 2832 if iNdEx >= l { 2833 return io.ErrUnexpectedEOF 2834 } 2835 b := dAtA[iNdEx] 2836 iNdEx++ 2837 stringLen |= uint64(b&0x7F) << shift 2838 if b < 0x80 { 2839 break 2840 } 2841 } 2842 intStringLen := int(stringLen) 2843 if intStringLen < 0 { 2844 return ErrInvalidLengthDevice 2845 } 2846 postIndex := iNdEx + intStringLen 2847 if postIndex < 0 { 2848 return ErrInvalidLengthDevice 2849 } 2850 if postIndex > l { 2851 return io.ErrUnexpectedEOF 2852 } 2853 m.BaseBoardSerialNumber = string(dAtA[iNdEx:postIndex]) 2854 iNdEx = postIndex 2855 case 14: 2856 if wireType != 2 { 2857 return fmt.Errorf("proto: wrong wireType = %d for field TpmPlatformAttestation", wireType) 2858 } 2859 var msglen int 2860 for shift := uint(0); ; shift += 7 { 2861 if shift >= 64 { 2862 return ErrIntOverflowDevice 2863 } 2864 if iNdEx >= l { 2865 return io.ErrUnexpectedEOF 2866 } 2867 b := dAtA[iNdEx] 2868 iNdEx++ 2869 msglen |= int(b&0x7F) << shift 2870 if b < 0x80 { 2871 break 2872 } 2873 } 2874 if msglen < 0 { 2875 return ErrInvalidLengthDevice 2876 } 2877 postIndex := iNdEx + msglen 2878 if postIndex < 0 { 2879 return ErrInvalidLengthDevice 2880 } 2881 if postIndex > l { 2882 return io.ErrUnexpectedEOF 2883 } 2884 if m.TpmPlatformAttestation == nil { 2885 m.TpmPlatformAttestation = &TPMPlatformAttestation{} 2886 } 2887 if err := m.TpmPlatformAttestation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2888 return err 2889 } 2890 iNdEx = postIndex 2891 case 15: 2892 if wireType != 2 { 2893 return fmt.Errorf("proto: wrong wireType = %d for field OsId", wireType) 2894 } 2895 var stringLen uint64 2896 for shift := uint(0); ; shift += 7 { 2897 if shift >= 64 { 2898 return ErrIntOverflowDevice 2899 } 2900 if iNdEx >= l { 2901 return io.ErrUnexpectedEOF 2902 } 2903 b := dAtA[iNdEx] 2904 iNdEx++ 2905 stringLen |= uint64(b&0x7F) << shift 2906 if b < 0x80 { 2907 break 2908 } 2909 } 2910 intStringLen := int(stringLen) 2911 if intStringLen < 0 { 2912 return ErrInvalidLengthDevice 2913 } 2914 postIndex := iNdEx + intStringLen 2915 if postIndex < 0 { 2916 return ErrInvalidLengthDevice 2917 } 2918 if postIndex > l { 2919 return io.ErrUnexpectedEOF 2920 } 2921 m.OsId = string(dAtA[iNdEx:postIndex]) 2922 iNdEx = postIndex 2923 default: 2924 iNdEx = preIndex 2925 skippy, err := skipDevice(dAtA[iNdEx:]) 2926 if err != nil { 2927 return err 2928 } 2929 if (skippy < 0) || (iNdEx+skippy) < 0 { 2930 return ErrInvalidLengthDevice 2931 } 2932 if (iNdEx + skippy) > l { 2933 return io.ErrUnexpectedEOF 2934 } 2935 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2936 iNdEx += skippy 2937 } 2938 } 2939 2940 if iNdEx > l { 2941 return io.ErrUnexpectedEOF 2942 } 2943 return nil 2944 } 2945 func (m *TPMPCR) Unmarshal(dAtA []byte) error { 2946 l := len(dAtA) 2947 iNdEx := 0 2948 for iNdEx < l { 2949 preIndex := iNdEx 2950 var wire uint64 2951 for shift := uint(0); ; shift += 7 { 2952 if shift >= 64 { 2953 return ErrIntOverflowDevice 2954 } 2955 if iNdEx >= l { 2956 return io.ErrUnexpectedEOF 2957 } 2958 b := dAtA[iNdEx] 2959 iNdEx++ 2960 wire |= uint64(b&0x7F) << shift 2961 if b < 0x80 { 2962 break 2963 } 2964 } 2965 fieldNum := int32(wire >> 3) 2966 wireType := int(wire & 0x7) 2967 if wireType == 4 { 2968 return fmt.Errorf("proto: TPMPCR: wiretype end group for non-group") 2969 } 2970 if fieldNum <= 0 { 2971 return fmt.Errorf("proto: TPMPCR: illegal tag %d (wire type %d)", fieldNum, wire) 2972 } 2973 switch fieldNum { 2974 case 1: 2975 if wireType != 0 { 2976 return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) 2977 } 2978 m.Index = 0 2979 for shift := uint(0); ; shift += 7 { 2980 if shift >= 64 { 2981 return ErrIntOverflowDevice 2982 } 2983 if iNdEx >= l { 2984 return io.ErrUnexpectedEOF 2985 } 2986 b := dAtA[iNdEx] 2987 iNdEx++ 2988 m.Index |= int32(b&0x7F) << shift 2989 if b < 0x80 { 2990 break 2991 } 2992 } 2993 case 2: 2994 if wireType != 2 { 2995 return fmt.Errorf("proto: wrong wireType = %d for field Digest", wireType) 2996 } 2997 var byteLen int 2998 for shift := uint(0); ; shift += 7 { 2999 if shift >= 64 { 3000 return ErrIntOverflowDevice 3001 } 3002 if iNdEx >= l { 3003 return io.ErrUnexpectedEOF 3004 } 3005 b := dAtA[iNdEx] 3006 iNdEx++ 3007 byteLen |= int(b&0x7F) << shift 3008 if b < 0x80 { 3009 break 3010 } 3011 } 3012 if byteLen < 0 { 3013 return ErrInvalidLengthDevice 3014 } 3015 postIndex := iNdEx + byteLen 3016 if postIndex < 0 { 3017 return ErrInvalidLengthDevice 3018 } 3019 if postIndex > l { 3020 return io.ErrUnexpectedEOF 3021 } 3022 m.Digest = append(m.Digest[:0], dAtA[iNdEx:postIndex]...) 3023 if m.Digest == nil { 3024 m.Digest = []byte{} 3025 } 3026 iNdEx = postIndex 3027 case 3: 3028 if wireType != 0 { 3029 return fmt.Errorf("proto: wrong wireType = %d for field DigestAlg", wireType) 3030 } 3031 m.DigestAlg = 0 3032 for shift := uint(0); ; shift += 7 { 3033 if shift >= 64 { 3034 return ErrIntOverflowDevice 3035 } 3036 if iNdEx >= l { 3037 return io.ErrUnexpectedEOF 3038 } 3039 b := dAtA[iNdEx] 3040 iNdEx++ 3041 m.DigestAlg |= uint64(b&0x7F) << shift 3042 if b < 0x80 { 3043 break 3044 } 3045 } 3046 default: 3047 iNdEx = preIndex 3048 skippy, err := skipDevice(dAtA[iNdEx:]) 3049 if err != nil { 3050 return err 3051 } 3052 if (skippy < 0) || (iNdEx+skippy) < 0 { 3053 return ErrInvalidLengthDevice 3054 } 3055 if (iNdEx + skippy) > l { 3056 return io.ErrUnexpectedEOF 3057 } 3058 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3059 iNdEx += skippy 3060 } 3061 } 3062 3063 if iNdEx > l { 3064 return io.ErrUnexpectedEOF 3065 } 3066 return nil 3067 } 3068 func (m *TPMQuote) Unmarshal(dAtA []byte) error { 3069 l := len(dAtA) 3070 iNdEx := 0 3071 for iNdEx < l { 3072 preIndex := iNdEx 3073 var wire uint64 3074 for shift := uint(0); ; shift += 7 { 3075 if shift >= 64 { 3076 return ErrIntOverflowDevice 3077 } 3078 if iNdEx >= l { 3079 return io.ErrUnexpectedEOF 3080 } 3081 b := dAtA[iNdEx] 3082 iNdEx++ 3083 wire |= uint64(b&0x7F) << shift 3084 if b < 0x80 { 3085 break 3086 } 3087 } 3088 fieldNum := int32(wire >> 3) 3089 wireType := int(wire & 0x7) 3090 if wireType == 4 { 3091 return fmt.Errorf("proto: TPMQuote: wiretype end group for non-group") 3092 } 3093 if fieldNum <= 0 { 3094 return fmt.Errorf("proto: TPMQuote: illegal tag %d (wire type %d)", fieldNum, wire) 3095 } 3096 switch fieldNum { 3097 case 1: 3098 if wireType != 2 { 3099 return fmt.Errorf("proto: wrong wireType = %d for field Quote", wireType) 3100 } 3101 var byteLen int 3102 for shift := uint(0); ; shift += 7 { 3103 if shift >= 64 { 3104 return ErrIntOverflowDevice 3105 } 3106 if iNdEx >= l { 3107 return io.ErrUnexpectedEOF 3108 } 3109 b := dAtA[iNdEx] 3110 iNdEx++ 3111 byteLen |= int(b&0x7F) << shift 3112 if b < 0x80 { 3113 break 3114 } 3115 } 3116 if byteLen < 0 { 3117 return ErrInvalidLengthDevice 3118 } 3119 postIndex := iNdEx + byteLen 3120 if postIndex < 0 { 3121 return ErrInvalidLengthDevice 3122 } 3123 if postIndex > l { 3124 return io.ErrUnexpectedEOF 3125 } 3126 m.Quote = append(m.Quote[:0], dAtA[iNdEx:postIndex]...) 3127 if m.Quote == nil { 3128 m.Quote = []byte{} 3129 } 3130 iNdEx = postIndex 3131 case 2: 3132 if wireType != 2 { 3133 return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) 3134 } 3135 var byteLen int 3136 for shift := uint(0); ; shift += 7 { 3137 if shift >= 64 { 3138 return ErrIntOverflowDevice 3139 } 3140 if iNdEx >= l { 3141 return io.ErrUnexpectedEOF 3142 } 3143 b := dAtA[iNdEx] 3144 iNdEx++ 3145 byteLen |= int(b&0x7F) << shift 3146 if b < 0x80 { 3147 break 3148 } 3149 } 3150 if byteLen < 0 { 3151 return ErrInvalidLengthDevice 3152 } 3153 postIndex := iNdEx + byteLen 3154 if postIndex < 0 { 3155 return ErrInvalidLengthDevice 3156 } 3157 if postIndex > l { 3158 return io.ErrUnexpectedEOF 3159 } 3160 m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) 3161 if m.Signature == nil { 3162 m.Signature = []byte{} 3163 } 3164 iNdEx = postIndex 3165 default: 3166 iNdEx = preIndex 3167 skippy, err := skipDevice(dAtA[iNdEx:]) 3168 if err != nil { 3169 return err 3170 } 3171 if (skippy < 0) || (iNdEx+skippy) < 0 { 3172 return ErrInvalidLengthDevice 3173 } 3174 if (iNdEx + skippy) > l { 3175 return io.ErrUnexpectedEOF 3176 } 3177 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3178 iNdEx += skippy 3179 } 3180 } 3181 3182 if iNdEx > l { 3183 return io.ErrUnexpectedEOF 3184 } 3185 return nil 3186 } 3187 func (m *TPMPlatformParameters) Unmarshal(dAtA []byte) error { 3188 l := len(dAtA) 3189 iNdEx := 0 3190 for iNdEx < l { 3191 preIndex := iNdEx 3192 var wire uint64 3193 for shift := uint(0); ; shift += 7 { 3194 if shift >= 64 { 3195 return ErrIntOverflowDevice 3196 } 3197 if iNdEx >= l { 3198 return io.ErrUnexpectedEOF 3199 } 3200 b := dAtA[iNdEx] 3201 iNdEx++ 3202 wire |= uint64(b&0x7F) << shift 3203 if b < 0x80 { 3204 break 3205 } 3206 } 3207 fieldNum := int32(wire >> 3) 3208 wireType := int(wire & 0x7) 3209 if wireType == 4 { 3210 return fmt.Errorf("proto: TPMPlatformParameters: wiretype end group for non-group") 3211 } 3212 if fieldNum <= 0 { 3213 return fmt.Errorf("proto: TPMPlatformParameters: illegal tag %d (wire type %d)", fieldNum, wire) 3214 } 3215 switch fieldNum { 3216 case 1: 3217 if wireType != 2 { 3218 return fmt.Errorf("proto: wrong wireType = %d for field Quotes", wireType) 3219 } 3220 var msglen int 3221 for shift := uint(0); ; shift += 7 { 3222 if shift >= 64 { 3223 return ErrIntOverflowDevice 3224 } 3225 if iNdEx >= l { 3226 return io.ErrUnexpectedEOF 3227 } 3228 b := dAtA[iNdEx] 3229 iNdEx++ 3230 msglen |= int(b&0x7F) << shift 3231 if b < 0x80 { 3232 break 3233 } 3234 } 3235 if msglen < 0 { 3236 return ErrInvalidLengthDevice 3237 } 3238 postIndex := iNdEx + msglen 3239 if postIndex < 0 { 3240 return ErrInvalidLengthDevice 3241 } 3242 if postIndex > l { 3243 return io.ErrUnexpectedEOF 3244 } 3245 m.Quotes = append(m.Quotes, &TPMQuote{}) 3246 if err := m.Quotes[len(m.Quotes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3247 return err 3248 } 3249 iNdEx = postIndex 3250 case 2: 3251 if wireType != 2 { 3252 return fmt.Errorf("proto: wrong wireType = %d for field Pcrs", wireType) 3253 } 3254 var msglen int 3255 for shift := uint(0); ; shift += 7 { 3256 if shift >= 64 { 3257 return ErrIntOverflowDevice 3258 } 3259 if iNdEx >= l { 3260 return io.ErrUnexpectedEOF 3261 } 3262 b := dAtA[iNdEx] 3263 iNdEx++ 3264 msglen |= int(b&0x7F) << shift 3265 if b < 0x80 { 3266 break 3267 } 3268 } 3269 if msglen < 0 { 3270 return ErrInvalidLengthDevice 3271 } 3272 postIndex := iNdEx + msglen 3273 if postIndex < 0 { 3274 return ErrInvalidLengthDevice 3275 } 3276 if postIndex > l { 3277 return io.ErrUnexpectedEOF 3278 } 3279 m.Pcrs = append(m.Pcrs, &TPMPCR{}) 3280 if err := m.Pcrs[len(m.Pcrs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3281 return err 3282 } 3283 iNdEx = postIndex 3284 case 3: 3285 if wireType != 2 { 3286 return fmt.Errorf("proto: wrong wireType = %d for field EventLog", wireType) 3287 } 3288 var byteLen int 3289 for shift := uint(0); ; shift += 7 { 3290 if shift >= 64 { 3291 return ErrIntOverflowDevice 3292 } 3293 if iNdEx >= l { 3294 return io.ErrUnexpectedEOF 3295 } 3296 b := dAtA[iNdEx] 3297 iNdEx++ 3298 byteLen |= int(b&0x7F) << shift 3299 if b < 0x80 { 3300 break 3301 } 3302 } 3303 if byteLen < 0 { 3304 return ErrInvalidLengthDevice 3305 } 3306 postIndex := iNdEx + byteLen 3307 if postIndex < 0 { 3308 return ErrInvalidLengthDevice 3309 } 3310 if postIndex > l { 3311 return io.ErrUnexpectedEOF 3312 } 3313 m.EventLog = append(m.EventLog[:0], dAtA[iNdEx:postIndex]...) 3314 if m.EventLog == nil { 3315 m.EventLog = []byte{} 3316 } 3317 iNdEx = postIndex 3318 default: 3319 iNdEx = preIndex 3320 skippy, err := skipDevice(dAtA[iNdEx:]) 3321 if err != nil { 3322 return err 3323 } 3324 if (skippy < 0) || (iNdEx+skippy) < 0 { 3325 return ErrInvalidLengthDevice 3326 } 3327 if (iNdEx + skippy) > l { 3328 return io.ErrUnexpectedEOF 3329 } 3330 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3331 iNdEx += skippy 3332 } 3333 } 3334 3335 if iNdEx > l { 3336 return io.ErrUnexpectedEOF 3337 } 3338 return nil 3339 } 3340 func (m *TPMPlatformAttestation) Unmarshal(dAtA []byte) error { 3341 l := len(dAtA) 3342 iNdEx := 0 3343 for iNdEx < l { 3344 preIndex := iNdEx 3345 var wire uint64 3346 for shift := uint(0); ; shift += 7 { 3347 if shift >= 64 { 3348 return ErrIntOverflowDevice 3349 } 3350 if iNdEx >= l { 3351 return io.ErrUnexpectedEOF 3352 } 3353 b := dAtA[iNdEx] 3354 iNdEx++ 3355 wire |= uint64(b&0x7F) << shift 3356 if b < 0x80 { 3357 break 3358 } 3359 } 3360 fieldNum := int32(wire >> 3) 3361 wireType := int(wire & 0x7) 3362 if wireType == 4 { 3363 return fmt.Errorf("proto: TPMPlatformAttestation: wiretype end group for non-group") 3364 } 3365 if fieldNum <= 0 { 3366 return fmt.Errorf("proto: TPMPlatformAttestation: illegal tag %d (wire type %d)", fieldNum, wire) 3367 } 3368 switch fieldNum { 3369 case 1: 3370 if wireType != 2 { 3371 return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) 3372 } 3373 var byteLen int 3374 for shift := uint(0); ; shift += 7 { 3375 if shift >= 64 { 3376 return ErrIntOverflowDevice 3377 } 3378 if iNdEx >= l { 3379 return io.ErrUnexpectedEOF 3380 } 3381 b := dAtA[iNdEx] 3382 iNdEx++ 3383 byteLen |= int(b&0x7F) << shift 3384 if b < 0x80 { 3385 break 3386 } 3387 } 3388 if byteLen < 0 { 3389 return ErrInvalidLengthDevice 3390 } 3391 postIndex := iNdEx + byteLen 3392 if postIndex < 0 { 3393 return ErrInvalidLengthDevice 3394 } 3395 if postIndex > l { 3396 return io.ErrUnexpectedEOF 3397 } 3398 m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) 3399 if m.Nonce == nil { 3400 m.Nonce = []byte{} 3401 } 3402 iNdEx = postIndex 3403 case 2: 3404 if wireType != 2 { 3405 return fmt.Errorf("proto: wrong wireType = %d for field PlatformParameters", wireType) 3406 } 3407 var msglen int 3408 for shift := uint(0); ; shift += 7 { 3409 if shift >= 64 { 3410 return ErrIntOverflowDevice 3411 } 3412 if iNdEx >= l { 3413 return io.ErrUnexpectedEOF 3414 } 3415 b := dAtA[iNdEx] 3416 iNdEx++ 3417 msglen |= int(b&0x7F) << shift 3418 if b < 0x80 { 3419 break 3420 } 3421 } 3422 if msglen < 0 { 3423 return ErrInvalidLengthDevice 3424 } 3425 postIndex := iNdEx + msglen 3426 if postIndex < 0 { 3427 return ErrInvalidLengthDevice 3428 } 3429 if postIndex > l { 3430 return io.ErrUnexpectedEOF 3431 } 3432 if m.PlatformParameters == nil { 3433 m.PlatformParameters = &TPMPlatformParameters{} 3434 } 3435 if err := m.PlatformParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3436 return err 3437 } 3438 iNdEx = postIndex 3439 default: 3440 iNdEx = preIndex 3441 skippy, err := skipDevice(dAtA[iNdEx:]) 3442 if err != nil { 3443 return err 3444 } 3445 if (skippy < 0) || (iNdEx+skippy) < 0 { 3446 return ErrInvalidLengthDevice 3447 } 3448 if (iNdEx + skippy) > l { 3449 return io.ErrUnexpectedEOF 3450 } 3451 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3452 iNdEx += skippy 3453 } 3454 } 3455 3456 if iNdEx > l { 3457 return io.ErrUnexpectedEOF 3458 } 3459 return nil 3460 } 3461 func (m *DeviceSource) Unmarshal(dAtA []byte) error { 3462 l := len(dAtA) 3463 iNdEx := 0 3464 for iNdEx < l { 3465 preIndex := iNdEx 3466 var wire uint64 3467 for shift := uint(0); ; shift += 7 { 3468 if shift >= 64 { 3469 return ErrIntOverflowDevice 3470 } 3471 if iNdEx >= l { 3472 return io.ErrUnexpectedEOF 3473 } 3474 b := dAtA[iNdEx] 3475 iNdEx++ 3476 wire |= uint64(b&0x7F) << shift 3477 if b < 0x80 { 3478 break 3479 } 3480 } 3481 fieldNum := int32(wire >> 3) 3482 wireType := int(wire & 0x7) 3483 if wireType == 4 { 3484 return fmt.Errorf("proto: DeviceSource: wiretype end group for non-group") 3485 } 3486 if fieldNum <= 0 { 3487 return fmt.Errorf("proto: DeviceSource: illegal tag %d (wire type %d)", fieldNum, wire) 3488 } 3489 switch fieldNum { 3490 case 1: 3491 if wireType != 2 { 3492 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 3493 } 3494 var stringLen uint64 3495 for shift := uint(0); ; shift += 7 { 3496 if shift >= 64 { 3497 return ErrIntOverflowDevice 3498 } 3499 if iNdEx >= l { 3500 return io.ErrUnexpectedEOF 3501 } 3502 b := dAtA[iNdEx] 3503 iNdEx++ 3504 stringLen |= uint64(b&0x7F) << shift 3505 if b < 0x80 { 3506 break 3507 } 3508 } 3509 intStringLen := int(stringLen) 3510 if intStringLen < 0 { 3511 return ErrInvalidLengthDevice 3512 } 3513 postIndex := iNdEx + intStringLen 3514 if postIndex < 0 { 3515 return ErrInvalidLengthDevice 3516 } 3517 if postIndex > l { 3518 return io.ErrUnexpectedEOF 3519 } 3520 m.Name = string(dAtA[iNdEx:postIndex]) 3521 iNdEx = postIndex 3522 case 2: 3523 if wireType != 2 { 3524 return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) 3525 } 3526 var stringLen uint64 3527 for shift := uint(0); ; shift += 7 { 3528 if shift >= 64 { 3529 return ErrIntOverflowDevice 3530 } 3531 if iNdEx >= l { 3532 return io.ErrUnexpectedEOF 3533 } 3534 b := dAtA[iNdEx] 3535 iNdEx++ 3536 stringLen |= uint64(b&0x7F) << shift 3537 if b < 0x80 { 3538 break 3539 } 3540 } 3541 intStringLen := int(stringLen) 3542 if intStringLen < 0 { 3543 return ErrInvalidLengthDevice 3544 } 3545 postIndex := iNdEx + intStringLen 3546 if postIndex < 0 { 3547 return ErrInvalidLengthDevice 3548 } 3549 if postIndex > l { 3550 return io.ErrUnexpectedEOF 3551 } 3552 m.Origin = string(dAtA[iNdEx:postIndex]) 3553 iNdEx = postIndex 3554 default: 3555 iNdEx = preIndex 3556 skippy, err := skipDevice(dAtA[iNdEx:]) 3557 if err != nil { 3558 return err 3559 } 3560 if (skippy < 0) || (iNdEx+skippy) < 0 { 3561 return ErrInvalidLengthDevice 3562 } 3563 if (iNdEx + skippy) > l { 3564 return io.ErrUnexpectedEOF 3565 } 3566 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3567 iNdEx += skippy 3568 } 3569 } 3570 3571 if iNdEx > l { 3572 return io.ErrUnexpectedEOF 3573 } 3574 return nil 3575 } 3576 func (m *DeviceProfile) Unmarshal(dAtA []byte) error { 3577 l := len(dAtA) 3578 iNdEx := 0 3579 for iNdEx < l { 3580 preIndex := iNdEx 3581 var wire uint64 3582 for shift := uint(0); ; shift += 7 { 3583 if shift >= 64 { 3584 return ErrIntOverflowDevice 3585 } 3586 if iNdEx >= l { 3587 return io.ErrUnexpectedEOF 3588 } 3589 b := dAtA[iNdEx] 3590 iNdEx++ 3591 wire |= uint64(b&0x7F) << shift 3592 if b < 0x80 { 3593 break 3594 } 3595 } 3596 fieldNum := int32(wire >> 3) 3597 wireType := int(wire & 0x7) 3598 if wireType == 4 { 3599 return fmt.Errorf("proto: DeviceProfile: wiretype end group for non-group") 3600 } 3601 if fieldNum <= 0 { 3602 return fmt.Errorf("proto: DeviceProfile: illegal tag %d (wire type %d)", fieldNum, wire) 3603 } 3604 switch fieldNum { 3605 case 1: 3606 if wireType != 2 { 3607 return fmt.Errorf("proto: wrong wireType = %d for field UpdateTime", wireType) 3608 } 3609 var msglen int 3610 for shift := uint(0); ; shift += 7 { 3611 if shift >= 64 { 3612 return ErrIntOverflowDevice 3613 } 3614 if iNdEx >= l { 3615 return io.ErrUnexpectedEOF 3616 } 3617 b := dAtA[iNdEx] 3618 iNdEx++ 3619 msglen |= int(b&0x7F) << shift 3620 if b < 0x80 { 3621 break 3622 } 3623 } 3624 if msglen < 0 { 3625 return ErrInvalidLengthDevice 3626 } 3627 postIndex := iNdEx + msglen 3628 if postIndex < 0 { 3629 return ErrInvalidLengthDevice 3630 } 3631 if postIndex > l { 3632 return io.ErrUnexpectedEOF 3633 } 3634 if m.UpdateTime == nil { 3635 m.UpdateTime = new(time.Time) 3636 } 3637 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.UpdateTime, dAtA[iNdEx:postIndex]); err != nil { 3638 return err 3639 } 3640 iNdEx = postIndex 3641 case 2: 3642 if wireType != 2 { 3643 return fmt.Errorf("proto: wrong wireType = %d for field ModelIdentifier", wireType) 3644 } 3645 var stringLen uint64 3646 for shift := uint(0); ; shift += 7 { 3647 if shift >= 64 { 3648 return ErrIntOverflowDevice 3649 } 3650 if iNdEx >= l { 3651 return io.ErrUnexpectedEOF 3652 } 3653 b := dAtA[iNdEx] 3654 iNdEx++ 3655 stringLen |= uint64(b&0x7F) << shift 3656 if b < 0x80 { 3657 break 3658 } 3659 } 3660 intStringLen := int(stringLen) 3661 if intStringLen < 0 { 3662 return ErrInvalidLengthDevice 3663 } 3664 postIndex := iNdEx + intStringLen 3665 if postIndex < 0 { 3666 return ErrInvalidLengthDevice 3667 } 3668 if postIndex > l { 3669 return io.ErrUnexpectedEOF 3670 } 3671 m.ModelIdentifier = string(dAtA[iNdEx:postIndex]) 3672 iNdEx = postIndex 3673 case 3: 3674 if wireType != 2 { 3675 return fmt.Errorf("proto: wrong wireType = %d for field OsVersion", wireType) 3676 } 3677 var stringLen uint64 3678 for shift := uint(0); ; shift += 7 { 3679 if shift >= 64 { 3680 return ErrIntOverflowDevice 3681 } 3682 if iNdEx >= l { 3683 return io.ErrUnexpectedEOF 3684 } 3685 b := dAtA[iNdEx] 3686 iNdEx++ 3687 stringLen |= uint64(b&0x7F) << shift 3688 if b < 0x80 { 3689 break 3690 } 3691 } 3692 intStringLen := int(stringLen) 3693 if intStringLen < 0 { 3694 return ErrInvalidLengthDevice 3695 } 3696 postIndex := iNdEx + intStringLen 3697 if postIndex < 0 { 3698 return ErrInvalidLengthDevice 3699 } 3700 if postIndex > l { 3701 return io.ErrUnexpectedEOF 3702 } 3703 m.OsVersion = string(dAtA[iNdEx:postIndex]) 3704 iNdEx = postIndex 3705 case 4: 3706 if wireType != 2 { 3707 return fmt.Errorf("proto: wrong wireType = %d for field OsBuild", wireType) 3708 } 3709 var stringLen uint64 3710 for shift := uint(0); ; shift += 7 { 3711 if shift >= 64 { 3712 return ErrIntOverflowDevice 3713 } 3714 if iNdEx >= l { 3715 return io.ErrUnexpectedEOF 3716 } 3717 b := dAtA[iNdEx] 3718 iNdEx++ 3719 stringLen |= uint64(b&0x7F) << shift 3720 if b < 0x80 { 3721 break 3722 } 3723 } 3724 intStringLen := int(stringLen) 3725 if intStringLen < 0 { 3726 return ErrInvalidLengthDevice 3727 } 3728 postIndex := iNdEx + intStringLen 3729 if postIndex < 0 { 3730 return ErrInvalidLengthDevice 3731 } 3732 if postIndex > l { 3733 return io.ErrUnexpectedEOF 3734 } 3735 m.OsBuild = string(dAtA[iNdEx:postIndex]) 3736 iNdEx = postIndex 3737 case 5: 3738 if wireType != 2 { 3739 return fmt.Errorf("proto: wrong wireType = %d for field OsUsernames", wireType) 3740 } 3741 var stringLen uint64 3742 for shift := uint(0); ; shift += 7 { 3743 if shift >= 64 { 3744 return ErrIntOverflowDevice 3745 } 3746 if iNdEx >= l { 3747 return io.ErrUnexpectedEOF 3748 } 3749 b := dAtA[iNdEx] 3750 iNdEx++ 3751 stringLen |= uint64(b&0x7F) << shift 3752 if b < 0x80 { 3753 break 3754 } 3755 } 3756 intStringLen := int(stringLen) 3757 if intStringLen < 0 { 3758 return ErrInvalidLengthDevice 3759 } 3760 postIndex := iNdEx + intStringLen 3761 if postIndex < 0 { 3762 return ErrInvalidLengthDevice 3763 } 3764 if postIndex > l { 3765 return io.ErrUnexpectedEOF 3766 } 3767 m.OsUsernames = append(m.OsUsernames, string(dAtA[iNdEx:postIndex])) 3768 iNdEx = postIndex 3769 case 6: 3770 if wireType != 2 { 3771 return fmt.Errorf("proto: wrong wireType = %d for field JamfBinaryVersion", wireType) 3772 } 3773 var stringLen uint64 3774 for shift := uint(0); ; shift += 7 { 3775 if shift >= 64 { 3776 return ErrIntOverflowDevice 3777 } 3778 if iNdEx >= l { 3779 return io.ErrUnexpectedEOF 3780 } 3781 b := dAtA[iNdEx] 3782 iNdEx++ 3783 stringLen |= uint64(b&0x7F) << shift 3784 if b < 0x80 { 3785 break 3786 } 3787 } 3788 intStringLen := int(stringLen) 3789 if intStringLen < 0 { 3790 return ErrInvalidLengthDevice 3791 } 3792 postIndex := iNdEx + intStringLen 3793 if postIndex < 0 { 3794 return ErrInvalidLengthDevice 3795 } 3796 if postIndex > l { 3797 return io.ErrUnexpectedEOF 3798 } 3799 m.JamfBinaryVersion = string(dAtA[iNdEx:postIndex]) 3800 iNdEx = postIndex 3801 case 7: 3802 if wireType != 2 { 3803 return fmt.Errorf("proto: wrong wireType = %d for field ExternalId", wireType) 3804 } 3805 var stringLen uint64 3806 for shift := uint(0); ; shift += 7 { 3807 if shift >= 64 { 3808 return ErrIntOverflowDevice 3809 } 3810 if iNdEx >= l { 3811 return io.ErrUnexpectedEOF 3812 } 3813 b := dAtA[iNdEx] 3814 iNdEx++ 3815 stringLen |= uint64(b&0x7F) << shift 3816 if b < 0x80 { 3817 break 3818 } 3819 } 3820 intStringLen := int(stringLen) 3821 if intStringLen < 0 { 3822 return ErrInvalidLengthDevice 3823 } 3824 postIndex := iNdEx + intStringLen 3825 if postIndex < 0 { 3826 return ErrInvalidLengthDevice 3827 } 3828 if postIndex > l { 3829 return io.ErrUnexpectedEOF 3830 } 3831 m.ExternalId = string(dAtA[iNdEx:postIndex]) 3832 iNdEx = postIndex 3833 case 8: 3834 if wireType != 2 { 3835 return fmt.Errorf("proto: wrong wireType = %d for field OsBuildSupplemental", wireType) 3836 } 3837 var stringLen uint64 3838 for shift := uint(0); ; shift += 7 { 3839 if shift >= 64 { 3840 return ErrIntOverflowDevice 3841 } 3842 if iNdEx >= l { 3843 return io.ErrUnexpectedEOF 3844 } 3845 b := dAtA[iNdEx] 3846 iNdEx++ 3847 stringLen |= uint64(b&0x7F) << shift 3848 if b < 0x80 { 3849 break 3850 } 3851 } 3852 intStringLen := int(stringLen) 3853 if intStringLen < 0 { 3854 return ErrInvalidLengthDevice 3855 } 3856 postIndex := iNdEx + intStringLen 3857 if postIndex < 0 { 3858 return ErrInvalidLengthDevice 3859 } 3860 if postIndex > l { 3861 return io.ErrUnexpectedEOF 3862 } 3863 m.OsBuildSupplemental = string(dAtA[iNdEx:postIndex]) 3864 iNdEx = postIndex 3865 case 9: 3866 if wireType != 2 { 3867 return fmt.Errorf("proto: wrong wireType = %d for field OsId", wireType) 3868 } 3869 var stringLen uint64 3870 for shift := uint(0); ; shift += 7 { 3871 if shift >= 64 { 3872 return ErrIntOverflowDevice 3873 } 3874 if iNdEx >= l { 3875 return io.ErrUnexpectedEOF 3876 } 3877 b := dAtA[iNdEx] 3878 iNdEx++ 3879 stringLen |= uint64(b&0x7F) << shift 3880 if b < 0x80 { 3881 break 3882 } 3883 } 3884 intStringLen := int(stringLen) 3885 if intStringLen < 0 { 3886 return ErrInvalidLengthDevice 3887 } 3888 postIndex := iNdEx + intStringLen 3889 if postIndex < 0 { 3890 return ErrInvalidLengthDevice 3891 } 3892 if postIndex > l { 3893 return io.ErrUnexpectedEOF 3894 } 3895 m.OsId = string(dAtA[iNdEx:postIndex]) 3896 iNdEx = postIndex 3897 default: 3898 iNdEx = preIndex 3899 skippy, err := skipDevice(dAtA[iNdEx:]) 3900 if err != nil { 3901 return err 3902 } 3903 if (skippy < 0) || (iNdEx+skippy) < 0 { 3904 return ErrInvalidLengthDevice 3905 } 3906 if (iNdEx + skippy) > l { 3907 return io.ErrUnexpectedEOF 3908 } 3909 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3910 iNdEx += skippy 3911 } 3912 } 3913 3914 if iNdEx > l { 3915 return io.ErrUnexpectedEOF 3916 } 3917 return nil 3918 } 3919 func skipDevice(dAtA []byte) (n int, err error) { 3920 l := len(dAtA) 3921 iNdEx := 0 3922 depth := 0 3923 for iNdEx < l { 3924 var wire uint64 3925 for shift := uint(0); ; shift += 7 { 3926 if shift >= 64 { 3927 return 0, ErrIntOverflowDevice 3928 } 3929 if iNdEx >= l { 3930 return 0, io.ErrUnexpectedEOF 3931 } 3932 b := dAtA[iNdEx] 3933 iNdEx++ 3934 wire |= (uint64(b) & 0x7F) << shift 3935 if b < 0x80 { 3936 break 3937 } 3938 } 3939 wireType := int(wire & 0x7) 3940 switch wireType { 3941 case 0: 3942 for shift := uint(0); ; shift += 7 { 3943 if shift >= 64 { 3944 return 0, ErrIntOverflowDevice 3945 } 3946 if iNdEx >= l { 3947 return 0, io.ErrUnexpectedEOF 3948 } 3949 iNdEx++ 3950 if dAtA[iNdEx-1] < 0x80 { 3951 break 3952 } 3953 } 3954 case 1: 3955 iNdEx += 8 3956 case 2: 3957 var length int 3958 for shift := uint(0); ; shift += 7 { 3959 if shift >= 64 { 3960 return 0, ErrIntOverflowDevice 3961 } 3962 if iNdEx >= l { 3963 return 0, io.ErrUnexpectedEOF 3964 } 3965 b := dAtA[iNdEx] 3966 iNdEx++ 3967 length |= (int(b) & 0x7F) << shift 3968 if b < 0x80 { 3969 break 3970 } 3971 } 3972 if length < 0 { 3973 return 0, ErrInvalidLengthDevice 3974 } 3975 iNdEx += length 3976 case 3: 3977 depth++ 3978 case 4: 3979 if depth == 0 { 3980 return 0, ErrUnexpectedEndOfGroupDevice 3981 } 3982 depth-- 3983 case 5: 3984 iNdEx += 4 3985 default: 3986 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 3987 } 3988 if iNdEx < 0 { 3989 return 0, ErrInvalidLengthDevice 3990 } 3991 if depth == 0 { 3992 return iNdEx, nil 3993 } 3994 } 3995 return 0, io.ErrUnexpectedEOF 3996 } 3997 3998 var ( 3999 ErrInvalidLengthDevice = fmt.Errorf("proto: negative length found during unmarshaling") 4000 ErrIntOverflowDevice = fmt.Errorf("proto: integer overflow") 4001 ErrUnexpectedEndOfGroupDevice = fmt.Errorf("proto: unexpected end of group") 4002 )