diff --git a/Gopkg.lock b/Gopkg.lock index d7a0ff72..bd8ac64f 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -207,6 +207,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "a0e142be45fe66d78df2a6361a72d52f1b5bce2f5c1f1fcb2489abca55a0daa5" + inputs-digest = "3d247c7533ff5f494f214cccd89d30e7eb426b30218ac166eac3ae75220a21d2" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index 832a3b4a..580e61a6 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -22,3 +22,7 @@ [[constraint]] name = "github.com/micromdm/mdm" branch = "master" + +[[constraint]] + name = "github.com/groob/plist" + branch = "master" diff --git a/mdm/mdm/command.go b/mdm/mdm/command.go new file mode 100644 index 00000000..c7ba5286 --- /dev/null +++ b/mdm/mdm/command.go @@ -0,0 +1,270 @@ +package mdm + +import ( + uuid "github.com/satori/go.uuid" +) + +type CommandRequest struct { + UDID string `json:"udid"` + *Command +} + +type CommandPayload struct { + CommandUUID string `json:"command_uuid"` + Command *Command `json:"command"` +} + +func NewCommandPayload(request *CommandRequest) (*CommandPayload, error) { + payload := &CommandPayload{ + CommandUUID: uuid.NewV4().String(), + Command: request.Command, + } + return payload, nil +} + +type Command struct { + RequestType string `json:"request_type"` + InstallProfile *InstallProfile + RemoveProfile *RemoveProfile + InstallProvisioningProfile *InstallProvisioningProfile + RemoveProvisioningProfile *RemoveProvisioningProfile + InstalledApplicationList *InstalledApplicationList + DeviceInformation *DeviceInformation + DeviceLock *DeviceLock + ClearPasscode *ClearPasscode + EraseDevice *EraseDevice + RequestMirroring *RequestMirroring + Restrictions *Restrictions + UnlockUserAccount *UnlockUserAccount + DeleteUser *DeleteUser + EnableLostMode *EnableLostMode + InstallApplication *InstallApplication + AccountConfiguration *AccountConfiguration + ApplyRedemptionCode *ApplyRedemptionCode + ManagedApplicationList *ManagedApplicationList + RemoveApplication *RemoveApplication + InviteToProgram *InviteToProgram + ValidateApplications *ValidateApplications + InstallMedia *InstallMedia + RemoveMedia *RemoveMedia + Settings *Settings + ManagedApplicationConfiguration *ManagedApplicationConfiguration + ManagedApplicationAttributes *ManagedApplicationAttributes + ManagedApplicationFeedback *ManagedApplicationFeedback + SetFirmwarePassword *SetFirmwarePassword + VerifyFirmwarePassword *VerifyFirmwarePassword + SetAutoAdminPassword *SetAutoAdminPassword + ScheduleOSUpdate *ScheduleOSUpdate + ScheduleOSUpdateScan *ScheduleOSUpdateScan + ActiveNSExtensions *ActiveNSExtensions + RotateFileVaultKey *RotateFileVaultKey +} + +// InstallProfile is an InstallProfile MDM Command +type InstallProfile struct { + Payload []byte `json:"payload,omitempty"` +} + +type RemoveProfile struct { + Identifier string `json:"identifier,omitempty"` +} + +type InstallProvisioningProfile struct { + ProvisioningProfile []byte `plist:",omitempty" json:"provisioning_profile,omitempty"` +} + +type RemoveProvisioningProfile struct { + UUID string `json:"uuid"` +} + +type InstalledApplicationList struct { + Identifiers []string `plist:",omitempty" json:"identifiers,omitempty"` + ManagedAppsOnly bool `plist:",omitempty" json:"managed_appd_only,omitempty"` +} + +type DeviceInformation struct { + Queries []string `plist:",omitempty" json:"queries,omitempty"` +} + +type DeviceLock struct { + PIN string `plist:",omitempty" json:"pin"` + Message string `plist:",omitempty" json:"message,omitempty"` + PhoneNumber string `plist:",omitempty" json:"phone_number,omitempty"` +} + +type ClearPasscode struct { + UnlockToken []byte `json:"unlock_token"` +} + +type EraseDevice struct { + PIN string `json:"pin"` + PreserveDataPlan bool `plist:",omitempty" json:"preserve_data_plan,omitempty"` + DisallowProximitySetup bool `plist:",omitempty" json:"disallow_proximity_setup,omitempty"` +} + +type RequestMirroring struct { + DestinationName string `plist:",omitempty" json:"destination_name,omitempty"` + DestinationDeviceID string `plist:",omitempty" json:"destination_device_id,omitempty"` + ScanTime string `plist:",omitempty" json:"scan_time,omitempty"` + Password string `plist:",omitempty" json:"password,omitempty"` +} + +type Restrictions struct { + ProfileRestrictions bool `json:"profile_restrictions"` +} + +type UnlockUserAccount struct { + UserName string `json:"username"` +} + +type DeleteUser struct { + UserName string `plist:",omitempty" json:"username,omitempty"` + ForceDeletion bool `plist:",omitempty" json:"force_deletion,omitempty"` +} + +type EnableLostMode struct { + Message string `plist:",omitempty" json:"message,omitempty"` + PhoneNumber string `plist:",omitempty" json:"phone_number,omitempty"` + Footnote string `plist:",omitempty" json:"footnote,omitempty"` +} + +type InstallApplication struct { + ITunesStoreID *int64 `plist:"iTunesStoreID,omitempty" json:"itunes_store_id,omitempty"` + Identifier *string `plist:",omitempty" json:"identifier,omitempty"` + ManagementFlags *int `plist:",omitempty" json:"management_flags,omitempty"` + ChangeManagementState *string `plist:",omitempty" json:"change_management_state,omitempty"` + ManifestURL *string `plist:",omitempty" json:"manifest_url,omitempty"` + Options *InstallApplicationOptions `plist:",omitempty" json:"options,omitempty"` + Configuration *InstallApplicationConfiguration `plist:",omitempty" json:"configuration,omitempty"` + Attributes *InstallApplicationAttributes `plist:",omitempty" json:"attributes,omitempty"` +} + +type InstallApplicationOptions struct { + PurchaseMethod int64 `plist:",omitempty" json:"purchase_method,omitempty"` +} + +type InstallApplicationConfiguration struct{} +type InstallApplicationAttributes struct{} + +type AccountConfiguration struct { + SkipPrimarySetupAccountCreation bool `plist:",omitempty" json:"skip_primary_setup_account_creation,omitempty"` + SetPrimarySetupAccountAsRegularUser bool `plist:",omitempty" json:"skip_primary_setup_account_as_regular_user,omitempty"` + AutoSetupAdminAccounts []AdminAccount `plist:",omitempty" json:"auto_setup_admin_accounts,omitempty"` +} + +type AdminAccount struct { + ShortName string `plist:"shortName" json:"short_name"` + FullName string `plist:"fullName,omitempty" json:"full_name,omitempty"` + PasswordHash []byte `plist:"passwordHash" json:"password_hash"` + Hidden bool `plist:"hidden,omitempty" json:"hidden,omitempty"` +} + +type ApplyRedemptionCode struct { + Identifier string `plist:",omitempty" json:"identifier,omitempty"` + RedemptionCode string `plist:",omitempty" json:"redemption_code,omitempty"` +} + +type ManagedApplicationList struct { + Identifiers []string `plist:",omitempty" json:"identifiers,omitempty"` +} + +type RemoveApplication struct { + Identifier string `plist:",omitempty" json:"identifier,omitempty"` +} + +type InviteToProgram struct { + ProgramID string `plist:",omitempty" json"program_id,omitempty"` + InvitationURL string `plist:",omitempty" json:"invitation_url,omitempty"` +} + +type ValidateApplications struct { + Identifiers []string `plist:",omitempty" json:"identifiers,omitempty"` +} + +type InstallMedia struct { + ITunesStoreID *int64 `plist:"iTunesStoreID,omitempty" json:"itunes_store_id,omitempty"` + MediaURL string `plist:",omitempty" json:"media_url,omitempty"` + MediaType string `plist:",omitempty" json:"media_type,omitempty"` +} + +type RemoveMedia struct { + ITunesStoreID *int64 `plist:"iTunesStoreID,omitempty" json:"itunes_store_id,omitempty"` + MediaType string `plist:",omitempty" json:"media_type,omitempty"` + PersistentID string `plist:",omitempty" json:"persistent_id,omitempty"` +} + +type Settings struct { + Settings []Setting `plist:",omitempty" json:"settings,omitempty"` +} + +type Setting struct { + Item string `json:"item"` + Enabled *bool `plist:",omitempty" json:"enabled,omitempty"` + DeviceName *string `plist:",omitempty" json:"device_name,omitempty"` + HostName *string `plist:",omitempty" json:"hostname,omitempty"` + Identifier *string `plist:",omitempty" json:"identifier"` + Attributes map[string]string `plist:",omitempty" json:"attributes,omitempty"` + Image []byte `plist:",omitempty" json:"image,omitempty"` + Where *int `plist:",omitempty" json:"where,omitempty"` + MDMOptions map[string]interface{} `plist:",omitempty" json:"mdm_options,omitempty"` + PasscodeLockGracePeriod *int `plist:",omitempty" json:"passcode_lock_grace_period,omitempty"` + MaximumResidentUsers *int `plist:",omitempty" json:"maximum_resident_users,omitempty"` +} + +type ManagedApplicationConfiguration struct { + Identifiers []string `plist:",omitempty" json:"identifiers,omitempty"` +} + +type ManagedApplicationAttributes struct { + Identifiers []string `plist:",omitempty" json:"identifiers,omitempty"` +} + +type ManagedApplicationFeedback struct { + Identifiers []string `plist:",omitempty" json:"identifiers,omitempty"` + DeleteFeedback bool `plist:",omitempty" json:"delete_feedback,omitempty"` +} + +type SetFirmwarePassword struct { + CurrentPassword string `plist:",omitempty" json:"current_password,omitempty"` + NewPassword string `plist:",omitempty" json:"new_password,omitempty"` + AllowOroms bool `plist:",omitempty" json:"allow_oroms,omitempty"` +} + +type VerifyFirmwarePassword struct { + Password string `plist:",omitempty" json:"password,omitempty"` +} + +type SetAutoAdminPassword struct { + GUID string `plist:",omitempty" json:"guid,omitempty"` + PasswordHash []byte `plist:"passwordHash" json:"password_hash"` +} + +type OSUpdate struct { + ProductKey string `json:"product_key"` + InstallAction string `json:"install_action"` +} + +type ScheduleOSUpdate struct { + Updates []OSUpdate `plist:",omitempty" json:"updates,omitempty"` +} + +type ScheduleOSUpdateScan struct { + Force bool `plist:",omitempty" json:"force,omitempty"` +} + +type ActiveNSExtensions struct { + FilterExtensionPoints []string `plist:",omitempty json:"filter_extensions_points,omitempty"` +} + +type RotateFileVaultKey struct { + KeyType string `plist:",omitempty" json:"key_type,omitempty"` + FileVaultUnlock FileVaultUnlock `plist:",omitempty" json:"filevault_unlock,omitempty"` + NewCertificate []byte `plist:",omitempty" json:"new_certificate,omitempty"` + ReplyEncryptionCertificate []byte `plist:",omitempty" json:"reply_encryption_certificate,omitempty"` +} + +type FileVaultUnlock struct { + Password string `plist:",omitempty" json:"password,omitempty"` + PrivateKeyExport []byte `plist:",omitempty" json:"private_key_export,omitempty"` + PrivateKeyExportPassword string `plist:",omitempty" json:"private_key_export_password,omitempty"` +} diff --git a/mdm/mdm/internal/mdmproto/mdm.go b/mdm/mdm/internal/mdmproto/mdm.go new file mode 100644 index 00000000..8018c0be --- /dev/null +++ b/mdm/mdm/internal/mdmproto/mdm.go @@ -0,0 +1,3 @@ +package mdmproto + +//go:generate protoc mdm.proto -I. --gofast_out=:. diff --git a/mdm/mdm/internal/mdmproto/mdm.pb.go b/mdm/mdm/internal/mdmproto/mdm.pb.go new file mode 100644 index 00000000..771eb730 --- /dev/null +++ b/mdm/mdm/internal/mdmproto/mdm.pb.go @@ -0,0 +1,14177 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: mdm.proto + +/* + Package mdmproto is a generated protocol buffer package. + + It is generated from these files: + mdm.proto + + It has these top-level messages: + CommandPayload + Command + InstallProfile + RemoveProfile + InstallProvisioningProfile + RemoveProvisioningProfile + InstalledApplicationList + DeviceInformation + ClearPasscode + DeviceLock + EraseDevice + RequestMirroring + Restrictions + UnlockUserAccount + DeleteUser + EnableLostMode + InstallApplication + InstallApplicationOptions + InstallApplicationConfiguration + InstallApplicationAttributes + ApplyRedemptionCode + ManagedApplicationList + RemoveApplication + InviteToProgram + ValidateApplications + AccountConfiguration + AutoSetupAdminAccounts + InstallMedia + RemoveMedia + Settings + Setting + VoiceRoamingSetting + PersonalHotspotSetting + WallpaperSetting + DataRoamingSetting + BluetoothSetting + ApplicationAttributesSetting + ApplicationAttributes + DeviceNameSetting + HostnameSetting + MDMOptionsSetting + MDMOptions + PasscodeLockGracePeriodSetting + MaximumResidentUsersSetting + DiagnosticSubmissionSetting + AppAnalyticsSetting + ManagedApplicationConfiguration + ManagedApplicationAttributes + ManagedApplicationFeedback + SetFirmwarePassword + VerifyFirmwarePassword + SetAutoAdminPassword + ScheduleOSUpdate + Update + ScheduleOSUpdateScan + ActiveNSExtensions + RotateFileVaultKey + FileVaultUnlock + ResultPayload + ErrorChain +*/ +package mdmproto + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + +type ResultPayload_Status int32 + +const ( + ResultPayload_Acknowledged ResultPayload_Status = 0 + ResultPayload_Error ResultPayload_Status = 1 + ResultPayload_CommandFormatError ResultPayload_Status = 2 + ResultPayload_Idle ResultPayload_Status = 3 + ResultPayload_NotNow ResultPayload_Status = 4 +) + +var ResultPayload_Status_name = map[int32]string{ + 0: "Acknowledged", + 1: "Error", + 2: "CommandFormatError", + 3: "Idle", + 4: "NotNow", +} +var ResultPayload_Status_value = map[string]int32{ + "Acknowledged": 0, + "Error": 1, + "CommandFormatError": 2, + "Idle": 3, + "NotNow": 4, +} + +func (x ResultPayload_Status) String() string { + return proto.EnumName(ResultPayload_Status_name, int32(x)) +} +func (ResultPayload_Status) EnumDescriptor() ([]byte, []int) { return fileDescriptorMdm, []int{58, 0} } + +type CommandPayload struct { + CommandUuid string `protobuf:"bytes,1,opt,name=command_uuid,json=commandUuid,proto3" json:"command_uuid,omitempty"` + Command *Command `protobuf:"bytes,2,opt,name=command" json:"command,omitempty"` +} + +func (m *CommandPayload) Reset() { *m = CommandPayload{} } +func (m *CommandPayload) String() string { return proto.CompactTextString(m) } +func (*CommandPayload) ProtoMessage() {} +func (*CommandPayload) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{0} } + +func (m *CommandPayload) GetCommandUuid() string { + if m != nil { + return m.CommandUuid + } + return "" +} + +func (m *CommandPayload) GetCommand() *Command { + if m != nil { + return m.Command + } + return nil +} + +type Command struct { + RequestType string `protobuf:"bytes,1,opt,name=request_type,json=requestType,proto3" json:"request_type,omitempty"` + // + // Request Types that do not have additional fields: + // - ProfileList + // - ProvisioningProfileList + // - CertificateList", + // - SecurityInfo + // - RestartDevice + // - ShutDownDevice + // - StopMirroring + // - ClearRestrictionsPassword + // - UserList + // - LogOutUser + // - PlayLostModeSound + // - DisableLostMode + // - DeviceLocation + // - ManagedMediaList + // - DeviceConfigured + // - AvailableOSUpdates + // - NSExtensionMappings + // + // Types that are valid to be assigned to Request: + // *Command_InstallProfile + // *Command_RemoveProfile + // *Command_InstallProvisioningProfile + // *Command_RemoveProfisioningProfile + // *Command_InstalledApplicationList + // *Command_DeviceInformation + // *Command_DeviceLock + // *Command_ClearPasscode + // *Command_EraseDevice + // *Command_RequestMirroring + // *Command_Restrictions + // *Command_UnlockUserAccount + // *Command_DeleteUser + // *Command_EnableLostMode + // *Command_InstallApplication + // *Command_AccountConfiguration + // *Command_ApplyRedemptionCode + // *Command_ManagedApplicationList + // *Command_RemoveApplication + // *Command_InviteToProgram + // *Command_ValidataApplications + // *Command_InstallMedia + // *Command_RemoveMedia + // *Command_Settings + // *Command_ManagedApplicationConfiguration + // *Command_ManagedApplicationAttributes + // *Command_ManagedApplicationFeedback + // *Command_SetFirmwarePassword + // *Command_VerifyFirmwarePassword + // *Command_SetAutoAdminPassword + // *Command_ScheduleOsUpdate + // *Command_ScheduleOsUpdateScan + // *Command_ActiveNsExtensions + // *Command_RotateFilevaultKey + Request isCommand_Request `protobuf_oneof:"request"` +} + +func (m *Command) Reset() { *m = Command{} } +func (m *Command) String() string { return proto.CompactTextString(m) } +func (*Command) ProtoMessage() {} +func (*Command) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{1} } + +type isCommand_Request interface { + isCommand_Request() + MarshalTo([]byte) (int, error) + Size() int +} + +type Command_InstallProfile struct { + InstallProfile *InstallProfile `protobuf:"bytes,2,opt,name=install_profile,json=installProfile,oneof"` +} +type Command_RemoveProfile struct { + RemoveProfile *RemoveProfile `protobuf:"bytes,3,opt,name=remove_profile,json=removeProfile,oneof"` +} +type Command_InstallProvisioningProfile struct { + InstallProvisioningProfile *InstallProvisioningProfile `protobuf:"bytes,4,opt,name=install_provisioning_profile,json=installProvisioningProfile,oneof"` +} +type Command_RemoveProfisioningProfile struct { + RemoveProfisioningProfile *RemoveProvisioningProfile `protobuf:"bytes,5,opt,name=remove_profisioning_profile,json=removeProfisioningProfile,oneof"` +} +type Command_InstalledApplicationList struct { + InstalledApplicationList *InstalledApplicationList `protobuf:"bytes,6,opt,name=installed_application_list,json=installedApplicationList,oneof"` +} +type Command_DeviceInformation struct { + DeviceInformation *DeviceInformation `protobuf:"bytes,7,opt,name=device_information,json=deviceInformation,oneof"` +} +type Command_DeviceLock struct { + DeviceLock *DeviceLock `protobuf:"bytes,8,opt,name=device_lock,json=deviceLock,oneof"` +} +type Command_ClearPasscode struct { + ClearPasscode *ClearPasscode `protobuf:"bytes,9,opt,name=clear_passcode,json=clearPasscode,oneof"` +} +type Command_EraseDevice struct { + EraseDevice *EraseDevice `protobuf:"bytes,10,opt,name=erase_device,json=eraseDevice,oneof"` +} +type Command_RequestMirroring struct { + RequestMirroring *RequestMirroring `protobuf:"bytes,11,opt,name=request_mirroring,json=requestMirroring,oneof"` +} +type Command_Restrictions struct { + Restrictions *Restrictions `protobuf:"bytes,12,opt,name=restrictions,oneof"` +} +type Command_UnlockUserAccount struct { + UnlockUserAccount *UnlockUserAccount `protobuf:"bytes,13,opt,name=unlock_user_account,json=unlockUserAccount,oneof"` +} +type Command_DeleteUser struct { + DeleteUser *DeleteUser `protobuf:"bytes,14,opt,name=delete_user,json=deleteUser,oneof"` +} +type Command_EnableLostMode struct { + EnableLostMode *EnableLostMode `protobuf:"bytes,15,opt,name=enable_lost_mode,json=enableLostMode,oneof"` +} +type Command_InstallApplication struct { + InstallApplication *InstallApplication `protobuf:"bytes,16,opt,name=install_application,json=installApplication,oneof"` +} +type Command_AccountConfiguration struct { + AccountConfiguration *AccountConfiguration `protobuf:"bytes,17,opt,name=account_configuration,json=accountConfiguration,oneof"` +} +type Command_ApplyRedemptionCode struct { + ApplyRedemptionCode *ApplyRedemptionCode `protobuf:"bytes,18,opt,name=apply_redemption_code,json=applyRedemptionCode,oneof"` +} +type Command_ManagedApplicationList struct { + ManagedApplicationList *ManagedApplicationList `protobuf:"bytes,19,opt,name=managed_application_list,json=managedApplicationList,oneof"` +} +type Command_RemoveApplication struct { + RemoveApplication *RemoveApplication `protobuf:"bytes,20,opt,name=remove_application,json=removeApplication,oneof"` +} +type Command_InviteToProgram struct { + InviteToProgram *InviteToProgram `protobuf:"bytes,21,opt,name=invite_to_program,json=inviteToProgram,oneof"` +} +type Command_ValidataApplications struct { + ValidataApplications *ValidateApplications `protobuf:"bytes,22,opt,name=validata_applications,json=validataApplications,oneof"` +} +type Command_InstallMedia struct { + InstallMedia *InstallMedia `protobuf:"bytes,23,opt,name=install_media,json=installMedia,oneof"` +} +type Command_RemoveMedia struct { + RemoveMedia *RemoveMedia `protobuf:"bytes,24,opt,name=remove_media,json=removeMedia,oneof"` +} +type Command_Settings struct { + Settings *Settings `protobuf:"bytes,25,opt,name=settings,oneof"` +} +type Command_ManagedApplicationConfiguration struct { + ManagedApplicationConfiguration *ManagedApplicationConfiguration `protobuf:"bytes,26,opt,name=managed_application_configuration,json=managedApplicationConfiguration,oneof"` +} +type Command_ManagedApplicationAttributes struct { + ManagedApplicationAttributes *ManagedApplicationAttributes `protobuf:"bytes,27,opt,name=managed_application_attributes,json=managedApplicationAttributes,oneof"` +} +type Command_ManagedApplicationFeedback struct { + ManagedApplicationFeedback *ManagedApplicationFeedback `protobuf:"bytes,28,opt,name=managed_application_feedback,json=managedApplicationFeedback,oneof"` +} +type Command_SetFirmwarePassword struct { + SetFirmwarePassword *SetFirmwarePassword `protobuf:"bytes,29,opt,name=set_firmware_password,json=setFirmwarePassword,oneof"` +} +type Command_VerifyFirmwarePassword struct { + VerifyFirmwarePassword *VerifyFirmwarePassword `protobuf:"bytes,30,opt,name=verify_firmware_password,json=verifyFirmwarePassword,oneof"` +} +type Command_SetAutoAdminPassword struct { + SetAutoAdminPassword *SetAutoAdminPassword `protobuf:"bytes,31,opt,name=set_auto_admin_password,json=setAutoAdminPassword,oneof"` +} +type Command_ScheduleOsUpdate struct { + ScheduleOsUpdate *ScheduleOSUpdate `protobuf:"bytes,32,opt,name=schedule_os_update,json=scheduleOsUpdate,oneof"` +} +type Command_ScheduleOsUpdateScan struct { + ScheduleOsUpdateScan *ScheduleOSUpdateScan `protobuf:"bytes,33,opt,name=schedule_os_update_scan,json=scheduleOsUpdateScan,oneof"` +} +type Command_ActiveNsExtensions struct { + ActiveNsExtensions *ActiveNSExtensions `protobuf:"bytes,34,opt,name=active_ns_extensions,json=activeNsExtensions,oneof"` +} +type Command_RotateFilevaultKey struct { + RotateFilevaultKey *RotateFileVaultKey `protobuf:"bytes,35,opt,name=rotate_filevault_key,json=rotateFilevaultKey,oneof"` +} + +func (*Command_InstallProfile) isCommand_Request() {} +func (*Command_RemoveProfile) isCommand_Request() {} +func (*Command_InstallProvisioningProfile) isCommand_Request() {} +func (*Command_RemoveProfisioningProfile) isCommand_Request() {} +func (*Command_InstalledApplicationList) isCommand_Request() {} +func (*Command_DeviceInformation) isCommand_Request() {} +func (*Command_DeviceLock) isCommand_Request() {} +func (*Command_ClearPasscode) isCommand_Request() {} +func (*Command_EraseDevice) isCommand_Request() {} +func (*Command_RequestMirroring) isCommand_Request() {} +func (*Command_Restrictions) isCommand_Request() {} +func (*Command_UnlockUserAccount) isCommand_Request() {} +func (*Command_DeleteUser) isCommand_Request() {} +func (*Command_EnableLostMode) isCommand_Request() {} +func (*Command_InstallApplication) isCommand_Request() {} +func (*Command_AccountConfiguration) isCommand_Request() {} +func (*Command_ApplyRedemptionCode) isCommand_Request() {} +func (*Command_ManagedApplicationList) isCommand_Request() {} +func (*Command_RemoveApplication) isCommand_Request() {} +func (*Command_InviteToProgram) isCommand_Request() {} +func (*Command_ValidataApplications) isCommand_Request() {} +func (*Command_InstallMedia) isCommand_Request() {} +func (*Command_RemoveMedia) isCommand_Request() {} +func (*Command_Settings) isCommand_Request() {} +func (*Command_ManagedApplicationConfiguration) isCommand_Request() {} +func (*Command_ManagedApplicationAttributes) isCommand_Request() {} +func (*Command_ManagedApplicationFeedback) isCommand_Request() {} +func (*Command_SetFirmwarePassword) isCommand_Request() {} +func (*Command_VerifyFirmwarePassword) isCommand_Request() {} +func (*Command_SetAutoAdminPassword) isCommand_Request() {} +func (*Command_ScheduleOsUpdate) isCommand_Request() {} +func (*Command_ScheduleOsUpdateScan) isCommand_Request() {} +func (*Command_ActiveNsExtensions) isCommand_Request() {} +func (*Command_RotateFilevaultKey) isCommand_Request() {} + +func (m *Command) GetRequest() isCommand_Request { + if m != nil { + return m.Request + } + return nil +} + +func (m *Command) GetRequestType() string { + if m != nil { + return m.RequestType + } + return "" +} + +func (m *Command) GetInstallProfile() *InstallProfile { + if x, ok := m.GetRequest().(*Command_InstallProfile); ok { + return x.InstallProfile + } + return nil +} + +func (m *Command) GetRemoveProfile() *RemoveProfile { + if x, ok := m.GetRequest().(*Command_RemoveProfile); ok { + return x.RemoveProfile + } + return nil +} + +func (m *Command) GetInstallProvisioningProfile() *InstallProvisioningProfile { + if x, ok := m.GetRequest().(*Command_InstallProvisioningProfile); ok { + return x.InstallProvisioningProfile + } + return nil +} + +func (m *Command) GetRemoveProfisioningProfile() *RemoveProvisioningProfile { + if x, ok := m.GetRequest().(*Command_RemoveProfisioningProfile); ok { + return x.RemoveProfisioningProfile + } + return nil +} + +func (m *Command) GetInstalledApplicationList() *InstalledApplicationList { + if x, ok := m.GetRequest().(*Command_InstalledApplicationList); ok { + return x.InstalledApplicationList + } + return nil +} + +func (m *Command) GetDeviceInformation() *DeviceInformation { + if x, ok := m.GetRequest().(*Command_DeviceInformation); ok { + return x.DeviceInformation + } + return nil +} + +func (m *Command) GetDeviceLock() *DeviceLock { + if x, ok := m.GetRequest().(*Command_DeviceLock); ok { + return x.DeviceLock + } + return nil +} + +func (m *Command) GetClearPasscode() *ClearPasscode { + if x, ok := m.GetRequest().(*Command_ClearPasscode); ok { + return x.ClearPasscode + } + return nil +} + +func (m *Command) GetEraseDevice() *EraseDevice { + if x, ok := m.GetRequest().(*Command_EraseDevice); ok { + return x.EraseDevice + } + return nil +} + +func (m *Command) GetRequestMirroring() *RequestMirroring { + if x, ok := m.GetRequest().(*Command_RequestMirroring); ok { + return x.RequestMirroring + } + return nil +} + +func (m *Command) GetRestrictions() *Restrictions { + if x, ok := m.GetRequest().(*Command_Restrictions); ok { + return x.Restrictions + } + return nil +} + +func (m *Command) GetUnlockUserAccount() *UnlockUserAccount { + if x, ok := m.GetRequest().(*Command_UnlockUserAccount); ok { + return x.UnlockUserAccount + } + return nil +} + +func (m *Command) GetDeleteUser() *DeleteUser { + if x, ok := m.GetRequest().(*Command_DeleteUser); ok { + return x.DeleteUser + } + return nil +} + +func (m *Command) GetEnableLostMode() *EnableLostMode { + if x, ok := m.GetRequest().(*Command_EnableLostMode); ok { + return x.EnableLostMode + } + return nil +} + +func (m *Command) GetInstallApplication() *InstallApplication { + if x, ok := m.GetRequest().(*Command_InstallApplication); ok { + return x.InstallApplication + } + return nil +} + +func (m *Command) GetAccountConfiguration() *AccountConfiguration { + if x, ok := m.GetRequest().(*Command_AccountConfiguration); ok { + return x.AccountConfiguration + } + return nil +} + +func (m *Command) GetApplyRedemptionCode() *ApplyRedemptionCode { + if x, ok := m.GetRequest().(*Command_ApplyRedemptionCode); ok { + return x.ApplyRedemptionCode + } + return nil +} + +func (m *Command) GetManagedApplicationList() *ManagedApplicationList { + if x, ok := m.GetRequest().(*Command_ManagedApplicationList); ok { + return x.ManagedApplicationList + } + return nil +} + +func (m *Command) GetRemoveApplication() *RemoveApplication { + if x, ok := m.GetRequest().(*Command_RemoveApplication); ok { + return x.RemoveApplication + } + return nil +} + +func (m *Command) GetInviteToProgram() *InviteToProgram { + if x, ok := m.GetRequest().(*Command_InviteToProgram); ok { + return x.InviteToProgram + } + return nil +} + +func (m *Command) GetValidataApplications() *ValidateApplications { + if x, ok := m.GetRequest().(*Command_ValidataApplications); ok { + return x.ValidataApplications + } + return nil +} + +func (m *Command) GetInstallMedia() *InstallMedia { + if x, ok := m.GetRequest().(*Command_InstallMedia); ok { + return x.InstallMedia + } + return nil +} + +func (m *Command) GetRemoveMedia() *RemoveMedia { + if x, ok := m.GetRequest().(*Command_RemoveMedia); ok { + return x.RemoveMedia + } + return nil +} + +func (m *Command) GetSettings() *Settings { + if x, ok := m.GetRequest().(*Command_Settings); ok { + return x.Settings + } + return nil +} + +func (m *Command) GetManagedApplicationConfiguration() *ManagedApplicationConfiguration { + if x, ok := m.GetRequest().(*Command_ManagedApplicationConfiguration); ok { + return x.ManagedApplicationConfiguration + } + return nil +} + +func (m *Command) GetManagedApplicationAttributes() *ManagedApplicationAttributes { + if x, ok := m.GetRequest().(*Command_ManagedApplicationAttributes); ok { + return x.ManagedApplicationAttributes + } + return nil +} + +func (m *Command) GetManagedApplicationFeedback() *ManagedApplicationFeedback { + if x, ok := m.GetRequest().(*Command_ManagedApplicationFeedback); ok { + return x.ManagedApplicationFeedback + } + return nil +} + +func (m *Command) GetSetFirmwarePassword() *SetFirmwarePassword { + if x, ok := m.GetRequest().(*Command_SetFirmwarePassword); ok { + return x.SetFirmwarePassword + } + return nil +} + +func (m *Command) GetVerifyFirmwarePassword() *VerifyFirmwarePassword { + if x, ok := m.GetRequest().(*Command_VerifyFirmwarePassword); ok { + return x.VerifyFirmwarePassword + } + return nil +} + +func (m *Command) GetSetAutoAdminPassword() *SetAutoAdminPassword { + if x, ok := m.GetRequest().(*Command_SetAutoAdminPassword); ok { + return x.SetAutoAdminPassword + } + return nil +} + +func (m *Command) GetScheduleOsUpdate() *ScheduleOSUpdate { + if x, ok := m.GetRequest().(*Command_ScheduleOsUpdate); ok { + return x.ScheduleOsUpdate + } + return nil +} + +func (m *Command) GetScheduleOsUpdateScan() *ScheduleOSUpdateScan { + if x, ok := m.GetRequest().(*Command_ScheduleOsUpdateScan); ok { + return x.ScheduleOsUpdateScan + } + return nil +} + +func (m *Command) GetActiveNsExtensions() *ActiveNSExtensions { + if x, ok := m.GetRequest().(*Command_ActiveNsExtensions); ok { + return x.ActiveNsExtensions + } + return nil +} + +func (m *Command) GetRotateFilevaultKey() *RotateFileVaultKey { + if x, ok := m.GetRequest().(*Command_RotateFilevaultKey); ok { + return x.RotateFilevaultKey + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Command) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _Command_OneofMarshaler, _Command_OneofUnmarshaler, _Command_OneofSizer, []interface{}{ + (*Command_InstallProfile)(nil), + (*Command_RemoveProfile)(nil), + (*Command_InstallProvisioningProfile)(nil), + (*Command_RemoveProfisioningProfile)(nil), + (*Command_InstalledApplicationList)(nil), + (*Command_DeviceInformation)(nil), + (*Command_DeviceLock)(nil), + (*Command_ClearPasscode)(nil), + (*Command_EraseDevice)(nil), + (*Command_RequestMirroring)(nil), + (*Command_Restrictions)(nil), + (*Command_UnlockUserAccount)(nil), + (*Command_DeleteUser)(nil), + (*Command_EnableLostMode)(nil), + (*Command_InstallApplication)(nil), + (*Command_AccountConfiguration)(nil), + (*Command_ApplyRedemptionCode)(nil), + (*Command_ManagedApplicationList)(nil), + (*Command_RemoveApplication)(nil), + (*Command_InviteToProgram)(nil), + (*Command_ValidataApplications)(nil), + (*Command_InstallMedia)(nil), + (*Command_RemoveMedia)(nil), + (*Command_Settings)(nil), + (*Command_ManagedApplicationConfiguration)(nil), + (*Command_ManagedApplicationAttributes)(nil), + (*Command_ManagedApplicationFeedback)(nil), + (*Command_SetFirmwarePassword)(nil), + (*Command_VerifyFirmwarePassword)(nil), + (*Command_SetAutoAdminPassword)(nil), + (*Command_ScheduleOsUpdate)(nil), + (*Command_ScheduleOsUpdateScan)(nil), + (*Command_ActiveNsExtensions)(nil), + (*Command_RotateFilevaultKey)(nil), + } +} + +func _Command_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*Command) + // request + switch x := m.Request.(type) { + case *Command_InstallProfile: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.InstallProfile); err != nil { + return err + } + case *Command_RemoveProfile: + _ = b.EncodeVarint(3<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RemoveProfile); err != nil { + return err + } + case *Command_InstallProvisioningProfile: + _ = b.EncodeVarint(4<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.InstallProvisioningProfile); err != nil { + return err + } + case *Command_RemoveProfisioningProfile: + _ = b.EncodeVarint(5<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RemoveProfisioningProfile); err != nil { + return err + } + case *Command_InstalledApplicationList: + _ = b.EncodeVarint(6<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.InstalledApplicationList); err != nil { + return err + } + case *Command_DeviceInformation: + _ = b.EncodeVarint(7<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.DeviceInformation); err != nil { + return err + } + case *Command_DeviceLock: + _ = b.EncodeVarint(8<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.DeviceLock); err != nil { + return err + } + case *Command_ClearPasscode: + _ = b.EncodeVarint(9<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.ClearPasscode); err != nil { + return err + } + case *Command_EraseDevice: + _ = b.EncodeVarint(10<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.EraseDevice); err != nil { + return err + } + case *Command_RequestMirroring: + _ = b.EncodeVarint(11<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RequestMirroring); err != nil { + return err + } + case *Command_Restrictions: + _ = b.EncodeVarint(12<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Restrictions); err != nil { + return err + } + case *Command_UnlockUserAccount: + _ = b.EncodeVarint(13<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.UnlockUserAccount); err != nil { + return err + } + case *Command_DeleteUser: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.DeleteUser); err != nil { + return err + } + case *Command_EnableLostMode: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.EnableLostMode); err != nil { + return err + } + case *Command_InstallApplication: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.InstallApplication); err != nil { + return err + } + case *Command_AccountConfiguration: + _ = b.EncodeVarint(17<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.AccountConfiguration); err != nil { + return err + } + case *Command_ApplyRedemptionCode: + _ = b.EncodeVarint(18<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.ApplyRedemptionCode); err != nil { + return err + } + case *Command_ManagedApplicationList: + _ = b.EncodeVarint(19<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.ManagedApplicationList); err != nil { + return err + } + case *Command_RemoveApplication: + _ = b.EncodeVarint(20<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RemoveApplication); err != nil { + return err + } + case *Command_InviteToProgram: + _ = b.EncodeVarint(21<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.InviteToProgram); err != nil { + return err + } + case *Command_ValidataApplications: + _ = b.EncodeVarint(22<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.ValidataApplications); err != nil { + return err + } + case *Command_InstallMedia: + _ = b.EncodeVarint(23<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.InstallMedia); err != nil { + return err + } + case *Command_RemoveMedia: + _ = b.EncodeVarint(24<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RemoveMedia); err != nil { + return err + } + case *Command_Settings: + _ = b.EncodeVarint(25<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Settings); err != nil { + return err + } + case *Command_ManagedApplicationConfiguration: + _ = b.EncodeVarint(26<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.ManagedApplicationConfiguration); err != nil { + return err + } + case *Command_ManagedApplicationAttributes: + _ = b.EncodeVarint(27<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.ManagedApplicationAttributes); err != nil { + return err + } + case *Command_ManagedApplicationFeedback: + _ = b.EncodeVarint(28<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.ManagedApplicationFeedback); err != nil { + return err + } + case *Command_SetFirmwarePassword: + _ = b.EncodeVarint(29<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SetFirmwarePassword); err != nil { + return err + } + case *Command_VerifyFirmwarePassword: + _ = b.EncodeVarint(30<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.VerifyFirmwarePassword); err != nil { + return err + } + case *Command_SetAutoAdminPassword: + _ = b.EncodeVarint(31<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SetAutoAdminPassword); err != nil { + return err + } + case *Command_ScheduleOsUpdate: + _ = b.EncodeVarint(32<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.ScheduleOsUpdate); err != nil { + return err + } + case *Command_ScheduleOsUpdateScan: + _ = b.EncodeVarint(33<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.ScheduleOsUpdateScan); err != nil { + return err + } + case *Command_ActiveNsExtensions: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.ActiveNsExtensions); err != nil { + return err + } + case *Command_RotateFilevaultKey: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RotateFilevaultKey); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("Command.Request has unexpected type %T", x) + } + return nil +} + +func _Command_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*Command) + switch tag { + case 2: // request.install_profile + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(InstallProfile) + err := b.DecodeMessage(msg) + m.Request = &Command_InstallProfile{msg} + return true, err + case 3: // request.remove_profile + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(RemoveProfile) + err := b.DecodeMessage(msg) + m.Request = &Command_RemoveProfile{msg} + return true, err + case 4: // request.install_provisioning_profile + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(InstallProvisioningProfile) + err := b.DecodeMessage(msg) + m.Request = &Command_InstallProvisioningProfile{msg} + return true, err + case 5: // request.remove_profisioning_profile + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(RemoveProvisioningProfile) + err := b.DecodeMessage(msg) + m.Request = &Command_RemoveProfisioningProfile{msg} + return true, err + case 6: // request.installed_application_list + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(InstalledApplicationList) + err := b.DecodeMessage(msg) + m.Request = &Command_InstalledApplicationList{msg} + return true, err + case 7: // request.device_information + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(DeviceInformation) + err := b.DecodeMessage(msg) + m.Request = &Command_DeviceInformation{msg} + return true, err + case 8: // request.device_lock + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(DeviceLock) + err := b.DecodeMessage(msg) + m.Request = &Command_DeviceLock{msg} + return true, err + case 9: // request.clear_passcode + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(ClearPasscode) + err := b.DecodeMessage(msg) + m.Request = &Command_ClearPasscode{msg} + return true, err + case 10: // request.erase_device + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(EraseDevice) + err := b.DecodeMessage(msg) + m.Request = &Command_EraseDevice{msg} + return true, err + case 11: // request.request_mirroring + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(RequestMirroring) + err := b.DecodeMessage(msg) + m.Request = &Command_RequestMirroring{msg} + return true, err + case 12: // request.restrictions + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Restrictions) + err := b.DecodeMessage(msg) + m.Request = &Command_Restrictions{msg} + return true, err + case 13: // request.unlock_user_account + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(UnlockUserAccount) + err := b.DecodeMessage(msg) + m.Request = &Command_UnlockUserAccount{msg} + return true, err + case 14: // request.delete_user + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(DeleteUser) + err := b.DecodeMessage(msg) + m.Request = &Command_DeleteUser{msg} + return true, err + case 15: // request.enable_lost_mode + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(EnableLostMode) + err := b.DecodeMessage(msg) + m.Request = &Command_EnableLostMode{msg} + return true, err + case 16: // request.install_application + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(InstallApplication) + err := b.DecodeMessage(msg) + m.Request = &Command_InstallApplication{msg} + return true, err + case 17: // request.account_configuration + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(AccountConfiguration) + err := b.DecodeMessage(msg) + m.Request = &Command_AccountConfiguration{msg} + return true, err + case 18: // request.apply_redemption_code + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(ApplyRedemptionCode) + err := b.DecodeMessage(msg) + m.Request = &Command_ApplyRedemptionCode{msg} + return true, err + case 19: // request.managed_application_list + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(ManagedApplicationList) + err := b.DecodeMessage(msg) + m.Request = &Command_ManagedApplicationList{msg} + return true, err + case 20: // request.remove_application + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(RemoveApplication) + err := b.DecodeMessage(msg) + m.Request = &Command_RemoveApplication{msg} + return true, err + case 21: // request.invite_to_program + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(InviteToProgram) + err := b.DecodeMessage(msg) + m.Request = &Command_InviteToProgram{msg} + return true, err + case 22: // request.validata_applications + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(ValidateApplications) + err := b.DecodeMessage(msg) + m.Request = &Command_ValidataApplications{msg} + return true, err + case 23: // request.install_media + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(InstallMedia) + err := b.DecodeMessage(msg) + m.Request = &Command_InstallMedia{msg} + return true, err + case 24: // request.remove_media + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(RemoveMedia) + err := b.DecodeMessage(msg) + m.Request = &Command_RemoveMedia{msg} + return true, err + case 25: // request.settings + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Settings) + err := b.DecodeMessage(msg) + m.Request = &Command_Settings{msg} + return true, err + case 26: // request.managed_application_configuration + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(ManagedApplicationConfiguration) + err := b.DecodeMessage(msg) + m.Request = &Command_ManagedApplicationConfiguration{msg} + return true, err + case 27: // request.managed_application_attributes + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(ManagedApplicationAttributes) + err := b.DecodeMessage(msg) + m.Request = &Command_ManagedApplicationAttributes{msg} + return true, err + case 28: // request.managed_application_feedback + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(ManagedApplicationFeedback) + err := b.DecodeMessage(msg) + m.Request = &Command_ManagedApplicationFeedback{msg} + return true, err + case 29: // request.set_firmware_password + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(SetFirmwarePassword) + err := b.DecodeMessage(msg) + m.Request = &Command_SetFirmwarePassword{msg} + return true, err + case 30: // request.verify_firmware_password + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(VerifyFirmwarePassword) + err := b.DecodeMessage(msg) + m.Request = &Command_VerifyFirmwarePassword{msg} + return true, err + case 31: // request.set_auto_admin_password + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(SetAutoAdminPassword) + err := b.DecodeMessage(msg) + m.Request = &Command_SetAutoAdminPassword{msg} + return true, err + case 32: // request.schedule_os_update + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(ScheduleOSUpdate) + err := b.DecodeMessage(msg) + m.Request = &Command_ScheduleOsUpdate{msg} + return true, err + case 33: // request.schedule_os_update_scan + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(ScheduleOSUpdateScan) + err := b.DecodeMessage(msg) + m.Request = &Command_ScheduleOsUpdateScan{msg} + return true, err + case 34: // request.active_ns_extensions + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(ActiveNSExtensions) + err := b.DecodeMessage(msg) + m.Request = &Command_ActiveNsExtensions{msg} + return true, err + case 35: // request.rotate_filevault_key + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(RotateFileVaultKey) + err := b.DecodeMessage(msg) + m.Request = &Command_RotateFilevaultKey{msg} + return true, err + default: + return false, nil + } +} + +func _Command_OneofSizer(msg proto.Message) (n int) { + m := msg.(*Command) + // request + switch x := m.Request.(type) { + case *Command_InstallProfile: + s := proto.Size(x.InstallProfile) + n += proto.SizeVarint(2<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_RemoveProfile: + s := proto.Size(x.RemoveProfile) + n += proto.SizeVarint(3<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_InstallProvisioningProfile: + s := proto.Size(x.InstallProvisioningProfile) + n += proto.SizeVarint(4<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_RemoveProfisioningProfile: + s := proto.Size(x.RemoveProfisioningProfile) + n += proto.SizeVarint(5<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_InstalledApplicationList: + s := proto.Size(x.InstalledApplicationList) + n += proto.SizeVarint(6<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_DeviceInformation: + s := proto.Size(x.DeviceInformation) + n += proto.SizeVarint(7<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_DeviceLock: + s := proto.Size(x.DeviceLock) + n += proto.SizeVarint(8<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_ClearPasscode: + s := proto.Size(x.ClearPasscode) + n += proto.SizeVarint(9<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_EraseDevice: + s := proto.Size(x.EraseDevice) + n += proto.SizeVarint(10<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_RequestMirroring: + s := proto.Size(x.RequestMirroring) + n += proto.SizeVarint(11<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_Restrictions: + s := proto.Size(x.Restrictions) + n += proto.SizeVarint(12<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_UnlockUserAccount: + s := proto.Size(x.UnlockUserAccount) + n += proto.SizeVarint(13<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_DeleteUser: + s := proto.Size(x.DeleteUser) + n += proto.SizeVarint(14<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_EnableLostMode: + s := proto.Size(x.EnableLostMode) + n += proto.SizeVarint(15<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_InstallApplication: + s := proto.Size(x.InstallApplication) + n += proto.SizeVarint(16<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_AccountConfiguration: + s := proto.Size(x.AccountConfiguration) + n += proto.SizeVarint(17<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_ApplyRedemptionCode: + s := proto.Size(x.ApplyRedemptionCode) + n += proto.SizeVarint(18<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_ManagedApplicationList: + s := proto.Size(x.ManagedApplicationList) + n += proto.SizeVarint(19<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_RemoveApplication: + s := proto.Size(x.RemoveApplication) + n += proto.SizeVarint(20<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_InviteToProgram: + s := proto.Size(x.InviteToProgram) + n += proto.SizeVarint(21<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_ValidataApplications: + s := proto.Size(x.ValidataApplications) + n += proto.SizeVarint(22<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_InstallMedia: + s := proto.Size(x.InstallMedia) + n += proto.SizeVarint(23<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_RemoveMedia: + s := proto.Size(x.RemoveMedia) + n += proto.SizeVarint(24<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_Settings: + s := proto.Size(x.Settings) + n += proto.SizeVarint(25<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_ManagedApplicationConfiguration: + s := proto.Size(x.ManagedApplicationConfiguration) + n += proto.SizeVarint(26<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_ManagedApplicationAttributes: + s := proto.Size(x.ManagedApplicationAttributes) + n += proto.SizeVarint(27<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_ManagedApplicationFeedback: + s := proto.Size(x.ManagedApplicationFeedback) + n += proto.SizeVarint(28<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_SetFirmwarePassword: + s := proto.Size(x.SetFirmwarePassword) + n += proto.SizeVarint(29<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_VerifyFirmwarePassword: + s := proto.Size(x.VerifyFirmwarePassword) + n += proto.SizeVarint(30<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_SetAutoAdminPassword: + s := proto.Size(x.SetAutoAdminPassword) + n += proto.SizeVarint(31<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_ScheduleOsUpdate: + s := proto.Size(x.ScheduleOsUpdate) + n += proto.SizeVarint(32<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_ScheduleOsUpdateScan: + s := proto.Size(x.ScheduleOsUpdateScan) + n += proto.SizeVarint(33<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_ActiveNsExtensions: + s := proto.Size(x.ActiveNsExtensions) + n += proto.SizeVarint(34<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Command_RotateFilevaultKey: + s := proto.Size(x.RotateFilevaultKey) + n += proto.SizeVarint(35<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type InstallProfile struct { + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` +} + +func (m *InstallProfile) Reset() { *m = InstallProfile{} } +func (m *InstallProfile) String() string { return proto.CompactTextString(m) } +func (*InstallProfile) ProtoMessage() {} +func (*InstallProfile) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{2} } + +func (m *InstallProfile) GetPayload() []byte { + if m != nil { + return m.Payload + } + return nil +} + +type RemoveProfile struct { + Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` +} + +func (m *RemoveProfile) Reset() { *m = RemoveProfile{} } +func (m *RemoveProfile) String() string { return proto.CompactTextString(m) } +func (*RemoveProfile) ProtoMessage() {} +func (*RemoveProfile) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{3} } + +func (m *RemoveProfile) GetIdentifier() string { + if m != nil { + return m.Identifier + } + return "" +} + +type InstallProvisioningProfile struct { + ProvisioningProfile []byte `protobuf:"bytes,1,opt,name=provisioning_profile,json=provisioningProfile,proto3" json:"provisioning_profile,omitempty"` +} + +func (m *InstallProvisioningProfile) Reset() { *m = InstallProvisioningProfile{} } +func (m *InstallProvisioningProfile) String() string { return proto.CompactTextString(m) } +func (*InstallProvisioningProfile) ProtoMessage() {} +func (*InstallProvisioningProfile) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{4} } + +func (m *InstallProvisioningProfile) GetProvisioningProfile() []byte { + if m != nil { + return m.ProvisioningProfile + } + return nil +} + +type RemoveProvisioningProfile struct { + Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` +} + +func (m *RemoveProvisioningProfile) Reset() { *m = RemoveProvisioningProfile{} } +func (m *RemoveProvisioningProfile) String() string { return proto.CompactTextString(m) } +func (*RemoveProvisioningProfile) ProtoMessage() {} +func (*RemoveProvisioningProfile) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{5} } + +func (m *RemoveProvisioningProfile) GetUuid() string { + if m != nil { + return m.Uuid + } + return "" +} + +type InstalledApplicationList struct { + Identifiers []string `protobuf:"bytes,1,rep,name=identifiers" json:"identifiers,omitempty"` + ManagedAppsOnly bool `protobuf:"varint,2,opt,name=managed_apps_only,json=managedAppsOnly,proto3" json:"managed_apps_only,omitempty"` +} + +func (m *InstalledApplicationList) Reset() { *m = InstalledApplicationList{} } +func (m *InstalledApplicationList) String() string { return proto.CompactTextString(m) } +func (*InstalledApplicationList) ProtoMessage() {} +func (*InstalledApplicationList) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{6} } + +func (m *InstalledApplicationList) GetIdentifiers() []string { + if m != nil { + return m.Identifiers + } + return nil +} + +func (m *InstalledApplicationList) GetManagedAppsOnly() bool { + if m != nil { + return m.ManagedAppsOnly + } + return false +} + +type DeviceInformation struct { + Queries []string `protobuf:"bytes,1,rep,name=queries" json:"queries,omitempty"` +} + +func (m *DeviceInformation) Reset() { *m = DeviceInformation{} } +func (m *DeviceInformation) String() string { return proto.CompactTextString(m) } +func (*DeviceInformation) ProtoMessage() {} +func (*DeviceInformation) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{7} } + +func (m *DeviceInformation) GetQueries() []string { + if m != nil { + return m.Queries + } + return nil +} + +type ClearPasscode struct { + UnlockToken []byte `protobuf:"bytes,1,opt,name=unlock_token,json=unlockToken,proto3" json:"unlock_token,omitempty"` +} + +func (m *ClearPasscode) Reset() { *m = ClearPasscode{} } +func (m *ClearPasscode) String() string { return proto.CompactTextString(m) } +func (*ClearPasscode) ProtoMessage() {} +func (*ClearPasscode) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{8} } + +func (m *ClearPasscode) GetUnlockToken() []byte { + if m != nil { + return m.UnlockToken + } + return nil +} + +type DeviceLock struct { + Pin string `protobuf:"bytes,1,opt,name=pin,proto3" json:"pin,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + PhoneNumber string `protobuf:"bytes,3,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` +} + +func (m *DeviceLock) Reset() { *m = DeviceLock{} } +func (m *DeviceLock) String() string { return proto.CompactTextString(m) } +func (*DeviceLock) ProtoMessage() {} +func (*DeviceLock) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{9} } + +func (m *DeviceLock) GetPin() string { + if m != nil { + return m.Pin + } + return "" +} + +func (m *DeviceLock) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +func (m *DeviceLock) GetPhoneNumber() string { + if m != nil { + return m.PhoneNumber + } + return "" +} + +type EraseDevice struct { + Pin string `protobuf:"bytes,1,opt,name=pin,proto3" json:"pin,omitempty"` + PreserveDataPlan bool `protobuf:"varint,2,opt,name=preserve_data_plan,json=preserveDataPlan,proto3" json:"preserve_data_plan,omitempty"` + DisallowProximitySetup bool `protobuf:"varint,3,opt,name=disallow_proximity_setup,json=disallowProximitySetup,proto3" json:"disallow_proximity_setup,omitempty"` +} + +func (m *EraseDevice) Reset() { *m = EraseDevice{} } +func (m *EraseDevice) String() string { return proto.CompactTextString(m) } +func (*EraseDevice) ProtoMessage() {} +func (*EraseDevice) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{10} } + +func (m *EraseDevice) GetPin() string { + if m != nil { + return m.Pin + } + return "" +} + +func (m *EraseDevice) GetPreserveDataPlan() bool { + if m != nil { + return m.PreserveDataPlan + } + return false +} + +func (m *EraseDevice) GetDisallowProximitySetup() bool { + if m != nil { + return m.DisallowProximitySetup + } + return false +} + +type RequestMirroring struct { + DestinationName string `protobuf:"bytes,1,opt,name=destination_name,json=destinationName,proto3" json:"destination_name,omitempty"` + DestinationDeviceId string `protobuf:"bytes,2,opt,name=destination_device_id,json=destinationDeviceId,proto3" json:"destination_device_id,omitempty"` + ScanTime string `protobuf:"bytes,3,opt,name=scan_time,json=scanTime,proto3" json:"scan_time,omitempty"` + Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` +} + +func (m *RequestMirroring) Reset() { *m = RequestMirroring{} } +func (m *RequestMirroring) String() string { return proto.CompactTextString(m) } +func (*RequestMirroring) ProtoMessage() {} +func (*RequestMirroring) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{11} } + +func (m *RequestMirroring) GetDestinationName() string { + if m != nil { + return m.DestinationName + } + return "" +} + +func (m *RequestMirroring) GetDestinationDeviceId() string { + if m != nil { + return m.DestinationDeviceId + } + return "" +} + +func (m *RequestMirroring) GetScanTime() string { + if m != nil { + return m.ScanTime + } + return "" +} + +func (m *RequestMirroring) GetPassword() string { + if m != nil { + return m.Password + } + return "" +} + +type Restrictions struct { + ProfileRestrictions bool `protobuf:"varint,1,opt,name=profile_restrictions,json=profileRestrictions,proto3" json:"profile_restrictions,omitempty"` +} + +func (m *Restrictions) Reset() { *m = Restrictions{} } +func (m *Restrictions) String() string { return proto.CompactTextString(m) } +func (*Restrictions) ProtoMessage() {} +func (*Restrictions) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{12} } + +func (m *Restrictions) GetProfileRestrictions() bool { + if m != nil { + return m.ProfileRestrictions + } + return false +} + +type UnlockUserAccount struct { + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` +} + +func (m *UnlockUserAccount) Reset() { *m = UnlockUserAccount{} } +func (m *UnlockUserAccount) String() string { return proto.CompactTextString(m) } +func (*UnlockUserAccount) ProtoMessage() {} +func (*UnlockUserAccount) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{13} } + +func (m *UnlockUserAccount) GetUsername() string { + if m != nil { + return m.Username + } + return "" +} + +type DeleteUser struct { + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + ForceDeletion bool `protobuf:"varint,2,opt,name=force_deletion,json=forceDeletion,proto3" json:"force_deletion,omitempty"` +} + +func (m *DeleteUser) Reset() { *m = DeleteUser{} } +func (m *DeleteUser) String() string { return proto.CompactTextString(m) } +func (*DeleteUser) ProtoMessage() {} +func (*DeleteUser) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{14} } + +func (m *DeleteUser) GetUsername() string { + if m != nil { + return m.Username + } + return "" +} + +func (m *DeleteUser) GetForceDeletion() bool { + if m != nil { + return m.ForceDeletion + } + return false +} + +type EnableLostMode struct { + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + PhoneNumber string `protobuf:"bytes,2,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` + Footnote string `protobuf:"bytes,3,opt,name=footnote,proto3" json:"footnote,omitempty"` +} + +func (m *EnableLostMode) Reset() { *m = EnableLostMode{} } +func (m *EnableLostMode) String() string { return proto.CompactTextString(m) } +func (*EnableLostMode) ProtoMessage() {} +func (*EnableLostMode) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{15} } + +func (m *EnableLostMode) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +func (m *EnableLostMode) GetPhoneNumber() string { + if m != nil { + return m.PhoneNumber + } + return "" +} + +func (m *EnableLostMode) GetFootnote() string { + if m != nil { + return m.Footnote + } + return "" +} + +type InstallApplication struct { + ItunesStoreId int64 `protobuf:"varint,1,opt,name=itunes_store_id,json=itunesStoreId,proto3" json:"itunes_store_id,omitempty"` + Identifier string `protobuf:"bytes,2,opt,name=identifier,proto3" json:"identifier,omitempty"` + Options *InstallApplicationOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + ManifestUrl string `protobuf:"bytes,4,opt,name=manifest_url,json=manifestUrl,proto3" json:"manifest_url,omitempty"` + ManagementFlags int64 `protobuf:"varint,5,opt,name=management_flags,json=managementFlags,proto3" json:"management_flags,omitempty"` + Configuration *InstallApplicationConfiguration `protobuf:"bytes,6,opt,name=configuration" json:"configuration,omitempty"` + Attributes *InstallApplicationAttributes `protobuf:"bytes,7,opt,name=attributes" json:"attributes,omitempty"` + ChangeManagementState string `protobuf:"bytes,8,opt,name=change_management_state,json=changeManagementState,proto3" json:"change_management_state,omitempty"` +} + +func (m *InstallApplication) Reset() { *m = InstallApplication{} } +func (m *InstallApplication) String() string { return proto.CompactTextString(m) } +func (*InstallApplication) ProtoMessage() {} +func (*InstallApplication) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{16} } + +func (m *InstallApplication) GetItunesStoreId() int64 { + if m != nil { + return m.ItunesStoreId + } + return 0 +} + +func (m *InstallApplication) GetIdentifier() string { + if m != nil { + return m.Identifier + } + return "" +} + +func (m *InstallApplication) GetOptions() *InstallApplicationOptions { + if m != nil { + return m.Options + } + return nil +} + +func (m *InstallApplication) GetManifestUrl() string { + if m != nil { + return m.ManifestUrl + } + return "" +} + +func (m *InstallApplication) GetManagementFlags() int64 { + if m != nil { + return m.ManagementFlags + } + return 0 +} + +func (m *InstallApplication) GetConfiguration() *InstallApplicationConfiguration { + if m != nil { + return m.Configuration + } + return nil +} + +func (m *InstallApplication) GetAttributes() *InstallApplicationAttributes { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *InstallApplication) GetChangeManagementState() string { + if m != nil { + return m.ChangeManagementState + } + return "" +} + +type InstallApplicationOptions struct { + PurchaseMethod int64 `protobuf:"varint,1,opt,name=purchase_method,json=purchaseMethod,proto3" json:"purchase_method,omitempty"` +} + +func (m *InstallApplicationOptions) Reset() { *m = InstallApplicationOptions{} } +func (m *InstallApplicationOptions) String() string { return proto.CompactTextString(m) } +func (*InstallApplicationOptions) ProtoMessage() {} +func (*InstallApplicationOptions) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{17} } + +func (m *InstallApplicationOptions) GetPurchaseMethod() int64 { + if m != nil { + return m.PurchaseMethod + } + return 0 +} + +type InstallApplicationConfiguration struct { +} + +func (m *InstallApplicationConfiguration) Reset() { *m = InstallApplicationConfiguration{} } +func (m *InstallApplicationConfiguration) String() string { return proto.CompactTextString(m) } +func (*InstallApplicationConfiguration) ProtoMessage() {} +func (*InstallApplicationConfiguration) Descriptor() ([]byte, []int) { + return fileDescriptorMdm, []int{18} +} + +type InstallApplicationAttributes struct { +} + +func (m *InstallApplicationAttributes) Reset() { *m = InstallApplicationAttributes{} } +func (m *InstallApplicationAttributes) String() string { return proto.CompactTextString(m) } +func (*InstallApplicationAttributes) ProtoMessage() {} +func (*InstallApplicationAttributes) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{19} } + +type ApplyRedemptionCode struct { + Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` + RedemptionCode string `protobuf:"bytes,2,opt,name=redemption_code,json=redemptionCode,proto3" json:"redemption_code,omitempty"` +} + +func (m *ApplyRedemptionCode) Reset() { *m = ApplyRedemptionCode{} } +func (m *ApplyRedemptionCode) String() string { return proto.CompactTextString(m) } +func (*ApplyRedemptionCode) ProtoMessage() {} +func (*ApplyRedemptionCode) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{20} } + +func (m *ApplyRedemptionCode) GetIdentifier() string { + if m != nil { + return m.Identifier + } + return "" +} + +func (m *ApplyRedemptionCode) GetRedemptionCode() string { + if m != nil { + return m.RedemptionCode + } + return "" +} + +type ManagedApplicationList struct { + Identifiers []string `protobuf:"bytes,1,rep,name=identifiers" json:"identifiers,omitempty"` +} + +func (m *ManagedApplicationList) Reset() { *m = ManagedApplicationList{} } +func (m *ManagedApplicationList) String() string { return proto.CompactTextString(m) } +func (*ManagedApplicationList) ProtoMessage() {} +func (*ManagedApplicationList) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{21} } + +func (m *ManagedApplicationList) GetIdentifiers() []string { + if m != nil { + return m.Identifiers + } + return nil +} + +type RemoveApplication struct { + Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` +} + +func (m *RemoveApplication) Reset() { *m = RemoveApplication{} } +func (m *RemoveApplication) String() string { return proto.CompactTextString(m) } +func (*RemoveApplication) ProtoMessage() {} +func (*RemoveApplication) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{22} } + +func (m *RemoveApplication) GetIdentifier() string { + if m != nil { + return m.Identifier + } + return "" +} + +type InviteToProgram struct { + ProgramId string `protobuf:"bytes,1,opt,name=program_id,json=programId,proto3" json:"program_id,omitempty"` + InvitationUrl string `protobuf:"bytes,2,opt,name=invitation_url,json=invitationUrl,proto3" json:"invitation_url,omitempty"` +} + +func (m *InviteToProgram) Reset() { *m = InviteToProgram{} } +func (m *InviteToProgram) String() string { return proto.CompactTextString(m) } +func (*InviteToProgram) ProtoMessage() {} +func (*InviteToProgram) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{23} } + +func (m *InviteToProgram) GetProgramId() string { + if m != nil { + return m.ProgramId + } + return "" +} + +func (m *InviteToProgram) GetInvitationUrl() string { + if m != nil { + return m.InvitationUrl + } + return "" +} + +type ValidateApplications struct { + Identifiers []string `protobuf:"bytes,1,rep,name=identifiers" json:"identifiers,omitempty"` +} + +func (m *ValidateApplications) Reset() { *m = ValidateApplications{} } +func (m *ValidateApplications) String() string { return proto.CompactTextString(m) } +func (*ValidateApplications) ProtoMessage() {} +func (*ValidateApplications) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{24} } + +func (m *ValidateApplications) GetIdentifiers() []string { + if m != nil { + return m.Identifiers + } + return nil +} + +type AccountConfiguration struct { + SkipPrimarySetupAccountCreation bool `protobuf:"varint,1,opt,name=skip_primary_setup_account_creation,json=skipPrimarySetupAccountCreation,proto3" json:"skip_primary_setup_account_creation,omitempty"` + SetPrimarySetupAccountAsRegularUser bool `protobuf:"varint,2,opt,name=set_primary_setup_account_as_regular_user,json=setPrimarySetupAccountAsRegularUser,proto3" json:"set_primary_setup_account_as_regular_user,omitempty"` + AutoSetupAdminAccounts []*AutoSetupAdminAccounts `protobuf:"bytes,3,rep,name=auto_setup_admin_accounts,json=autoSetupAdminAccounts" json:"auto_setup_admin_accounts,omitempty"` +} + +func (m *AccountConfiguration) Reset() { *m = AccountConfiguration{} } +func (m *AccountConfiguration) String() string { return proto.CompactTextString(m) } +func (*AccountConfiguration) ProtoMessage() {} +func (*AccountConfiguration) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{25} } + +func (m *AccountConfiguration) GetSkipPrimarySetupAccountCreation() bool { + if m != nil { + return m.SkipPrimarySetupAccountCreation + } + return false +} + +func (m *AccountConfiguration) GetSetPrimarySetupAccountAsRegularUser() bool { + if m != nil { + return m.SetPrimarySetupAccountAsRegularUser + } + return false +} + +func (m *AccountConfiguration) GetAutoSetupAdminAccounts() []*AutoSetupAdminAccounts { + if m != nil { + return m.AutoSetupAdminAccounts + } + return nil +} + +type AutoSetupAdminAccounts struct { + ShortName string `protobuf:"bytes,1,opt,name=short_name,json=shortName,proto3" json:"short_name,omitempty"` + FullName string `protobuf:"bytes,2,opt,name=full_name,json=fullName,proto3" json:"full_name,omitempty"` + PasswordHash []byte `protobuf:"bytes,3,opt,name=password_hash,json=passwordHash,proto3" json:"password_hash,omitempty"` + Hidden bool `protobuf:"varint,4,opt,name=hidden,proto3" json:"hidden,omitempty"` +} + +func (m *AutoSetupAdminAccounts) Reset() { *m = AutoSetupAdminAccounts{} } +func (m *AutoSetupAdminAccounts) String() string { return proto.CompactTextString(m) } +func (*AutoSetupAdminAccounts) ProtoMessage() {} +func (*AutoSetupAdminAccounts) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{26} } + +func (m *AutoSetupAdminAccounts) GetShortName() string { + if m != nil { + return m.ShortName + } + return "" +} + +func (m *AutoSetupAdminAccounts) GetFullName() string { + if m != nil { + return m.FullName + } + return "" +} + +func (m *AutoSetupAdminAccounts) GetPasswordHash() []byte { + if m != nil { + return m.PasswordHash + } + return nil +} + +func (m *AutoSetupAdminAccounts) GetHidden() bool { + if m != nil { + return m.Hidden + } + return false +} + +type InstallMedia struct { + ItunesStoreId int64 `protobuf:"varint,1,opt,name=itunes_store_id,json=itunesStoreId,proto3" json:"itunes_store_id,omitempty"` + MediaUrl string `protobuf:"bytes,2,opt,name=media_url,json=mediaUrl,proto3" json:"media_url,omitempty"` + MediaType string `protobuf:"bytes,3,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"` +} + +func (m *InstallMedia) Reset() { *m = InstallMedia{} } +func (m *InstallMedia) String() string { return proto.CompactTextString(m) } +func (*InstallMedia) ProtoMessage() {} +func (*InstallMedia) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{27} } + +func (m *InstallMedia) GetItunesStoreId() int64 { + if m != nil { + return m.ItunesStoreId + } + return 0 +} + +func (m *InstallMedia) GetMediaUrl() string { + if m != nil { + return m.MediaUrl + } + return "" +} + +func (m *InstallMedia) GetMediaType() string { + if m != nil { + return m.MediaType + } + return "" +} + +type RemoveMedia struct { + MediaType string `protobuf:"bytes,1,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"` + ItunesStoreId int64 `protobuf:"varint,2,opt,name=itunes_store_id,json=itunesStoreId,proto3" json:"itunes_store_id,omitempty"` + PersistentId string `protobuf:"bytes,3,opt,name=persistent_id,json=persistentId,proto3" json:"persistent_id,omitempty"` +} + +func (m *RemoveMedia) Reset() { *m = RemoveMedia{} } +func (m *RemoveMedia) String() string { return proto.CompactTextString(m) } +func (*RemoveMedia) ProtoMessage() {} +func (*RemoveMedia) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{28} } + +func (m *RemoveMedia) GetMediaType() string { + if m != nil { + return m.MediaType + } + return "" +} + +func (m *RemoveMedia) GetItunesStoreId() int64 { + if m != nil { + return m.ItunesStoreId + } + return 0 +} + +func (m *RemoveMedia) GetPersistentId() string { + if m != nil { + return m.PersistentId + } + return "" +} + +type Settings struct { + Settings []*Setting `protobuf:"bytes,1,rep,name=settings" json:"settings,omitempty"` +} + +func (m *Settings) Reset() { *m = Settings{} } +func (m *Settings) String() string { return proto.CompactTextString(m) } +func (*Settings) ProtoMessage() {} +func (*Settings) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{29} } + +func (m *Settings) GetSettings() []*Setting { + if m != nil { + return m.Settings + } + return nil +} + +type Setting struct { + Item string `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` + DeviceName *DeviceNameSetting `protobuf:"bytes,2,opt,name=device_name,json=deviceName" json:"device_name,omitempty"` + Hostname *HostnameSetting `protobuf:"bytes,3,opt,name=hostname" json:"hostname,omitempty"` + VoiceRoaming *VoiceRoamingSetting `protobuf:"bytes,4,opt,name=voice_roaming,json=voiceRoaming" json:"voice_roaming,omitempty"` + PersonalHotspot *PersonalHotspotSetting `protobuf:"bytes,5,opt,name=personal_hotspot,json=personalHotspot" json:"personal_hotspot,omitempty"` + Wallpaper *WallpaperSetting `protobuf:"bytes,6,opt,name=wallpaper" json:"wallpaper,omitempty"` + DataRoaming *DataRoamingSetting `protobuf:"bytes,7,opt,name=data_roaming,json=dataRoaming" json:"data_roaming,omitempty"` + Bluetooth *BluetoothSetting `protobuf:"bytes,8,opt,name=bluetooth" json:"bluetooth,omitempty"` + ApplicationAttributes *ApplicationAttributesSetting `protobuf:"bytes,9,opt,name=application_attributes,json=applicationAttributes" json:"application_attributes,omitempty"` + MdmOptions *MDMOptionsSetting `protobuf:"bytes,10,opt,name=mdm_options,json=mdmOptions" json:"mdm_options,omitempty"` + PasscodeLockGracePeriod *PasscodeLockGracePeriodSetting `protobuf:"bytes,11,opt,name=passcode_lock_grace_period,json=passcodeLockGracePeriod" json:"passcode_lock_grace_period,omitempty"` + MaximumResidentUsers *MaximumResidentUsersSetting `protobuf:"bytes,12,opt,name=maximum_resident_users,json=maximumResidentUsers" json:"maximum_resident_users,omitempty"` + DiagnosticSubmission *DiagnosticSubmissionSetting `protobuf:"bytes,13,opt,name=diagnostic_submission,json=diagnosticSubmission" json:"diagnostic_submission,omitempty"` + AppAnalytics *AppAnalyticsSetting `protobuf:"bytes,14,opt,name=app_analytics,json=appAnalytics" json:"app_analytics,omitempty"` +} + +func (m *Setting) Reset() { *m = Setting{} } +func (m *Setting) String() string { return proto.CompactTextString(m) } +func (*Setting) ProtoMessage() {} +func (*Setting) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{30} } + +func (m *Setting) GetItem() string { + if m != nil { + return m.Item + } + return "" +} + +func (m *Setting) GetDeviceName() *DeviceNameSetting { + if m != nil { + return m.DeviceName + } + return nil +} + +func (m *Setting) GetHostname() *HostnameSetting { + if m != nil { + return m.Hostname + } + return nil +} + +func (m *Setting) GetVoiceRoaming() *VoiceRoamingSetting { + if m != nil { + return m.VoiceRoaming + } + return nil +} + +func (m *Setting) GetPersonalHotspot() *PersonalHotspotSetting { + if m != nil { + return m.PersonalHotspot + } + return nil +} + +func (m *Setting) GetWallpaper() *WallpaperSetting { + if m != nil { + return m.Wallpaper + } + return nil +} + +func (m *Setting) GetDataRoaming() *DataRoamingSetting { + if m != nil { + return m.DataRoaming + } + return nil +} + +func (m *Setting) GetBluetooth() *BluetoothSetting { + if m != nil { + return m.Bluetooth + } + return nil +} + +func (m *Setting) GetApplicationAttributes() *ApplicationAttributesSetting { + if m != nil { + return m.ApplicationAttributes + } + return nil +} + +func (m *Setting) GetMdmOptions() *MDMOptionsSetting { + if m != nil { + return m.MdmOptions + } + return nil +} + +func (m *Setting) GetPasscodeLockGracePeriod() *PasscodeLockGracePeriodSetting { + if m != nil { + return m.PasscodeLockGracePeriod + } + return nil +} + +func (m *Setting) GetMaximumResidentUsers() *MaximumResidentUsersSetting { + if m != nil { + return m.MaximumResidentUsers + } + return nil +} + +func (m *Setting) GetDiagnosticSubmission() *DiagnosticSubmissionSetting { + if m != nil { + return m.DiagnosticSubmission + } + return nil +} + +func (m *Setting) GetAppAnalytics() *AppAnalyticsSetting { + if m != nil { + return m.AppAnalytics + } + return nil +} + +type VoiceRoamingSetting struct { + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` +} + +func (m *VoiceRoamingSetting) Reset() { *m = VoiceRoamingSetting{} } +func (m *VoiceRoamingSetting) String() string { return proto.CompactTextString(m) } +func (*VoiceRoamingSetting) ProtoMessage() {} +func (*VoiceRoamingSetting) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{31} } + +func (m *VoiceRoamingSetting) GetEnabled() bool { + if m != nil { + return m.Enabled + } + return false +} + +type PersonalHotspotSetting struct { + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` +} + +func (m *PersonalHotspotSetting) Reset() { *m = PersonalHotspotSetting{} } +func (m *PersonalHotspotSetting) String() string { return proto.CompactTextString(m) } +func (*PersonalHotspotSetting) ProtoMessage() {} +func (*PersonalHotspotSetting) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{32} } + +func (m *PersonalHotspotSetting) GetEnabled() bool { + if m != nil { + return m.Enabled + } + return false +} + +type WallpaperSetting struct { + Image []byte `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"` + Where int64 `protobuf:"varint,2,opt,name=where,proto3" json:"where,omitempty"` +} + +func (m *WallpaperSetting) Reset() { *m = WallpaperSetting{} } +func (m *WallpaperSetting) String() string { return proto.CompactTextString(m) } +func (*WallpaperSetting) ProtoMessage() {} +func (*WallpaperSetting) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{33} } + +func (m *WallpaperSetting) GetImage() []byte { + if m != nil { + return m.Image + } + return nil +} + +func (m *WallpaperSetting) GetWhere() int64 { + if m != nil { + return m.Where + } + return 0 +} + +type DataRoamingSetting struct { + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` +} + +func (m *DataRoamingSetting) Reset() { *m = DataRoamingSetting{} } +func (m *DataRoamingSetting) String() string { return proto.CompactTextString(m) } +func (*DataRoamingSetting) ProtoMessage() {} +func (*DataRoamingSetting) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{34} } + +func (m *DataRoamingSetting) GetEnabled() bool { + if m != nil { + return m.Enabled + } + return false +} + +type BluetoothSetting struct { + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` +} + +func (m *BluetoothSetting) Reset() { *m = BluetoothSetting{} } +func (m *BluetoothSetting) String() string { return proto.CompactTextString(m) } +func (*BluetoothSetting) ProtoMessage() {} +func (*BluetoothSetting) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{35} } + +func (m *BluetoothSetting) GetEnabled() bool { + if m != nil { + return m.Enabled + } + return false +} + +type ApplicationAttributesSetting struct { + Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` + ApplicationAttributes *ApplicationAttributes `protobuf:"bytes,2,opt,name=application_attributes,json=applicationAttributes" json:"application_attributes,omitempty"` +} + +func (m *ApplicationAttributesSetting) Reset() { *m = ApplicationAttributesSetting{} } +func (m *ApplicationAttributesSetting) String() string { return proto.CompactTextString(m) } +func (*ApplicationAttributesSetting) ProtoMessage() {} +func (*ApplicationAttributesSetting) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{36} } + +func (m *ApplicationAttributesSetting) GetIdentifier() string { + if m != nil { + return m.Identifier + } + return "" +} + +func (m *ApplicationAttributesSetting) GetApplicationAttributes() *ApplicationAttributes { + if m != nil { + return m.ApplicationAttributes + } + return nil +} + +type ApplicationAttributes struct { + VpnUuid string `protobuf:"bytes,1,opt,name=vpn_uuid,json=vpnUuid,proto3" json:"vpn_uuid,omitempty"` +} + +func (m *ApplicationAttributes) Reset() { *m = ApplicationAttributes{} } +func (m *ApplicationAttributes) String() string { return proto.CompactTextString(m) } +func (*ApplicationAttributes) ProtoMessage() {} +func (*ApplicationAttributes) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{37} } + +func (m *ApplicationAttributes) GetVpnUuid() string { + if m != nil { + return m.VpnUuid + } + return "" +} + +type DeviceNameSetting struct { + DeviceName string `protobuf:"bytes,1,opt,name=device_name,json=deviceName,proto3" json:"device_name,omitempty"` +} + +func (m *DeviceNameSetting) Reset() { *m = DeviceNameSetting{} } +func (m *DeviceNameSetting) String() string { return proto.CompactTextString(m) } +func (*DeviceNameSetting) ProtoMessage() {} +func (*DeviceNameSetting) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{38} } + +func (m *DeviceNameSetting) GetDeviceName() string { + if m != nil { + return m.DeviceName + } + return "" +} + +type HostnameSetting struct { + Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"` +} + +func (m *HostnameSetting) Reset() { *m = HostnameSetting{} } +func (m *HostnameSetting) String() string { return proto.CompactTextString(m) } +func (*HostnameSetting) ProtoMessage() {} +func (*HostnameSetting) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{39} } + +func (m *HostnameSetting) GetHostname() string { + if m != nil { + return m.Hostname + } + return "" +} + +type MDMOptionsSetting struct { + MdmOptions *MDMOptions `protobuf:"bytes,1,opt,name=mdm_options,json=mdmOptions" json:"mdm_options,omitempty"` +} + +func (m *MDMOptionsSetting) Reset() { *m = MDMOptionsSetting{} } +func (m *MDMOptionsSetting) String() string { return proto.CompactTextString(m) } +func (*MDMOptionsSetting) ProtoMessage() {} +func (*MDMOptionsSetting) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{40} } + +func (m *MDMOptionsSetting) GetMdmOptions() *MDMOptions { + if m != nil { + return m.MdmOptions + } + return nil +} + +type MDMOptions struct { + ActivationLockAllowedWhileSupervised bool `protobuf:"varint,1,opt,name=activation_lock_allowed_while_supervised,json=activationLockAllowedWhileSupervised,proto3" json:"activation_lock_allowed_while_supervised,omitempty"` +} + +func (m *MDMOptions) Reset() { *m = MDMOptions{} } +func (m *MDMOptions) String() string { return proto.CompactTextString(m) } +func (*MDMOptions) ProtoMessage() {} +func (*MDMOptions) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{41} } + +func (m *MDMOptions) GetActivationLockAllowedWhileSupervised() bool { + if m != nil { + return m.ActivationLockAllowedWhileSupervised + } + return false +} + +type PasscodeLockGracePeriodSetting struct { + PasscodeLockGracePeriod int64 `protobuf:"varint,1,opt,name=passcode_lock_grace_period,json=passcodeLockGracePeriod,proto3" json:"passcode_lock_grace_period,omitempty"` +} + +func (m *PasscodeLockGracePeriodSetting) Reset() { *m = PasscodeLockGracePeriodSetting{} } +func (m *PasscodeLockGracePeriodSetting) String() string { return proto.CompactTextString(m) } +func (*PasscodeLockGracePeriodSetting) ProtoMessage() {} +func (*PasscodeLockGracePeriodSetting) Descriptor() ([]byte, []int) { + return fileDescriptorMdm, []int{42} +} + +func (m *PasscodeLockGracePeriodSetting) GetPasscodeLockGracePeriod() int64 { + if m != nil { + return m.PasscodeLockGracePeriod + } + return 0 +} + +type MaximumResidentUsersSetting struct { + MaximumResidentUsers int64 `protobuf:"varint,1,opt,name=maximum_resident_users,json=maximumResidentUsers,proto3" json:"maximum_resident_users,omitempty"` +} + +func (m *MaximumResidentUsersSetting) Reset() { *m = MaximumResidentUsersSetting{} } +func (m *MaximumResidentUsersSetting) String() string { return proto.CompactTextString(m) } +func (*MaximumResidentUsersSetting) ProtoMessage() {} +func (*MaximumResidentUsersSetting) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{43} } + +func (m *MaximumResidentUsersSetting) GetMaximumResidentUsers() int64 { + if m != nil { + return m.MaximumResidentUsers + } + return 0 +} + +type DiagnosticSubmissionSetting struct { + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` +} + +func (m *DiagnosticSubmissionSetting) Reset() { *m = DiagnosticSubmissionSetting{} } +func (m *DiagnosticSubmissionSetting) String() string { return proto.CompactTextString(m) } +func (*DiagnosticSubmissionSetting) ProtoMessage() {} +func (*DiagnosticSubmissionSetting) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{44} } + +func (m *DiagnosticSubmissionSetting) GetEnabled() bool { + if m != nil { + return m.Enabled + } + return false +} + +type AppAnalyticsSetting struct { + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` +} + +func (m *AppAnalyticsSetting) Reset() { *m = AppAnalyticsSetting{} } +func (m *AppAnalyticsSetting) String() string { return proto.CompactTextString(m) } +func (*AppAnalyticsSetting) ProtoMessage() {} +func (*AppAnalyticsSetting) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{45} } + +func (m *AppAnalyticsSetting) GetEnabled() bool { + if m != nil { + return m.Enabled + } + return false +} + +type ManagedApplicationConfiguration struct { + Identifiers []string `protobuf:"bytes,1,rep,name=identifiers" json:"identifiers,omitempty"` +} + +func (m *ManagedApplicationConfiguration) Reset() { *m = ManagedApplicationConfiguration{} } +func (m *ManagedApplicationConfiguration) String() string { return proto.CompactTextString(m) } +func (*ManagedApplicationConfiguration) ProtoMessage() {} +func (*ManagedApplicationConfiguration) Descriptor() ([]byte, []int) { + return fileDescriptorMdm, []int{46} +} + +func (m *ManagedApplicationConfiguration) GetIdentifiers() []string { + if m != nil { + return m.Identifiers + } + return nil +} + +type ManagedApplicationAttributes struct { + Identifiers []string `protobuf:"bytes,1,rep,name=identifiers" json:"identifiers,omitempty"` +} + +func (m *ManagedApplicationAttributes) Reset() { *m = ManagedApplicationAttributes{} } +func (m *ManagedApplicationAttributes) String() string { return proto.CompactTextString(m) } +func (*ManagedApplicationAttributes) ProtoMessage() {} +func (*ManagedApplicationAttributes) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{47} } + +func (m *ManagedApplicationAttributes) GetIdentifiers() []string { + if m != nil { + return m.Identifiers + } + return nil +} + +type ManagedApplicationFeedback struct { + Identifiers []string `protobuf:"bytes,1,rep,name=identifiers" json:"identifiers,omitempty"` + DeleteFeedback bool `protobuf:"varint,2,opt,name=delete_feedback,json=deleteFeedback,proto3" json:"delete_feedback,omitempty"` +} + +func (m *ManagedApplicationFeedback) Reset() { *m = ManagedApplicationFeedback{} } +func (m *ManagedApplicationFeedback) String() string { return proto.CompactTextString(m) } +func (*ManagedApplicationFeedback) ProtoMessage() {} +func (*ManagedApplicationFeedback) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{48} } + +func (m *ManagedApplicationFeedback) GetIdentifiers() []string { + if m != nil { + return m.Identifiers + } + return nil +} + +func (m *ManagedApplicationFeedback) GetDeleteFeedback() bool { + if m != nil { + return m.DeleteFeedback + } + return false +} + +type SetFirmwarePassword struct { + CurrentPassword string `protobuf:"bytes,1,opt,name=current_password,json=currentPassword,proto3" json:"current_password,omitempty"` + NewPassword string `protobuf:"bytes,2,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"` + AllowOroms bool `protobuf:"varint,3,opt,name=allow_oroms,json=allowOroms,proto3" json:"allow_oroms,omitempty"` +} + +func (m *SetFirmwarePassword) Reset() { *m = SetFirmwarePassword{} } +func (m *SetFirmwarePassword) String() string { return proto.CompactTextString(m) } +func (*SetFirmwarePassword) ProtoMessage() {} +func (*SetFirmwarePassword) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{49} } + +func (m *SetFirmwarePassword) GetCurrentPassword() string { + if m != nil { + return m.CurrentPassword + } + return "" +} + +func (m *SetFirmwarePassword) GetNewPassword() string { + if m != nil { + return m.NewPassword + } + return "" +} + +func (m *SetFirmwarePassword) GetAllowOroms() bool { + if m != nil { + return m.AllowOroms + } + return false +} + +type VerifyFirmwarePassword struct { + Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` +} + +func (m *VerifyFirmwarePassword) Reset() { *m = VerifyFirmwarePassword{} } +func (m *VerifyFirmwarePassword) String() string { return proto.CompactTextString(m) } +func (*VerifyFirmwarePassword) ProtoMessage() {} +func (*VerifyFirmwarePassword) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{50} } + +func (m *VerifyFirmwarePassword) GetPassword() string { + if m != nil { + return m.Password + } + return "" +} + +type SetAutoAdminPassword struct { + Guid string `protobuf:"bytes,1,opt,name=guid,proto3" json:"guid,omitempty"` + PasswordHash []byte `protobuf:"bytes,2,opt,name=password_hash,json=passwordHash,proto3" json:"password_hash,omitempty"` +} + +func (m *SetAutoAdminPassword) Reset() { *m = SetAutoAdminPassword{} } +func (m *SetAutoAdminPassword) String() string { return proto.CompactTextString(m) } +func (*SetAutoAdminPassword) ProtoMessage() {} +func (*SetAutoAdminPassword) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{51} } + +func (m *SetAutoAdminPassword) GetGuid() string { + if m != nil { + return m.Guid + } + return "" +} + +func (m *SetAutoAdminPassword) GetPasswordHash() []byte { + if m != nil { + return m.PasswordHash + } + return nil +} + +type ScheduleOSUpdate struct { + Updates []*Update `protobuf:"bytes,1,rep,name=updates" json:"updates,omitempty"` +} + +func (m *ScheduleOSUpdate) Reset() { *m = ScheduleOSUpdate{} } +func (m *ScheduleOSUpdate) String() string { return proto.CompactTextString(m) } +func (*ScheduleOSUpdate) ProtoMessage() {} +func (*ScheduleOSUpdate) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{52} } + +func (m *ScheduleOSUpdate) GetUpdates() []*Update { + if m != nil { + return m.Updates + } + return nil +} + +type Update struct { + ProductKey string `protobuf:"bytes,1,opt,name=product_key,json=productKey,proto3" json:"product_key,omitempty"` + ProductVersion string `protobuf:"bytes,2,opt,name=product_version,json=productVersion,proto3" json:"product_version,omitempty"` + InstallAction string `protobuf:"bytes,3,opt,name=install_action,json=installAction,proto3" json:"install_action,omitempty"` +} + +func (m *Update) Reset() { *m = Update{} } +func (m *Update) String() string { return proto.CompactTextString(m) } +func (*Update) ProtoMessage() {} +func (*Update) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{53} } + +func (m *Update) GetProductKey() string { + if m != nil { + return m.ProductKey + } + return "" +} + +func (m *Update) GetProductVersion() string { + if m != nil { + return m.ProductVersion + } + return "" +} + +func (m *Update) GetInstallAction() string { + if m != nil { + return m.InstallAction + } + return "" +} + +type ScheduleOSUpdateScan struct { + Force bool `protobuf:"varint,1,opt,name=force,proto3" json:"force,omitempty"` +} + +func (m *ScheduleOSUpdateScan) Reset() { *m = ScheduleOSUpdateScan{} } +func (m *ScheduleOSUpdateScan) String() string { return proto.CompactTextString(m) } +func (*ScheduleOSUpdateScan) ProtoMessage() {} +func (*ScheduleOSUpdateScan) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{54} } + +func (m *ScheduleOSUpdateScan) GetForce() bool { + if m != nil { + return m.Force + } + return false +} + +type ActiveNSExtensions struct { + FilterExtensionPoints []string `protobuf:"bytes,1,rep,name=filter_extension_points,json=filterExtensionPoints" json:"filter_extension_points,omitempty"` +} + +func (m *ActiveNSExtensions) Reset() { *m = ActiveNSExtensions{} } +func (m *ActiveNSExtensions) String() string { return proto.CompactTextString(m) } +func (*ActiveNSExtensions) ProtoMessage() {} +func (*ActiveNSExtensions) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{55} } + +func (m *ActiveNSExtensions) GetFilterExtensionPoints() []string { + if m != nil { + return m.FilterExtensionPoints + } + return nil +} + +type RotateFileVaultKey struct { + KeyType string `protobuf:"bytes,1,opt,name=key_type,json=keyType,proto3" json:"key_type,omitempty"` + FilevaultUnlock *FileVaultUnlock `protobuf:"bytes,2,opt,name=filevault_unlock,json=filevaultUnlock" json:"filevault_unlock,omitempty"` + NewCertificate []byte `protobuf:"bytes,3,opt,name=new_certificate,json=newCertificate,proto3" json:"new_certificate,omitempty"` + ReplyEncryptionCertificate []byte `protobuf:"bytes,4,opt,name=reply_encryption_certificate,json=replyEncryptionCertificate,proto3" json:"reply_encryption_certificate,omitempty"` +} + +func (m *RotateFileVaultKey) Reset() { *m = RotateFileVaultKey{} } +func (m *RotateFileVaultKey) String() string { return proto.CompactTextString(m) } +func (*RotateFileVaultKey) ProtoMessage() {} +func (*RotateFileVaultKey) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{56} } + +func (m *RotateFileVaultKey) GetKeyType() string { + if m != nil { + return m.KeyType + } + return "" +} + +func (m *RotateFileVaultKey) GetFilevaultUnlock() *FileVaultUnlock { + if m != nil { + return m.FilevaultUnlock + } + return nil +} + +func (m *RotateFileVaultKey) GetNewCertificate() []byte { + if m != nil { + return m.NewCertificate + } + return nil +} + +func (m *RotateFileVaultKey) GetReplyEncryptionCertificate() []byte { + if m != nil { + return m.ReplyEncryptionCertificate + } + return nil +} + +type FileVaultUnlock struct { + Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` + PrivateKeyExport []byte `protobuf:"bytes,2,opt,name=private_key_export,json=privateKeyExport,proto3" json:"private_key_export,omitempty"` + PrivateKeyExportPassword string `protobuf:"bytes,3,opt,name=private_key_export_password,json=privateKeyExportPassword,proto3" json:"private_key_export_password,omitempty"` +} + +func (m *FileVaultUnlock) Reset() { *m = FileVaultUnlock{} } +func (m *FileVaultUnlock) String() string { return proto.CompactTextString(m) } +func (*FileVaultUnlock) ProtoMessage() {} +func (*FileVaultUnlock) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{57} } + +func (m *FileVaultUnlock) GetPassword() string { + if m != nil { + return m.Password + } + return "" +} + +func (m *FileVaultUnlock) GetPrivateKeyExport() []byte { + if m != nil { + return m.PrivateKeyExport + } + return nil +} + +func (m *FileVaultUnlock) GetPrivateKeyExportPassword() string { + if m != nil { + return m.PrivateKeyExportPassword + } + return "" +} + +type ResultPayload struct { + Udid string `protobuf:"bytes,1,opt,name=udid,proto3" json:"udid,omitempty"` + CommandUuid string `protobuf:"bytes,2,opt,name=command_uuid,json=commandUuid,proto3" json:"command_uuid,omitempty"` + ErrorChain []*ErrorChain `protobuf:"bytes,3,rep,name=error_chain,json=errorChain" json:"error_chain,omitempty"` +} + +func (m *ResultPayload) Reset() { *m = ResultPayload{} } +func (m *ResultPayload) String() string { return proto.CompactTextString(m) } +func (*ResultPayload) ProtoMessage() {} +func (*ResultPayload) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{58} } + +func (m *ResultPayload) GetUdid() string { + if m != nil { + return m.Udid + } + return "" +} + +func (m *ResultPayload) GetCommandUuid() string { + if m != nil { + return m.CommandUuid + } + return "" +} + +func (m *ResultPayload) GetErrorChain() []*ErrorChain { + if m != nil { + return m.ErrorChain + } + return nil +} + +type ErrorChain struct { + LocalizedDescription string `protobuf:"bytes,1,opt,name=localized_description,json=localizedDescription,proto3" json:"localized_description,omitempty"` + UsEnglishDescription string `protobuf:"bytes,2,opt,name=us_english_description,json=usEnglishDescription,proto3" json:"us_english_description,omitempty"` + // The ErrorDomain and ErrorCode keys contain internal codes used by Apple + // that may be useful for diagnostics. Your host should not rely on these + // values, as they may change between software releases. + ErrorDomain string `protobuf:"bytes,3,opt,name=error_domain,json=errorDomain,proto3" json:"error_domain,omitempty"` + ErrorCode int32 `protobuf:"varint,4,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` +} + +func (m *ErrorChain) Reset() { *m = ErrorChain{} } +func (m *ErrorChain) String() string { return proto.CompactTextString(m) } +func (*ErrorChain) ProtoMessage() {} +func (*ErrorChain) Descriptor() ([]byte, []int) { return fileDescriptorMdm, []int{59} } + +func (m *ErrorChain) GetLocalizedDescription() string { + if m != nil { + return m.LocalizedDescription + } + return "" +} + +func (m *ErrorChain) GetUsEnglishDescription() string { + if m != nil { + return m.UsEnglishDescription + } + return "" +} + +func (m *ErrorChain) GetErrorDomain() string { + if m != nil { + return m.ErrorDomain + } + return "" +} + +func (m *ErrorChain) GetErrorCode() int32 { + if m != nil { + return m.ErrorCode + } + return 0 +} + +func init() { + proto.RegisterType((*CommandPayload)(nil), "mdmproto.CommandPayload") + proto.RegisterType((*Command)(nil), "mdmproto.Command") + proto.RegisterType((*InstallProfile)(nil), "mdmproto.InstallProfile") + proto.RegisterType((*RemoveProfile)(nil), "mdmproto.RemoveProfile") + proto.RegisterType((*InstallProvisioningProfile)(nil), "mdmproto.InstallProvisioningProfile") + proto.RegisterType((*RemoveProvisioningProfile)(nil), "mdmproto.RemoveProvisioningProfile") + proto.RegisterType((*InstalledApplicationList)(nil), "mdmproto.InstalledApplicationList") + proto.RegisterType((*DeviceInformation)(nil), "mdmproto.DeviceInformation") + proto.RegisterType((*ClearPasscode)(nil), "mdmproto.ClearPasscode") + proto.RegisterType((*DeviceLock)(nil), "mdmproto.DeviceLock") + proto.RegisterType((*EraseDevice)(nil), "mdmproto.EraseDevice") + proto.RegisterType((*RequestMirroring)(nil), "mdmproto.RequestMirroring") + proto.RegisterType((*Restrictions)(nil), "mdmproto.Restrictions") + proto.RegisterType((*UnlockUserAccount)(nil), "mdmproto.UnlockUserAccount") + proto.RegisterType((*DeleteUser)(nil), "mdmproto.DeleteUser") + proto.RegisterType((*EnableLostMode)(nil), "mdmproto.EnableLostMode") + proto.RegisterType((*InstallApplication)(nil), "mdmproto.InstallApplication") + proto.RegisterType((*InstallApplicationOptions)(nil), "mdmproto.InstallApplicationOptions") + proto.RegisterType((*InstallApplicationConfiguration)(nil), "mdmproto.InstallApplicationConfiguration") + proto.RegisterType((*InstallApplicationAttributes)(nil), "mdmproto.InstallApplicationAttributes") + proto.RegisterType((*ApplyRedemptionCode)(nil), "mdmproto.ApplyRedemptionCode") + proto.RegisterType((*ManagedApplicationList)(nil), "mdmproto.ManagedApplicationList") + proto.RegisterType((*RemoveApplication)(nil), "mdmproto.RemoveApplication") + proto.RegisterType((*InviteToProgram)(nil), "mdmproto.InviteToProgram") + proto.RegisterType((*ValidateApplications)(nil), "mdmproto.ValidateApplications") + proto.RegisterType((*AccountConfiguration)(nil), "mdmproto.AccountConfiguration") + proto.RegisterType((*AutoSetupAdminAccounts)(nil), "mdmproto.AutoSetupAdminAccounts") + proto.RegisterType((*InstallMedia)(nil), "mdmproto.InstallMedia") + proto.RegisterType((*RemoveMedia)(nil), "mdmproto.RemoveMedia") + proto.RegisterType((*Settings)(nil), "mdmproto.Settings") + proto.RegisterType((*Setting)(nil), "mdmproto.Setting") + proto.RegisterType((*VoiceRoamingSetting)(nil), "mdmproto.VoiceRoamingSetting") + proto.RegisterType((*PersonalHotspotSetting)(nil), "mdmproto.PersonalHotspotSetting") + proto.RegisterType((*WallpaperSetting)(nil), "mdmproto.WallpaperSetting") + proto.RegisterType((*DataRoamingSetting)(nil), "mdmproto.DataRoamingSetting") + proto.RegisterType((*BluetoothSetting)(nil), "mdmproto.BluetoothSetting") + proto.RegisterType((*ApplicationAttributesSetting)(nil), "mdmproto.ApplicationAttributesSetting") + proto.RegisterType((*ApplicationAttributes)(nil), "mdmproto.ApplicationAttributes") + proto.RegisterType((*DeviceNameSetting)(nil), "mdmproto.DeviceNameSetting") + proto.RegisterType((*HostnameSetting)(nil), "mdmproto.HostnameSetting") + proto.RegisterType((*MDMOptionsSetting)(nil), "mdmproto.MDMOptionsSetting") + proto.RegisterType((*MDMOptions)(nil), "mdmproto.MDMOptions") + proto.RegisterType((*PasscodeLockGracePeriodSetting)(nil), "mdmproto.PasscodeLockGracePeriodSetting") + proto.RegisterType((*MaximumResidentUsersSetting)(nil), "mdmproto.MaximumResidentUsersSetting") + proto.RegisterType((*DiagnosticSubmissionSetting)(nil), "mdmproto.DiagnosticSubmissionSetting") + proto.RegisterType((*AppAnalyticsSetting)(nil), "mdmproto.AppAnalyticsSetting") + proto.RegisterType((*ManagedApplicationConfiguration)(nil), "mdmproto.ManagedApplicationConfiguration") + proto.RegisterType((*ManagedApplicationAttributes)(nil), "mdmproto.ManagedApplicationAttributes") + proto.RegisterType((*ManagedApplicationFeedback)(nil), "mdmproto.ManagedApplicationFeedback") + proto.RegisterType((*SetFirmwarePassword)(nil), "mdmproto.SetFirmwarePassword") + proto.RegisterType((*VerifyFirmwarePassword)(nil), "mdmproto.VerifyFirmwarePassword") + proto.RegisterType((*SetAutoAdminPassword)(nil), "mdmproto.SetAutoAdminPassword") + proto.RegisterType((*ScheduleOSUpdate)(nil), "mdmproto.ScheduleOSUpdate") + proto.RegisterType((*Update)(nil), "mdmproto.Update") + proto.RegisterType((*ScheduleOSUpdateScan)(nil), "mdmproto.ScheduleOSUpdateScan") + proto.RegisterType((*ActiveNSExtensions)(nil), "mdmproto.ActiveNSExtensions") + proto.RegisterType((*RotateFileVaultKey)(nil), "mdmproto.RotateFileVaultKey") + proto.RegisterType((*FileVaultUnlock)(nil), "mdmproto.FileVaultUnlock") + proto.RegisterType((*ResultPayload)(nil), "mdmproto.ResultPayload") + proto.RegisterType((*ErrorChain)(nil), "mdmproto.ErrorChain") + proto.RegisterEnum("mdmproto.ResultPayload_Status", ResultPayload_Status_name, ResultPayload_Status_value) +} +func (m *CommandPayload) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CommandPayload) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.CommandUuid) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.CommandUuid))) + i += copy(dAtA[i:], m.CommandUuid) + } + if m.Command != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.Command.Size())) + n1, err := m.Command.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + return i, nil +} + +func (m *Command) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Command) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.RequestType) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.RequestType))) + i += copy(dAtA[i:], m.RequestType) + } + if m.Request != nil { + nn2, err := m.Request.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn2 + } + return i, nil +} + +func (m *Command_InstallProfile) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.InstallProfile != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.InstallProfile.Size())) + n3, err := m.InstallProfile.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + return i, nil +} +func (m *Command_RemoveProfile) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RemoveProfile != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.RemoveProfile.Size())) + n4, err := m.RemoveProfile.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + return i, nil +} +func (m *Command_InstallProvisioningProfile) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.InstallProvisioningProfile != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.InstallProvisioningProfile.Size())) + n5, err := m.InstallProvisioningProfile.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + return i, nil +} +func (m *Command_RemoveProfisioningProfile) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RemoveProfisioningProfile != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.RemoveProfisioningProfile.Size())) + n6, err := m.RemoveProfisioningProfile.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + return i, nil +} +func (m *Command_InstalledApplicationList) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.InstalledApplicationList != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.InstalledApplicationList.Size())) + n7, err := m.InstalledApplicationList.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + } + return i, nil +} +func (m *Command_DeviceInformation) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.DeviceInformation != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.DeviceInformation.Size())) + n8, err := m.DeviceInformation.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + } + return i, nil +} +func (m *Command_DeviceLock) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.DeviceLock != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.DeviceLock.Size())) + n9, err := m.DeviceLock.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 + } + return i, nil +} +func (m *Command_ClearPasscode) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.ClearPasscode != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.ClearPasscode.Size())) + n10, err := m.ClearPasscode.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n10 + } + return i, nil +} +func (m *Command_EraseDevice) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.EraseDevice != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.EraseDevice.Size())) + n11, err := m.EraseDevice.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 + } + return i, nil +} +func (m *Command_RequestMirroring) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RequestMirroring != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.RequestMirroring.Size())) + n12, err := m.RequestMirroring.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n12 + } + return i, nil +} +func (m *Command_Restrictions) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Restrictions != nil { + dAtA[i] = 0x62 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.Restrictions.Size())) + n13, err := m.Restrictions.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n13 + } + return i, nil +} +func (m *Command_UnlockUserAccount) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.UnlockUserAccount != nil { + dAtA[i] = 0x6a + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.UnlockUserAccount.Size())) + n14, err := m.UnlockUserAccount.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n14 + } + return i, nil +} +func (m *Command_DeleteUser) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.DeleteUser != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.DeleteUser.Size())) + n15, err := m.DeleteUser.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n15 + } + return i, nil +} +func (m *Command_EnableLostMode) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.EnableLostMode != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.EnableLostMode.Size())) + n16, err := m.EnableLostMode.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n16 + } + return i, nil +} +func (m *Command_InstallApplication) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.InstallApplication != nil { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.InstallApplication.Size())) + n17, err := m.InstallApplication.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n17 + } + return i, nil +} +func (m *Command_AccountConfiguration) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.AccountConfiguration != nil { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.AccountConfiguration.Size())) + n18, err := m.AccountConfiguration.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n18 + } + return i, nil +} +func (m *Command_ApplyRedemptionCode) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.ApplyRedemptionCode != nil { + dAtA[i] = 0x92 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.ApplyRedemptionCode.Size())) + n19, err := m.ApplyRedemptionCode.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n19 + } + return i, nil +} +func (m *Command_ManagedApplicationList) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.ManagedApplicationList != nil { + dAtA[i] = 0x9a + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.ManagedApplicationList.Size())) + n20, err := m.ManagedApplicationList.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n20 + } + return i, nil +} +func (m *Command_RemoveApplication) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RemoveApplication != nil { + dAtA[i] = 0xa2 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.RemoveApplication.Size())) + n21, err := m.RemoveApplication.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n21 + } + return i, nil +} +func (m *Command_InviteToProgram) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.InviteToProgram != nil { + dAtA[i] = 0xaa + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.InviteToProgram.Size())) + n22, err := m.InviteToProgram.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n22 + } + return i, nil +} +func (m *Command_ValidataApplications) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.ValidataApplications != nil { + dAtA[i] = 0xb2 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.ValidataApplications.Size())) + n23, err := m.ValidataApplications.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n23 + } + return i, nil +} +func (m *Command_InstallMedia) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.InstallMedia != nil { + dAtA[i] = 0xba + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.InstallMedia.Size())) + n24, err := m.InstallMedia.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n24 + } + return i, nil +} +func (m *Command_RemoveMedia) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RemoveMedia != nil { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.RemoveMedia.Size())) + n25, err := m.RemoveMedia.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n25 + } + return i, nil +} +func (m *Command_Settings) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Settings != nil { + dAtA[i] = 0xca + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.Settings.Size())) + n26, err := m.Settings.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n26 + } + return i, nil +} +func (m *Command_ManagedApplicationConfiguration) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.ManagedApplicationConfiguration != nil { + dAtA[i] = 0xd2 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.ManagedApplicationConfiguration.Size())) + n27, err := m.ManagedApplicationConfiguration.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n27 + } + return i, nil +} +func (m *Command_ManagedApplicationAttributes) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.ManagedApplicationAttributes != nil { + dAtA[i] = 0xda + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.ManagedApplicationAttributes.Size())) + n28, err := m.ManagedApplicationAttributes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n28 + } + return i, nil +} +func (m *Command_ManagedApplicationFeedback) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.ManagedApplicationFeedback != nil { + dAtA[i] = 0xe2 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.ManagedApplicationFeedback.Size())) + n29, err := m.ManagedApplicationFeedback.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n29 + } + return i, nil +} +func (m *Command_SetFirmwarePassword) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.SetFirmwarePassword != nil { + dAtA[i] = 0xea + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.SetFirmwarePassword.Size())) + n30, err := m.SetFirmwarePassword.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n30 + } + return i, nil +} +func (m *Command_VerifyFirmwarePassword) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.VerifyFirmwarePassword != nil { + dAtA[i] = 0xf2 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.VerifyFirmwarePassword.Size())) + n31, err := m.VerifyFirmwarePassword.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n31 + } + return i, nil +} +func (m *Command_SetAutoAdminPassword) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.SetAutoAdminPassword != nil { + dAtA[i] = 0xfa + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.SetAutoAdminPassword.Size())) + n32, err := m.SetAutoAdminPassword.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n32 + } + return i, nil +} +func (m *Command_ScheduleOsUpdate) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.ScheduleOsUpdate != nil { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.ScheduleOsUpdate.Size())) + n33, err := m.ScheduleOsUpdate.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n33 + } + return i, nil +} +func (m *Command_ScheduleOsUpdateScan) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.ScheduleOsUpdateScan != nil { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.ScheduleOsUpdateScan.Size())) + n34, err := m.ScheduleOsUpdateScan.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n34 + } + return i, nil +} +func (m *Command_ActiveNsExtensions) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.ActiveNsExtensions != nil { + dAtA[i] = 0x92 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.ActiveNsExtensions.Size())) + n35, err := m.ActiveNsExtensions.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n35 + } + return i, nil +} +func (m *Command_RotateFilevaultKey) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RotateFilevaultKey != nil { + dAtA[i] = 0x9a + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.RotateFilevaultKey.Size())) + n36, err := m.RotateFilevaultKey.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n36 + } + return i, nil +} +func (m *InstallProfile) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InstallProfile) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Payload) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.Payload))) + i += copy(dAtA[i:], m.Payload) + } + return i, nil +} + +func (m *RemoveProfile) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RemoveProfile) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Identifier) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.Identifier))) + i += copy(dAtA[i:], m.Identifier) + } + return i, nil +} + +func (m *InstallProvisioningProfile) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InstallProvisioningProfile) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ProvisioningProfile) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.ProvisioningProfile))) + i += copy(dAtA[i:], m.ProvisioningProfile) + } + return i, nil +} + +func (m *RemoveProvisioningProfile) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RemoveProvisioningProfile) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Uuid) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.Uuid))) + i += copy(dAtA[i:], m.Uuid) + } + return i, nil +} + +func (m *InstalledApplicationList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InstalledApplicationList) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Identifiers) > 0 { + for _, s := range m.Identifiers { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if m.ManagedAppsOnly { + dAtA[i] = 0x10 + i++ + if m.ManagedAppsOnly { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *DeviceInformation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeviceInformation) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Queries) > 0 { + for _, s := range m.Queries { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *ClearPasscode) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ClearPasscode) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.UnlockToken) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.UnlockToken))) + i += copy(dAtA[i:], m.UnlockToken) + } + return i, nil +} + +func (m *DeviceLock) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeviceLock) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Pin) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.Pin))) + i += copy(dAtA[i:], m.Pin) + } + if len(m.Message) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.Message))) + i += copy(dAtA[i:], m.Message) + } + if len(m.PhoneNumber) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.PhoneNumber))) + i += copy(dAtA[i:], m.PhoneNumber) + } + return i, nil +} + +func (m *EraseDevice) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EraseDevice) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Pin) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.Pin))) + i += copy(dAtA[i:], m.Pin) + } + if m.PreserveDataPlan { + dAtA[i] = 0x10 + i++ + if m.PreserveDataPlan { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.DisallowProximitySetup { + dAtA[i] = 0x18 + i++ + if m.DisallowProximitySetup { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *RequestMirroring) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RequestMirroring) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.DestinationName) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.DestinationName))) + i += copy(dAtA[i:], m.DestinationName) + } + if len(m.DestinationDeviceId) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.DestinationDeviceId))) + i += copy(dAtA[i:], m.DestinationDeviceId) + } + if len(m.ScanTime) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.ScanTime))) + i += copy(dAtA[i:], m.ScanTime) + } + if len(m.Password) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.Password))) + i += copy(dAtA[i:], m.Password) + } + return i, nil +} + +func (m *Restrictions) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Restrictions) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ProfileRestrictions { + dAtA[i] = 0x8 + i++ + if m.ProfileRestrictions { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *UnlockUserAccount) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UnlockUserAccount) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Username) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) + } + return i, nil +} + +func (m *DeleteUser) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeleteUser) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Username) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) + } + if m.ForceDeletion { + dAtA[i] = 0x10 + i++ + if m.ForceDeletion { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *EnableLostMode) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EnableLostMode) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Message) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.Message))) + i += copy(dAtA[i:], m.Message) + } + if len(m.PhoneNumber) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.PhoneNumber))) + i += copy(dAtA[i:], m.PhoneNumber) + } + if len(m.Footnote) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.Footnote))) + i += copy(dAtA[i:], m.Footnote) + } + return i, nil +} + +func (m *InstallApplication) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InstallApplication) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ItunesStoreId != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.ItunesStoreId)) + } + if len(m.Identifier) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.Identifier))) + i += copy(dAtA[i:], m.Identifier) + } + if m.Options != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.Options.Size())) + n37, err := m.Options.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n37 + } + if len(m.ManifestUrl) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.ManifestUrl))) + i += copy(dAtA[i:], m.ManifestUrl) + } + if m.ManagementFlags != 0 { + dAtA[i] = 0x28 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.ManagementFlags)) + } + if m.Configuration != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.Configuration.Size())) + n38, err := m.Configuration.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n38 + } + if m.Attributes != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.Attributes.Size())) + n39, err := m.Attributes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n39 + } + if len(m.ChangeManagementState) > 0 { + dAtA[i] = 0x42 + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.ChangeManagementState))) + i += copy(dAtA[i:], m.ChangeManagementState) + } + return i, nil +} + +func (m *InstallApplicationOptions) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InstallApplicationOptions) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.PurchaseMethod != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.PurchaseMethod)) + } + return i, nil +} + +func (m *InstallApplicationConfiguration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InstallApplicationConfiguration) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *InstallApplicationAttributes) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InstallApplicationAttributes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *ApplyRedemptionCode) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ApplyRedemptionCode) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Identifier) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.Identifier))) + i += copy(dAtA[i:], m.Identifier) + } + if len(m.RedemptionCode) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.RedemptionCode))) + i += copy(dAtA[i:], m.RedemptionCode) + } + return i, nil +} + +func (m *ManagedApplicationList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ManagedApplicationList) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Identifiers) > 0 { + for _, s := range m.Identifiers { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *RemoveApplication) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RemoveApplication) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Identifier) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.Identifier))) + i += copy(dAtA[i:], m.Identifier) + } + return i, nil +} + +func (m *InviteToProgram) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InviteToProgram) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ProgramId) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.ProgramId))) + i += copy(dAtA[i:], m.ProgramId) + } + if len(m.InvitationUrl) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.InvitationUrl))) + i += copy(dAtA[i:], m.InvitationUrl) + } + return i, nil +} + +func (m *ValidateApplications) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValidateApplications) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Identifiers) > 0 { + for _, s := range m.Identifiers { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *AccountConfiguration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AccountConfiguration) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.SkipPrimarySetupAccountCreation { + dAtA[i] = 0x8 + i++ + if m.SkipPrimarySetupAccountCreation { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.SetPrimarySetupAccountAsRegularUser { + dAtA[i] = 0x10 + i++ + if m.SetPrimarySetupAccountAsRegularUser { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if len(m.AutoSetupAdminAccounts) > 0 { + for _, msg := range m.AutoSetupAdminAccounts { + dAtA[i] = 0x1a + i++ + i = encodeVarintMdm(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *AutoSetupAdminAccounts) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AutoSetupAdminAccounts) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ShortName) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.ShortName))) + i += copy(dAtA[i:], m.ShortName) + } + if len(m.FullName) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.FullName))) + i += copy(dAtA[i:], m.FullName) + } + if len(m.PasswordHash) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.PasswordHash))) + i += copy(dAtA[i:], m.PasswordHash) + } + if m.Hidden { + dAtA[i] = 0x20 + i++ + if m.Hidden { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *InstallMedia) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InstallMedia) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ItunesStoreId != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.ItunesStoreId)) + } + if len(m.MediaUrl) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.MediaUrl))) + i += copy(dAtA[i:], m.MediaUrl) + } + if len(m.MediaType) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.MediaType))) + i += copy(dAtA[i:], m.MediaType) + } + return i, nil +} + +func (m *RemoveMedia) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RemoveMedia) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.MediaType) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.MediaType))) + i += copy(dAtA[i:], m.MediaType) + } + if m.ItunesStoreId != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.ItunesStoreId)) + } + if len(m.PersistentId) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.PersistentId))) + i += copy(dAtA[i:], m.PersistentId) + } + return i, nil +} + +func (m *Settings) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Settings) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Settings) > 0 { + for _, msg := range m.Settings { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Setting) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Setting) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Item) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.Item))) + i += copy(dAtA[i:], m.Item) + } + if m.DeviceName != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.DeviceName.Size())) + n40, err := m.DeviceName.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n40 + } + if m.Hostname != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.Hostname.Size())) + n41, err := m.Hostname.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n41 + } + if m.VoiceRoaming != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.VoiceRoaming.Size())) + n42, err := m.VoiceRoaming.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n42 + } + if m.PersonalHotspot != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.PersonalHotspot.Size())) + n43, err := m.PersonalHotspot.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n43 + } + if m.Wallpaper != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.Wallpaper.Size())) + n44, err := m.Wallpaper.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n44 + } + if m.DataRoaming != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.DataRoaming.Size())) + n45, err := m.DataRoaming.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n45 + } + if m.Bluetooth != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.Bluetooth.Size())) + n46, err := m.Bluetooth.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n46 + } + if m.ApplicationAttributes != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.ApplicationAttributes.Size())) + n47, err := m.ApplicationAttributes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n47 + } + if m.MdmOptions != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.MdmOptions.Size())) + n48, err := m.MdmOptions.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n48 + } + if m.PasscodeLockGracePeriod != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.PasscodeLockGracePeriod.Size())) + n49, err := m.PasscodeLockGracePeriod.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n49 + } + if m.MaximumResidentUsers != nil { + dAtA[i] = 0x62 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.MaximumResidentUsers.Size())) + n50, err := m.MaximumResidentUsers.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n50 + } + if m.DiagnosticSubmission != nil { + dAtA[i] = 0x6a + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.DiagnosticSubmission.Size())) + n51, err := m.DiagnosticSubmission.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n51 + } + if m.AppAnalytics != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.AppAnalytics.Size())) + n52, err := m.AppAnalytics.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n52 + } + return i, nil +} + +func (m *VoiceRoamingSetting) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VoiceRoamingSetting) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Enabled { + dAtA[i] = 0x8 + i++ + if m.Enabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *PersonalHotspotSetting) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PersonalHotspotSetting) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Enabled { + dAtA[i] = 0x8 + i++ + if m.Enabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *WallpaperSetting) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *WallpaperSetting) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Image) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.Image))) + i += copy(dAtA[i:], m.Image) + } + if m.Where != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.Where)) + } + return i, nil +} + +func (m *DataRoamingSetting) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DataRoamingSetting) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Enabled { + dAtA[i] = 0x8 + i++ + if m.Enabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *BluetoothSetting) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BluetoothSetting) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Enabled { + dAtA[i] = 0x8 + i++ + if m.Enabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *ApplicationAttributesSetting) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ApplicationAttributesSetting) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Identifier) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.Identifier))) + i += copy(dAtA[i:], m.Identifier) + } + if m.ApplicationAttributes != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.ApplicationAttributes.Size())) + n53, err := m.ApplicationAttributes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n53 + } + return i, nil +} + +func (m *ApplicationAttributes) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ApplicationAttributes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.VpnUuid) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.VpnUuid))) + i += copy(dAtA[i:], m.VpnUuid) + } + return i, nil +} + +func (m *DeviceNameSetting) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeviceNameSetting) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.DeviceName) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.DeviceName))) + i += copy(dAtA[i:], m.DeviceName) + } + return i, nil +} + +func (m *HostnameSetting) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HostnameSetting) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Hostname) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.Hostname))) + i += copy(dAtA[i:], m.Hostname) + } + return i, nil +} + +func (m *MDMOptionsSetting) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MDMOptionsSetting) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.MdmOptions != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.MdmOptions.Size())) + n54, err := m.MdmOptions.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n54 + } + return i, nil +} + +func (m *MDMOptions) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MDMOptions) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ActivationLockAllowedWhileSupervised { + dAtA[i] = 0x8 + i++ + if m.ActivationLockAllowedWhileSupervised { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *PasscodeLockGracePeriodSetting) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PasscodeLockGracePeriodSetting) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.PasscodeLockGracePeriod != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.PasscodeLockGracePeriod)) + } + return i, nil +} + +func (m *MaximumResidentUsersSetting) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MaximumResidentUsersSetting) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.MaximumResidentUsers != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.MaximumResidentUsers)) + } + return i, nil +} + +func (m *DiagnosticSubmissionSetting) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DiagnosticSubmissionSetting) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Enabled { + dAtA[i] = 0x8 + i++ + if m.Enabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *AppAnalyticsSetting) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AppAnalyticsSetting) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Enabled { + dAtA[i] = 0x8 + i++ + if m.Enabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *ManagedApplicationConfiguration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ManagedApplicationConfiguration) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Identifiers) > 0 { + for _, s := range m.Identifiers { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *ManagedApplicationAttributes) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ManagedApplicationAttributes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Identifiers) > 0 { + for _, s := range m.Identifiers { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *ManagedApplicationFeedback) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ManagedApplicationFeedback) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Identifiers) > 0 { + for _, s := range m.Identifiers { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if m.DeleteFeedback { + dAtA[i] = 0x10 + i++ + if m.DeleteFeedback { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *SetFirmwarePassword) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SetFirmwarePassword) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.CurrentPassword) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.CurrentPassword))) + i += copy(dAtA[i:], m.CurrentPassword) + } + if len(m.NewPassword) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.NewPassword))) + i += copy(dAtA[i:], m.NewPassword) + } + if m.AllowOroms { + dAtA[i] = 0x18 + i++ + if m.AllowOroms { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *VerifyFirmwarePassword) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VerifyFirmwarePassword) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Password) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.Password))) + i += copy(dAtA[i:], m.Password) + } + return i, nil +} + +func (m *SetAutoAdminPassword) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SetAutoAdminPassword) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Guid) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.Guid))) + i += copy(dAtA[i:], m.Guid) + } + if len(m.PasswordHash) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.PasswordHash))) + i += copy(dAtA[i:], m.PasswordHash) + } + return i, nil +} + +func (m *ScheduleOSUpdate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ScheduleOSUpdate) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Updates) > 0 { + for _, msg := range m.Updates { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Update) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Update) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ProductKey) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.ProductKey))) + i += copy(dAtA[i:], m.ProductKey) + } + if len(m.ProductVersion) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.ProductVersion))) + i += copy(dAtA[i:], m.ProductVersion) + } + if len(m.InstallAction) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.InstallAction))) + i += copy(dAtA[i:], m.InstallAction) + } + return i, nil +} + +func (m *ScheduleOSUpdateScan) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ScheduleOSUpdateScan) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Force { + dAtA[i] = 0x8 + i++ + if m.Force { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *ActiveNSExtensions) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ActiveNSExtensions) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.FilterExtensionPoints) > 0 { + for _, s := range m.FilterExtensionPoints { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *RotateFileVaultKey) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RotateFileVaultKey) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.KeyType) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.KeyType))) + i += copy(dAtA[i:], m.KeyType) + } + if m.FilevaultUnlock != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.FilevaultUnlock.Size())) + n55, err := m.FilevaultUnlock.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n55 + } + if len(m.NewCertificate) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.NewCertificate))) + i += copy(dAtA[i:], m.NewCertificate) + } + if len(m.ReplyEncryptionCertificate) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.ReplyEncryptionCertificate))) + i += copy(dAtA[i:], m.ReplyEncryptionCertificate) + } + return i, nil +} + +func (m *FileVaultUnlock) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FileVaultUnlock) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Password) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.Password))) + i += copy(dAtA[i:], m.Password) + } + if len(m.PrivateKeyExport) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.PrivateKeyExport))) + i += copy(dAtA[i:], m.PrivateKeyExport) + } + if len(m.PrivateKeyExportPassword) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.PrivateKeyExportPassword))) + i += copy(dAtA[i:], m.PrivateKeyExportPassword) + } + return i, nil +} + +func (m *ResultPayload) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResultPayload) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Udid) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.Udid))) + i += copy(dAtA[i:], m.Udid) + } + if len(m.CommandUuid) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.CommandUuid))) + i += copy(dAtA[i:], m.CommandUuid) + } + if len(m.ErrorChain) > 0 { + for _, msg := range m.ErrorChain { + dAtA[i] = 0x1a + i++ + i = encodeVarintMdm(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ErrorChain) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ErrorChain) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.LocalizedDescription) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.LocalizedDescription))) + i += copy(dAtA[i:], m.LocalizedDescription) + } + if len(m.UsEnglishDescription) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.UsEnglishDescription))) + i += copy(dAtA[i:], m.UsEnglishDescription) + } + if len(m.ErrorDomain) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintMdm(dAtA, i, uint64(len(m.ErrorDomain))) + i += copy(dAtA[i:], m.ErrorDomain) + } + if m.ErrorCode != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintMdm(dAtA, i, uint64(m.ErrorCode)) + } + return i, nil +} + +func encodeVarintMdm(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *CommandPayload) Size() (n int) { + var l int + _ = l + l = len(m.CommandUuid) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + if m.Command != nil { + l = m.Command.Size() + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *Command) Size() (n int) { + var l int + _ = l + l = len(m.RequestType) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + if m.Request != nil { + n += m.Request.Size() + } + return n +} + +func (m *Command_InstallProfile) Size() (n int) { + var l int + _ = l + if m.InstallProfile != nil { + l = m.InstallProfile.Size() + n += 1 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_RemoveProfile) Size() (n int) { + var l int + _ = l + if m.RemoveProfile != nil { + l = m.RemoveProfile.Size() + n += 1 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_InstallProvisioningProfile) Size() (n int) { + var l int + _ = l + if m.InstallProvisioningProfile != nil { + l = m.InstallProvisioningProfile.Size() + n += 1 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_RemoveProfisioningProfile) Size() (n int) { + var l int + _ = l + if m.RemoveProfisioningProfile != nil { + l = m.RemoveProfisioningProfile.Size() + n += 1 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_InstalledApplicationList) Size() (n int) { + var l int + _ = l + if m.InstalledApplicationList != nil { + l = m.InstalledApplicationList.Size() + n += 1 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_DeviceInformation) Size() (n int) { + var l int + _ = l + if m.DeviceInformation != nil { + l = m.DeviceInformation.Size() + n += 1 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_DeviceLock) Size() (n int) { + var l int + _ = l + if m.DeviceLock != nil { + l = m.DeviceLock.Size() + n += 1 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_ClearPasscode) Size() (n int) { + var l int + _ = l + if m.ClearPasscode != nil { + l = m.ClearPasscode.Size() + n += 1 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_EraseDevice) Size() (n int) { + var l int + _ = l + if m.EraseDevice != nil { + l = m.EraseDevice.Size() + n += 1 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_RequestMirroring) Size() (n int) { + var l int + _ = l + if m.RequestMirroring != nil { + l = m.RequestMirroring.Size() + n += 1 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_Restrictions) Size() (n int) { + var l int + _ = l + if m.Restrictions != nil { + l = m.Restrictions.Size() + n += 1 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_UnlockUserAccount) Size() (n int) { + var l int + _ = l + if m.UnlockUserAccount != nil { + l = m.UnlockUserAccount.Size() + n += 1 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_DeleteUser) Size() (n int) { + var l int + _ = l + if m.DeleteUser != nil { + l = m.DeleteUser.Size() + n += 1 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_EnableLostMode) Size() (n int) { + var l int + _ = l + if m.EnableLostMode != nil { + l = m.EnableLostMode.Size() + n += 1 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_InstallApplication) Size() (n int) { + var l int + _ = l + if m.InstallApplication != nil { + l = m.InstallApplication.Size() + n += 2 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_AccountConfiguration) Size() (n int) { + var l int + _ = l + if m.AccountConfiguration != nil { + l = m.AccountConfiguration.Size() + n += 2 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_ApplyRedemptionCode) Size() (n int) { + var l int + _ = l + if m.ApplyRedemptionCode != nil { + l = m.ApplyRedemptionCode.Size() + n += 2 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_ManagedApplicationList) Size() (n int) { + var l int + _ = l + if m.ManagedApplicationList != nil { + l = m.ManagedApplicationList.Size() + n += 2 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_RemoveApplication) Size() (n int) { + var l int + _ = l + if m.RemoveApplication != nil { + l = m.RemoveApplication.Size() + n += 2 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_InviteToProgram) Size() (n int) { + var l int + _ = l + if m.InviteToProgram != nil { + l = m.InviteToProgram.Size() + n += 2 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_ValidataApplications) Size() (n int) { + var l int + _ = l + if m.ValidataApplications != nil { + l = m.ValidataApplications.Size() + n += 2 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_InstallMedia) Size() (n int) { + var l int + _ = l + if m.InstallMedia != nil { + l = m.InstallMedia.Size() + n += 2 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_RemoveMedia) Size() (n int) { + var l int + _ = l + if m.RemoveMedia != nil { + l = m.RemoveMedia.Size() + n += 2 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_Settings) Size() (n int) { + var l int + _ = l + if m.Settings != nil { + l = m.Settings.Size() + n += 2 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_ManagedApplicationConfiguration) Size() (n int) { + var l int + _ = l + if m.ManagedApplicationConfiguration != nil { + l = m.ManagedApplicationConfiguration.Size() + n += 2 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_ManagedApplicationAttributes) Size() (n int) { + var l int + _ = l + if m.ManagedApplicationAttributes != nil { + l = m.ManagedApplicationAttributes.Size() + n += 2 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_ManagedApplicationFeedback) Size() (n int) { + var l int + _ = l + if m.ManagedApplicationFeedback != nil { + l = m.ManagedApplicationFeedback.Size() + n += 2 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_SetFirmwarePassword) Size() (n int) { + var l int + _ = l + if m.SetFirmwarePassword != nil { + l = m.SetFirmwarePassword.Size() + n += 2 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_VerifyFirmwarePassword) Size() (n int) { + var l int + _ = l + if m.VerifyFirmwarePassword != nil { + l = m.VerifyFirmwarePassword.Size() + n += 2 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_SetAutoAdminPassword) Size() (n int) { + var l int + _ = l + if m.SetAutoAdminPassword != nil { + l = m.SetAutoAdminPassword.Size() + n += 2 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_ScheduleOsUpdate) Size() (n int) { + var l int + _ = l + if m.ScheduleOsUpdate != nil { + l = m.ScheduleOsUpdate.Size() + n += 2 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_ScheduleOsUpdateScan) Size() (n int) { + var l int + _ = l + if m.ScheduleOsUpdateScan != nil { + l = m.ScheduleOsUpdateScan.Size() + n += 2 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_ActiveNsExtensions) Size() (n int) { + var l int + _ = l + if m.ActiveNsExtensions != nil { + l = m.ActiveNsExtensions.Size() + n += 2 + l + sovMdm(uint64(l)) + } + return n +} +func (m *Command_RotateFilevaultKey) Size() (n int) { + var l int + _ = l + if m.RotateFilevaultKey != nil { + l = m.RotateFilevaultKey.Size() + n += 2 + l + sovMdm(uint64(l)) + } + return n +} +func (m *InstallProfile) Size() (n int) { + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *RemoveProfile) Size() (n int) { + var l int + _ = l + l = len(m.Identifier) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *InstallProvisioningProfile) Size() (n int) { + var l int + _ = l + l = len(m.ProvisioningProfile) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *RemoveProvisioningProfile) Size() (n int) { + var l int + _ = l + l = len(m.Uuid) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *InstalledApplicationList) Size() (n int) { + var l int + _ = l + if len(m.Identifiers) > 0 { + for _, s := range m.Identifiers { + l = len(s) + n += 1 + l + sovMdm(uint64(l)) + } + } + if m.ManagedAppsOnly { + n += 2 + } + return n +} + +func (m *DeviceInformation) Size() (n int) { + var l int + _ = l + if len(m.Queries) > 0 { + for _, s := range m.Queries { + l = len(s) + n += 1 + l + sovMdm(uint64(l)) + } + } + return n +} + +func (m *ClearPasscode) Size() (n int) { + var l int + _ = l + l = len(m.UnlockToken) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *DeviceLock) Size() (n int) { + var l int + _ = l + l = len(m.Pin) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + l = len(m.Message) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + l = len(m.PhoneNumber) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *EraseDevice) Size() (n int) { + var l int + _ = l + l = len(m.Pin) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + if m.PreserveDataPlan { + n += 2 + } + if m.DisallowProximitySetup { + n += 2 + } + return n +} + +func (m *RequestMirroring) Size() (n int) { + var l int + _ = l + l = len(m.DestinationName) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + l = len(m.DestinationDeviceId) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + l = len(m.ScanTime) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + l = len(m.Password) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *Restrictions) Size() (n int) { + var l int + _ = l + if m.ProfileRestrictions { + n += 2 + } + return n +} + +func (m *UnlockUserAccount) Size() (n int) { + var l int + _ = l + l = len(m.Username) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *DeleteUser) Size() (n int) { + var l int + _ = l + l = len(m.Username) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + if m.ForceDeletion { + n += 2 + } + return n +} + +func (m *EnableLostMode) Size() (n int) { + var l int + _ = l + l = len(m.Message) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + l = len(m.PhoneNumber) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + l = len(m.Footnote) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *InstallApplication) Size() (n int) { + var l int + _ = l + if m.ItunesStoreId != 0 { + n += 1 + sovMdm(uint64(m.ItunesStoreId)) + } + l = len(m.Identifier) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + if m.Options != nil { + l = m.Options.Size() + n += 1 + l + sovMdm(uint64(l)) + } + l = len(m.ManifestUrl) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + if m.ManagementFlags != 0 { + n += 1 + sovMdm(uint64(m.ManagementFlags)) + } + if m.Configuration != nil { + l = m.Configuration.Size() + n += 1 + l + sovMdm(uint64(l)) + } + if m.Attributes != nil { + l = m.Attributes.Size() + n += 1 + l + sovMdm(uint64(l)) + } + l = len(m.ChangeManagementState) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *InstallApplicationOptions) Size() (n int) { + var l int + _ = l + if m.PurchaseMethod != 0 { + n += 1 + sovMdm(uint64(m.PurchaseMethod)) + } + return n +} + +func (m *InstallApplicationConfiguration) Size() (n int) { + var l int + _ = l + return n +} + +func (m *InstallApplicationAttributes) Size() (n int) { + var l int + _ = l + return n +} + +func (m *ApplyRedemptionCode) Size() (n int) { + var l int + _ = l + l = len(m.Identifier) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + l = len(m.RedemptionCode) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *ManagedApplicationList) Size() (n int) { + var l int + _ = l + if len(m.Identifiers) > 0 { + for _, s := range m.Identifiers { + l = len(s) + n += 1 + l + sovMdm(uint64(l)) + } + } + return n +} + +func (m *RemoveApplication) Size() (n int) { + var l int + _ = l + l = len(m.Identifier) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *InviteToProgram) Size() (n int) { + var l int + _ = l + l = len(m.ProgramId) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + l = len(m.InvitationUrl) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *ValidateApplications) Size() (n int) { + var l int + _ = l + if len(m.Identifiers) > 0 { + for _, s := range m.Identifiers { + l = len(s) + n += 1 + l + sovMdm(uint64(l)) + } + } + return n +} + +func (m *AccountConfiguration) Size() (n int) { + var l int + _ = l + if m.SkipPrimarySetupAccountCreation { + n += 2 + } + if m.SetPrimarySetupAccountAsRegularUser { + n += 2 + } + if len(m.AutoSetupAdminAccounts) > 0 { + for _, e := range m.AutoSetupAdminAccounts { + l = e.Size() + n += 1 + l + sovMdm(uint64(l)) + } + } + return n +} + +func (m *AutoSetupAdminAccounts) Size() (n int) { + var l int + _ = l + l = len(m.ShortName) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + l = len(m.FullName) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + l = len(m.PasswordHash) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + if m.Hidden { + n += 2 + } + return n +} + +func (m *InstallMedia) Size() (n int) { + var l int + _ = l + if m.ItunesStoreId != 0 { + n += 1 + sovMdm(uint64(m.ItunesStoreId)) + } + l = len(m.MediaUrl) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + l = len(m.MediaType) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *RemoveMedia) Size() (n int) { + var l int + _ = l + l = len(m.MediaType) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + if m.ItunesStoreId != 0 { + n += 1 + sovMdm(uint64(m.ItunesStoreId)) + } + l = len(m.PersistentId) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *Settings) Size() (n int) { + var l int + _ = l + if len(m.Settings) > 0 { + for _, e := range m.Settings { + l = e.Size() + n += 1 + l + sovMdm(uint64(l)) + } + } + return n +} + +func (m *Setting) Size() (n int) { + var l int + _ = l + l = len(m.Item) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + if m.DeviceName != nil { + l = m.DeviceName.Size() + n += 1 + l + sovMdm(uint64(l)) + } + if m.Hostname != nil { + l = m.Hostname.Size() + n += 1 + l + sovMdm(uint64(l)) + } + if m.VoiceRoaming != nil { + l = m.VoiceRoaming.Size() + n += 1 + l + sovMdm(uint64(l)) + } + if m.PersonalHotspot != nil { + l = m.PersonalHotspot.Size() + n += 1 + l + sovMdm(uint64(l)) + } + if m.Wallpaper != nil { + l = m.Wallpaper.Size() + n += 1 + l + sovMdm(uint64(l)) + } + if m.DataRoaming != nil { + l = m.DataRoaming.Size() + n += 1 + l + sovMdm(uint64(l)) + } + if m.Bluetooth != nil { + l = m.Bluetooth.Size() + n += 1 + l + sovMdm(uint64(l)) + } + if m.ApplicationAttributes != nil { + l = m.ApplicationAttributes.Size() + n += 1 + l + sovMdm(uint64(l)) + } + if m.MdmOptions != nil { + l = m.MdmOptions.Size() + n += 1 + l + sovMdm(uint64(l)) + } + if m.PasscodeLockGracePeriod != nil { + l = m.PasscodeLockGracePeriod.Size() + n += 1 + l + sovMdm(uint64(l)) + } + if m.MaximumResidentUsers != nil { + l = m.MaximumResidentUsers.Size() + n += 1 + l + sovMdm(uint64(l)) + } + if m.DiagnosticSubmission != nil { + l = m.DiagnosticSubmission.Size() + n += 1 + l + sovMdm(uint64(l)) + } + if m.AppAnalytics != nil { + l = m.AppAnalytics.Size() + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *VoiceRoamingSetting) Size() (n int) { + var l int + _ = l + if m.Enabled { + n += 2 + } + return n +} + +func (m *PersonalHotspotSetting) Size() (n int) { + var l int + _ = l + if m.Enabled { + n += 2 + } + return n +} + +func (m *WallpaperSetting) Size() (n int) { + var l int + _ = l + l = len(m.Image) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + if m.Where != 0 { + n += 1 + sovMdm(uint64(m.Where)) + } + return n +} + +func (m *DataRoamingSetting) Size() (n int) { + var l int + _ = l + if m.Enabled { + n += 2 + } + return n +} + +func (m *BluetoothSetting) Size() (n int) { + var l int + _ = l + if m.Enabled { + n += 2 + } + return n +} + +func (m *ApplicationAttributesSetting) Size() (n int) { + var l int + _ = l + l = len(m.Identifier) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + if m.ApplicationAttributes != nil { + l = m.ApplicationAttributes.Size() + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *ApplicationAttributes) Size() (n int) { + var l int + _ = l + l = len(m.VpnUuid) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *DeviceNameSetting) Size() (n int) { + var l int + _ = l + l = len(m.DeviceName) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *HostnameSetting) Size() (n int) { + var l int + _ = l + l = len(m.Hostname) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *MDMOptionsSetting) Size() (n int) { + var l int + _ = l + if m.MdmOptions != nil { + l = m.MdmOptions.Size() + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *MDMOptions) Size() (n int) { + var l int + _ = l + if m.ActivationLockAllowedWhileSupervised { + n += 2 + } + return n +} + +func (m *PasscodeLockGracePeriodSetting) Size() (n int) { + var l int + _ = l + if m.PasscodeLockGracePeriod != 0 { + n += 1 + sovMdm(uint64(m.PasscodeLockGracePeriod)) + } + return n +} + +func (m *MaximumResidentUsersSetting) Size() (n int) { + var l int + _ = l + if m.MaximumResidentUsers != 0 { + n += 1 + sovMdm(uint64(m.MaximumResidentUsers)) + } + return n +} + +func (m *DiagnosticSubmissionSetting) Size() (n int) { + var l int + _ = l + if m.Enabled { + n += 2 + } + return n +} + +func (m *AppAnalyticsSetting) Size() (n int) { + var l int + _ = l + if m.Enabled { + n += 2 + } + return n +} + +func (m *ManagedApplicationConfiguration) Size() (n int) { + var l int + _ = l + if len(m.Identifiers) > 0 { + for _, s := range m.Identifiers { + l = len(s) + n += 1 + l + sovMdm(uint64(l)) + } + } + return n +} + +func (m *ManagedApplicationAttributes) Size() (n int) { + var l int + _ = l + if len(m.Identifiers) > 0 { + for _, s := range m.Identifiers { + l = len(s) + n += 1 + l + sovMdm(uint64(l)) + } + } + return n +} + +func (m *ManagedApplicationFeedback) Size() (n int) { + var l int + _ = l + if len(m.Identifiers) > 0 { + for _, s := range m.Identifiers { + l = len(s) + n += 1 + l + sovMdm(uint64(l)) + } + } + if m.DeleteFeedback { + n += 2 + } + return n +} + +func (m *SetFirmwarePassword) Size() (n int) { + var l int + _ = l + l = len(m.CurrentPassword) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + l = len(m.NewPassword) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + if m.AllowOroms { + n += 2 + } + return n +} + +func (m *VerifyFirmwarePassword) Size() (n int) { + var l int + _ = l + l = len(m.Password) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *SetAutoAdminPassword) Size() (n int) { + var l int + _ = l + l = len(m.Guid) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + l = len(m.PasswordHash) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *ScheduleOSUpdate) Size() (n int) { + var l int + _ = l + if len(m.Updates) > 0 { + for _, e := range m.Updates { + l = e.Size() + n += 1 + l + sovMdm(uint64(l)) + } + } + return n +} + +func (m *Update) Size() (n int) { + var l int + _ = l + l = len(m.ProductKey) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + l = len(m.ProductVersion) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + l = len(m.InstallAction) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *ScheduleOSUpdateScan) Size() (n int) { + var l int + _ = l + if m.Force { + n += 2 + } + return n +} + +func (m *ActiveNSExtensions) Size() (n int) { + var l int + _ = l + if len(m.FilterExtensionPoints) > 0 { + for _, s := range m.FilterExtensionPoints { + l = len(s) + n += 1 + l + sovMdm(uint64(l)) + } + } + return n +} + +func (m *RotateFileVaultKey) Size() (n int) { + var l int + _ = l + l = len(m.KeyType) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + if m.FilevaultUnlock != nil { + l = m.FilevaultUnlock.Size() + n += 1 + l + sovMdm(uint64(l)) + } + l = len(m.NewCertificate) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + l = len(m.ReplyEncryptionCertificate) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *FileVaultUnlock) Size() (n int) { + var l int + _ = l + l = len(m.Password) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + l = len(m.PrivateKeyExport) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + l = len(m.PrivateKeyExportPassword) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + return n +} + +func (m *ResultPayload) Size() (n int) { + var l int + _ = l + l = len(m.Udid) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + l = len(m.CommandUuid) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + if len(m.ErrorChain) > 0 { + for _, e := range m.ErrorChain { + l = e.Size() + n += 1 + l + sovMdm(uint64(l)) + } + } + return n +} + +func (m *ErrorChain) Size() (n int) { + var l int + _ = l + l = len(m.LocalizedDescription) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + l = len(m.UsEnglishDescription) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + l = len(m.ErrorDomain) + if l > 0 { + n += 1 + l + sovMdm(uint64(l)) + } + if m.ErrorCode != 0 { + n += 1 + sovMdm(uint64(m.ErrorCode)) + } + return n +} + +func sovMdm(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMdm(x uint64) (n int) { + return sovMdm(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *CommandPayload) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CommandPayload: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CommandPayload: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CommandUuid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CommandUuid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Command == nil { + m.Command = &Command{} + } + if err := m.Command.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Command) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Command: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Command: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InstallProfile", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &InstallProfile{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_InstallProfile{v} + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RemoveProfile", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &RemoveProfile{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_RemoveProfile{v} + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InstallProvisioningProfile", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &InstallProvisioningProfile{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_InstallProvisioningProfile{v} + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RemoveProfisioningProfile", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &RemoveProvisioningProfile{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_RemoveProfisioningProfile{v} + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InstalledApplicationList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &InstalledApplicationList{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_InstalledApplicationList{v} + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeviceInformation", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &DeviceInformation{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_DeviceInformation{v} + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeviceLock", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &DeviceLock{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_DeviceLock{v} + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClearPasscode", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ClearPasscode{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_ClearPasscode{v} + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EraseDevice", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &EraseDevice{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_EraseDevice{v} + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestMirroring", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &RequestMirroring{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_RequestMirroring{v} + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Restrictions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Restrictions{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_Restrictions{v} + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnlockUserAccount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &UnlockUserAccount{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_UnlockUserAccount{v} + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeleteUser", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &DeleteUser{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_DeleteUser{v} + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EnableLostMode", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &EnableLostMode{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_EnableLostMode{v} + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InstallApplication", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &InstallApplication{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_InstallApplication{v} + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountConfiguration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &AccountConfiguration{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_AccountConfiguration{v} + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ApplyRedemptionCode", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ApplyRedemptionCode{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_ApplyRedemptionCode{v} + iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ManagedApplicationList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ManagedApplicationList{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_ManagedApplicationList{v} + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RemoveApplication", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &RemoveApplication{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_RemoveApplication{v} + iNdEx = postIndex + case 21: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InviteToProgram", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &InviteToProgram{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_InviteToProgram{v} + iNdEx = postIndex + case 22: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidataApplications", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ValidateApplications{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_ValidataApplications{v} + iNdEx = postIndex + case 23: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InstallMedia", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &InstallMedia{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_InstallMedia{v} + iNdEx = postIndex + case 24: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RemoveMedia", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &RemoveMedia{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_RemoveMedia{v} + iNdEx = postIndex + case 25: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Settings", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Settings{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_Settings{v} + iNdEx = postIndex + case 26: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ManagedApplicationConfiguration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ManagedApplicationConfiguration{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_ManagedApplicationConfiguration{v} + iNdEx = postIndex + case 27: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ManagedApplicationAttributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ManagedApplicationAttributes{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_ManagedApplicationAttributes{v} + iNdEx = postIndex + case 28: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ManagedApplicationFeedback", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ManagedApplicationFeedback{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_ManagedApplicationFeedback{v} + iNdEx = postIndex + case 29: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SetFirmwarePassword", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &SetFirmwarePassword{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_SetFirmwarePassword{v} + iNdEx = postIndex + case 30: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifyFirmwarePassword", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &VerifyFirmwarePassword{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_VerifyFirmwarePassword{v} + iNdEx = postIndex + case 31: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SetAutoAdminPassword", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &SetAutoAdminPassword{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_SetAutoAdminPassword{v} + iNdEx = postIndex + case 32: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ScheduleOsUpdate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ScheduleOSUpdate{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_ScheduleOsUpdate{v} + iNdEx = postIndex + case 33: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ScheduleOsUpdateScan", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ScheduleOSUpdateScan{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_ScheduleOsUpdateScan{v} + iNdEx = postIndex + case 34: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ActiveNsExtensions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ActiveNSExtensions{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_ActiveNsExtensions{v} + iNdEx = postIndex + case 35: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RotateFilevaultKey", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &RotateFileVaultKey{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Request = &Command_RotateFilevaultKey{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InstallProfile) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InstallProfile: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InstallProfile: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RemoveProfile) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RemoveProfile: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemoveProfile: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identifier", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identifier = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InstallProvisioningProfile) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InstallProvisioningProfile: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InstallProvisioningProfile: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProvisioningProfile", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProvisioningProfile = append(m.ProvisioningProfile[:0], dAtA[iNdEx:postIndex]...) + if m.ProvisioningProfile == nil { + m.ProvisioningProfile = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RemoveProvisioningProfile) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RemoveProvisioningProfile: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemoveProvisioningProfile: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uuid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Uuid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InstalledApplicationList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InstalledApplicationList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InstalledApplicationList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identifiers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identifiers = append(m.Identifiers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ManagedAppsOnly", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ManagedAppsOnly = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceInformation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceInformation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceInformation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Queries", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Queries = append(m.Queries, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ClearPasscode) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ClearPasscode: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClearPasscode: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnlockToken", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UnlockToken = append(m.UnlockToken[:0], dAtA[iNdEx:postIndex]...) + if m.UnlockToken == nil { + m.UnlockToken = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceLock) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceLock: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceLock: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PhoneNumber", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PhoneNumber = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EraseDevice) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EraseDevice: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EraseDevice: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PreserveDataPlan", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.PreserveDataPlan = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DisallowProximitySetup", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.DisallowProximitySetup = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RequestMirroring) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RequestMirroring: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RequestMirroring: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationDeviceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationDeviceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ScanTime", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ScanTime = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Password = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Restrictions) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Restrictions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Restrictions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProfileRestrictions", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ProfileRestrictions = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnlockUserAccount) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UnlockUserAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnlockUserAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeleteUser) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeleteUser: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeleteUser: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ForceDeletion", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ForceDeletion = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EnableLostMode) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EnableLostMode: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EnableLostMode: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PhoneNumber", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PhoneNumber = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Footnote", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Footnote = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InstallApplication) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InstallApplication: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InstallApplication: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ItunesStoreId", wireType) + } + m.ItunesStoreId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ItunesStoreId |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identifier", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identifier = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Options == nil { + m.Options = &InstallApplicationOptions{} + } + if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ManifestUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ManifestUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ManagementFlags", wireType) + } + m.ManagementFlags = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ManagementFlags |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Configuration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Configuration == nil { + m.Configuration = &InstallApplicationConfiguration{} + } + if err := m.Configuration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Attributes == nil { + m.Attributes = &InstallApplicationAttributes{} + } + if err := m.Attributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChangeManagementState", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChangeManagementState = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InstallApplicationOptions) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InstallApplicationOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InstallApplicationOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PurchaseMethod", wireType) + } + m.PurchaseMethod = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PurchaseMethod |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InstallApplicationConfiguration) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InstallApplicationConfiguration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InstallApplicationConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InstallApplicationAttributes) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InstallApplicationAttributes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InstallApplicationAttributes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ApplyRedemptionCode) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ApplyRedemptionCode: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ApplyRedemptionCode: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identifier", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identifier = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RedemptionCode", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RedemptionCode = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ManagedApplicationList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ManagedApplicationList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ManagedApplicationList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identifiers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identifiers = append(m.Identifiers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RemoveApplication) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RemoveApplication: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemoveApplication: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identifier", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identifier = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InviteToProgram) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InviteToProgram: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InviteToProgram: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProgramId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProgramId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InvitationUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InvitationUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValidateApplications) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValidateApplications: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidateApplications: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identifiers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identifiers = append(m.Identifiers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AccountConfiguration) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AccountConfiguration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccountConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SkipPrimarySetupAccountCreation", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.SkipPrimarySetupAccountCreation = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SetPrimarySetupAccountAsRegularUser", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.SetPrimarySetupAccountAsRegularUser = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AutoSetupAdminAccounts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AutoSetupAdminAccounts = append(m.AutoSetupAdminAccounts, &AutoSetupAdminAccounts{}) + if err := m.AutoSetupAdminAccounts[len(m.AutoSetupAdminAccounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AutoSetupAdminAccounts) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AutoSetupAdminAccounts: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AutoSetupAdminAccounts: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShortName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ShortName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FullName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FullName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PasswordHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PasswordHash = append(m.PasswordHash[:0], dAtA[iNdEx:postIndex]...) + if m.PasswordHash == nil { + m.PasswordHash = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Hidden", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Hidden = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InstallMedia) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InstallMedia: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InstallMedia: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ItunesStoreId", wireType) + } + m.ItunesStoreId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ItunesStoreId |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MediaUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MediaUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MediaType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MediaType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RemoveMedia) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RemoveMedia: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemoveMedia: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MediaType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MediaType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ItunesStoreId", wireType) + } + m.ItunesStoreId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ItunesStoreId |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PersistentId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PersistentId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Settings) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Settings: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Settings: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Settings", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Settings = append(m.Settings, &Setting{}) + if err := m.Settings[len(m.Settings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Setting) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Setting: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Setting: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Item", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Item = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeviceName", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DeviceName == nil { + m.DeviceName = &DeviceNameSetting{} + } + if err := m.DeviceName.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Hostname == nil { + m.Hostname = &HostnameSetting{} + } + if err := m.Hostname.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VoiceRoaming", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VoiceRoaming == nil { + m.VoiceRoaming = &VoiceRoamingSetting{} + } + if err := m.VoiceRoaming.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PersonalHotspot", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PersonalHotspot == nil { + m.PersonalHotspot = &PersonalHotspotSetting{} + } + if err := m.PersonalHotspot.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Wallpaper", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Wallpaper == nil { + m.Wallpaper = &WallpaperSetting{} + } + if err := m.Wallpaper.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DataRoaming", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DataRoaming == nil { + m.DataRoaming = &DataRoamingSetting{} + } + if err := m.DataRoaming.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bluetooth", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Bluetooth == nil { + m.Bluetooth = &BluetoothSetting{} + } + if err := m.Bluetooth.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ApplicationAttributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ApplicationAttributes == nil { + m.ApplicationAttributes = &ApplicationAttributesSetting{} + } + if err := m.ApplicationAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MdmOptions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MdmOptions == nil { + m.MdmOptions = &MDMOptionsSetting{} + } + if err := m.MdmOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PasscodeLockGracePeriod", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PasscodeLockGracePeriod == nil { + m.PasscodeLockGracePeriod = &PasscodeLockGracePeriodSetting{} + } + if err := m.PasscodeLockGracePeriod.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaximumResidentUsers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MaximumResidentUsers == nil { + m.MaximumResidentUsers = &MaximumResidentUsersSetting{} + } + if err := m.MaximumResidentUsers.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DiagnosticSubmission", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DiagnosticSubmission == nil { + m.DiagnosticSubmission = &DiagnosticSubmissionSetting{} + } + if err := m.DiagnosticSubmission.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AppAnalytics", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AppAnalytics == nil { + m.AppAnalytics = &AppAnalyticsSetting{} + } + if err := m.AppAnalytics.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VoiceRoamingSetting) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VoiceRoamingSetting: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VoiceRoamingSetting: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Enabled = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PersonalHotspotSetting) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PersonalHotspotSetting: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PersonalHotspotSetting: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Enabled = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *WallpaperSetting) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WallpaperSetting: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WallpaperSetting: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Image = append(m.Image[:0], dAtA[iNdEx:postIndex]...) + if m.Image == nil { + m.Image = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Where", wireType) + } + m.Where = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Where |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DataRoamingSetting) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DataRoamingSetting: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DataRoamingSetting: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Enabled = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BluetoothSetting) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BluetoothSetting: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BluetoothSetting: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Enabled = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ApplicationAttributesSetting) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ApplicationAttributesSetting: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ApplicationAttributesSetting: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identifier", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identifier = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ApplicationAttributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ApplicationAttributes == nil { + m.ApplicationAttributes = &ApplicationAttributes{} + } + if err := m.ApplicationAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ApplicationAttributes) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ApplicationAttributes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ApplicationAttributes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VpnUuid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VpnUuid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceNameSetting) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceNameSetting: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceNameSetting: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeviceName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeviceName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HostnameSetting) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HostnameSetting: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HostnameSetting: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hostname = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MDMOptionsSetting) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MDMOptionsSetting: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MDMOptionsSetting: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MdmOptions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MdmOptions == nil { + m.MdmOptions = &MDMOptions{} + } + if err := m.MdmOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MDMOptions) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MDMOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MDMOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ActivationLockAllowedWhileSupervised", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ActivationLockAllowedWhileSupervised = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PasscodeLockGracePeriodSetting) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PasscodeLockGracePeriodSetting: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PasscodeLockGracePeriodSetting: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PasscodeLockGracePeriod", wireType) + } + m.PasscodeLockGracePeriod = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PasscodeLockGracePeriod |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MaximumResidentUsersSetting) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MaximumResidentUsersSetting: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MaximumResidentUsersSetting: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaximumResidentUsers", wireType) + } + m.MaximumResidentUsers = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaximumResidentUsers |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DiagnosticSubmissionSetting) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DiagnosticSubmissionSetting: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DiagnosticSubmissionSetting: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Enabled = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AppAnalyticsSetting) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AppAnalyticsSetting: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AppAnalyticsSetting: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Enabled = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ManagedApplicationConfiguration) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ManagedApplicationConfiguration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ManagedApplicationConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identifiers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identifiers = append(m.Identifiers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ManagedApplicationAttributes) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ManagedApplicationAttributes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ManagedApplicationAttributes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identifiers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identifiers = append(m.Identifiers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ManagedApplicationFeedback) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ManagedApplicationFeedback: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ManagedApplicationFeedback: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identifiers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identifiers = append(m.Identifiers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DeleteFeedback", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.DeleteFeedback = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SetFirmwarePassword) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SetFirmwarePassword: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SetFirmwarePassword: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentPassword", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CurrentPassword = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewPassword", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NewPassword = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowOroms", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.AllowOroms = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VerifyFirmwarePassword) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VerifyFirmwarePassword: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VerifyFirmwarePassword: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Password = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SetAutoAdminPassword) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SetAutoAdminPassword: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SetAutoAdminPassword: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Guid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Guid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PasswordHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PasswordHash = append(m.PasswordHash[:0], dAtA[iNdEx:postIndex]...) + if m.PasswordHash == nil { + m.PasswordHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ScheduleOSUpdate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ScheduleOSUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ScheduleOSUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Updates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Updates = append(m.Updates, &Update{}) + if err := m.Updates[len(m.Updates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Update) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Update: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Update: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProductKey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProductKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProductVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProductVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InstallAction", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InstallAction = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ScheduleOSUpdateScan) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ScheduleOSUpdateScan: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ScheduleOSUpdateScan: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Force", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Force = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ActiveNSExtensions) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ActiveNSExtensions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ActiveNSExtensions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FilterExtensionPoints", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FilterExtensionPoints = append(m.FilterExtensionPoints, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RotateFileVaultKey) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RotateFileVaultKey: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RotateFileVaultKey: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.KeyType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FilevaultUnlock", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FilevaultUnlock == nil { + m.FilevaultUnlock = &FileVaultUnlock{} + } + if err := m.FilevaultUnlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewCertificate", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NewCertificate = append(m.NewCertificate[:0], dAtA[iNdEx:postIndex]...) + if m.NewCertificate == nil { + m.NewCertificate = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReplyEncryptionCertificate", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ReplyEncryptionCertificate = append(m.ReplyEncryptionCertificate[:0], dAtA[iNdEx:postIndex]...) + if m.ReplyEncryptionCertificate == nil { + m.ReplyEncryptionCertificate = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FileVaultUnlock) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FileVaultUnlock: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FileVaultUnlock: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Password = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PrivateKeyExport", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PrivateKeyExport = append(m.PrivateKeyExport[:0], dAtA[iNdEx:postIndex]...) + if m.PrivateKeyExport == nil { + m.PrivateKeyExport = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PrivateKeyExportPassword", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PrivateKeyExportPassword = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResultPayload) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResultPayload: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResultPayload: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Udid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Udid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CommandUuid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CommandUuid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ErrorChain", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ErrorChain = append(m.ErrorChain, &ErrorChain{}) + if err := m.ErrorChain[len(m.ErrorChain)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ErrorChain) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ErrorChain: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ErrorChain: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalizedDescription", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LocalizedDescription = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UsEnglishDescription", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UsEnglishDescription = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ErrorDomain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMdm + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ErrorDomain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ErrorCode", wireType) + } + m.ErrorCode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMdm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ErrorCode |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMdm(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMdm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMdm(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMdm + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMdm + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMdm + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthMdm + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMdm + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipMdm(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthMdm = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMdm = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("mdm.proto", fileDescriptorMdm) } + +var fileDescriptorMdm = []byte{ + // 3243 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x5a, 0x5d, 0x53, 0x1c, 0xc7, + 0xd5, 0x66, 0x41, 0x12, 0xec, 0xd9, 0x05, 0x96, 0x66, 0x41, 0x23, 0x40, 0x20, 0x8d, 0xfc, 0x21, + 0xfb, 0xb5, 0xa5, 0xf7, 0x95, 0xed, 0xd7, 0x8e, 0x63, 0x27, 0x46, 0x20, 0x79, 0x65, 0x09, 0x41, + 0xcd, 0x0a, 0x54, 0x15, 0xc7, 0x99, 0x34, 0x33, 0xcd, 0x6e, 0x17, 0xf3, 0xe5, 0xee, 0x99, 0x45, + 0x9b, 0xeb, 0x54, 0xe5, 0x3a, 0x37, 0xa9, 0x24, 0x3f, 0x21, 0xff, 0x20, 0xf9, 0x05, 0xb9, 0x4c, + 0xe5, 0x2e, 0x77, 0x2e, 0xe7, 0x3a, 0xff, 0x21, 0xd5, 0x1f, 0xf3, 0xb1, 0x33, 0xc3, 0x4a, 0x77, + 0xf4, 0x73, 0x9e, 0x3e, 0xdd, 0xd3, 0x7d, 0xce, 0xe9, 0x73, 0xce, 0x02, 0x4d, 0xdf, 0xf5, 0xef, + 0x45, 0x2c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, + 0x1d, 0x71, 0x20, 0xdc, 0x68, 0x4b, 0x2d, 0xeb, 0x45, 0x2d, 0xb9, 0xb4, 0x37, 0x63, 0x4d, 0xb0, + 0xd1, 0x01, 0xac, 0x26, 0x81, 0x38, 0x3a, 0x3b, 0xe1, 0x84, 0xd9, 0xd8, 0x71, 0xc2, 0x24, 0x88, + 0x8d, 0xc5, 0xf2, 0x75, 0x1c, 0x4b, 0xd2, 0x31, 0x27, 0x6c, 0x57, 0x51, 0xc4, 0x75, 0x24, 0x65, + 0x50, 0x5d, 0x87, 0x47, 0x62, 0x22, 0xd5, 0x19, 0x4b, 0xd5, 0xeb, 0x10, 0x42, 0x31, 0x43, 0x5d, + 0x47, 0x3a, 0x42, 0xfb, 0xd0, 0x21, 0x01, 0x3e, 0xf5, 0xc4, 0x3d, 0x8a, 0x43, 0x11, 0x17, 0xb2, + 0x5c, 0x76, 0xe9, 0x47, 0x92, 0xf1, 0x2c, 0xe4, 0xf1, 0x81, 0xba, 0x91, 0x25, 0x32, 0x81, 0xa0, + 0x43, 0x58, 0x4d, 0x1d, 0xb2, 0x60, 0xbd, 0x46, 0x47, 0x2a, 0xda, 0xaa, 0x18, 0x6e, 0xc1, 0x34, + 0x7b, 0x33, 0x16, 0xa2, 0x15, 0x14, 0x1d, 0xc3, 0x9a, 0x3e, 0x12, 0xdb, 0x09, 0x83, 0x33, 0x3a, + 0x48, 0x98, 0x52, 0xb9, 0x22, 0x55, 0x6e, 0xe7, 0x2a, 0xf5, 0x09, 0xec, 0x15, 0x59, 0xbd, 0x19, + 0xab, 0x8b, 0x6b, 0x70, 0xd4, 0x87, 0x35, 0xb1, 0xbf, 0xb1, 0xcd, 0x88, 0x4b, 0xfc, 0x48, 0xba, + 0x98, 0xb4, 0x41, 0x24, 0xd5, 0xde, 0x2c, 0xa8, 0x15, 0x34, 0x2b, 0x63, 0xed, 0xa9, 0xef, 0x5e, + 0xc5, 0x55, 0x18, 0xfd, 0x12, 0x0c, 0x1f, 0x07, 0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71, + 0x1c, 0x33, 0x7a, 0x9a, 0xc4, 0x84, 0x1b, 0x9b, 0x72, 0xd5, 0x77, 0xa6, 0xad, 0xba, 0x9b, 0xb1, + 0x7b, 0x33, 0xd6, 0x96, 0x3f, 0x45, 0x2e, 0xde, 0xdb, 0xba, 0xf5, 0xce, 0x08, 0x71, 0x4f, 0xb1, + 0x73, 0x6e, 0x6c, 0x95, 0xdf, 0xdb, 0xea, 0x6a, 0x8f, 0x35, 0x57, 0xbc, 0xb7, 0xfe, 0xa5, 0x52, + 0xe1, 0xa0, 0x9c, 0xc4, 0xf6, 0x19, 0x65, 0xfe, 0x05, 0x66, 0x44, 0x3e, 0x12, 0x17, 0x21, 0x73, + 0x8d, 0x9b, 0x65, 0x07, 0xed, 0x93, 0xf8, 0xb1, 0x66, 0x1d, 0x69, 0x92, 0x70, 0x50, 0x5e, 0x85, + 0x85, 0x83, 0x8e, 0x08, 0xa3, 0x67, 0xe3, 0x1a, 0xbd, 0xdb, 0x65, 0x07, 0x3d, 0x91, 0xcc, 0x1a, + 0xd5, 0xeb, 0xa3, 0x5a, 0x09, 0x7a, 0x09, 0xd7, 0xc5, 0x96, 0x71, 0x12, 0x87, 0x36, 0x76, 0x7d, + 0x1a, 0xe4, 0xca, 0x77, 0xca, 0xbe, 0xd0, 0x27, 0xf1, 0x6e, 0x12, 0x87, 0xbb, 0x82, 0x56, 0x50, + 0xdd, 0xe5, 0x35, 0x38, 0xfa, 0x06, 0x10, 0x77, 0x86, 0xc4, 0x4d, 0x3c, 0x62, 0x87, 0xdc, 0x4e, + 0x22, 0xe1, 0x45, 0xc6, 0xad, 0xf2, 0x63, 0xd5, 0xd7, 0x9c, 0xc3, 0xfe, 0xb1, 0x64, 0x88, 0xc7, + 0x2a, 0x9d, 0x77, 0xc8, 0x15, 0x26, 0x37, 0x59, 0xd1, 0x65, 0x73, 0x07, 0x07, 0xc6, 0xed, 0xca, + 0x26, 0x4b, 0x0a, 0xfb, 0x0e, 0x96, 0x11, 0xb5, 0xac, 0x54, 0xe0, 0xe8, 0x08, 0xba, 0xd8, 0x89, + 0xe9, 0x88, 0xd8, 0x01, 0xb7, 0xc9, 0xab, 0x98, 0x04, 0x5c, 0x86, 0x01, 0xb3, 0x1c, 0xfa, 0x77, + 0x25, 0xeb, 0x79, 0xff, 0x51, 0xc6, 0x11, 0xa1, 0x5f, 0xcd, 0x7d, 0xce, 0x73, 0x54, 0x68, 0x64, + 0x61, 0x2c, 0xb6, 0x27, 0x52, 0xa3, 0x11, 0x4e, 0xbc, 0xd8, 0x3e, 0x27, 0x63, 0xe3, 0x4e, 0x59, + 0xa3, 0x25, 0x59, 0x8f, 0xa9, 0x47, 0x4e, 0x04, 0xe9, 0x29, 0x19, 0x0b, 0x8d, 0x2c, 0x43, 0x47, + 0x1a, 0x7d, 0xd8, 0x84, 0x79, 0xfd, 0x7a, 0x9b, 0xef, 0xc3, 0xd2, 0x64, 0x7e, 0x8a, 0x0c, 0x98, + 0x8f, 0x54, 0x72, 0x2d, 0x13, 0xde, 0xb6, 0x95, 0x0e, 0xcd, 0xfb, 0xb0, 0x38, 0x91, 0x87, 0xa2, + 0x6d, 0x00, 0xea, 0x92, 0x20, 0xa6, 0x67, 0x94, 0x30, 0x9d, 0x1e, 0x17, 0x10, 0xf3, 0x10, 0x36, + 0x2e, 0x4f, 0x34, 0xd1, 0xff, 0x41, 0xb7, 0x36, 0x59, 0x55, 0xab, 0xae, 0x46, 0xd5, 0x29, 0xe6, + 0x7d, 0xb8, 0x71, 0x69, 0x42, 0x89, 0x10, 0x5c, 0x29, 0x94, 0x00, 0xf2, 0x6f, 0x73, 0x08, 0xc6, + 0x65, 0xb9, 0x21, 0xba, 0x05, 0xad, 0x7c, 0xaf, 0xdc, 0x68, 0xdc, 0x9a, 0x13, 0xd9, 0x7d, 0x01, + 0x42, 0xef, 0xc3, 0x4a, 0xc1, 0xcd, 0xb9, 0x1d, 0x06, 0xde, 0x58, 0xe6, 0xf7, 0x0b, 0xd6, 0x72, + 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, 0xed, 0x99, 0xd3, 0x6b, 0xf2, 0x00, 0x3f, 0xfa, 0x6f, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x4a, 0xe0, 0x03, 0xec, 0x9c, 0x24, 0x00, 0x00, +} diff --git a/mdm/mdm/internal/mdmproto/mdm.proto b/mdm/mdm/internal/mdmproto/mdm.proto new file mode 100644 index 00000000..7e78e9b3 --- /dev/null +++ b/mdm/mdm/internal/mdmproto/mdm.proto @@ -0,0 +1,368 @@ +syntax = "proto3"; + +package mdmproto; + +message CommandPayload { + string command_uuid = 1; + Command command = 2; +} + +message Command { + string request_type = 1; + /* + Request Types that do not have additional fields: + - ProfileList + - ProvisioningProfileList + - CertificateList", + - SecurityInfo + - RestartDevice + - ShutDownDevice + - StopMirroring + - ClearRestrictionsPassword + - UserList + - LogOutUser + - PlayLostModeSound + - DisableLostMode + - DeviceLocation + - ManagedMediaList + - DeviceConfigured + - AvailableOSUpdates + - NSExtensionMappings + */ + oneof request { + InstallProfile install_profile = 2; + RemoveProfile remove_profile = 3; + InstallProvisioningProfile install_provisioning_profile = 4; + RemoveProvisioningProfile remove_profisioning_profile = 5; + InstalledApplicationList installed_application_list = 6; + DeviceInformation device_information = 7; + DeviceLock device_lock = 8; + ClearPasscode clear_passcode = 9; + EraseDevice erase_device = 10; + RequestMirroring request_mirroring = 11; + Restrictions restrictions = 12; + UnlockUserAccount unlock_user_account = 13; + DeleteUser delete_user = 14; + EnableLostMode enable_lost_mode = 15; + InstallApplication install_application = 16; + AccountConfiguration account_configuration = 17; + ApplyRedemptionCode apply_redemption_code = 18; + ManagedApplicationList managed_application_list = 19; + RemoveApplication remove_application = 20; + InviteToProgram invite_to_program = 21; + ValidateApplications validata_applications = 22; + InstallMedia install_media = 23; + RemoveMedia remove_media = 24; + Settings settings = 25; + ManagedApplicationConfiguration managed_application_configuration = 26; + ManagedApplicationAttributes managed_application_attributes = 27; + ManagedApplicationFeedback managed_application_feedback = 28; + SetFirmwarePassword set_firmware_password = 29; + VerifyFirmwarePassword verify_firmware_password = 30; + SetAutoAdminPassword set_auto_admin_password = 31; + ScheduleOSUpdate schedule_os_update = 32; + ScheduleOSUpdateScan schedule_os_update_scan = 33; + ActiveNSExtensions active_ns_extensions = 34; + RotateFileVaultKey rotate_filevault_key = 35; + } +} + +message InstallProfile { + bytes payload = 1; // The mobileconfig data. +} + +message RemoveProfile { + string identifier = 1; +} + +message InstallProvisioningProfile { + bytes provisioning_profile = 1; +} + +message RemoveProvisioningProfile { + string uuid = 1; +} + +message InstalledApplicationList { + repeated string identifiers = 1; + bool managed_apps_only = 2; +} + +message DeviceInformation { + repeated string queries = 1; +} + +message ClearPasscode { + bytes unlock_token = 1; +} + +message DeviceLock { + string pin = 1; + string message = 2; + string phone_number = 3; +} + +message EraseDevice { + string pin = 1; + bool preserve_data_plan = 2; + bool disallow_proximity_setup = 3; +} + +message RequestMirroring { + string destination_name = 1; + string destination_device_id = 2; + string scan_time = 3; + string password = 4; +} + +message Restrictions { + bool profile_restrictions = 1; +} + +message UnlockUserAccount { + string username = 1; +} + +message DeleteUser { + string username = 1; + bool force_deletion = 2; +} + +message EnableLostMode { + string message = 1; + string phone_number = 2; + string footnote = 3; +} + +message InstallApplication { + int64 itunes_store_id = 1; + string identifier = 2; + InstallApplicationOptions options = 3; + string manifest_url = 4; + int64 management_flags = 5; // bitwise OR + InstallApplicationConfiguration configuration = 6; + InstallApplicationAttributes attributes = 7; + string change_management_state = 8; +} + +message InstallApplicationOptions { + int64 purchase_method = 1; +} + +message InstallApplicationConfiguration {} + +message InstallApplicationAttributes {} + +message ApplyRedemptionCode { + string identifier = 1; + string redemption_code = 2; +} + +message ManagedApplicationList { + repeated string identifiers = 1; +} + +message RemoveApplication { + string identifier = 1; +} + +message InviteToProgram { + string program_id = 1; + string invitation_url = 2; +} + +message ValidateApplications { + repeated string identifiers = 1; +} + +message AccountConfiguration { + bool skip_primary_setup_account_creation = 1; + bool set_primary_setup_account_as_regular_user = 2; + repeated AutoSetupAdminAccounts auto_setup_admin_accounts = 3; +} + +message AutoSetupAdminAccounts { + string short_name = 1; + string full_name = 2; + bytes password_hash = 3; + bool hidden = 4; +} + + +message InstallMedia { + int64 itunes_store_id = 1; + string media_url = 2; + string media_type = 3; +} + +message RemoveMedia { + string media_type = 1; + int64 itunes_store_id = 2; + string persistent_id = 3; +} + +message Settings { + repeated Setting settings = 1; +} + +message Setting { + string item = 1; + DeviceNameSetting device_name = 2; + HostnameSetting hostname = 3; + VoiceRoamingSetting voice_roaming = 4; + PersonalHotspotSetting personal_hotspot = 5; + WallpaperSetting wallpaper = 6; + DataRoamingSetting data_roaming = 7; + BluetoothSetting bluetooth = 8; + ApplicationAttributesSetting application_attributes = 9; + MDMOptionsSetting mdm_options = 10; + PasscodeLockGracePeriodSetting passcode_lock_grace_period = 11; + MaximumResidentUsersSetting maximum_resident_users = 12; + DiagnosticSubmissionSetting diagnostic_submission = 13; + AppAnalyticsSetting app_analytics = 14; +} + +message VoiceRoamingSetting { + bool enabled = 1; +} + +message PersonalHotspotSetting { + bool enabled = 1; +} + +message WallpaperSetting { + bytes image = 1; + int64 where = 2; +} + +message DataRoamingSetting { + bool enabled = 1; +} + +message BluetoothSetting { + bool enabled = 1; +} + +message ApplicationAttributesSetting { + string identifier = 1; + ApplicationAttributes application_attributes = 2; +} + +message ApplicationAttributes { + string vpn_uuid = 1; +} + +message DeviceNameSetting { + string device_name = 1; +} + +message HostnameSetting { + string hostname = 1; +} + +message MDMOptionsSetting { + MDMOptions mdm_options = 1; +} + +message MDMOptions { + bool activation_lock_allowed_while_supervised = 1; +} + +message PasscodeLockGracePeriodSetting { + int64 passcode_lock_grace_period = 1; +} + +message MaximumResidentUsersSetting { + int64 maximum_resident_users = 1; +} + +message DiagnosticSubmissionSetting { + bool enabled = 1; +} + +message AppAnalyticsSetting { + bool enabled = 1; +} + +message ManagedApplicationConfiguration { + repeated string identifiers = 1; +} + +message ManagedApplicationAttributes { + repeated string identifiers = 1; +} + +message ManagedApplicationFeedback { + repeated string identifiers = 1; + bool delete_feedback = 2; +} + +message SetFirmwarePassword { + string current_password = 1; + string new_password = 2; + bool allow_oroms = 3; +} + +message VerifyFirmwarePassword { + string password = 1; +} + +message SetAutoAdminPassword { + string guid = 1; + bytes password_hash = 2; +} + +message ScheduleOSUpdate { + repeated Update updates = 1; +} + +message Update { + string product_key = 1; + string product_version = 2; + string install_action = 3; +} + +message ScheduleOSUpdateScan { + bool force = 1; +} + +message ActiveNSExtensions { + repeated string filter_extension_points = 1; +} + +message RotateFileVaultKey { + string key_type = 1; + FileVaultUnlock filevault_unlock = 2; + bytes new_certificate = 3; + bytes reply_encryption_certificate = 4; +} + +message FileVaultUnlock { + string password = 1; + bytes private_key_export = 2; + string private_key_export_password = 3; +} + +message ResultPayload { + enum Status { + Acknowledged = 0; + Error = 1; + CommandFormatError = 2; + Idle = 3; + NotNow = 4; + } + string udid = 1; + string command_uuid = 2; + repeated ErrorChain error_chain = 3; +} + +message ErrorChain { + string localized_description = 1; + string us_english_description = 2; + + // The ErrorDomain and ErrorCode keys contain internal codes used by Apple + // that may be useful for diagnostics. Your host should not rely on these + // values, as they may change between software releases. + string error_domain = 3; + int32 error_code = 4; +} diff --git a/mdm/mdm/marshal_json.go b/mdm/mdm/marshal_json.go new file mode 100644 index 00000000..f7b3762a --- /dev/null +++ b/mdm/mdm/marshal_json.go @@ -0,0 +1,342 @@ +package mdm + +import ( + "encoding/json" + "fmt" +) + +func (c *Command) MarshalJSON() ([]byte, error) { + switch c.RequestType { + case "ProfileList", + "ProvisioningProfileList", + "CertificateList", + "SecurityInfo", + "RestartDevice", + "ShutDownDevice", + "StopMirroring", + "ClearRestrictionsPassword", + "UserList", + "LogOutUser", + "PlayLostModeSound", + "DisableLostMode", + "DeviceLocation", + "ManagedMediaList", + "DeviceConfigured", + "AvailableOSUpdates", + "NSExtensionMappings": + var x = struct { + RequestType string `json:"request_type"` + }{ + RequestType: c.RequestType, + } + return json.Marshal(&x) + case "InstallProfile": + var x = struct { + RequestType string `json:"request_type"` + *InstallProfile + }{ + RequestType: c.RequestType, + InstallProfile: c.InstallProfile, + } + return json.Marshal(&x) + case "RemoveProfile": + var x = struct { + RequestType string `json:"request_type"` + *RemoveProfile + }{ + RequestType: c.RequestType, + RemoveProfile: c.RemoveProfile, + } + return json.Marshal(&x) + case "InstallProvisioningProfile": + var x = struct { + RequestType string `json:"request_type"` + *InstallProvisioningProfile + }{ + RequestType: c.RequestType, + InstallProvisioningProfile: c.InstallProvisioningProfile, + } + return json.Marshal(&x) + case "RemoveProvisioningProfile": + var x = struct { + RequestType string `json:"request_type"` + *RemoveProvisioningProfile + }{ + RequestType: c.RequestType, + RemoveProvisioningProfile: c.RemoveProvisioningProfile, + } + return json.Marshal(&x) + case "InstalledApplicationList": + var x = struct { + RequestType string `json:"request_type"` + *InstalledApplicationList + }{ + RequestType: c.RequestType, + InstalledApplicationList: c.InstalledApplicationList, + } + return json.Marshal(&x) + case "DeviceInformation": + var x = struct { + RequestType string `json:"request_type"` + *DeviceInformation + }{ + RequestType: c.RequestType, + DeviceInformation: c.DeviceInformation, + } + return json.Marshal(&x) + case "DeviceLock": + var x = struct { + RequestType string `json:"request_type"` + *DeviceLock + }{ + RequestType: c.RequestType, + DeviceLock: c.DeviceLock, + } + return json.Marshal(&x) + case "ClearPasscode": + var x = struct { + RequestType string `json:"request_type"` + *ClearPasscode + }{ + RequestType: c.RequestType, + ClearPasscode: c.ClearPasscode, + } + return json.Marshal(&x) + case "EraseDevice": + var x = struct { + RequestType string `json:"request_type"` + *EraseDevice + }{ + RequestType: c.RequestType, + EraseDevice: c.EraseDevice, + } + return json.Marshal(&x) + case "RequestMirroring": + var x = struct { + RequestType string `json:"request_type"` + *RequestMirroring + }{ + RequestType: c.RequestType, + RequestMirroring: c.RequestMirroring, + } + return json.Marshal(&x) + case "Restrictions": + var x = struct { + RequestType string `json:"request_type"` + *Restrictions + }{ + RequestType: c.RequestType, + Restrictions: c.Restrictions, + } + return json.Marshal(&x) + case "UnlockUserAccount": + var x = struct { + RequestType string `json:"request_type"` + *UnlockUserAccount + }{ + RequestType: c.RequestType, + UnlockUserAccount: c.UnlockUserAccount, + } + return json.Marshal(&x) + case "DeleteUser": + var x = struct { + RequestType string `json:"request_type"` + *DeleteUser + }{ + RequestType: c.RequestType, + DeleteUser: c.DeleteUser, + } + return json.Marshal(&x) + case "EnableLostMode": + var x = struct { + RequestType string `json:"request_type"` + *EnableLostMode + }{ + RequestType: c.RequestType, + EnableLostMode: c.EnableLostMode, + } + return json.Marshal(&x) + case "InstallApplication": + var x = struct { + RequestType string `json:"request_type"` + *InstallApplication + }{ + RequestType: c.RequestType, + InstallApplication: c.InstallApplication, + } + return json.Marshal(&x) + case "AccountConfiguration": + var x = struct { + RequestType string `json:"request_type"` + *AccountConfiguration + }{ + RequestType: c.RequestType, + AccountConfiguration: c.AccountConfiguration, + } + return json.Marshal(&x) + case "ApplyRedemptionCode": + var x = struct { + RequestType string `json:"request_type"` + *ApplyRedemptionCode + }{ + RequestType: c.RequestType, + ApplyRedemptionCode: c.ApplyRedemptionCode, + } + return json.Marshal(&x) + case "ManagedApplicationList": + var x = struct { + RequestType string `json:"request_type"` + *ManagedApplicationList + }{ + RequestType: c.RequestType, + ManagedApplicationList: c.ManagedApplicationList, + } + return json.Marshal(&x) + case "RemoveApplication": + var x = struct { + RequestType string `json:"request_type"` + *RemoveApplication + }{ + RequestType: c.RequestType, + RemoveApplication: c.RemoveApplication, + } + return json.Marshal(&x) + case "InviteToProgram": + var x = struct { + RequestType string `json:"request_type"` + *InviteToProgram + }{ + RequestType: c.RequestType, + InviteToProgram: c.InviteToProgram, + } + return json.Marshal(&x) + case "ValidateApplications": + var x = struct { + RequestType string `json:"request_type"` + *ValidateApplications + }{ + RequestType: c.RequestType, + ValidateApplications: c.ValidateApplications, + } + return json.Marshal(&x) + case "InstallMedia": + var x = struct { + RequestType string `json:"request_type"` + *InstallMedia + }{ + RequestType: c.RequestType, + InstallMedia: c.InstallMedia, + } + return json.Marshal(&x) + case "RemoveMedia": + var x = struct { + RequestType string `json:"request_type"` + *RemoveMedia + }{ + RequestType: c.RequestType, + RemoveMedia: c.RemoveMedia, + } + return json.Marshal(&x) + case "Settings": + var x = struct { + RequestType string `json:"request_type"` + *Settings + }{ + RequestType: c.RequestType, + Settings: c.Settings, + } + return json.Marshal(&x) + case "ManagedApplicationConfiguration": + var x = struct { + RequestType string `json:"request_type"` + *ManagedApplicationConfiguration + }{ + RequestType: c.RequestType, + ManagedApplicationConfiguration: c.ManagedApplicationConfiguration, + } + return json.Marshal(&x) + case "ManagedApplicationAttributes": + var x = struct { + RequestType string `json:"request_type"` + *ManagedApplicationAttributes + }{ + RequestType: c.RequestType, + ManagedApplicationAttributes: c.ManagedApplicationAttributes, + } + return json.Marshal(&x) + case "ManagedApplicationFeedback": + var x = struct { + RequestType string `json:"request_type"` + *ManagedApplicationFeedback + }{ + RequestType: c.RequestType, + ManagedApplicationFeedback: c.ManagedApplicationFeedback, + } + return json.Marshal(&x) + case "SetFirmwarePassword": + var x = struct { + RequestType string `json:"request_type"` + *SetFirmwarePassword + }{ + RequestType: c.RequestType, + SetFirmwarePassword: c.SetFirmwarePassword, + } + return json.Marshal(&x) + case "VerifyFirmwarePassword": + var x = struct { + RequestType string `json:"request_type"` + *VerifyFirmwarePassword + }{ + RequestType: c.RequestType, + VerifyFirmwarePassword: c.VerifyFirmwarePassword, + } + return json.Marshal(&x) + case "SetAutoAdminPassword": + var x = struct { + RequestType string `json:"request_type"` + *SetAutoAdminPassword + }{ + RequestType: c.RequestType, + SetAutoAdminPassword: c.SetAutoAdminPassword, + } + return json.Marshal(&x) + case "ScheduleOSUpdate": + var x = struct { + RequestType string `json:"request_type"` + *ScheduleOSUpdate + }{ + RequestType: c.RequestType, + ScheduleOSUpdate: c.ScheduleOSUpdate, + } + return json.Marshal(&x) + case "ScheduleOSUpdateScan": + var x = struct { + RequestType string `json:"request_type"` + *ScheduleOSUpdateScan + }{ + RequestType: c.RequestType, + ScheduleOSUpdateScan: c.ScheduleOSUpdateScan, + } + return json.Marshal(&x) + case "ActiveNSExtensions": + var x = struct { + RequestType string `json:"request_type"` + *ActiveNSExtensions + }{ + RequestType: c.RequestType, + ActiveNSExtensions: c.ActiveNSExtensions, + } + return json.Marshal(&x) + case "RotateFileVaultKey": + var x = struct { + RequestType string `json:"request_type"` + *RotateFileVaultKey + }{ + RequestType: c.RequestType, + RotateFileVaultKey: c.RotateFileVaultKey, + } + return json.Marshal(&x) + default: + return nil, fmt.Errorf("mdm: unknown RequestType: %s", c.RequestType) + } +} diff --git a/mdm/mdm/marshal_plist.go b/mdm/mdm/marshal_plist.go new file mode 100644 index 00000000..d6d48478 --- /dev/null +++ b/mdm/mdm/marshal_plist.go @@ -0,0 +1,305 @@ +package mdm + +import "fmt" + +func (c *Command) MarshalPlist() (interface{}, error) { + switch c.RequestType { + case "ProfileList", + "ProvisioningProfileList", + "CertificateList", + "SecurityInfo", + "RestartDevice", + "ShutDownDevice", + "StopMirroring", + "ClearRestrictionsPassword", + "UserList", + "LogOutUser", + "PlayLostModeSound", + "DisableLostMode", + "DeviceLocation", + "ManagedMediaList", + "DeviceConfigured", + "AvailableOSUpdates", + "NSExtensionMappings": + return &struct { + RequestType string + }{ + RequestType: c.RequestType, + }, nil + + case "InstallProfile": + return &struct { + RequestType string + *InstallProfile + }{ + RequestType: c.RequestType, + InstallProfile: c.InstallProfile, + }, nil + case "RemoveProfile": + return &struct { + RequestType string + *RemoveProfile + }{ + RequestType: c.RequestType, + RemoveProfile: c.RemoveProfile, + }, nil + case "InstallProvisioningProfile": + return &struct { + RequestType string + *InstallProvisioningProfile + }{ + RequestType: c.RequestType, + InstallProvisioningProfile: c.InstallProvisioningProfile, + }, nil + case "RemoveProvisioningProfile": + return &struct { + RequestType string + *RemoveProvisioningProfile + }{ + RequestType: c.RequestType, + RemoveProvisioningProfile: c.RemoveProvisioningProfile, + }, nil + case "InstalledApplicationList": + return &struct { + RequestType string + *InstalledApplicationList + }{ + RequestType: c.RequestType, + InstalledApplicationList: c.InstalledApplicationList, + }, nil + case "DeviceInformation": + return &struct { + RequestType string + *DeviceInformation + }{ + RequestType: c.RequestType, + DeviceInformation: c.DeviceInformation, + }, nil + case "DeviceLock": + return &struct { + RequestType string + *DeviceLock + }{ + RequestType: c.RequestType, + DeviceLock: c.DeviceLock, + }, nil + case "ClearPasscode": + return &struct { + RequestType string + *ClearPasscode + }{ + RequestType: c.RequestType, + ClearPasscode: c.ClearPasscode, + }, nil + case "EraseDevice": + return &struct { + RequestType string + *EraseDevice + }{ + RequestType: c.RequestType, + EraseDevice: c.EraseDevice, + }, nil + case "RequestMirroring": + return &struct { + RequestType string + *RequestMirroring + }{ + RequestType: c.RequestType, + RequestMirroring: c.RequestMirroring, + }, nil + case "Restrictions": + return &struct { + RequestType string + *Restrictions + }{ + RequestType: c.RequestType, + Restrictions: c.Restrictions, + }, nil + case "UnlockUserAccount": + return &struct { + RequestType string + *UnlockUserAccount + }{ + RequestType: c.RequestType, + UnlockUserAccount: c.UnlockUserAccount, + }, nil + case "DeleteUser": + return &struct { + RequestType string + *DeleteUser + }{ + RequestType: c.RequestType, + DeleteUser: c.DeleteUser, + }, nil + case "EnableLostMode": + return &struct { + RequestType string + *EnableLostMode + }{ + RequestType: c.RequestType, + EnableLostMode: c.EnableLostMode, + }, nil + case "InstallApplication": + return &struct { + RequestType string + *InstallApplication + }{ + RequestType: c.RequestType, + InstallApplication: c.InstallApplication, + }, nil + case "AccountConfiguration": + return &struct { + RequestType string + *AccountConfiguration + }{ + RequestType: c.RequestType, + AccountConfiguration: c.AccountConfiguration, + }, nil + case "ApplyRedemptionCode": + return &struct { + RequestType string + *ApplyRedemptionCode + }{ + RequestType: c.RequestType, + ApplyRedemptionCode: c.ApplyRedemptionCode, + }, nil + case "ManagedApplicationList": + return &struct { + RequestType string + *ManagedApplicationList + }{ + RequestType: c.RequestType, + ManagedApplicationList: c.ManagedApplicationList, + }, nil + case "RemoveApplication": + return &struct { + RequestType string + *RemoveApplication + }{ + RequestType: c.RequestType, + RemoveApplication: c.RemoveApplication, + }, nil + case "InviteToProgram": + return &struct { + RequestType string + *InviteToProgram + }{ + RequestType: c.RequestType, + InviteToProgram: c.InviteToProgram, + }, nil + case "ValidateApplications": + return &struct { + RequestType string + *ValidateApplications + }{ + RequestType: c.RequestType, + ValidateApplications: c.ValidateApplications, + }, nil + case "InstallMedia": + return &struct { + RequestType string + *InstallMedia + }{ + RequestType: c.RequestType, + InstallMedia: c.InstallMedia, + }, nil + case "RemoveMedia": + return &struct { + RequestType string + *RemoveMedia + }{ + RequestType: c.RequestType, + RemoveMedia: c.RemoveMedia, + }, nil + case "Settings": + return &struct { + RequestType string + *Settings + }{ + RequestType: c.RequestType, + Settings: c.Settings, + }, nil + case "ManagedApplicationConfiguration": + return &struct { + RequestType string + *ManagedApplicationConfiguration + }{ + RequestType: c.RequestType, + ManagedApplicationConfiguration: c.ManagedApplicationConfiguration, + }, nil + case "ManagedApplicationAttributes": + return &struct { + RequestType string + *ManagedApplicationAttributes + }{ + RequestType: c.RequestType, + ManagedApplicationAttributes: c.ManagedApplicationAttributes, + }, nil + case "ManagedApplicationFeedback": + return &struct { + RequestType string + *ManagedApplicationFeedback + }{ + RequestType: c.RequestType, + ManagedApplicationFeedback: c.ManagedApplicationFeedback, + }, nil + case "SetFirmwarePassword": + return &struct { + RequestType string + *SetFirmwarePassword + }{ + RequestType: c.RequestType, + SetFirmwarePassword: c.SetFirmwarePassword, + }, nil + case "VerifyFirmwarePassword": + return &struct { + RequestType string + *VerifyFirmwarePassword + }{ + RequestType: c.RequestType, + VerifyFirmwarePassword: c.VerifyFirmwarePassword, + }, nil + case "SetAutoAdminPassword": + return &struct { + RequestType string + *SetAutoAdminPassword + }{ + RequestType: c.RequestType, + SetAutoAdminPassword: c.SetAutoAdminPassword, + }, nil + case "ScheduleOSUpdate": + return &struct { + RequestType string + *ScheduleOSUpdate + }{ + RequestType: c.RequestType, + ScheduleOSUpdate: c.ScheduleOSUpdate, + }, nil + case "ScheduleOSUpdateScan": + return &struct { + RequestType string + *ScheduleOSUpdateScan + }{ + RequestType: c.RequestType, + ScheduleOSUpdateScan: c.ScheduleOSUpdateScan, + }, nil + case "ActiveNSExtensions": + return &struct { + RequestType string + *ActiveNSExtensions + }{ + RequestType: c.RequestType, + ActiveNSExtensions: c.ActiveNSExtensions, + }, nil + case "RotateFileVaultKey": + return &struct { + RequestType string + *RotateFileVaultKey + }{ + RequestType: c.RequestType, + RotateFileVaultKey: c.RotateFileVaultKey, + }, nil + default: + return nil, fmt.Errorf("mdm: unknown command RequestType, %s", c.RequestType) + } +} diff --git a/mdm/mdm/marshal_proto.go b/mdm/mdm/marshal_proto.go new file mode 100644 index 00000000..898e44de --- /dev/null +++ b/mdm/mdm/marshal_proto.go @@ -0,0 +1,432 @@ +package mdm + +import ( + "fmt" + + "github.com/gogo/protobuf/proto" + "github.com/micromdm/micromdm/mdm/mdm/internal/mdmproto" +) + +func MarshalCommandPayload(cmd *CommandPayload) ([]byte, error) { + cmdToProto, err := commandToProto(cmd.Command) + if err != nil { + return nil, err + } + cmdproto := mdmproto.CommandPayload{ + CommandUuid: cmd.CommandUUID, + Command: cmdToProto, + } + pb, err := proto.Marshal(&cmdproto) + return pb, err +} + +func commandToProto(cmd *Command) (*mdmproto.Command, error) { + cmdproto := mdmproto.Command{ + RequestType: cmd.RequestType, + } + switch cmd.RequestType { + case "ProfileList", + "ProvisioningProfileList", + "CertificateList", + "SecurityInfo", + "RestartDevice", + "ShutDownDevice", + "StopMirroring", + "ClearRestrictionsPassword", + "UserList", + "LogOutUser", + "PlayLostModeSound", + "DisableLostMode", + "DeviceLocation", + "ManagedMediaList", + "DeviceConfigured", + "AvailableOSUpdates", + "NSExtensionMappings": + + case "InstallProfile": + if cmd.InstallProfile == nil { + break + } + cmdproto.Request = &mdmproto.Command_InstallProfile{ + InstallProfile: &mdmproto.InstallProfile{ + Payload: cmd.InstallProfile.Payload, + }, + } + case "RemoveProfile": + if cmd.RemoveProfile == nil { + break + } + cmdproto.Request = &mdmproto.Command_RemoveProfile{ + RemoveProfile: &mdmproto.RemoveProfile{ + Identifier: cmd.RemoveProfile.Identifier, + }, + } + case "InstallProvisioningProfile": + cmdproto.Request = &mdmproto.Command_InstallProvisioningProfile{ + InstallProvisioningProfile: &mdmproto.InstallProvisioningProfile{ + ProvisioningProfile: cmd.InstallProvisioningProfile.ProvisioningProfile, + }, + } + case "RemoveProvisioningProfile": + cmdproto.Request = &mdmproto.Command_RemoveProfisioningProfile{ + RemoveProfisioningProfile: &mdmproto.RemoveProvisioningProfile{ + Uuid: cmd.RemoveProvisioningProfile.UUID, + }, + } + case "InstalledApplicationList": + cmdproto.Request = &mdmproto.Command_InstalledApplicationList{ + InstalledApplicationList: &mdmproto.InstalledApplicationList{ + Identifiers: cmd.InstalledApplicationList.Identifiers, + ManagedAppsOnly: cmd.InstalledApplicationList.ManagedAppsOnly, + }, + } + case "DeviceInformation": + if cmd.DeviceInformation == nil { + break + } + cmdproto.Request = &mdmproto.Command_DeviceInformation{ + DeviceInformation: &mdmproto.DeviceInformation{ + Queries: cmd.DeviceInformation.Queries, + }, + } + case "DeviceLock": + cmdproto.Request = &mdmproto.Command_DeviceLock{ + DeviceLock: &mdmproto.DeviceLock{ + Pin: cmd.DeviceLock.PIN, + Message: cmd.DeviceLock.Message, + PhoneNumber: cmd.DeviceLock.PhoneNumber, + }, + } + case "ClearPasscode": + cmdproto.Request = &mdmproto.Command_ClearPasscode{ + ClearPasscode: &mdmproto.ClearPasscode{ + UnlockToken: cmd.ClearPasscode.UnlockToken, + }, + } + case "EraseDevice": + cmdproto.Request = &mdmproto.Command_EraseDevice{ + EraseDevice: &mdmproto.EraseDevice{ + Pin: cmd.EraseDevice.PIN, + PreserveDataPlan: cmd.EraseDevice.PreserveDataPlan, + DisallowProximitySetup: cmd.EraseDevice.DisallowProximitySetup, + }, + } + case "RequestMirroring": + cmdproto.Request = &mdmproto.Command_RequestMirroring{ + RequestMirroring: &mdmproto.RequestMirroring{ + DestinationName: cmd.RequestMirroring.DestinationName, + DestinationDeviceId: cmd.RequestMirroring.DestinationDeviceID, + ScanTime: cmd.RequestMirroring.ScanTime, + Password: cmd.RequestMirroring.Password, + }, + } + case "Restrictions": + cmdproto.Request = &mdmproto.Command_Restrictions{ + Restrictions: &mdmproto.Restrictions{ + ProfileRestrictions: cmd.Restrictions.ProfileRestrictions, + }, + } + case "UnlockUserAccount": + cmdproto.Request = &mdmproto.Command_UnlockUserAccount{ + UnlockUserAccount: &mdmproto.UnlockUserAccount{ + Username: cmd.UnlockUserAccount.UserName, + }, + } + case "DeleteUser": + cmdproto.Request = &mdmproto.Command_DeleteUser{ + DeleteUser: &mdmproto.DeleteUser{ + Username: cmd.DeleteUser.UserName, + ForceDeletion: cmd.DeleteUser.ForceDeletion, + }, + } + case "EnableLostMode": + cmdproto.Request = &mdmproto.Command_EnableLostMode{ + EnableLostMode: &mdmproto.EnableLostMode{ + Message: cmd.EnableLostMode.Message, + PhoneNumber: cmd.EnableLostMode.PhoneNumber, + Footnote: cmd.EnableLostMode.Footnote, + }, + } + case "InstallApplication": + var ( + options *mdmproto.InstallApplicationOptions + configuration *mdmproto.InstallApplicationConfiguration + attributes *mdmproto.InstallApplicationAttributes + ) + if cmd.InstallApplication.Options != nil { + options = &mdmproto.InstallApplicationOptions{ + PurchaseMethod: cmd.InstallApplication.Options.PurchaseMethod, + } + } + if cmd.InstallApplication.Configuration != nil { + configuration = &mdmproto.InstallApplicationConfiguration{} + } + if cmd.InstallApplication.Attributes != nil { + attributes = &mdmproto.InstallApplicationAttributes{} + } + cmdproto.Request = &mdmproto.Command_InstallApplication{ + InstallApplication: &mdmproto.InstallApplication{ + ItunesStoreId: zeroInt64IfNil(cmd.InstallApplication.ITunesStoreID), + Identifier: emptyStringIfNil(cmd.InstallApplication.Identifier), + ManagementFlags: int64(zeroIntIfNil(cmd.InstallApplication.ManagementFlags)), + ChangeManagementState: emptyStringIfNil(cmd.InstallApplication.ChangeManagementState), + ManifestUrl: emptyStringIfNil(cmd.InstallApplication.ManifestURL), + Options: options, + Configuration: configuration, + Attributes: attributes, + }, + } + case "AccountConfiguration": + var autosetupadminaccounts []*mdmproto.AutoSetupAdminAccounts + for _, acct := range cmd.AccountConfiguration.AutoSetupAdminAccounts { + autosetupadminaccounts = append(autosetupadminaccounts, &mdmproto.AutoSetupAdminAccounts{ + ShortName: acct.ShortName, + FullName: acct.FullName, + PasswordHash: acct.PasswordHash, + Hidden: acct.Hidden, + }) + } + cmdproto.Request = &mdmproto.Command_AccountConfiguration{ + AccountConfiguration: &mdmproto.AccountConfiguration{ + SkipPrimarySetupAccountCreation: cmd.AccountConfiguration.SkipPrimarySetupAccountCreation, + SetPrimarySetupAccountAsRegularUser: cmd.AccountConfiguration.SetPrimarySetupAccountAsRegularUser, + AutoSetupAdminAccounts: autosetupadminaccounts, + }, + } + case "ApplyRedemptionCode": + cmdproto.Request = &mdmproto.Command_ApplyRedemptionCode{ + ApplyRedemptionCode: &mdmproto.ApplyRedemptionCode{ + Identifier: cmd.ApplyRedemptionCode.Identifier, + RedemptionCode: cmd.ApplyRedemptionCode.RedemptionCode, + }, + } + case "ManagedApplicationList": + cmdproto.Request = &mdmproto.Command_ManagedApplicationList{ + ManagedApplicationList: &mdmproto.ManagedApplicationList{ + Identifiers: cmd.ManagedApplicationList.Identifiers, + }, + } + case "RemoveApplication": + cmdproto.Request = &mdmproto.Command_RemoveApplication{ + RemoveApplication: &mdmproto.RemoveApplication{ + Identifier: cmd.RemoveApplication.Identifier, + }, + } + case "InviteToProgram": + cmdproto.Request = &mdmproto.Command_InviteToProgram{ + InviteToProgram: &mdmproto.InviteToProgram{ + ProgramId: cmd.InviteToProgram.ProgramID, + InvitationUrl: cmd.InviteToProgram.InvitationURL, + }, + } + case "ValidateApplications": + cmdproto.Request = &mdmproto.Command_ValidataApplications{ + ValidataApplications: &mdmproto.ValidateApplications{ + Identifiers: cmd.ValidateApplications.Identifiers, + }, + } + case "InstallMedia": + cmdproto.Request = &mdmproto.Command_InstallMedia{ + InstallMedia: &mdmproto.InstallMedia{ + ItunesStoreId: zeroInt64IfNil(cmd.InstallMedia.ITunesStoreID), + MediaType: cmd.InstallMedia.MediaType, + MediaUrl: cmd.InstallMedia.MediaURL, + }, + } + case "RemoveMedia": + cmdproto.Request = &mdmproto.Command_RemoveMedia{ + RemoveMedia: &mdmproto.RemoveMedia{ + ItunesStoreId: zeroInt64IfNil(cmd.RemoveMedia.ITunesStoreID), + MediaType: cmd.RemoveMedia.MediaType, + PersistentId: cmd.RemoveMedia.PersistentID, + }, + } + case "Settings": + var settings []*mdmproto.Setting + for _, s := range cmd.Settings.Settings { + settings = append(settings, settingToProto(s)) + } + cmdproto.Request = &mdmproto.Command_Settings{ + Settings: &mdmproto.Settings{Settings: settings}, + } + case "ManagedApplicationConfiguration": + cmdproto.Request = &mdmproto.Command_ManagedApplicationConfiguration{ + ManagedApplicationConfiguration: &mdmproto.ManagedApplicationConfiguration{ + Identifiers: cmd.ManagedApplicationConfiguration.Identifiers, + }, + } + case "ManagedApplicationAttributes": + cmdproto.Request = &mdmproto.Command_ManagedApplicationAttributes{ + ManagedApplicationAttributes: &mdmproto.ManagedApplicationAttributes{ + Identifiers: cmd.ManagedApplicationAttributes.Identifiers, + }, + } + case "ManagedApplicationFeedback": + cmdproto.Request = &mdmproto.Command_ManagedApplicationFeedback{ + ManagedApplicationFeedback: &mdmproto.ManagedApplicationFeedback{ + Identifiers: cmd.ManagedApplicationFeedback.Identifiers, + DeleteFeedback: cmd.ManagedApplicationFeedback.DeleteFeedback, + }, + } + case "SetFirmwarePassword": + cmdproto.Request = &mdmproto.Command_SetFirmwarePassword{ + SetFirmwarePassword: &mdmproto.SetFirmwarePassword{ + CurrentPassword: cmd.SetFirmwarePassword.CurrentPassword, + NewPassword: cmd.SetFirmwarePassword.NewPassword, + AllowOroms: cmd.SetFirmwarePassword.AllowOroms, + }, + } + case "VerifyFirmwarePassword": + cmdproto.Request = &mdmproto.Command_VerifyFirmwarePassword{ + VerifyFirmwarePassword: &mdmproto.VerifyFirmwarePassword{ + Password: cmd.VerifyFirmwarePassword.Password, + }, + } + case "SetAutoAdminPassword": + cmdproto.Request = &mdmproto.Command_SetAutoAdminPassword{ + SetAutoAdminPassword: &mdmproto.SetAutoAdminPassword{ + Guid: cmd.SetAutoAdminPassword.GUID, + PasswordHash: cmd.SetAutoAdminPassword.PasswordHash, + }, + } + case "ScheduleOSUpdate": + var updates []*mdmproto.Update + for _, u := range cmd.ScheduleOSUpdate.Updates { + updates = append(updates, &mdmproto.Update{ + ProductKey: u.ProductKey, + InstallAction: u.InstallAction, + }) + } + cmdproto.Request = &mdmproto.Command_ScheduleOsUpdate{ + ScheduleOsUpdate: &mdmproto.ScheduleOSUpdate{ + Updates: updates, + }, + } + case "ScheduleOSUpdateScan": + cmdproto.Request = &mdmproto.Command_ScheduleOsUpdateScan{ + ScheduleOsUpdateScan: &mdmproto.ScheduleOSUpdateScan{ + Force: cmd.ScheduleOSUpdateScan.Force, + }, + } + case "ActiveNSExtensions": + cmdproto.Request = &mdmproto.Command_ActiveNsExtensions{ + ActiveNsExtensions: &mdmproto.ActiveNSExtensions{ + FilterExtensionPoints: cmd.ActiveNSExtensions.FilterExtensionPoints, + }, + } + case "RotateFileVaultKey": + fvunlock := cmd.RotateFileVaultKey.FileVaultUnlock + cmdproto.Request = &mdmproto.Command_RotateFilevaultKey{ + RotateFilevaultKey: &mdmproto.RotateFileVaultKey{ + KeyType: cmd.RotateFileVaultKey.KeyType, + NewCertificate: cmd.RotateFileVaultKey.NewCertificate, + ReplyEncryptionCertificate: cmd.RotateFileVaultKey.ReplyEncryptionCertificate, + FilevaultUnlock: &mdmproto.FileVaultUnlock{ + Password: fvunlock.Password, + PrivateKeyExport: fvunlock.PrivateKeyExport, + PrivateKeyExportPassword: fvunlock.PrivateKeyExportPassword, + }, + }, + } + default: + return nil, fmt.Errorf("unknown command type %s", cmd.RequestType) + } + return &cmdproto, nil +} + +func settingToProto(s Setting) *mdmproto.Setting { + pbs := mdmproto.Setting{Item: s.Item} + switch s.Item { + case "VoiceRoaming": + pbs.VoiceRoaming = &mdmproto.VoiceRoamingSetting{ + Enabled: falseIfNil(s.Enabled), + } + case "PersonalHotspot": + pbs.PersonalHotspot = &mdmproto.PersonalHotspotSetting{ + Enabled: falseIfNil(s.Enabled), + } + case "Wallpaper": + pbs.Wallpaper = &mdmproto.WallpaperSetting{ + Image: s.Image, + Where: int64(zeroIntIfNil(s.Where)), + } + case "DataRoaming": + pbs.DataRoaming = &mdmproto.DataRoamingSetting{ + Enabled: falseIfNil(s.Enabled), + } + case "Bluetooth": + pbs.Bluetooth = &mdmproto.BluetoothSetting{ + Enabled: falseIfNil(s.Enabled), + } + case "ApplicationAttributes": + var attributes *mdmproto.ApplicationAttributes + if v, ok := s.Attributes["VPNUUID"]; ok { + attributes.VpnUuid = v + } + pbs.ApplicationAttributes = &mdmproto.ApplicationAttributesSetting{ + Identifier: emptyStringIfNil(s.Identifier), + ApplicationAttributes: attributes, + } + case "DeviceName": + pbs.DeviceName = &mdmproto.DeviceNameSetting{ + DeviceName: emptyStringIfNil(s.DeviceName), + } + case "HostName": + pbs.Hostname = &mdmproto.HostnameSetting{ + Hostname: emptyStringIfNil(s.HostName), + } + case "MDMOptions": + options := &mdmproto.MDMOptions{} + if v, ok := s.MDMOptions["ActivationLockAllowedWhileSupervised"]; ok { + options.ActivationLockAllowedWhileSupervised = v.(bool) + } + pbs.MdmOptions = &mdmproto.MDMOptionsSetting{ + MdmOptions: options, + } + case "PasscodeLockGracePeriod": + pbs.PasscodeLockGracePeriod = &mdmproto.PasscodeLockGracePeriodSetting{ + PasscodeLockGracePeriod: int64(zeroIntIfNil(s.PasscodeLockGracePeriod)), + } + case "MaximumResidentUsers": + pbs.MaximumResidentUsers = &mdmproto.MaximumResidentUsersSetting{ + MaximumResidentUsers: int64(zeroIntIfNil(s.MaximumResidentUsers)), + } + case "DiagnosticSubmission": + pbs.DiagnosticSubmission = &mdmproto.DiagnosticSubmissionSetting{ + Enabled: falseIfNil(s.Enabled), + } + case "AppAnalytics": + pbs.AppAnalytics = &mdmproto.AppAnalyticsSetting{ + Enabled: falseIfNil(s.Enabled), + } + } + return &pbs +} + +func falseIfNil(b *bool) bool { + if b == nil { + return false + } + return *b +} + +func zeroInt64IfNil(n *int64) int64 { + if n == nil { + return 0 + } + return *n +} + +func zeroIntIfNil(n *int) int { + if n == nil { + return 0 + } + return *n +} + +func emptyStringIfNil(s *string) string { + if s == nil { + return "" + } + return *s +} diff --git a/mdm/mdm/mdm_command_test.go b/mdm/mdm/mdm_command_test.go new file mode 100644 index 00000000..56f21608 --- /dev/null +++ b/mdm/mdm/mdm_command_test.go @@ -0,0 +1,183 @@ +package mdm + +import ( + "bytes" + "encoding/json" + "fmt" + "io/ioutil" + "path/filepath" + "reflect" + "testing" + + "github.com/groob/plist" +) + +/* +Last Verified against PDF: April 7 2018 +Fully tested commands (with a 10.13.4 mac): + - ProfileList + - InstallProfile + - RemoveProfile + - ProvisioningProfileList + - CertificateList + +-- +Not tested end to end but checked against pdf: + - InstallProvisioningProfile + - RemoveProvisioningProfile +*/ + +func TestMarshalCommand(t *testing.T) { + var tests = []struct { + Command Command + }{ + { + Command: Command{ + RequestType: "ProfileList", + }, + }, + { + Command: Command{ + RequestType: "InstallProfile", + InstallProfile: &InstallProfile{ + Payload: []byte("foobarbaz"), + }, + }, + }, + { + Command: Command{ + RequestType: "RemoveProfile", + RemoveProfile: &RemoveProfile{ + Identifier: "foobarbaz", + }, + }, + }, + } + for _, tt := range tests { + t.Run(tt.Command.RequestType+"_json", func(t *testing.T) { + payload := CommandPayload{CommandUUID: "abcd", Command: &tt.Command} + buf := new(bytes.Buffer) + enc := json.NewEncoder(buf) + enc.SetIndent("", " ") + if err := enc.Encode(&payload); err != nil { + t.Fatal(err) + } + fmt.Println(buf.String()) + }) + + t.Run(tt.Command.RequestType+"_plist", func(t *testing.T) { + payload := CommandPayload{CommandUUID: "abcd", Command: &tt.Command} + buf := new(bytes.Buffer) + enc := plist.NewEncoder(buf) + enc.Indent(" ") + if err := enc.Encode(&payload); err != nil { + t.Fatal(err) + } + fmt.Println(buf.String()) + }) + } +} + +func TestUnmarshalCommandPayload(t *testing.T) { + var tests = []struct { + RequestType string + }{ + {RequestType: "InstallProfile"}, + } + + for _, tt := range tests { + t.Run(tt.RequestType+"_json", func(t *testing.T) { + filename := fmt.Sprintf("%s.json", tt.RequestType) + data := mustLoadFile(t, filename) + var payload CommandPayload + testCommandUnmarshal(t, tt.RequestType, json.Unmarshal, data, &payload) + }) + + t.Run(tt.RequestType+"_plist", func(t *testing.T) { + filename := fmt.Sprintf("%s.plist", tt.RequestType) + data := mustLoadFile(t, filename) + var payload CommandPayload + testCommandUnmarshal(t, tt.RequestType, plist.Unmarshal, data, &payload) + }) + } +} + +func mustLoadFile(t *testing.T, filename string) []byte { + t.Helper() + data, err := ioutil.ReadFile(filepath.Join("testdata", filename)) + if err != nil { + t.Fatalf("could not read test file %s: %s", filename, err) + } + return data +} + +type unmarshalFunc func([]byte, interface{}) error + +func testCommandUnmarshal( + t *testing.T, + requestType string, + unmarshal unmarshalFunc, + data []byte, + payload *CommandPayload, +) { + t.Helper() + if err := unmarshal(data, payload); err != nil { + t.Fatalf("unmarshal command type %s: %s", requestType, err) + } + + if payload.CommandUUID == "" { + t.Errorf("missing CommandUUID") + } + + if have, want := payload.Command.RequestType, requestType; have != want { + t.Errorf("have %s, want %s", have, want) + } +} + +func TestEndToEnd(t *testing.T) { + // given an request that came over http as JSON + requestBytes := []byte(`{"udid": "BC5E2DA4-7FB6-5E70-9928-4981680DAFBF", "payload":"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHBsaXN0IFBVQkxJQyAiLS8vQXBwbGUvL0RURCBQTElTVCAxLjAvL0VOIiAiaHR0cDovL3d3dy5hcHBsZS5jb20vRFREcy9Qcm9wZXJ0eUxpc3QtMS4wLmR0ZC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aW9uPC9rZXk+CgkJCTxpbnRlZ2VyPjE8L2ludGVnZXI+CgkJPC9kaWN0PgoJPC9hcnJheT4KCTxrZXk+UGF5bG9hZERlc2NyaXB0aW9uPC9rZXk+Cgk8c3RyaW5nPlN0b3BzIFNpcmkgZnJvbSBiZWluZyBlbmFibGVkLjwvc3RyaW5nPgoJPGtleT5QYXlsb2FkRGlzcGxheU5hbWU8L2tleT4KCTxzdHJpbmc+RGlzYWJsZSBTaXJpPC9zdHJpbmc+Cgk8a2V5PlBheWxvYWRJZGVudGlmaWVyPC9rZXk+Cgk8c3RyaW5nPkRpc2FibGVTaXJpPC9zdHJpbmc+Cgk8a2V5PlBheWxvYWRPcmdhbml6YXRpb248L2tleT4KCTxzdHJpbmc+PC9zdHJpbmc+Cgk8a2V5PlBheWxvYWRSZW1vdmFsRGlzYWxsb3dlZDwva2V5PgoJPHRydWUvPgoJPGtleT5QYXlsb2FkU2NvcGU8L2tleT4KCTxzdHJpbmc+U3lzdGVtPC9zdHJpbmc+Cgk8a2V5PlBheWxvYWRUeXBlPC9rZXk+Cgk8c3RyaW5nPkNvbmZpZ3VyYXRpb248L3N0cmluZz4KCTxrZXk+UGF5bG9hZFVVSUQ8L2tleT4KCTxzdHJpbmc+OWM3MzgwZDItNWJmZS00ZTYwLWJhZDMtMjVhZDg2ZDYxNTBkPC9zdHJpbmc+Cgk8a2V5PlBheWxvYWRWZXJzaW9uPC9rZXk+Cgk8aW50ZWdlcj4xPC9pbnRlZ2VyPgo8L2RpY3Q+CjwvcGxpc3Q+Cg==", "request_type": "InstallProfile"}`) + + // unmarshal the request into a go structure + var req CommandRequest + if err := json.Unmarshal(requestBytes, &req); err != nil { + t.Fatal(err) + } + if len(req.Command.InstallProfile.Payload) == 0 { + t.Fatal("InstallProfile payload is empty after json unmarshal") + } + + // create a payload from the request + payload, err := NewCommandPayload(&req) + if err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(payload.Command.InstallProfile.Payload, req.Command.InstallProfile.Payload) { + t.Fatal("mdm payload and request do not have the same payload data") + } + + // marshal to proto (for storage) + data, err := MarshalCommandPayload(payload) + if err != nil { + t.Fatal(err) + } + + // unmarshal the proto back into go (from storage) + var newPayload CommandPayload + err = UnmarshalCommandPayload(data, &newPayload) + if err != nil { + t.Fatal(err) + } + if len(newPayload.Command.InstallProfile.Payload) == 0 { + t.Fatal("unmarshaled proto payload is missing payload") + } + + // marshal it into a plist to send to the device + pd, err := plist.MarshalIndent(newPayload, " ") + if err != nil { + t.Fatal(err) + } + if !bytes.Contains(pd, []byte(`PD94bWwgdm`)) { + t.Fatal("marshaled plist does not contain the required payload") + } +} diff --git a/mdm/mdm/testdata/InstallProfile.json b/mdm/mdm/testdata/InstallProfile.json new file mode 100644 index 00000000..a8144f10 --- /dev/null +++ b/mdm/mdm/testdata/InstallProfile.json @@ -0,0 +1,7 @@ +{ + "command_uuid": "7e761ec5-9e20-42d1-9072-3d5a611e3ac5", + "command": { + "request_type":"InstallProfile", + "payload": "Zm9vYmFyYmF6" + } +} diff --git a/mdm/mdm/testdata/InstallProfile.plist b/mdm/mdm/testdata/InstallProfile.plist new file mode 100755 index 00000000..63f7bd8c --- /dev/null +++ b/mdm/mdm/testdata/InstallProfile.plist @@ -0,0 +1,15 @@ + + + + + Command + + Payload + Zm9vYmFyYmF6 + RequestType + InstallProfile + + CommandUUID + 7e761ec5-9e20-42d1-9072-3d5a611e3ac5 + + diff --git a/mdm/mdm/unmarshal_json.go b/mdm/mdm/unmarshal_json.go new file mode 100644 index 00000000..0222533f --- /dev/null +++ b/mdm/mdm/unmarshal_json.go @@ -0,0 +1,292 @@ +package mdm + +import ( + "encoding/json" + "fmt" + + "github.com/pkg/errors" +) + +func (c *CommandRequest) UnmarshalJSON(data []byte) error { + var request = struct { + UDID string `json:"udid"` + RequestType string `json:"request_type"` + }{} + if err := json.Unmarshal(data, &request); err != nil { + return errors.Wrap(err, "mdm: unmarshal json command request") + } + c.UDID = request.UDID + c.Command = &Command{} + return c.Command.UnmarshalJSON(data) +} + +func (c *Command) UnmarshalJSON(data []byte) error { + var request = struct { + RequestType string `json:"request_type"` + }{} + if err := json.Unmarshal(data, &request); err != nil { + return errors.Wrap(err, "mdm: unmarshal json command request") + } + c.RequestType = request.RequestType + + switch c.RequestType { + case "ProfileList", + "ProvisioningProfileList", + "CertificateList", + "SecurityInfo", + "RestartDevice", + "ShutDownDevice", + "StopMirroring", + "ClearRestrictionsPassword", + "UserList", + "LogOutUser", + "PlayLostModeSound", + "DisableLostMode", + "DeviceLocation", + "ManagedMediaList", + "DeviceConfigured", + "AvailableOSUpdates", + "NSExtensionMappings": + return nil + case "InstallProfile": + var payload InstallProfile + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.InstallProfile = &payload + return nil + case "RemoveProfile": + var payload RemoveProfile + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.RemoveProfile = &payload + return nil + case "InstallProvisioningProfile": + var payload InstallProvisioningProfile + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.InstallProvisioningProfile = &payload + return nil + case "RemoveProvisioningProfile": + var payload RemoveProvisioningProfile + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.RemoveProvisioningProfile = &payload + return nil + case "InstalledApplicationList": + var payload InstalledApplicationList + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.InstalledApplicationList = &payload + return nil + case "DeviceInformation": + var payload DeviceInformation + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.DeviceInformation = &payload + return nil + case "DeviceLock": + var payload DeviceLock + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.DeviceLock = &payload + return nil + case "ClearPasscode": + var payload ClearPasscode + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.ClearPasscode = &payload + return nil + case "EraseDevice": + var payload EraseDevice + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.EraseDevice = &payload + return nil + case "RequestMirroring": + var payload RequestMirroring + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.RequestMirroring = &payload + return nil + case "Restrictions": + var payload Restrictions + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.Restrictions = &payload + return nil + case "UnlockUserAccount": + var payload UnlockUserAccount + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.UnlockUserAccount = &payload + return nil + case "DeleteUser": + var payload DeleteUser + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.DeleteUser = &payload + return nil + case "EnableLostMode": + var payload EnableLostMode + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.EnableLostMode = &payload + return nil + case "InstallApplication": + var payload InstallApplication + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.InstallApplication = &payload + return nil + case "AccountConfiguration": + var payload AccountConfiguration + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.AccountConfiguration = &payload + return nil + case "ApplyRedemptionCode": + var payload ApplyRedemptionCode + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.ApplyRedemptionCode = &payload + return nil + case "ManagedApplicationList": + var payload ManagedApplicationList + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.ManagedApplicationList = &payload + return nil + case "RemoveApplication": + var payload RemoveApplication + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.RemoveApplication = &payload + return nil + case "InviteToProgram": + var payload InviteToProgram + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.InviteToProgram = &payload + return nil + case "ValidateApplications": + var payload ValidateApplications + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.ValidateApplications = &payload + return nil + case "InstallMedia": + var payload InstallMedia + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.InstallMedia = &payload + return nil + case "RemoveMedia": + var payload RemoveMedia + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.RemoveMedia = &payload + return nil + case "Settings": + var payload Settings + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.Settings = &payload + return nil + case "ManagedApplicationConfiguration": + var payload ManagedApplicationConfiguration + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.ManagedApplicationConfiguration = &payload + return nil + case "ManagedApplicationAttributes": + var payload ManagedApplicationAttributes + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.ManagedApplicationAttributes = &payload + return nil + case "ManagedApplicationFeedback": + var payload ManagedApplicationFeedback + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.ManagedApplicationFeedback = &payload + return nil + case "SetFirmwarePassword": + var payload SetFirmwarePassword + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.SetFirmwarePassword = &payload + return nil + case "VerifyFirmwarePassword": + var payload VerifyFirmwarePassword + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.VerifyFirmwarePassword = &payload + return nil + case "SetAutoAdminPassword": + var payload SetAutoAdminPassword + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.SetAutoAdminPassword = &payload + return nil + case "ScheduleOSUpdate": + var payload ScheduleOSUpdate + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.ScheduleOSUpdate = &payload + return nil + case "ScheduleOSUpdateScan": + var payload ScheduleOSUpdateScan + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.ScheduleOSUpdateScan = &payload + return nil + case "ActiveNSExtensions": + var payload ActiveNSExtensions + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.ActiveNSExtensions = &payload + return nil + case "RotateFileVaultKey": + var payload RotateFileVaultKey + if err := json.Unmarshal(data, &payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command json", c.RequestType) + } + c.RotateFileVaultKey = &payload + return nil + default: + return fmt.Errorf("mdm: unknown RequestType: %s", c.RequestType) + } +} diff --git a/mdm/mdm/unmarshal_plist.go b/mdm/mdm/unmarshal_plist.go new file mode 100644 index 00000000..8ae5f876 --- /dev/null +++ b/mdm/mdm/unmarshal_plist.go @@ -0,0 +1,278 @@ +package mdm + +import ( + "fmt" + + "github.com/pkg/errors" +) + +func (c *Command) UnmarshalPlist(unmarshal func(i interface{}) error) error { + var requestType = struct { + RequestType string + }{} + if err := unmarshal(&requestType); err != nil { + return errors.Wrap(err, "mdm: unmarshal request type") + } + c.RequestType = requestType.RequestType + + switch requestType.RequestType { + case "ProfileList", + "ProvisioningProfileList", + "CertificateList", + "SecurityInfo", + "RestartDevice", + "ShutDownDevice", + "StopMirroring", + "ClearRestrictionsPassword", + "UserList", + "LogOutUser", + "PlayLostModeSound", + "DisableLostMode", + "DeviceLocation", + "ManagedMediaList", + "DeviceConfigured", + "AvailableOSUpdates", + "NSExtensionMappings": + return nil + case "InstallProfile": + var payload InstallProfile + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.InstallProfile = &payload + return nil + case "RemoveProfile": + var payload RemoveProfile + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.RemoveProfile = &payload + return nil + case "InstallProvisioningProfile": + var payload InstallProvisioningProfile + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.InstallProvisioningProfile = &payload + return nil + case "RemoveProvisioningProfile": + var payload RemoveProvisioningProfile + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.RemoveProvisioningProfile = &payload + return nil + case "InstalledApplicationList": + var payload InstalledApplicationList + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.InstalledApplicationList = &payload + return nil + case "DeviceInformation": + var payload DeviceInformation + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.DeviceInformation = &payload + return nil + case "DeviceLock": + var payload DeviceLock + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.DeviceLock = &payload + return nil + case "ClearPasscode": + var payload ClearPasscode + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.ClearPasscode = &payload + return nil + case "EraseDevice": + var payload EraseDevice + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.EraseDevice = &payload + return nil + case "RequestMirroring": + var payload RequestMirroring + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.RequestMirroring = &payload + return nil + case "Restrictions": + var payload Restrictions + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.Restrictions = &payload + return nil + case "UnlockUserAccount": + var payload UnlockUserAccount + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.UnlockUserAccount = &payload + return nil + case "DeleteUser": + var payload DeleteUser + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.DeleteUser = &payload + return nil + case "EnableLostMode": + var payload EnableLostMode + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.EnableLostMode = &payload + return nil + case "InstallApplication": + var payload InstallApplication + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.InstallApplication = &payload + return nil + case "AccountConfiguration": + var payload AccountConfiguration + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.AccountConfiguration = &payload + return nil + case "ApplyRedemptionCode": + var payload ApplyRedemptionCode + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.ApplyRedemptionCode = &payload + return nil + case "ManagedApplicationList": + var payload ManagedApplicationList + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.ManagedApplicationList = &payload + return nil + case "RemoveApplication": + var payload RemoveApplication + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.RemoveApplication = &payload + return nil + case "InviteToProgram": + var payload InviteToProgram + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.InviteToProgram = &payload + return nil + case "ValidateApplications": + var payload ValidateApplications + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.ValidateApplications = &payload + return nil + case "InstallMedia": + var payload InstallMedia + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.InstallMedia = &payload + return nil + case "RemoveMedia": + var payload RemoveMedia + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.RemoveMedia = &payload + return nil + case "Settings": + var payload Settings + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.Settings = &payload + return nil + case "ManagedApplicationConfiguration": + var payload ManagedApplicationConfiguration + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.ManagedApplicationConfiguration = &payload + return nil + case "ManagedApplicationAttributes": + var payload ManagedApplicationAttributes + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.ManagedApplicationAttributes = &payload + return nil + case "ManagedApplicationFeedback": + var payload ManagedApplicationFeedback + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.ManagedApplicationFeedback = &payload + return nil + case "SetFirmwarePassword": + var payload SetFirmwarePassword + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.SetFirmwarePassword = &payload + return nil + case "VerifyFirmwarePassword": + var payload VerifyFirmwarePassword + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.VerifyFirmwarePassword = &payload + return nil + case "SetAutoAdminPassword": + var payload SetAutoAdminPassword + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.SetAutoAdminPassword = &payload + return nil + case "ScheduleOSUpdate": + var payload ScheduleOSUpdate + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.ScheduleOSUpdate = &payload + return nil + case "ScheduleOSUpdateScan": + var payload ScheduleOSUpdateScan + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.ScheduleOSUpdateScan = &payload + return nil + case "ActiveNSExtensions": + var payload ActiveNSExtensions + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.ActiveNSExtensions = &payload + return nil + case "RotateFileVaultKey": + var payload RotateFileVaultKey + if err := unmarshal(&payload); err != nil { + return errors.Wrapf(err, "mdm: unmarshal %s command plist", requestType.RequestType) + } + c.RotateFileVaultKey = &payload + return nil + default: + return fmt.Errorf("mdm: unknown RequestType: %s", requestType.RequestType) + } +} diff --git a/mdm/mdm/unmarshal_proto.go b/mdm/mdm/unmarshal_proto.go new file mode 100644 index 00000000..9ac98449 --- /dev/null +++ b/mdm/mdm/unmarshal_proto.go @@ -0,0 +1,387 @@ +package mdm + +import ( + "fmt" + + "github.com/gogo/protobuf/proto" + "github.com/micromdm/micromdm/mdm/mdm/internal/mdmproto" +) + +func protoToCommand(pb *mdmproto.Command) *Command { + cmd := Command{ + RequestType: pb.RequestType, + } + switch pb.RequestType { + case "ProfileList", + "ProvisioningProfileList", + "CertificateList", + "SecurityInfo", + "RestartDevice", + "ShutDownDevice", + "StopMirroring", + "ClearRestrictionsPassword", + "UserList", + "LogOutUser", + "PlayLostModeSound", + "DisableLostMode", + "DeviceLocation", + "ManagedMediaList", + "DeviceConfigured", + "AvailableOSUpdates", + "NSExtensionMappings": + + case "InstallProfile": + cmd.InstallProfile = &InstallProfile{ + Payload: pb.GetInstallProfile().GetPayload(), + } + case "RemoveProfile": + cmd.RemoveProfile = &RemoveProfile{ + Identifier: pb.GetRemoveProfile().GetIdentifier(), + } + case "InstallProvisioningProfile": + cmd.InstallProvisioningProfile = &InstallProvisioningProfile{ + ProvisioningProfile: pb.GetInstallProvisioningProfile().GetProvisioningProfile(), + } + case "RemoveProvisioningProfile": + cmd.RemoveProvisioningProfile = &RemoveProvisioningProfile{ + UUID: pb.GetRemoveProfisioningProfile().GetUuid(), + } + case "InstalledApplicationList": + pbcmd := pb.GetInstalledApplicationList() + cmd.InstalledApplicationList = &InstalledApplicationList{ + Identifiers: pbcmd.GetIdentifiers(), + ManagedAppsOnly: pbcmd.GetManagedAppsOnly(), + } + case "DeviceInformation": + fmt.Println("x", pb.GetDeviceInformation().GetQueries()) + cmd.DeviceInformation = &DeviceInformation{ + Queries: pb.GetDeviceInformation().GetQueries(), + } + case "DeviceLock": + pbc := pb.GetDeviceLock() + cmd.DeviceLock = &DeviceLock{ + PIN: pbc.GetPin(), + Message: pbc.GetMessage(), + PhoneNumber: pbc.GetPhoneNumber(), + } + case "ClearPasscode": + pbc := pb.GetClearPasscode() + cmd.ClearPasscode = &ClearPasscode{ + UnlockToken: pbc.GetUnlockToken(), + } + case "EraseDevice": + pbc := pb.GetEraseDevice() + cmd.EraseDevice = &EraseDevice{ + PIN: pbc.GetPin(), + PreserveDataPlan: pbc.GetPreserveDataPlan(), + DisallowProximitySetup: pbc.GetDisallowProximitySetup(), + } + case "RequestMirroring": + pbc := pb.GetRequestMirroring() + cmd.RequestMirroring = &RequestMirroring{ + DestinationName: pbc.GetDestinationName(), + DestinationDeviceID: pbc.GetDestinationDeviceId(), + ScanTime: pbc.GetScanTime(), + Password: pbc.GetPassword(), + } + case "Restrictions": + pbc := pb.GetRestrictions() + cmd.Restrictions = &Restrictions{ + ProfileRestrictions: pbc.GetProfileRestrictions(), + } + case "UnlockUserAccount": + pbc := pb.GetUnlockUserAccount() + cmd.UnlockUserAccount = &UnlockUserAccount{ + UserName: pbc.GetUsername(), + } + case "DeleteUser": + pbc := pb.GetDeleteUser() + cmd.DeleteUser = &DeleteUser{ + UserName: pbc.GetUsername(), + ForceDeletion: pbc.GetForceDeletion(), + } + case "EnableLostMode": + pbc := pb.GetEnableLostMode() + cmd.EnableLostMode = &EnableLostMode{ + Message: pbc.GetMessage(), + PhoneNumber: pbc.GetPhoneNumber(), + Footnote: pbc.GetFootnote(), + } + case "InstallApplication": + pbc := pb.GetInstallApplication() + var mgmt *int + mgmtFlags := nilIfZeroInt64(pbc.GetManagementFlags()) + if mgmtFlags != nil { + mgmti := int(*mgmtFlags) + mgmt = &mgmti + } + + var ( + options *InstallApplicationOptions + configuration *InstallApplicationConfiguration + attributes *InstallApplicationAttributes + ) + + pboptions := pbc.GetOptions() + if pboptions != nil { + options = &InstallApplicationOptions{ + PurchaseMethod: pboptions.GetPurchaseMethod(), + } + } + + pbconfig := pbc.GetConfiguration() + if pbconfig != nil { + configuration = &InstallApplicationConfiguration{} + } + + pbattributes := pbc.GetAttributes() + if pbattributes != nil { + attributes = &InstallApplicationAttributes{} + } + + cmd.InstallApplication = &InstallApplication{ + ITunesStoreID: nilIfZeroInt64(pbc.GetItunesStoreId()), + Identifier: nilIfEmptyString(pbc.GetIdentifier()), + ManagementFlags: mgmt, + ChangeManagementState: nilIfEmptyString(pbc.GetChangeManagementState()), + ManifestURL: nilIfEmptyString(pbc.GetManifestUrl()), + Options: options, + Configuration: configuration, + Attributes: attributes, + } + case "AccountConfiguration": + pbc := pb.GetAccountConfiguration() + var autosetupadminaccounts []AdminAccount + for _, acct := range pbc.GetAutoSetupAdminAccounts() { + autosetupadminaccounts = append(autosetupadminaccounts, AdminAccount{ + ShortName: acct.GetShortName(), + FullName: acct.GetFullName(), + PasswordHash: acct.GetPasswordHash(), + Hidden: acct.GetHidden(), + }) + } + cmd.AccountConfiguration = &AccountConfiguration{ + SkipPrimarySetupAccountCreation: pbc.GetSkipPrimarySetupAccountCreation(), + SetPrimarySetupAccountAsRegularUser: pbc.GetSetPrimarySetupAccountAsRegularUser(), + AutoSetupAdminAccounts: autosetupadminaccounts, + } + case "ApplyRedemptionCode": + pbc := pb.GetApplyRedemptionCode() + cmd.ApplyRedemptionCode = &ApplyRedemptionCode{ + Identifier: pbc.GetIdentifier(), + RedemptionCode: pbc.GetRedemptionCode(), + } + case "ManagedApplicationList": + pbc := pb.GetManagedApplicationList() + cmd.ManagedApplicationList = &ManagedApplicationList{ + Identifiers: pbc.GetIdentifiers(), + } + case "RemoveApplication": + pbc := pb.GetRemoveApplication() + cmd.RemoveApplication = &RemoveApplication{ + Identifier: pbc.GetIdentifier(), + } + case "InviteToProgram": + pbc := pb.GetInviteToProgram() + cmd.InviteToProgram = &InviteToProgram{ + ProgramID: pbc.GetProgramId(), + InvitationURL: pbc.GetInvitationUrl(), + } + case "ValidateApplications": + pbc := pb.GetValidataApplications() + cmd.ValidateApplications = &ValidateApplications{ + Identifiers: pbc.GetIdentifiers(), + } + case "InstallMedia": + pbc := pb.GetInstallMedia() + cmd.InstallMedia = &InstallMedia{ + ITunesStoreID: nilIfZeroInt64(pbc.GetItunesStoreId()), + MediaType: pbc.GetMediaType(), + MediaURL: pbc.GetMediaUrl(), + } + case "RemoveMedia": + pbc := pb.GetRemoveMedia() + cmd.RemoveMedia = &RemoveMedia{ + ITunesStoreID: nilIfZeroInt64(pbc.GetItunesStoreId()), + MediaType: pbc.GetMediaType(), + PersistentID: pbc.GetPersistentId(), + } + case "Settings": + pbc := pb.GetSettings() + var settings []Setting + for _, s := range pbc.GetSettings() { + settings = append(settings, protoToSetting(s)) + } + cmd.Settings = &Settings{ + Settings: settings, + } + case "ManagedApplicationConfiguration": + pbc := pb.GetManagedApplicationConfiguration() + cmd.ManagedApplicationConfiguration = &ManagedApplicationConfiguration{ + Identifiers: pbc.GetIdentifiers(), + } + case "ManagedApplicationAttributes": + pbc := pb.GetManagedApplicationAttributes() + cmd.ManagedApplicationAttributes = &ManagedApplicationAttributes{ + Identifiers: pbc.GetIdentifiers(), + } + case "ManagedApplicationFeedback": + pbc := pb.GetManagedApplicationFeedback() + cmd.ManagedApplicationFeedback = &ManagedApplicationFeedback{ + Identifiers: pbc.GetIdentifiers(), + DeleteFeedback: pbc.GetDeleteFeedback(), + } + case "SetFirmwarePassword": + pbc := pb.GetSetFirmwarePassword() + cmd.SetFirmwarePassword = &SetFirmwarePassword{ + CurrentPassword: pbc.GetCurrentPassword(), + NewPassword: pbc.GetNewPassword(), + AllowOroms: pbc.GetAllowOroms(), + } + case "VerifyFirmwarePassword": + pbc := pb.GetVerifyFirmwarePassword() + cmd.VerifyFirmwarePassword = &VerifyFirmwarePassword{ + Password: pbc.GetPassword(), + } + case "SetAutoAdminPassword": + pbc := pb.GetSetAutoAdminPassword() + cmd.SetAutoAdminPassword = &SetAutoAdminPassword{ + GUID: pbc.GetGuid(), + PasswordHash: pbc.GetPasswordHash(), + } + case "ScheduleOSUpdate": + pbc := pb.GetScheduleOsUpdate() + var updates []OSUpdate + for _, up := range pbc.GetUpdates() { + updates = append(updates, OSUpdate{ + ProductKey: up.GetProductKey(), + InstallAction: up.GetInstallAction(), + }) + } + cmd.ScheduleOSUpdate = &ScheduleOSUpdate{ + Updates: updates, + } + case "ScheduleOSUpdateScan": + pbc := pb.GetScheduleOsUpdateScan() + cmd.ScheduleOSUpdateScan = &ScheduleOSUpdateScan{ + Force: pbc.GetForce(), + } + case "ActiveNSExtensions": + pbc := pb.GetActiveNsExtensions() + cmd.ActiveNSExtensions = &ActiveNSExtensions{ + FilterExtensionPoints: pbc.GetFilterExtensionPoints(), + } + case "RotateFileVaultKey": + pbc := pb.GetRotateFilevaultKey() + fvunlock := pbc.GetFilevaultUnlock() + cmd.RotateFileVaultKey = &RotateFileVaultKey{ + KeyType: pbc.GetKeyType(), + NewCertificate: pbc.GetNewCertificate(), + ReplyEncryptionCertificate: pbc.GetReplyEncryptionCertificate(), + FileVaultUnlock: FileVaultUnlock{ + Password: fvunlock.GetPassword(), + PrivateKeyExport: fvunlock.GetPrivateKeyExport(), + PrivateKeyExportPassword: fvunlock.GetPrivateKeyExportPassword(), + }, + } + + } + return &cmd +} + +func protoToSetting(s *mdmproto.Setting) Setting { + setting := Setting{ + Item: s.GetItem(), + } + switch s.Item { + case "VoiceRoaming": + pbs := s.GetVoiceRoaming() + setting.Enabled = nilIfFalse(pbs.GetEnabled()) + case "PersonalHotspot": + pbs := s.GetPersonalHotspot() + setting.Enabled = nilIfFalse(pbs.GetEnabled()) + case "Wallpaper": + pbs := s.GetWallpaper() + setting.Image = pbs.GetImage() + setting.Where = nilIfZeroInt(int(pbs.GetWhere())) + case "DataRoaming": + pbs := s.GetDataRoaming() + setting.Enabled = nilIfFalse(pbs.GetEnabled()) + case "Bluetooth": + pbs := s.GetBluetooth() + setting.Enabled = nilIfFalse(pbs.GetEnabled()) + case "ApplicationAttributes": + pbs := s.GetApplicationAttributes() + attr := pbs.GetApplicationAttributes() + vpnUUID := attr.GetVpnUuid() + if vpnUUID != "" { + setting.Attributes = map[string]string{"VPNUUID": vpnUUID} + } + setting.Identifier = nilIfEmptyString(pbs.GetIdentifier()) + case "DeviceName": + pbs := s.GetDeviceName() + setting.DeviceName = nilIfEmptyString(pbs.GetDeviceName()) + case "HostName": + pbs := s.GetHostname() + setting.HostName = nilIfEmptyString(pbs.GetHostname()) + case "MDMOptions": + pbs := s.GetMdmOptions() + activationLockAllowed := pbs.GetMdmOptions().GetActivationLockAllowedWhileSupervised() + setting.MDMOptions = map[string]interface { + }{ + "ActivationLockAllowedWhileSupervised": activationLockAllowed, + } + case "PasscodeLockGracePeriod": + pbs := s.GetPasscodeLockGracePeriod() + setting.PasscodeLockGracePeriod = nilIfZeroInt(int(pbs.GetPasscodeLockGracePeriod())) + case "MaximumResidentUsers": + pbs := s.GetMaximumResidentUsers() + setting.MaximumResidentUsers = nilIfZeroInt(int(pbs.GetMaximumResidentUsers())) + case "DiagnosticSubmission": + pbs := s.GetDiagnosticSubmission() + setting.Enabled = nilIfFalse(pbs.GetEnabled()) + case "AppAnalytics": + pbs := s.GetAppAnalytics() + setting.Enabled = nilIfFalse(pbs.GetEnabled()) + } + return setting +} + +func UnmarshalCommandPayload(data []byte, payload *CommandPayload) error { + var pb mdmproto.CommandPayload + if err := proto.Unmarshal(data, &pb); err != nil { + return err + } + payload.CommandUUID = pb.CommandUuid + payload.Command = protoToCommand(pb.Command) + return nil +} + +func nilIfZeroInt64(n int64) *int64 { + if n == 0 { + return nil + } + return &n +} + +func nilIfZeroInt(n int) *int { + if n == 0 { + return nil + } + return &n +} + +func nilIfEmptyString(s string) *string { + if s == "" { + return nil + } + return &s +} + +func nilIfFalse(b bool) *bool { + if !b { + return nil + + } + return &b +} diff --git a/platform/blueprint/builtin/listener.go b/platform/blueprint/builtin/listener.go index c1da7fb7..6b0c0991 100644 --- a/platform/blueprint/builtin/listener.go +++ b/platform/blueprint/builtin/listener.go @@ -4,10 +4,10 @@ import ( "context" "fmt" - "github.com/micromdm/mdm" "github.com/pkg/errors" "github.com/micromdm/micromdm/mdm/checkin" + "github.com/micromdm/micromdm/mdm/mdm" "github.com/micromdm/micromdm/platform/blueprint" "github.com/micromdm/micromdm/platform/command" "github.com/micromdm/micromdm/platform/device" @@ -26,9 +26,9 @@ func (db *DB) ApplyToDevice(ctx context.Context, svc command.Service, bp *bluepr } requests = append(requests, &mdm.CommandRequest{ UDID: udid, - Command: mdm.Command{ + Command: &mdm.Command{ RequestType: "AccountConfiguration", - AccountConfiguration: mdm.AccountConfiguration{ + AccountConfiguration: &mdm.AccountConfiguration{ SkipPrimarySetupAccountCreation: bp.SkipPrimarySetupAccountCreation, SetPrimarySetupAccountAsRegularUser: bp.SetPrimarySetupAccountAsRegularUser, AutoSetupAdminAccounts: []mdm.AdminAccount{ @@ -47,11 +47,11 @@ func (db *DB) ApplyToDevice(ctx context.Context, svc command.Service, bp *bluepr for _, appURL := range bp.ApplicationURLs { requests = append(requests, &mdm.CommandRequest{ UDID: udid, - Command: mdm.Command{ + Command: &mdm.Command{ RequestType: "InstallApplication", - InstallApplication: mdm.InstallApplication{ - ManifestURL: appURL, - ManagementFlags: 1, + InstallApplication: &mdm.InstallApplication{ + ManifestURL: &appURL, + ManagementFlags: intPtr(1), }, }, }) @@ -70,9 +70,9 @@ func (db *DB) ApplyToDevice(ctx context.Context, svc command.Service, bp *bluepr requests = append(requests, &mdm.CommandRequest{ UDID: udid, - Command: mdm.Command{ + Command: &mdm.Command{ RequestType: "InstallProfile", - InstallProfile: mdm.InstallProfile{ + InstallProfile: &mdm.InstallProfile{ Payload: foundProfile.Mobileconfig, }, }, @@ -124,7 +124,7 @@ func (db *DB) StartListener(sub pubsub.Subscriber, cmdSvc command.Service) error if ev.Command.AwaitingConfiguration { _, err := cmdSvc.NewCommand(ctx, &mdm.CommandRequest{ - Command: mdm.Command{RequestType: "DeviceConfigured"}, + Command: &mdm.Command{RequestType: "DeviceConfigured"}, UDID: ev.Command.UDID, }) if err != nil { @@ -145,3 +145,7 @@ func (db *DB) StartListener(sub pubsub.Subscriber, cmdSvc command.Service) error return nil } + +func intPtr(i int) *int { + return &i +} diff --git a/platform/command/command.go b/platform/command/command.go index 8308c920..8136c108 100644 --- a/platform/command/command.go +++ b/platform/command/command.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/boltdb/bolt" - "github.com/micromdm/mdm" + "github.com/micromdm/micromdm/mdm/mdm" "github.com/pkg/errors" "golang.org/x/net/context" @@ -42,15 +42,15 @@ func New(db *bolt.DB, pub pubsub.Publisher) (*Command, error) { return &svc, nil } -func (svc *Command) NewCommand(ctx context.Context, request *mdm.CommandRequest) (*mdm.Payload, error) { +func (svc *Command) NewCommand(ctx context.Context, request *mdm.CommandRequest) (*mdm.CommandPayload, error) { if request == nil { return nil, errors.New("empty CommandRequest") } - payload, err := mdm.NewPayload(request) + payload, err := mdm.NewCommandPayload(request) if err != nil { return nil, errors.Wrap(err, "creating mdm payload") } - event := NewEvent(*payload, request.UDID) + event := NewEvent(payload, request.UDID) msg, err := MarshalEvent(event) if err != nil { return nil, errors.Wrap(err, "marshalling mdm command event") diff --git a/platform/command/command_test.go b/platform/command/command_test.go deleted file mode 100644 index af4cd176..00000000 --- a/platform/command/command_test.go +++ /dev/null @@ -1,103 +0,0 @@ -package command - -import ( - "context" - "errors" - "io/ioutil" - "os" - "testing" - - "github.com/boltdb/bolt" - "github.com/micromdm/mdm" -) - -func TestService_NewCommand(t *testing.T) { - svc := setupDB(t) - mock := &mockPublisher{} - svc.publisher = mock - passPublisher := func(string, []byte) error { return nil } - failPublisher := func(string, []byte) error { - return errors.New("failed") - } - - tests := []struct { - name string - publisher func(string, []byte) error - request *mdm.CommandRequest - wantErr bool - }{ - { - name: "happy path", - wantErr: false, - publisher: passPublisher, - request: &mdm.CommandRequest{ - UDID: "foobarbaz", - Command: mdm.Command{ - RequestType: "DeviceInformation", - DeviceInformation: mdm.DeviceInformation{ - Queries: []string{"foo", "bar", "baz"}, - }, - }, - }, - }, - { - name: "publish fail", - wantErr: true, - publisher: failPublisher, - request: &mdm.CommandRequest{ - Command: mdm.Command{ - RequestType: "DeviceInformation", - }, - }, - }, - { - name: "empty request", - wantErr: true, - publisher: passPublisher, - }, - { - name: "bad payload", - wantErr: true, - publisher: passPublisher, - request: &mdm.CommandRequest{ - UDID: "foobarbaz", - Command: mdm.Command{ - RequestType: "DevicePropaganda", - }, - }, - }, - } - for _, tt := range tests { - mock.PublishFn = tt.publisher - _, err := svc.NewCommand(context.Background(), tt.request) - if (err != nil) != tt.wantErr { - t.Errorf("%q. CommandService.NewCommand() error = %v, wantErr %v", - tt.name, err, tt.wantErr) - continue - } - } -} - -type mockPublisher struct { - PublishFn func(string, []byte) error -} - -func (m *mockPublisher) Publish(ctx context.Context, s string, b []byte) error { - return m.PublishFn(s, b) -} - -func setupDB(t *testing.T) *Command { - f, _ := ioutil.TempFile("", "bolt-") - f.Close() - os.Remove(f.Name()) - - db, err := bolt.Open(f.Name(), 0777, nil) - if err != nil { - t.Fatalf("couldn't open bolt, err %s\n", err) - } - svc, err := New(db, nil) - if err != nil { - t.Fatalf("couldn't create service, err %s\n", err) - } - return svc -} diff --git a/platform/command/endpoint.go b/platform/command/endpoint.go index f7526a9c..011416fd 100644 --- a/platform/command/endpoint.go +++ b/platform/command/endpoint.go @@ -10,7 +10,7 @@ import ( "github.com/go-kit/kit/endpoint" "github.com/go-kit/kit/log" "github.com/go-kit/kit/metrics" - "github.com/micromdm/mdm" + "github.com/micromdm/micromdm/mdm/mdm" ) var errEmptyRequest = errors.New("request must contain UDID of the device") @@ -70,8 +70,8 @@ type newCommandRequest struct { } type newCommandResponse struct { - Payload *mdm.Payload `json:"payload,omitempty"` - Err error `json:"error,omitempty"` + Payload *mdm.CommandPayload `json:"payload,omitempty"` + Err error `json:"error,omitempty"` } func (r newCommandResponse) error() error { return r.Err } diff --git a/platform/command/event.go b/platform/command/event.go index 0b9a09d3..fdae4ba4 100644 --- a/platform/command/event.go +++ b/platform/command/event.go @@ -4,26 +4,25 @@ import ( "time" "github.com/gogo/protobuf/proto" - "github.com/micromdm/mdm" + "github.com/micromdm/micromdm/mdm/mdm" + "github.com/micromdm/micromdm/platform/command/internal/commandproto" "github.com/pkg/errors" uuid "github.com/satori/go.uuid" - - "github.com/micromdm/micromdm/platform/command/internal/commandproto" ) type Event struct { ID string Time time.Time - Payload mdm.Payload + Payload *mdm.CommandPayload DeviceUDID string } // NewEvent returns an Event with a unique ID and the current time. -func NewEvent(cmd mdm.Payload, udid string) *Event { +func NewEvent(payload *mdm.CommandPayload, udid string) *Event { event := Event{ ID: uuid.NewV4().String(), Time: time.Now().UTC(), - Payload: cmd, + Payload: payload, DeviceUDID: udid, } return &event @@ -31,110 +30,15 @@ func NewEvent(cmd mdm.Payload, udid string) *Event { // MarshalEvent serializes an event to a protocol buffer wire format. func MarshalEvent(e *Event) ([]byte, error) { - payload := &commandproto.Payload{ - CommandUuid: e.Payload.CommandUUID, - } - if e.Payload.Command != nil { - payload.Command = &commandproto.Command{ - RequestType: e.Payload.Command.RequestType, - } - } - switch e.Payload.Command.RequestType { - case "DeviceLock": - payload.Command.DeviceLock = &commandproto.DeviceLock{ - Pin: e.Payload.Command.DeviceLock.PIN, - Message: e.Payload.Command.DeviceLock.Message, - PhoneNumber: e.Payload.Command.DeviceLock.PhoneNumber, - } - case "EraseDevice": - payload.Command.EraseDevice = &commandproto.EraseDevice{ - Pin: e.Payload.Command.EraseDevice.PIN, - } - case "DeleteUser": - payload.Command.DeleteUser = &commandproto.DeleteUser{ - Username: e.Payload.Command.DeleteUser.UserName, - ForceDeletion: e.Payload.Command.DeleteUser.ForceDeletion, - } - case "ScheduleOSUpdateScan": - payload.Command.ScheduleOsUpdateScan = &commandproto.ScheduleOSUpdateScan{ - Force: e.Payload.Command.ScheduleOSUpdateScan.Force, - } - case "ScheduleOSUpdate": - p := e.Payload.Command.ScheduleOSUpdate - var updates []*commandproto.OSUpdate - for _, update := range p.Updates { - updates = append(updates, &commandproto.OSUpdate{ - ProductKey: update.ProductKey, - InstallAction: update.InstallAction, - }) - } - payload.Command.ScheduleOsUpdate = &commandproto.ScheduleOSUpdate{ - Updates: updates, - } - case "AccountConfiguration": - p := e.Payload.Command.AccountConfiguration - payload.Command.AccountConfiguration = &commandproto.AccountConfiguration{ - SkipPrimarySetupAccountCreation: p.SkipPrimarySetupAccountCreation, - SetPrimarySetupAccountAsRegularUser: p.SetPrimarySetupAccountAsRegularUser, - } - for _, account := range p.AutoSetupAdminAccounts { - payload.Command.AccountConfiguration.AutoSetupAdminAccounts = append( - payload.Command.AccountConfiguration.AutoSetupAdminAccounts, &commandproto.AutoSetupAdminAccounts{ - ShortName: account.ShortName, - FullName: account.FullName, - PasswordHash: account.PasswordHash, - Hidden: account.Hidden, - }) - } - case "DeviceInformation": - payload.Command.DeviceInformation = &commandproto.DeviceInformation{ - Queries: e.Payload.Command.DeviceInformation.Queries, - } - case "InstallProfile": - payload.Command.InstallProfile = &commandproto.InstallProfile{ - Payload: e.Payload.Command.InstallProfile.Payload, - } - case "RemoveProfile": - payload.Command.RemoveProfile = &commandproto.RemoveProfile{ - Identifier: e.Payload.Command.RemoveProfile.Identifier, - } - case "InstallApplication": - cmd := e.Payload.Command.InstallApplication - payload.Command.InstallApplication = &commandproto.InstallApplication{ - ItunesStoreId: int64(cmd.ITunesStoreID), - Identifier: cmd.Identifier, - ManifestUrl: cmd.ManifestURL, - ManagementFlags: int64(cmd.ManagementFlags), - NotManaged: cmd.NotManaged, - ChangeManagementState: cmd.ChangeManagementState, - } - case "Settings": - cmd := e.Payload.Command.Settings - var settings []*commandproto.Setting - for _, s := range cmd.Settings { - protoSetting := &commandproto.Setting{ - Item: s.Item, - } - if s.DeviceName != nil { - protoSetting.DeviceName = &commandproto.DeviceNameSetting{ - DeviceName: *s.DeviceName, - } - } - - if s.HostName != nil { - protoSetting.Hostname = &commandproto.HostnameSetting{ - Hostname: *s.HostName, - } - } - settings = append(settings, protoSetting) - } - payload.Command.Settings = &commandproto.Settings{Settings: settings} + payloadBytes, err := mdm.MarshalCommandPayload(e.Payload) + if err != nil { + return nil, err } return proto.Marshal(&commandproto.Event{ - Id: e.ID, - Time: e.Time.UnixNano(), - Payload: payload, - DeviceUdid: e.DeviceUDID, + Id: e.ID, + Time: e.Time.UnixNano(), + PayloadBytes: payloadBytes, + DeviceUdid: e.DeviceUDID, }) } @@ -146,115 +50,13 @@ func UnmarshalEvent(data []byte, e *Event) error { if err := proto.Unmarshal(data, &pb); err != nil { return errors.Wrap(err, "unmarshal pb Event") } + var payload mdm.CommandPayload + if err := mdm.UnmarshalCommandPayload(pb.PayloadBytes, &payload); err != nil { + return err + } e.ID = pb.Id e.DeviceUDID = pb.DeviceUdid e.Time = time.Unix(0, pb.Time).UTC() - if pb.Payload == nil { - return nil - } - e.Payload = mdm.Payload{ - CommandUUID: pb.Payload.CommandUuid, - } - if pb.Payload.Command == nil { - return nil - } - e.Payload.Command = &mdm.Command{ - RequestType: pb.Payload.Command.RequestType, - } - switch pb.Payload.Command.RequestType { - case "DeviceLock": - cmd := pb.Payload.Command.GetDeviceLock() - e.Payload.Command.DeviceLock = mdm.DeviceLock{ - PIN: cmd.GetPin(), - Message: cmd.GetMessage(), - PhoneNumber: cmd.GetPhoneNumber(), - } - case "EraseDevice": - cmd := pb.Payload.Command.GetEraseDevice() - e.Payload.Command.EraseDevice = mdm.EraseDevice{ - PIN: cmd.GetPin(), - } - case "DeleteUser": - cmd := pb.Payload.Command.GetDeleteUser() - e.Payload.Command.DeleteUser = mdm.DeleteUser{ - UserName: cmd.GetUsername(), - ForceDeletion: cmd.GetForceDeletion(), - } - case "ScheduleOSUpdateScan": - cmd := pb.Payload.Command.GetScheduleOsUpdateScan() - e.Payload.Command.ScheduleOSUpdateScan = mdm.ScheduleOSUpdateScan{ - Force: cmd.GetForce(), - } - case "ScheduleOSUpdate": - cmd := pb.Payload.Command.GetScheduleOsUpdate() - var updates []mdm.OSUpdate - for _, update := range cmd.GetUpdates() { - updates = append(updates, mdm.OSUpdate{ - ProductKey: update.GetProductKey(), - InstallAction: update.GetInstallAction(), - }) - } - e.Payload.Command.ScheduleOSUpdate = mdm.ScheduleOSUpdate{ - Updates: updates, - } - case "AccountConfiguration": - cmd := pb.Payload.Command.GetAccountConfiguration() - e.Payload.Command.AccountConfiguration = mdm.AccountConfiguration{ - SkipPrimarySetupAccountCreation: cmd.GetSkipPrimarySetupAccountCreation(), - SetPrimarySetupAccountAsRegularUser: cmd.GetSetPrimarySetupAccountAsRegularUser(), - } - for _, account := range cmd.GetAutoSetupAdminAccounts() { - e.Payload.Command.AccountConfiguration.AutoSetupAdminAccounts = append(e.Payload.Command.AutoSetupAdminAccounts, mdm.AdminAccount{ - ShortName: account.GetShortName(), - FullName: account.GetFullName(), - PasswordHash: account.GetPasswordHash(), - Hidden: account.GetHidden(), - }) - } - case "DeviceInformation": - e.Payload.Command.DeviceInformation = mdm.DeviceInformation{ - Queries: pb.Payload.Command.DeviceInformation.Queries, - } - case "InstallProfile": - e.Payload.Command.InstallProfile = mdm.InstallProfile{ - Payload: pb.Payload.Command.InstallProfile.Payload, - } - case "RemoveProfile": - e.Payload.Command.RemoveProfile = mdm.RemoveProfile{ - Identifier: pb.Payload.Command.RemoveProfile.Identifier, - } - case "InstallApplication": - cmd := pb.Payload.Command.GetInstallApplication() - e.Payload.Command.InstallApplication = mdm.InstallApplication{ - ITunesStoreID: int(cmd.GetItunesStoreId()), - Identifier: cmd.GetIdentifier(), - ManifestURL: cmd.GetManifestUrl(), - ManagementFlags: int(cmd.GetManagementFlags()), - ChangeManagementState: cmd.GetChangeManagementState(), - } - case "Settings": - cmd := pb.Payload.Command.GetSettings() - var settings []mdm.Setting - for _, s := range cmd.GetSettings() { - mdmSetting := mdm.Setting{ - Item: s.GetItem(), - } - - if s.GetDeviceName() != nil { - mdmSetting.DeviceName = stringPtr(s.GetDeviceName().GetDeviceName()) - } - - if s.GetHostname() != nil { - mdmSetting.HostName = stringPtr(s.GetHostname().GetHostname()) - } - - settings = append(settings, mdmSetting) - } - e.Payload.Command.Settings = mdm.Settings{Settings: settings} - } + e.Payload = &payload return nil } - -func stringPtr(s string) *string { - return &s -} diff --git a/platform/command/event_test.go b/platform/command/event_test.go deleted file mode 100644 index ce22eea4..00000000 --- a/platform/command/event_test.go +++ /dev/null @@ -1,83 +0,0 @@ -package command_test - -import ( - "encoding/json" - "io/ioutil" - "reflect" - "testing" - - "github.com/groob/plist" - "github.com/micromdm/mdm" - - "github.com/micromdm/micromdm/platform/command" -) - -var marshalTests = []string{ - "DeviceInformation", - "DeviceInformation_empty_queries", - "InstallProfile", - "Settings_hostname_devicename", -} - -func TestMarshalEvent(t *testing.T) { - for _, tt := range marshalTests { - name := tt - t.Run(name, func(t *testing.T) { - t.Parallel() - v := command.NewEvent(mustLoadPayload(t, name), name) - var other command.Event - if buf, err := command.MarshalEvent(v); err != nil { - t.Fatal(err) - } else if err := command.UnmarshalEvent(buf, &other); err != nil { - t.Fatal(err) - } else if !reflect.DeepEqual(v, &other) { - t.Logf("\nwant: %#v\n, \nhave: %#v\n", v.Payload.Command, other.Payload.Command) - t.Fatalf("\nwant: %#v\n \nhave: %#v\n", v, other) - } - }) - } -} - -func BenchmarkMarshalProto(b *testing.B) { - for _, tt := range marshalTests { - v := command.NewEvent(mustLoadPayload(&testing.T{}, tt), tt) - for n := 0; n < b.N; n++ { - var other command.Event - if buf, err := command.MarshalEvent(v); err != nil { - b.Fatal(err) - } else if err := command.UnmarshalEvent(buf, &other); err != nil { - b.Fatal(err) - } else if !reflect.DeepEqual(v, &other) { - b.Fatalf("\nwant: %#v\n \nhave: %#v\n", v, other) - } - } - } -} - -func BenchmarkMarshalJSON(b *testing.B) { - for _, tt := range marshalTests { - v := command.NewEvent(mustLoadPayload(&testing.T{}, tt), tt) - for n := 0; n < b.N; n++ { - var other command.Event - if buf, err := json.Marshal(&v); err != nil { - b.Fatal(err) - } else if err := json.Unmarshal(buf, &other); err != nil { - b.Fatal(err) - } else if !reflect.DeepEqual(v, &other) { - b.Fatalf("\nwant: %#v\n \nhave: %#v\n", v, other) - } - } - } -} - -func mustLoadPayload(t *testing.T, name string) mdm.Payload { - var payload mdm.Payload - data, err := ioutil.ReadFile("testdata/" + name + ".plist") - if err != nil { - t.Fatalf("failed to open test file %q.plist, err: %s", name, err) - } - if err := plist.Unmarshal(data, &payload); err != nil { - t.Fatalf("failed to unmarshal plist %q, err: %s", name, err) - } - return payload -} diff --git a/platform/command/internal/commandproto/command.pb.go b/platform/command/internal/commandproto/command.pb.go index 8226129d..031360dc 100644 --- a/platform/command/internal/commandproto/command.pb.go +++ b/platform/command/internal/commandproto/command.pb.go @@ -46,10 +46,11 @@ var _ = math.Inf const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type Event struct { - Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` - Time int64 `protobuf:"varint,2,opt,name=time" json:"time,omitempty"` - Payload *Payload `protobuf:"bytes,3,opt,name=payload" json:"payload,omitempty"` - DeviceUdid string `protobuf:"bytes,4,opt,name=device_udid,json=deviceUdid" json:"device_udid,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Time int64 `protobuf:"varint,2,opt,name=time" json:"time,omitempty"` + Payload *Payload `protobuf:"bytes,3,opt,name=payload" json:"payload,omitempty"` + DeviceUdid string `protobuf:"bytes,4,opt,name=device_udid,json=deviceUdid" json:"device_udid,omitempty"` + PayloadBytes []byte `protobuf:"bytes,5,opt,name=payload_bytes,json=payloadBytes,proto3" json:"payload_bytes,omitempty"` } func (m *Event) Reset() { *m = Event{} } @@ -85,6 +86,13 @@ func (m *Event) GetDeviceUdid() string { return "" } +func (m *Event) GetPayloadBytes() []byte { + if m != nil { + return m.PayloadBytes + } + return nil +} + type Payload struct { CommandUuid string `protobuf:"bytes,1,opt,name=command_uuid,json=commandUuid" json:"command_uuid,omitempty"` Command *Command `protobuf:"bytes,2,opt,name=command" json:"command,omitempty"` @@ -630,77 +638,78 @@ func init() { func init() { proto.RegisterFile("command.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 1139 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x56, 0x5b, 0x6f, 0x1c, 0x35, - 0x14, 0xd6, 0xee, 0xb6, 0xd9, 0xdd, 0xb3, 0xd9, 0x24, 0x35, 0x49, 0x3a, 0xa5, 0xb4, 0x09, 0x53, - 0x40, 0x2d, 0xea, 0x05, 0x0a, 0x42, 0xaa, 0x04, 0x12, 0xa1, 0x29, 0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 0x8a, 0x45, 0xfd, 0x80, 0xfd, 0x34, 0xad, 0x18, 0x7a, 0x0d, 0x28, 0x84, 0xcb, 0xc5, 0x48, 0xaa, - 0x92, 0x1a, 0x2e, 0x45, 0x38, 0xea, 0x60, 0xf1, 0xa8, 0x63, 0xc7, 0x7b, 0x31, 0xa3, 0xe1, 0x6b, - 0xf9, 0x32, 0x84, 0x9e, 0xc1, 0x36, 0x17, 0xda, 0xd0, 0xa2, 0x20, 0x95, 0x92, 0x23, 0x5e, 0xb0, - 0x70, 0x6f, 0x1f, 0x2c, 0x8a, 0xbd, 0xf0, 0xa4, 0x53, 0xcf, 0xc1, 0x5b, 0x7c, 0xc1, 0x46, 0x3f, - 0xc2, 0x7b, 0x51, 0x86, 0x56, 0x55, 0xc1, 0x33, 0x1f, 0xd7, 0x15, 0x27, 0x75, 0xb8, 0x56, 0xea, - 0x68, 0xc6, 0xc3, 0x88, 0xaf, 0x60, 0xe8, 0x17, 0xd8, 0xa3, 0x59, 0x26, 0x6b, 0x61, 0x48, 0x26, - 0xc5, 0x88, 0x8f, 0x6b, 0xe5, 0x45, 0xaf, 0x3a, 0xd1, 0x74, 0x51, 0xf4, 0xc8, 0x53, 0x9f, 0xce, - 0x33, 0xf1, 0x2e, 0x5d, 0x83, 0xa2, 0x97, 0x80, 0x74, 0x36, 0x61, 0x79, 0x5d, 0x30, 0x22, 0x35, - 0xa9, 0xab, 0x9c, 0x1a, 0x96, 0x6c, 0x38, 0xd5, 0xdb, 0x8b, 0xaa, 0x67, 0x81, 0x77, 0x72, 0x76, - 0xee, 0x58, 0x78, 0x27, 0x7a, 0x9e, 0x68, 0x8f, 0xa0, 0x5f, 0xe1, 0xfa, 0xaa, 0x1a, 0xd1, 0x19, - 0x15, 0x49, 0x77, 0x5d, 0xa0, 0xcb, 0x92, 0x67, 0x19, 0x15, 0x78, 0x77, 0x59, 0xd6, 0xa2, 0xe8, - 0x3b, 0xd8, 0x52, 0xac, 0x94, 0x97, 0xac, 0x49, 0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x96, - 0x0a, 0x00, 0x00, + // 1162 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x56, 0x5d, 0x6f, 0x1c, 0x35, + 0x17, 0xd6, 0xee, 0x36, 0xd9, 0xdd, 0xb3, 0xd9, 0x24, 0xf5, 0x9b, 0xa4, 0xd3, 0xb7, 0xb4, 0x09, + 0x53, 0x40, 0x29, 0xea, 0x07, 0x14, 0x84, 0x54, 0x09, 0x24, 0xd2, 0xa6, 0xa8, 0x15, 0xfd, 0x08, + 0x0e, 0x01, 0x21, 0x84, 0x2c, 0x67, 0xc6, 0xbb, 0x6b, 0x65, 0xc6, 0x9e, 0xda, 0x9e, 0xa0, 0xbd, + 0xe6, 0x17, 0x70, 0x8b, 0xc4, 0x0d, 0xbf, 0x85, 0x1f, 0x86, 0xfc, 0x35, 0xfb, 0x91, 0xed, 0xdd, + 0x9c, 0xc7, 0x8f, 0x9f, 0x39, 0xe3, 0x73, 0x9e, 0xe3, 0x81, 0x61, 0x26, 0xcb, 0x92, 0x8a, 0xfc, + 0x61, 0xa5, 0xa4, 0x91, 0x68, 0x23, 0x84, 0x2e, 0x4a, 0xff, 0x69, 0xc1, 0xda, 0xf3, 0x4b, 0x26, + 0x0c, 0xda, 0x84, 0x36, 0xcf, 0x93, 0xd6, 0x41, 0xeb, 0xb0, 0x8f, 0xdb, 0x3c, 0x47, 0x08, 0xae, + 0x19, 0x5e, 0xb2, 0xa4, 0x7d, 0xd0, 0x3a, 0xec, 0x60, 0xf7, 0x8c, 0x1e, 0x41, 0xb7, 0xa2, 0xd3, + 0x42, 0xd2, 0x3c, 0xe9, 0x1c, 0xb4, 0x0e, 0x07, 0x8f, 0x77, 0x1f, 0xce, 0xab, 0x3d, 0x3c, 0xf1, + 0x8b, 0x38, 0xb2, 0xd0, 0x3e, 0x0c, 0x72, 0x76, 0xc9, 0x33, 0x46, 0xea, 0x9c, 0xe7, 0xc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d, 0xbf, + 0x1e, 0xd6, 0x59, 0x51, 0x3f, 0xcc, 0x6a, 0x67, 0xb6, 0x27, 0xd0, 0x9b, 0x48, 0x6d, 0xdc, 0x76, + 0xff, 0xb3, 0x71, 0x7b, 0x71, 0xfb, 0x8b, 0xb0, 0xda, 0x24, 0x17, 0xe9, 0xe9, 0x97, 0xd1, 0x6a, + 0x73, 0xda, 0x73, 0xff, 0x79, 0x73, 0x8d, 0x3e, 0xf7, 0xc2, 0xf4, 0x01, 0x6c, 0x2d, 0x49, 0x5a, + 0x67, 0x34, 0x39, 0x04, 0x67, 0xc4, 0xf8, 0x7c, 0xdd, 0x65, 0xf1, 0xc5, 0x7f, 0x01, 0x00, 0x00, + 0xff, 0xff, 0x86, 0xfe, 0x3d, 0xe0, 0xbc, 0x0a, 0x00, 0x00, } diff --git a/platform/command/internal/commandproto/command.proto b/platform/command/internal/commandproto/command.proto index c64655bf..acf8c03b 100644 --- a/platform/command/internal/commandproto/command.proto +++ b/platform/command/internal/commandproto/command.proto @@ -5,8 +5,9 @@ package commandproto; message Event { string id = 1; int64 time = 2; - Payload payload = 3; + Payload payload = 3; // unused string device_udid = 4; + bytes payload_bytes = 5; } message Payload { diff --git a/platform/command/service.go b/platform/command/service.go index 6dcbbf5d..eeb9dd6f 100644 --- a/platform/command/service.go +++ b/platform/command/service.go @@ -6,12 +6,12 @@ import ( "github.com/go-kit/kit/log" "github.com/go-kit/kit/metrics" - "github.com/micromdm/mdm" + "github.com/micromdm/micromdm/mdm/mdm" "golang.org/x/net/context" ) type Service interface { - NewCommand(context.Context, *mdm.CommandRequest) (*mdm.Payload, error) + NewCommand(context.Context, *mdm.CommandRequest) (*mdm.CommandPayload, error) } // Middleware describes a service (as opposed to endpoint) middleware. @@ -28,7 +28,7 @@ func ServiceLoggingMiddleware(logger log.Logger) Middleware { } } -func (mw serviceLoggingMiddleware) NewCommand(ctx context.Context, req *mdm.CommandRequest) (p *mdm.Payload, err error) { +func (mw serviceLoggingMiddleware) NewCommand(ctx context.Context, req *mdm.CommandRequest) (p *mdm.CommandPayload, err error) { defer func(begin time.Time) { mw.logger.Log( "method", "NewCommand", @@ -60,7 +60,7 @@ type serviceInstrumentingMiddleware struct { next Service } -func (mw serviceInstrumentingMiddleware) NewCommand(ctx context.Context, req *mdm.CommandRequest) (*mdm.Payload, error) { +func (mw serviceInstrumentingMiddleware) NewCommand(ctx context.Context, req *mdm.CommandRequest) (*mdm.CommandPayload, error) { p, err := mw.next.NewCommand(ctx, req) mw.payloads.Add(1) return p, err diff --git a/platform/command/testdata/DeviceInformation.plist b/platform/command/testdata/DeviceInformation.plist deleted file mode 100755 index 3c0a9496..00000000 --- a/platform/command/testdata/DeviceInformation.plist +++ /dev/null @@ -1,3 +0,0 @@ - - -CommandQueriesfoobarRequestTypeDeviceInformationCommandUUID7564fecc-f1b5-4d2d-af17-986fdd68a252 diff --git a/platform/command/testdata/DeviceInformation_empty_queries.plist b/platform/command/testdata/DeviceInformation_empty_queries.plist deleted file mode 100755 index 8eead684..00000000 --- a/platform/command/testdata/DeviceInformation_empty_queries.plist +++ /dev/null @@ -1,3 +0,0 @@ - - -CommandRequestTypeDeviceInformationCommandUUID1ad24ed8-0405-47e5-a230-6966207b6e14 diff --git a/platform/command/testdata/InstallProfile.plist b/platform/command/testdata/InstallProfile.plist deleted file mode 100755 index c0095778..00000000 --- a/platform/command/testdata/InstallProfile.plist +++ /dev/null @@ -1,3 +0,0 @@ - - -CommandPayloadZm9vYmFyYmF6RequestTypeInstallProfileCommandUUID7e761ec5-9e20-42d1-9072-3d5a611e3ac5 diff --git a/platform/command/testdata/Settings_hostname_devicename.plist b/platform/command/testdata/Settings_hostname_devicename.plist deleted file mode 100644 index b11d32df..00000000 --- a/platform/command/testdata/Settings_hostname_devicename.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - Command - - RequestType - Settings - Settings - - - DeviceName - foo - Item - DeviceName - - - HostName - foo-bar - Item - HostName - - - - CommandUUID - 19a68ea7-eb45-4ced-a7e6-5aa0b0eb71bc - - diff --git a/platform/command/transport_http.go b/platform/command/transport_http.go index e1c16d7d..aa628ff8 100644 --- a/platform/command/transport_http.go +++ b/platform/command/transport_http.go @@ -5,6 +5,7 @@ import ( "encoding/json" "io" "net/http" + "github.com/pkg/errors" httptransport "github.com/go-kit/kit/transport/http" diff --git a/platform/command/transport_http_test.go b/platform/command/transport_http_test.go index 281b875a..b22d3789 100644 --- a/platform/command/transport_http_test.go +++ b/platform/command/transport_http_test.go @@ -27,9 +27,8 @@ func TestDecodeRequest(t *testing.T) { t.Errorf("have %s, want %s", have, want) } - if have, want := decoded.CommandRequest.InstallApplication.ManifestURL, - "https://mdm.acme.co/repo/munkitools-3.0.0.3298.plist"; have != want { - t.Errorf("have %s, want %s", have, want) + if have, want := decoded.CommandRequest.InstallApplication.ManifestURL, "https://mdm.acme.co/repo/munkitools-3.0.0.3298.plist"; *have != want { + t.Errorf("have %s, want %s", *have, want) } } diff --git a/platform/queue/queue.go b/platform/queue/queue.go index cd65757d..3341c555 100644 --- a/platform/queue/queue.go +++ b/platform/queue/queue.go @@ -204,9 +204,9 @@ func (db *Store) pollCommands(pubsub pubsub.PublishSubscriber) error { if err == nil && byUDID != nil { cmd = byUDID } - newPayload, err := plist.Marshal(&ev.Payload) + newPayload, err := plist.Marshal(ev.Payload) if err != nil { - fmt.Println(err) + fmt.Println(errors.Wrap(err, "marshal event payload")) continue } newCmd := Command{ diff --git a/tools/api/commands/certificate_list b/tools/api/commands/certificate_list new file mode 100755 index 00000000..60d97c8c --- /dev/null +++ b/tools/api/commands/certificate_list @@ -0,0 +1,10 @@ +#!/bin/bash +source $MICROMDM_ENV_PATH +endpoint="v1/commands" +jq -n \ + --arg request_type "CertificateList" \ + --arg udid "$1" \ + '.udid = $udid + |.request_type = $request_type + '|\ + curl -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@- diff --git a/tools/api/commands/install_application b/tools/api/commands/install_application new file mode 100755 index 00000000..fd1ee4b5 --- /dev/null +++ b/tools/api/commands/install_application @@ -0,0 +1,14 @@ +#!/bin/bash +source $MICROMDM_ENV_PATH +endpoint="v1/commands" +jq -n \ + --arg request_type "InstallApplication" \ + --arg udid "$1" \ + --arg manifest_url "$2" \ + '.udid = $udid + |.request_type = $request_type + |.manifest_url = $manifest_url + '|\ + curl \ + -H "Content-Type: application/json" \ + -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@- diff --git a/tools/api/commands/install_provisioning_profile b/tools/api/commands/install_provisioning_profile new file mode 100755 index 00000000..a0ea6d31 --- /dev/null +++ b/tools/api/commands/install_provisioning_profile @@ -0,0 +1,12 @@ +#!/bin/bash +source $MICROMDM_ENV_PATH +endpoint="v1/commands" +jq -n \ + --arg request_type "InstallProvisioningProfile" \ + --arg udid "$1" \ + --arg provisioning_profile $(cat $2|base64) \ + '.udid = $udid + |.provisioning_profile = $provisioning_profile + |.request_type = $request_type + '|\ + curl -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@- diff --git a/tools/api/commands/installed_application_list b/tools/api/commands/installed_application_list new file mode 100755 index 00000000..0037ecac --- /dev/null +++ b/tools/api/commands/installed_application_list @@ -0,0 +1,10 @@ +#!/bin/bash +source $MICROMDM_ENV_PATH +endpoint="v1/commands" +jq -n \ + --arg request_type "InstalledApplicationList" \ + --arg udid "$1" \ + '.udid = $udid + |.request_type = $request_type + '|\ + curl -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@- diff --git a/tools/api/commands/profile_list b/tools/api/commands/profile_list new file mode 100755 index 00000000..f9791245 --- /dev/null +++ b/tools/api/commands/profile_list @@ -0,0 +1,12 @@ +#!/bin/bash +source $MICROMDM_ENV_PATH +endpoint="v1/commands" +jq -n \ + --arg request_type "ProfileList" \ + --arg udid "$1" \ + '.udid = $udid + |.request_type = $request_type + '|\ + curl \ + -H "Content-Type: application/json" \ + -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@- diff --git a/tools/api/commands/provisioning_profile_list b/tools/api/commands/provisioning_profile_list new file mode 100755 index 00000000..e5824891 --- /dev/null +++ b/tools/api/commands/provisioning_profile_list @@ -0,0 +1,10 @@ +#!/bin/bash +source $MICROMDM_ENV_PATH +endpoint="v1/commands" +jq -n \ + --arg request_type "ProvisioningProfileList" \ + --arg udid "$1" \ + '.udid = $udid + |.request_type = $request_type + '|\ + curl -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@- diff --git a/tools/api/commands/remove_provisioning_profile b/tools/api/commands/remove_provisioning_profile new file mode 100755 index 00000000..9514ceb1 --- /dev/null +++ b/tools/api/commands/remove_provisioning_profile @@ -0,0 +1,12 @@ +#!/bin/bash +source $MICROMDM_ENV_PATH +endpoint="v1/commands" +jq -n \ + --arg request_type "RemoveProvisioningProfile" \ + --arg udid "$1" \ + --arg uuid $2 \ + '.udid = $udid + |.uuid = $uuid + |.request_type = $request_type + '|\ + curl -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-