Skip to content

Commit 8612bc8

Browse files
committed
Changed custom header parameter type from string to IDictionary
1 parent 8bd778f commit 8612bc8

16 files changed

+143
-161
lines changed

src/Groups/beta/custom/NewMgBetaGroupMember_Create.cs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,13 @@ public partial class NewMgBetaGroupMember_Create : System.Management.Automation.
4444
/// <summary>The reference to the client API class.</summary>
4545
public Groups Client => Module.Instance.ClientAPI;
4646
/// <summary>Backing field for <see cref="CustomHeader" /> property.</summary>
47-
private string _customHeader;
47+
/// <summary>Backing field for <see cref="CustomHeaders" /> property.</summary>
48+
private global::System.Collections.IDictionary _customHeaders;
4849

49-
/// <summary>
50-
/// CustomHeader Parameter. This should have a key:value and comma separated for multiple key:value pairs
51-
/// </summary>
52-
[System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "CustomHeader Parameter. This should have a key:value and comma separated for multiple key:value pairs", ValueFromPipeline = true)]
53-
[Category(ParameterCategory.Runtime)]
54-
public string CustomHeader { get => this._customHeader; set => this._customHeader = value; }
50+
/// <summary>Optional headers that will be added to the request.</summary>
51+
[global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional headers that will be added to the request.", ValueFromPipeline = true)]
52+
[global::Microsoft.Graph.PowerShell.Category(global::Microsoft.Graph.PowerShell.ParameterCategory.Runtime)]
53+
public global::System.Collections.IDictionary CustomHeaders { get => this._customHeaders; set => this._customHeaders = value; }
5554
/// <summary>Backing field for <see cref="GroupId" /> property.</summary>
5655
private string _groupId;
5756

@@ -270,12 +269,12 @@ protected async System.Threading.Tasks.Task ProcessRecordAsync()
270269
try
271270
{
272271
await ((Runtime.IEventListener)this).Signal(Runtime.Events.CmdletBeforeAPICall); if (((Runtime.IEventListener)this).Token.IsCancellationRequested) { return; }
273-
await this.Client.GroupCreateMemberGraphBPreRef(GroupId, CustomHeader, BodyParameter, onNoContent, onDefault, this, Pipeline);
272+
await this.Client.GroupCreateMemberGraphBPreRef(GroupId, CustomHeaders, BodyParameter, onNoContent, onDefault, this, Pipeline);
274273
await ((Runtime.IEventListener)this).Signal(Runtime.Events.CmdletAfterAPICall); if (((Runtime.IEventListener)this).Token.IsCancellationRequested) { return; }
275274
}
276275
catch (Microsoft.Graph.Beta.PowerShell.Runtime.UndeclaredResponseException urexception)
277276
{
278-
WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { GroupId = GroupId, CustomHeader = CustomHeader, body = BodyParameter })
277+
WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { GroupId = GroupId, CustomHeaders = CustomHeaders, body = BodyParameter })
279278
{
280279
ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action }
281280
});

src/Groups/beta/custom/NewMgBetaGroupMember_CreateExpanded.cs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,14 @@ public partial class NewMgBetaGroupMember_CreateExpanded : System.Management.Aut
3333
/// <summary>The reference to the client API class.</summary>
3434
public Groups Client => Module.Instance.ClientAPI;
3535

36-
/// <summary>Backing field for <see cref="CustomHeader" /> property.</summary>
37-
private string _customHeader;
36+
/// <summary>Backing field for <see cref="CustomHeaders" /> property.</summary>
37+
private global::System.Collections.IDictionary _customHeaders;
38+
39+
/// <summary>Optional headers that will be added to the request.</summary>
40+
[global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional headers that will be added to the request.", ValueFromPipeline = true)]
41+
[global::Microsoft.Graph.PowerShell.Category(global::Microsoft.Graph.PowerShell.ParameterCategory.Runtime)]
42+
public global::System.Collections.IDictionary CustomHeaders { get => this._customHeaders; set => this._customHeaders = value; }
3843

39-
/// <summary>
40-
/// CustomHeader Parameter. This should have a key:value and comma separated for multiple key:value pairs
41-
/// </summary>
42-
[System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "CustomHeader Parameter. This should have a key:value and comma separated for multiple key:value pairs", ValueFromPipeline = true)]
43-
[Category(ParameterCategory.Runtime)]
44-
public string CustomHeader { get => this._customHeader; set => this._customHeader = value; }
4544
/// <summary>Backing field for <see cref="GroupId" /> property.</summary>
4645
private string _groupId;
4746

@@ -272,12 +271,12 @@ protected async System.Threading.Tasks.Task ProcessRecordAsync()
272271
{
273272
await ((Runtime.IEventListener)this).Signal(Microsoft.Graph.Beta.PowerShell.Runtime.Events.CmdletBeforeAPICall); if (((Runtime.IEventListener)this).Token.IsCancellationRequested) { return; }
274273
_bodyParameter.OdataId = $"https://graph.microsoft.com/beta/directoryObjects/{DirectoryObjectId}";
275-
await this.Client.GroupCreateMemberGraphBPreRef(GroupId, CustomHeader, _bodyParameter, onNoContent, onDefault, this, Pipeline);
274+
await this.Client.GroupCreateMemberGraphBPreRef(GroupId, CustomHeaders, _bodyParameter, onNoContent, onDefault, this, Pipeline);
276275
await ((Runtime.IEventListener)this).Signal(Microsoft.Graph.Beta.PowerShell.Runtime.Events.CmdletAfterAPICall); if (((Runtime.IEventListener)this).Token.IsCancellationRequested) { return; }
277276
}
278277
catch (Runtime.UndeclaredResponseException urexception)
279278
{
280-
WriteError(new System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), System.Management.Automation.ErrorCategory.InvalidOperation, new { GroupId = GroupId, CustomHeader = CustomHeader, body = _bodyParameter })
279+
WriteError(new System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), System.Management.Automation.ErrorCategory.InvalidOperation, new { GroupId = GroupId, CustomHeaders = CustomHeaders, body = _bodyParameter })
281280
{
282281
ErrorDetails = new System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action }
283282
});

src/Groups/beta/custom/NewMgBetaGroupMember_CreateViaIdentity.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ public partial class NewMgBetaGroupMember_CreateViaIdentity : System.Management.
4545
public Groups Client => Module.Instance.ClientAPI;
4646

4747
/// <summary>Backing field for <see cref="CustomHeader" /> property.</summary>
48-
private string _customHeader;
48+
/// <summary>Backing field for <see cref="CustomHeaders" /> property.</summary>
49+
private global::System.Collections.IDictionary _customHeaders;
50+
51+
/// <summary>Optional headers that will be added to the request.</summary>
52+
[global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional headers that will be added to the request.", ValueFromPipeline = true)]
53+
[global::Microsoft.Graph.PowerShell.Category(global::Microsoft.Graph.PowerShell.ParameterCategory.Runtime)]
54+
public global::System.Collections.IDictionary CustomHeaders { get => this._customHeaders; set => this._customHeaders = value; }
4955

50-
/// <summary>
51-
/// CustomHeader Parameter. This should have a key:value and comma separated for multiple key:value pairs
52-
/// </summary>
53-
[System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "CustomHeader Parameter. This should have a key:value and comma separated for multiple key:value pairs", ValueFromPipeline = true)]
54-
[Category(ParameterCategory.Runtime)]
55-
public string CustomHeader { get => this._customHeader; set => this._customHeader = value; }
5656
/// <summary>SendAsync Pipeline Steps to be appended to the front of the pipeline</summary>
5757
[System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")]
5858
[System.Management.Automation.ValidateNotNull]
@@ -270,12 +270,12 @@ protected async System.Threading.Tasks.Task ProcessRecordAsync()
270270
{
271271
ThrowTerminatingError(new System.Management.Automation.ErrorRecord(new System.Exception("InputObject has null value for InputObject.GroupId"), string.Empty, System.Management.Automation.ErrorCategory.InvalidArgument, InputObject));
272272
}
273-
await this.Client.GroupCreateMemberGraphBPreRef(InputObject.GroupId, CustomHeader, BodyParameter, onNoContent, onDefault, this, Pipeline);
273+
await this.Client.GroupCreateMemberGraphBPreRef(InputObject.GroupId, CustomHeaders, BodyParameter, onNoContent, onDefault, this, Pipeline);
274274
await ((Runtime.IEventListener)this).Signal(Runtime.Events.CmdletAfterAPICall); if (((Runtime.IEventListener)this).Token.IsCancellationRequested) { return; }
275275
}
276276
catch (Runtime.UndeclaredResponseException urexception)
277277
{
278-
WriteError(new System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), System.Management.Automation.ErrorCategory.InvalidOperation, new { CustomHeader = CustomHeader, body = BodyParameter })
278+
WriteError(new System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), System.Management.Automation.ErrorCategory.InvalidOperation, new { CustomHeaders = CustomHeaders, body = BodyParameter })
279279
{
280280
ErrorDetails = new System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action }
281281
});

src/Groups/beta/custom/NewMgBetaGroupMember_CreateViaIdentityExpanded.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ public partial class NewMgBetaGroupMember_CreateViaIdentityExpanded : System.Man
3434
public Groups Client => Module.Instance.ClientAPI;
3535

3636
/// <summary>Backing field for <see cref="CustomHeader" /> property.</summary>
37-
private string _customHeader;
38-
39-
/// <summary>
40-
/// CustomHeader Parameter. This should have a key:value and comma separated for multiple key:value pairs
41-
/// </summary>
42-
[System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "CustomHeader Parameter. This should have a key:value and comma separated for multiple key:value pairs", ValueFromPipeline = true)]
43-
[Category(ParameterCategory.Runtime)]
44-
public string CustomHeader { get => this._customHeader; set => this._customHeader = value; }
37+
/// <summary>Backing field for <see cref="CustomHeaders" /> property.</summary>
38+
private global::System.Collections.IDictionary _customHeaders;
39+
40+
/// <summary>Optional headers that will be added to the request.</summary>
41+
[global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional headers that will be added to the request.", ValueFromPipeline = true)]
42+
[global::Microsoft.Graph.PowerShell.Category(global::Microsoft.Graph.PowerShell.ParameterCategory.Runtime)]
43+
public global::System.Collections.IDictionary CustomHeaders { get => this._customHeaders; set => this._customHeaders = value; }
44+
4545
/// <summary>SendAsync Pipeline Steps to be appended to the front of the pipeline</summary>
4646
[System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")]
4747
[System.Management.Automation.ValidateNotNull]
@@ -271,12 +271,12 @@ protected async System.Threading.Tasks.Task ProcessRecordAsync()
271271
ThrowTerminatingError(new System.Management.Automation.ErrorRecord(new System.Exception("InputObject has null value for InputObject.GroupId"), string.Empty, System.Management.Automation.ErrorCategory.InvalidArgument, InputObject));
272272
}
273273
_bodyParameter.OdataId = $"https://graph.microsoft.com/beta/directoryObjects/{DirectoryObjectId}";
274-
await this.Client.GroupCreateMemberGraphBPreRef(InputObject.GroupId, CustomHeader, _bodyParameter, onNoContent, onDefault, this, Pipeline);
274+
await this.Client.GroupCreateMemberGraphBPreRef(InputObject.GroupId, CustomHeaders, _bodyParameter, onNoContent, onDefault, this, Pipeline);
275275
await ((Runtime.IEventListener)this).Signal(Runtime.Events.CmdletAfterAPICall); if (((Runtime.IEventListener)this).Token.IsCancellationRequested) { return; }
276276
}
277277
catch (Runtime.UndeclaredResponseException urexception)
278278
{
279-
WriteError(new System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), System.Management.Automation.ErrorCategory.InvalidOperation, new { CustomHeader = CustomHeader, body = _bodyParameter })
279+
WriteError(new System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), System.Management.Automation.ErrorCategory.InvalidOperation, new { CustomHeaders = CustomHeaders, body = _bodyParameter })
280280
{
281281
ErrorDetails = new System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action }
282282
});

src/Groups/beta/custom/NewMgBetaGroupOwner_Create.cs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,14 @@ public partial class NewMgBetaGroupOwner_Create : System.Management.Automation.P
4242
/// <summary>The reference to the client API class.</summary>
4343
public Groups Client => Module.Instance.ClientAPI;
4444

