Skip to content

Commit 587c9b4

Browse files
Job output changes for returned object
1 parent 448ff80 commit 587c9b4

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationJobOutputRecord.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,24 @@ public class GetAzureAutomationJobOutputRecord : AzureAutomationBaseCmdlet
2929
/// <summary>
3030
/// Gets or sets the job id
3131
/// </summary>
32-
[Alias("JobId")]
3332
[Parameter(Mandatory = true, Position = 2, ValueFromPipelineByPropertyName = true, HelpMessage = "The job Id")]
34-
public Guid Id { get; set; }
33+
public Guid JobId { get; set; }
3534

3635
/// <summary>
37-
/// Gets or sets the job stream id
36+
/// Gets or sets the job stream record id
3837
/// </summary>
39-
[Alias("OutputRecordId")]
38+
[Alias("StreamRecordId")]
4039
[Parameter(Mandatory = true, Position = 3, ValueFromPipelineByPropertyName = true, HelpMessage = "The stream record id")]
4140
[ValidateNotNullOrEmpty]
42-
public string JobStreamId { get; set; }
41+
public string Id { get; set; }
4342

4443
/// <summary>
4544
/// Execute this cmdlet.
4645
/// </summary>
4746
[PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
4847
protected override void AutomationProcessRecord()
4948
{
50-
var ret = this.AutomationClient.GetJobStreamRecord(this.ResourceGroupName, this.AutomationAccountName, this.Id, this.JobStreamId);
49+
var ret = this.AutomationClient.GetJobStreamRecord(this.ResourceGroupName, this.AutomationAccountName, this.JobId, this.Id);
5150
this.GenerateCmdletOutput(ret);
5251
}
5352
}

src/ResourceManager/Automation/Commands.Automation/Model/Job.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public Job(string resourceGroupName, string accountName, Azure.Management.Automa
5050

5151
if (job.Properties == null) return;
5252

53-
this.Id = job.Properties.JobId;
53+
this.JobId = job.Properties.JobId;
5454
this.CreationTime = job.Properties.CreationTime.ToLocalTime();
5555
this.LastModifiedTime = job.Properties.LastModifiedTime.ToLocalTime();
5656
this.StartTime = job.Properties.StartTime.HasValue ? job.Properties.StartTime.Value.ToLocalTime() : (DateTimeOffset?)null;
@@ -105,7 +105,7 @@ public Job()
105105
/// <summary>
106106
/// Gets or sets the job id.
107107
/// </summary>
108-
public Guid Id { get; set; }
108+
public Guid JobId { get; set; }
109109

110110
/// <summary>
111111
/// Gets or sets the tags.

src/ResourceManager/Automation/Commands.Automation/Model/JobStream.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ public JobStream(AutomationManagement.Models.JobStream jobStream, string resourc
4747
{
4848
Requires.Argument("jobStream", jobStream).NotNull();
4949

50-
this.JobStreamId = jobStream.Properties.JobStreamId;
50+
this.StreamRecordId = jobStream.Properties.JobStreamId;
5151
this.Type = jobStream.Properties.StreamType;
5252
this.Time = jobStream.Properties.Time;
5353
this.AutomationAccountName = automationAccountName;
5454
this.ResourceGroupName = resourceGroupName;
55-
this.Id = jobId;
55+
this.JobId = jobId;
5656

5757
if (!String.IsNullOrWhiteSpace(jobStream.Properties.Summary))
5858
{
@@ -82,12 +82,12 @@ public JobStream()
8282
/// <summary>
8383
/// Gets or sets the Job Id.
8484
/// </summary>
85-
public Guid Id { get; set; }
85+
public Guid JobId { get; set; }
8686

8787
/// <summary>
88-
/// Gets or sets the stream id
88+
/// Gets or sets the stream record id
8989
/// </summary>
90-
public string JobStreamId { get; set; }
90+
public string StreamRecordId { get; set; }
9191

9292
/// <summary>
9393
/// Gets or sets the stream time.

src/ResourceManager/Automation/Commands.Automation/Model/JobStreamRecord.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
using System;
1616
using System.Collections;
17+
using System.Collections.Generic;
1718
using System.Management.Automation;
1819
using Microsoft.Azure.Commands.Automation.Common;
1920

@@ -45,7 +46,7 @@ public class JobStreamRecord : JobStream
4546
/// </exception>
4647
public JobStreamRecord(AutomationManagement.Models.JobStream jobStream, string resourceGroupName, string automationAccountName, Guid jobId ) : base (jobStream, resourceGroupName, automationAccountName, jobId)
4748
{
48-
this.Value = new Hashtable(StringComparer.InvariantCultureIgnoreCase);
49+
this.Value = new List<object>();
4950
foreach (var kvp in jobStream.Properties.Value)
5051
{
5152
object paramValue;
@@ -60,7 +61,7 @@ public JobStreamRecord(AutomationManagement.Models.JobStream jobStream, string r
6061

6162
paramValue = kvp.Value;
6263
}
63-
this.Value.Add(kvp.Key, paramValue);
64+
this.Value.Add(paramValue);
6465
}
6566

6667
}
@@ -75,6 +76,6 @@ public JobStreamRecord()
7576
/// <summary>
7677
/// Gets or sets the stream values.
7778
/// </summary>
78-
public Hashtable Value { get; set; }
79+
public List<object> Value { get; set; }
7980
}
8081
}

0 commit comments

Comments
 (0)