-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make WhatsAppMessageTemplateBindings internal
- Loading branch information
1 parent
7f1ec14
commit 2706f9d
Showing
5 changed files
with
142 additions
and
62 deletions.
There are no files selected for viewing
16 changes: 8 additions & 8 deletions
16
...ure.Communication.Messages/src/Generated/WhatsAppMessageTemplateBindings.Serialization.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
...mmunication/Azure.Communication.Messages/src/Generated/WhatsAppMessageTemplateBindings.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
111 changes: 111 additions & 0 deletions
111
...ation/Azure.Communication.Messages/src/Models/Channels/WhatsAppMessageTemplateBindings.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,111 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
// <auto-generated/> | ||
|
||
#nullable disable | ||
|
||
using System.Collections.Generic; | ||
using Azure.Communication.Messages; | ||
using Azure.Core; | ||
|
||
namespace Azure.Communication.Messages.Models.Channels | ||
{ | ||
|
||
/// <summary> The template bindings for WhatsApp. </summary> | ||
[CodeGenModel("WhatsAppMessageTemplateBindings")] | ||
public partial class WhatsAppMessageTemplateBindings | ||
{ | ||
|
||
/// <summary> The header template bindings. </summary> | ||
[CodeGenMember("Header")] | ||
internal IList<WhatsAppMessageTemplateBindingsComponent> HeaderInternal { | ||
get | ||
{ | ||
var header = new ChangeTrackingList<WhatsAppMessageTemplateBindingsComponent>(); | ||
foreach (string item in Header) | ||
{ | ||
header.Add(new WhatsAppMessageTemplateBindingsComponent(item)); | ||
} | ||
|
||
return header; | ||
} | ||
} | ||
|
||
/// <summary> The body template bindings. </summary> | ||
[CodeGenMember("Body")] | ||
internal IList<WhatsAppMessageTemplateBindingsComponent> BodyInternal | ||
{ | ||
get | ||
{ | ||
var body = new ChangeTrackingList<WhatsAppMessageTemplateBindingsComponent>(); | ||
foreach (string item in Body) | ||
{ | ||
body.Add(new WhatsAppMessageTemplateBindingsComponent(item)); | ||
} | ||
|
||
return body; | ||
} | ||
} | ||
|
||
/// <summary> The footer template bindings. </summary> | ||
[CodeGenMember("Footer")] | ||
internal IList<WhatsAppMessageTemplateBindingsComponent> FooterInternal | ||
{ | ||
get | ||
{ | ||
var footer = new ChangeTrackingList<WhatsAppMessageTemplateBindingsComponent>(); | ||
foreach (string item in Footer) | ||
{ | ||
footer.Add(new WhatsAppMessageTemplateBindingsComponent(item)); | ||
} | ||
|
||
return footer; | ||
} | ||
} | ||
/// <summary> The button template bindings. </summary> | ||
[CodeGenMember("Buttons")] | ||
internal IList<WhatsAppMessageTemplateBindingsButton> ButtonsInternal | ||
{ | ||
get | ||
{ | ||
var buttons = new ChangeTrackingList<WhatsAppMessageTemplateBindingsButton>(); | ||
foreach (var item in Buttons) | ||
{ | ||
buttons.Add(new WhatsAppMessageTemplateBindingsButton(item.Key) { SubType = item.Value.ToString() }); | ||
} | ||
|
||
return buttons; | ||
} | ||
} | ||
|
||
/// <summary> The header template bindings. </summary> | ||
public IList<string> Header { get; set; } = new List<string>(); | ||
|
||
/// <summary> The body template bindings. </summary> | ||
public IList<string> Body { get; set; } = new List<string>(); | ||
|
||
/// <summary> The footer template bindings. </summary> | ||
public IList<string> Footer { get; set; } = new List<string>(); | ||
|
||
/// <summary> The button template bindings. </summary> | ||
public IList<KeyValuePair<string, WhatsAppMessageButtonSubType>> Buttons { get; set; } = new List<KeyValuePair<string, WhatsAppMessageButtonSubType>> (); | ||
|
||
/// <summary> Initializes a new instance of <see cref="WhatsAppMessageTemplateBindings"/>. </summary> | ||
public WhatsAppMessageTemplateBindings() | ||
{ | ||
Kind = "whatsApp"; | ||
} | ||
|
||
// This is a direct copy of the auto-rest generated constructor but we want to make the internal bindings read only | ||
/// <summary> Initializes a new instance of <see cref="WhatsAppMessageTemplateBindings"/>. </summary> | ||
/// <param name="kind"> Discriminator. </param> | ||
/// <param name="headerInternal"> The header template bindings. </param> | ||
/// <param name="bodyInternal"> The body template bindings. </param> | ||
/// <param name="footerInternal"> The footer template bindings. </param> | ||
/// <param name="buttonsInternal"> The button template bindings. </param> | ||
internal WhatsAppMessageTemplateBindings(string kind, IList<WhatsAppMessageTemplateBindingsComponent> headerInternal, IList<WhatsAppMessageTemplateBindingsComponent> bodyInternal, IList<WhatsAppMessageTemplateBindingsComponent> footerInternal, IList<WhatsAppMessageTemplateBindingsButton> buttonsInternal) : base(kind) | ||
{ | ||
} | ||
} | ||
} |
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