Skip to content

Commit bde2663

Browse files
authored
Automated Spec Update (#235)
4d5bb48ac801df6410ddc9c2cad0d9f5bb0a2365 Change Notes: Team Log Namespace: - Add user_defined_tag to LabelType union Co-authored-by: DropboxBot <DropboxBot@users.noreply.github.com>
1 parent 93728be commit bde2663

File tree

2 files changed

+101
-1
lines changed

2 files changed

+101
-1
lines changed

dropbox-sdk-dotnet/Dropbox.Api/Generated/TeamLog/LabelType.cs

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,28 @@ public PersonalInformation AsPersonalInformation
5656
}
5757
}
5858

59+
/// <summary>
60+
/// <para>Gets a value indicating whether this instance is UserDefinedTag</para>
61+
/// </summary>
62+
public bool IsUserDefinedTag
63+
{
64+
get
65+
{
66+
return this is UserDefinedTag;
67+
}
68+
}
69+
70+
/// <summary>
71+
/// <para>Gets this instance as a UserDefinedTag, or <c>null</c>.</para>
72+
/// </summary>
73+
public UserDefinedTag AsUserDefinedTag
74+
{
75+
get
76+
{
77+
return this as UserDefinedTag;
78+
}
79+
}
80+
5981
/// <summary>
6082
/// <para>Gets a value indicating whether this instance is Other</para>
6183
/// </summary>
@@ -98,6 +120,12 @@ public override void EncodeFields(LabelType value, enc.IJsonWriter writer)
98120
PersonalInformation.Encoder.EncodeFields((PersonalInformation)value, writer);
99121
return;
100122
}
123+
if (value is UserDefinedTag)
124+
{
125+
WriteProperty(".tag", "user_defined_tag", writer, enc.StringEncoder.Instance);
126+
UserDefinedTag.Encoder.EncodeFields((UserDefinedTag)value, writer);
127+
return;
128+
}
101129
if (value is Other)
102130
{
103131
WriteProperty(".tag", "other", writer, enc.StringEncoder.Instance);
@@ -138,6 +166,8 @@ protected override LabelType Decode(string tag, enc.IJsonReader reader)
138166
{
139167
case "personal_information":
140168
return PersonalInformation.Decoder.DecodeFields(reader);
169+
case "user_defined_tag":
170+
return UserDefinedTag.Decoder.DecodeFields(reader);
141171
default:
142172
return Other.Decoder.DecodeFields(reader);
143173
}
@@ -217,6 +247,76 @@ protected override PersonalInformation Create()
217247
#endregion
218248
}
219249

250+
/// <summary>
251+
/// <para>The user defined tag object</para>
252+
/// </summary>
253+
public sealed class UserDefinedTag : LabelType
254+
{
255+
#pragma warning disable 108
256+
257+
/// <summary>
258+
/// <para>The encoder instance.</para>
259+
/// </summary>
260+
internal static enc.StructEncoder<UserDefinedTag> Encoder = new UserDefinedTagEncoder();
261+
262+
/// <summary>
263+
/// <para>The decoder instance.</para>
264+
/// </summary>
265+
internal static enc.StructDecoder<UserDefinedTag> Decoder = new UserDefinedTagDecoder();
266+
267+
/// <summary>
268+
/// <para>Initializes a new instance of the <see cref="UserDefinedTag" />
269+
/// class.</para>
270+
/// </summary>
271+
private UserDefinedTag()
272+
{
273+
}
274+
275+
/// <summary>
276+
/// <para>A singleton instance of UserDefinedTag</para>
277+
/// </summary>
278+
public static readonly UserDefinedTag Instance = new UserDefinedTag();
279+
280+
#region Encoder class
281+
282+
/// <summary>
283+
/// <para>Encoder for <see cref="UserDefinedTag" />.</para>
284+
/// </summary>
285+
private class UserDefinedTagEncoder : enc.StructEncoder<UserDefinedTag>
286+
{
287+
/// <summary>
288+
/// <para>Encode fields of given value.</para>
289+
/// </summary>
290+
/// <param name="value">The value.</param>
291+
/// <param name="writer">The writer.</param>
292+
public override void EncodeFields(UserDefinedTag value, enc.IJsonWriter writer)
293+
{
294+
}
295+
}
296+
297+
#endregion
298+
299+
#region Decoder class
300+
301+
/// <summary>
302+
/// <para>Decoder for <see cref="UserDefinedTag" />.</para>
303+
/// </summary>
304+
private class UserDefinedTagDecoder : enc.StructDecoder<UserDefinedTag>
305+
{
306+
/// <summary>
307+
/// <para>Create a new instance of type <see cref="UserDefinedTag" />.</para>
308+
/// </summary>
309+
/// <returns>The struct instance.</returns>
310+
protected override UserDefinedTag Create()
311+
{
312+
return UserDefinedTag.Instance;
313+
}
314+
315+
}
316+
317+
#endregion
318+
}
319+
220320
/// <summary>
221321
/// <para>The other object</para>
222322
/// </summary>

spec

0 commit comments

Comments
 (0)