45-
/// <summary>Backing field for <see cref="CustomHeader" /> property.</summary>
46-
private string _customHeader;
45+
/// <summary>Backing field for <see cref="CustomHeaders" /> property.</summary>
46+
private global::System.Collections.IDictionary _customHeaders;
47+
48+
/// <summary>Optional headers that will be added to the request.</summary>
49+
[global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional headers that will be added to the request.", ValueFromPipeline = true)]
50+
[global::Microsoft.Graph.PowerShell.Category(global::Microsoft.Graph.PowerShell.ParameterCategory.Runtime)]
51+
public global::System.Collections.IDictionary CustomHeaders { get => this._customHeaders; set => this._customHeaders = value; }
4752

48-
/// <summary>
49-
/// CustomHeader Parameter. This should have a key:value and comma separated for multiple key:value pairs
50-
/// </summary>
51-
[System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "CustomHeader Parameter. This should have a key:value and comma separated for multiple key:value pairs", ValueFromPipeline = true)]
52-
[Category(ParameterCategory.Runtime)]
53-
public string CustomHeader { get => this._customHeader; set => this._customHeader = value; }
5453
/// <summary>Backing field for <see cref="GroupId" /> property.</summary>
5554
private string _groupId;
5655

@@ -269,12 +268,12 @@ protected async System.Threading.Tasks.Task ProcessRecordAsync()
269268
try
270269
{
271270
await ((Runtime.IEventListener)this).Signal(Runtime.Events.CmdletBeforeAPICall); if (((Runtime.IEventListener)this).Token.IsCancellationRequested) { return; }
272-
await this.Client.GroupCreateOwnerGraphBPreRef(GroupId, CustomHeader, BodyParameter, onNoContent, onDefault, this, Pipeline);
271+
await this.Client.GroupCreateOwnerGraphBPreRef(GroupId, CustomHeaders, BodyParameter, onNoContent, onDefault, this, Pipeline);
273272
await ((Runtime.IEventListener)this).Signal(Runtime.Events.CmdletAfterAPICall); if (((Runtime.IEventListener)this).Token.IsCancellationRequested) { return; }
274273
}
275274
catch (Runtime.UndeclaredResponseException urexception)
276275
{
277-
WriteError(new System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), System.Management.Automation.ErrorCategory.InvalidOperation, new { GroupId = GroupId, CustomHeader = CustomHeader, body = BodyParameter })
276+
WriteError(new System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), System.Management.Automation.ErrorCategory.InvalidOperation, new { GroupId = GroupId, CustomHeaders = CustomHeaders, body = BodyParameter })
278277
{
279278
ErrorDetails = new System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action }
280279
});

src/Groups/beta/custom/NewMgBetaGroupOwner_CreateExpanded.cs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,14 @@ public partial class NewMgBetaGroupOwner_CreateExpanded : System.Management.Auto
3333
/// <summary>The reference to the client API class.</summary>
3434
public Groups Client => Module.Instance.ClientAPI;
3535

36-
/// <summary>Backing field for <see cref="CustomHeader" /> property.</summary>
37-
private string _customHeader;
38-
39-
/// <summary>
40-
/// CustomHeader Parameter. This should have a key:value and comma separated for multiple key:value pairs
41-
/// </summary>
42-
[System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "CustomHeader Parameter. This should have a key:value and comma separated for multiple key:value pairs", ValueFromPipeline = true)]
43-
[Category(ParameterCategory.Runtime)]
44-
public string CustomHeader { get => this._customHeader; set => this._customHeader = value; }
36+
/// <summary>Backing field for <see cref="CustomHeaders" /> property.</summary>
37+
private global::System.Collections.IDictionary _customHeaders;
38+
39+
/// <summary>Optional headers that will be added to the request.</summary>
40+
[global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional headers that will be added to the request.", ValueFromPipeline = true)]
41+
[global::Microsoft.Graph.PowerShell.Category(global::Microsoft.Graph.PowerShell.ParameterCategory.Runtime)]
42+
public global::System.Collections.IDictionary CustomHeaders { get => this._customHeaders; set => this._customHeaders = value; }
43+
4544
/// <summary>Backing field for <see cref="GroupId" /> property.</summary>
4645
private string _groupId;
4746

@@ -277,7 +276,7 @@ protected async System.Threading.Tasks.Task ProcessRecordAsync()
277276
}
278277
catch (Runtime.UndeclaredResponseException urexception)
279278
{
280-
WriteError(new System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), System.Management.Automation.ErrorCategory.InvalidOperation, new { GroupId = GroupId, CustomHeader = CustomHeader, body = _bodyParameter })
279+
WriteError(new System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), System.Management.Automation.ErrorCategory.InvalidOperation, new { GroupId = GroupId, CustomHeaders = CustomHeaders, body = _bodyParameter })
281280
{
282281
ErrorDetails = new System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action }
283282
});

0 commit comments

Comments
 (0)