This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Isaiah Williams
authored
Jul 10, 2019
1 parent
bd1b792
commit d84faf9
Showing
12 changed files
with
199 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
src/PowerShell/Models/DevicesDeployment/PSBatchUploadDetails.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// ----------------------------------------------------------------------- | ||
// <copyright file="PSBatchUploadDetails.cs" company="Microsoft"> | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// </copyright> | ||
// ----------------------------------------------------------------------- | ||
|
||
namespace Microsoft.Store.PartnerCenter.PowerShell.Models.DevicesDeployment | ||
{ | ||
using System; | ||
using System.Linq; | ||
using Common; | ||
using PartnerCenter.Models.DevicesDeployment; | ||
|
||
/// <summary> | ||
/// Represents the result of devices batch upload. | ||
/// </summary> | ||
public sealed class PSBatchUploadDetails | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="PSBatchUploadDetails" /> class. | ||
/// </summary> | ||
public PSBatchUploadDetails() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="PSBatchUploadDetails" /> class. | ||
/// </summary> | ||
/// <param name="details">The details for this instance.</param> | ||
public PSBatchUploadDetails(BatchUploadDetails details) | ||
{ | ||
this.CopyFrom(details, CloneAdditionalOperations); | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets the tracking ID of the batch of devices uploaded. | ||
/// </summary> | ||
public string BatchTrackingId { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the batch upload completed time. | ||
/// </summary> | ||
public DateTime CompletedTime { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the device upload status. | ||
/// </summary> | ||
public PSDeviceUploadDetails[] DevicesStatus { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the batch started time. | ||
/// </summary> | ||
public DateTime StartedTime { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the status. | ||
/// </summary> | ||
public DeviceUploadStatusType Status { get; set; } | ||
|
||
/// <summary> | ||
/// Additional operations to be performed when cloning an instance of <see cref="BatchUploadDetails"/> to an instance of <see cref="PSBatchUploadDetails" />. | ||
/// </summary> | ||
/// <param name="item">The item being cloned.</param> | ||
private void CloneAdditionalOperations(BatchUploadDetails item) | ||
{ | ||
DevicesStatus = item.DevicesStatus.Select(d => new PSDeviceUploadDetails(d)).ToArray(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
src/PowerShell/Models/DevicesDeployment/PSDeviceUploadDetails.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// ----------------------------------------------------------------------- | ||
// <copyright file="PSDeviceUploadDetails.cs" company="Microsoft"> | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// </copyright> | ||
// ----------------------------------------------------------------------- | ||
|
||
namespace Microsoft.Store.PartnerCenter.PowerShell.Models.DevicesDeployment | ||
{ | ||
using Common; | ||
using PartnerCenter.Models.DevicesDeployment; | ||
|
||
/// <summary> | ||
/// Represents the status of batch upload of devices. | ||
/// </summary> | ||
public sealed class PSDeviceUploadDetails | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="PSDeviceUploadDetails" /> class. | ||
/// </summary> | ||
public PSDeviceUploadDetails() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="PSDeviceUploadDetails" /> class. | ||
/// </summary> | ||
/// <param name="device">The base item for this instance.</param> | ||
public PSDeviceUploadDetails(DeviceUploadDetails item) | ||
{ | ||
this.CopyFrom(item); | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets the device identifier. | ||
/// </summary> | ||
public string DeviceId { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the error code upon device upload failure. | ||
/// </summary> | ||
public string ErrorCode { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the error description upon device upload failure. | ||
/// </summary> | ||
public string ErrorDescription { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the product key. | ||
/// </summary> | ||
public string ProductKey { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the serial number. | ||
/// </summary> | ||
public string SerialNumber { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the device upload status. | ||
/// </summary> | ||
public DeviceUploadStatusType Status { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters