Skip to content

Commit 0dbd222

Browse files
authored
Automated Spec Update (#329)
18963b8a29fe125f6495d36c38eda5db2710d0dd Change Notes: openid_openid_types Namespace - Add OpenIdError, UserInfoError unions - Remove UserInfoError structs - Remove AuthError unions - Update UserInfoArgs struct to include documentation team_policies Namespace - Add examples Co-authored-by: Brent Bumann <[email protected]> c36ba27d8d56648555d3068bb3826e1d3a44d92b Co-authored-by: DropboxBot <[email protected]>
1 parent 7106a9e commit 0dbd222

31 files changed

+4176
-282
lines changed

dropbox-sdk-dotnet/Dropbox.Api/Generated/DropboxClient.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ namespace Dropbox.Api
1414
using Dropbox.Api.FileProperties.Routes;
1515
using Dropbox.Api.FileRequests.Routes;
1616
using Dropbox.Api.Files.Routes;
17+
using Dropbox.Api.Openid.Routes;
1718
using Dropbox.Api.Paper.Routes;
1819
using Dropbox.Api.Sharing.Routes;
1920
using Dropbox.Api.Users.Routes;
@@ -55,6 +56,11 @@ public sealed partial class DropboxClient
5556
/// </summary>
5657
public FilesUserRoutes Files { get; private set; }
5758

59+
/// <summary>
60+
/// <para>Gets the Openid routes.</para>
61+
/// </summary>
62+
public OpenidUserRoutes Openid { get; private set; }
63+
5864
/// <summary>
5965
/// <para>Gets the Paper routes.</para>
6066
/// </summary>
@@ -83,6 +89,7 @@ internal override void InitializeRoutes(ITransport transport)
8389
this.FileProperties = new FilePropertiesUserRoutes(transport);
8490
this.FileRequests = new FileRequestsUserRoutes(transport);
8591
this.Files = new FilesUserRoutes(transport);
92+
this.Openid = new OpenidUserRoutes(transport);
8693
this.Paper = new PaperUserRoutes(transport);
8794
this.Sharing = new SharingUserRoutes(transport);
8895
this.Users = new UsersUserRoutes(transport);

dropbox-sdk-dotnet/Dropbox.Api/Generated/Files/AddTagArg.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ public class AddTagArg
3131
/// <para>Initializes a new instance of the <see cref="AddTagArg" /> class.</para>
3232
/// </summary>
3333
/// <param name="path">Path to the item to be tagged.</param>
34-
/// <param name="tagText">The value of the tag to add.</param>
34+
/// <param name="tagText">The value of the tag to add. Will be automatically converted
35+
/// to lowercase letters.</param>
3536
public AddTagArg(string path,
3637
string tagText)
3738
{
@@ -81,7 +82,8 @@ public AddTagArg()
8182
public string Path { get; protected set; }
8283

8384
/// <summary>
84-
/// <para>The value of the tag to add.</para>
85+
/// <para>The value of the tag to add. Will be automatically converted to lowercase
86+
/// letters.</para>
8587
/// </summary>
8688
public string TagText { get; protected set; }
8789

dropbox-sdk-dotnet/Dropbox.Api/Generated/Files/FilesUserRoutes.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6174,7 +6174,8 @@ public sys.IAsyncResult BeginTagsAdd(AddTagArg addTagArg, sys.AsyncCallback call
61746174
/// item.</para>
61756175
/// </summary>
61766176
/// <param name="path">Path to the item to be tagged.</param>
6177-
/// <param name="tagText">The value of the tag to add.</param>
6177+
/// <param name="tagText">The value of the tag to add. Will be automatically converted
6178+
/// to lowercase letters.</param>
61786179
/// <returns>The task that represents the asynchronous send operation.</returns>
61796180
/// <exception cref="Dropbox.Api.ApiException{TError}">Thrown if there is an error
61806181
/// processing the request; This will contain a <see cref="AddTagError"/>.</exception>
@@ -6191,7 +6192,8 @@ public t.Task TagsAddAsync(string path,
61916192
/// <para>Begins an asynchronous send to the tags add route.</para>
61926193
/// </summary>
61936194
/// <param name="path">Path to the item to be tagged.</param>
6194-
/// <param name="tagText">The value of the tag to add.</param>
6195+
/// <param name="tagText">The value of the tag to add. Will be automatically converted
6196+
/// to lowercase letters.</param>
61956197
/// <param name="callback">The method to be called when the asynchronous send is
61966198
/// completed.</param>
61976199
/// <param name="callbackState">A user provided object that distinguished this send
@@ -6340,7 +6342,8 @@ public sys.IAsyncResult BeginTagsRemove(RemoveTagArg removeTagArg, sys.AsyncCall
63406342
/// <para>Remove a tag from an item.</para>
63416343
/// </summary>
63426344
/// <param name="path">Path to the item to tag.</param>
6343-
/// <param name="tagText">The tag to remove.</param>
6345+
/// <param name="tagText">The tag to remove. Will be automatically converted to
6346+
/// lowercase letters.</param>
63446347
/// <returns>The task that represents the asynchronous send operation.</returns>
63456348
/// <exception cref="Dropbox.Api.ApiException{TError}">Thrown if there is an error
63466349
/// processing the request; This will contain a <see
@@ -6358,7 +6361,8 @@ public t.Task TagsRemoveAsync(string path,
63586361
/// <para>Begins an asynchronous send to the tags remove route.</para>
63596362
/// </summary>
63606363
/// <param name="path">Path to the item to tag.</param>
6361-
/// <param name="tagText">The tag to remove.</param>
6364+
/// <param name="tagText">The tag to remove. Will be automatically converted to
6365+
/// lowercase letters.</param>
63626366
/// <param name="callback">The method to be called when the asynchronous send is
63636367
/// completed.</param>
63646368
/// <param name="callbackState">A user provided object that distinguished this send

dropbox-sdk-dotnet/Dropbox.Api/Generated/Files/RemoveTagArg.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ public class RemoveTagArg
3131
/// <para>Initializes a new instance of the <see cref="RemoveTagArg" /> class.</para>
3232
/// </summary>
3333
/// <param name="path">Path to the item to tag.</param>
34-
/// <param name="tagText">The tag to remove.</param>
34+
/// <param name="tagText">The tag to remove. Will be automatically converted to
35+
/// lowercase letters.</param>
3536
public RemoveTagArg(string path,
3637
string tagText)
3738
{
@@ -81,7 +82,8 @@ public RemoveTagArg()
8182
public string Path { get; protected set; }
8283

8384
/// <summary>
84-
/// <para>The tag to remove.</para>
85+
/// <para>The tag to remove. Will be automatically converted to lowercase
86+
/// letters.</para>
8587
/// </summary>
8688
public string TagText { get; protected set; }
8789

dropbox-sdk-dotnet/Dropbox.Api/Generated/Openid/ErrUnion.cs renamed to dropbox-sdk-dotnet/Dropbox.Api/Generated/Openid/OpenIdError.cs

Lines changed: 45 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -11,48 +11,48 @@ namespace Dropbox.Api.Openid
1111
using enc = Dropbox.Api.Stone;
1212

1313
/// <summary>
14-
/// <para>The err union object</para>
14+
/// <para>The open id error object</para>
1515
/// </summary>
16-
public class ErrUnion
16+
public class OpenIdError
1717
{
1818
#pragma warning disable 108
1919

2020
/// <summary>
2121
/// <para>The encoder instance.</para>
2222
/// </summary>
23-
internal static enc.StructEncoder<ErrUnion> Encoder = new ErrUnionEncoder();
23+
internal static enc.StructEncoder<OpenIdError> Encoder = new OpenIdErrorEncoder();
2424

2525
/// <summary>
2626
/// <para>The decoder instance.</para>
2727
/// </summary>
28-
internal static enc.StructDecoder<ErrUnion> Decoder = new ErrUnionDecoder();
28+
internal static enc.StructDecoder<OpenIdError> Decoder = new OpenIdErrorDecoder();
2929

3030
/// <summary>
31-
/// <para>Initializes a new instance of the <see cref="ErrUnion" /> class.</para>
31+
/// <para>Initializes a new instance of the <see cref="OpenIdError" /> class.</para>
3232
/// </summary>
33-
public ErrUnion()
33+
public OpenIdError()
3434
{
3535
}
3636

3737
/// <summary>
38-
/// <para>Gets a value indicating whether this instance is AuthError</para>
38+
/// <para>Gets a value indicating whether this instance is IncorrectOpenidScopes</para>
3939
/// </summary>
40-
public bool IsAuthError
40+
public bool IsIncorrectOpenidScopes
4141
{
4242
get
4343
{
44-
return this is AuthError;
44+
return this is IncorrectOpenidScopes;
4545
}
4646
}
4747

4848
/// <summary>
49-
/// <para>Gets this instance as a AuthError, or <c>null</c>.</para>
49+
/// <para>Gets this instance as a IncorrectOpenidScopes, or <c>null</c>.</para>
5050
/// </summary>
51-
public AuthError AsAuthError
51+
public IncorrectOpenidScopes AsIncorrectOpenidScopes
5252
{
5353
get
5454
{
55-
return this as AuthError;
55+
return this as IncorrectOpenidScopes;
5656
}
5757
}
5858

@@ -81,21 +81,21 @@ public Other AsOther
8181
#region Encoder class
8282

8383
/// <summary>
84-
/// <para>Encoder for <see cref="ErrUnion" />.</para>
84+
/// <para>Encoder for <see cref="OpenIdError" />.</para>
8585
/// </summary>
86-
private class ErrUnionEncoder : enc.StructEncoder<ErrUnion>
86+
private class OpenIdErrorEncoder : enc.StructEncoder<OpenIdError>
8787
{
8888
/// <summary>
8989
/// <para>Encode fields of given value.</para>
9090
/// </summary>
9191
/// <param name="value">The value.</param>
9292
/// <param name="writer">The writer.</param>
93-
public override void EncodeFields(ErrUnion value, enc.IJsonWriter writer)
93+
public override void EncodeFields(OpenIdError value, enc.IJsonWriter writer)
9494
{
95-
if (value is AuthError)
95+
if (value is IncorrectOpenidScopes)
9696
{
97-
WriteProperty(".tag", "auth_error", writer, enc.StringEncoder.Instance);
98-
AuthError.Encoder.EncodeFields((AuthError)value, writer);
97+
WriteProperty(".tag", "incorrect_openid_scopes", writer, enc.StringEncoder.Instance);
98+
IncorrectOpenidScopes.Encoder.EncodeFields((IncorrectOpenidScopes)value, writer);
9999
return;
100100
}
101101
if (value is Other)
@@ -113,17 +113,17 @@ public override void EncodeFields(ErrUnion value, enc.IJsonWriter writer)
113113
#region Decoder class
114114

115115
/// <summary>
116-
/// <para>Decoder for <see cref="ErrUnion" />.</para>
116+
/// <para>Decoder for <see cref="OpenIdError" />.</para>
117117
/// </summary>
118-
private class ErrUnionDecoder : enc.UnionDecoder<ErrUnion>
118+
private class OpenIdErrorDecoder : enc.UnionDecoder<OpenIdError>
119119
{
120120
/// <summary>
121-
/// <para>Create a new instance of type <see cref="ErrUnion" />.</para>
121+
/// <para>Create a new instance of type <see cref="OpenIdError" />.</para>
122122
/// </summary>
123123
/// <returns>The struct instance.</returns>
124-
protected override ErrUnion Create()
124+
protected override OpenIdError Create()
125125
{
126-
return new ErrUnion();
126+
return new OpenIdError();
127127
}
128128

129129
/// <summary>
@@ -132,12 +132,12 @@ protected override ErrUnion Create()
132132
/// <param name="tag">The tag.</param>
133133
/// <param name="reader">The json reader.</param>
134134
/// <returns>The decoded object.</returns>
135-
protected override ErrUnion Decode(string tag, enc.IJsonReader reader)
135+
protected override OpenIdError Decode(string tag, enc.IJsonReader reader)
136136
{
137137
switch (tag)
138138
{
139-
case "auth_error":
140-
return AuthError.Decoder.DecodeFields(reader);
139+
case "incorrect_openid_scopes":
140+
return IncorrectOpenidScopes.Decoder.DecodeFields(reader);
141141
default:
142142
return Other.Decoder.DecodeFields(reader);
143143
}
@@ -147,57 +147,49 @@ protected override ErrUnion Decode(string tag, enc.IJsonReader reader)
147147
#endregion
148148

149149
/// <summary>
150-
/// <para>The auth error object</para>
150+
/// <para>Missing openid claims for the associated access token.</para>
151151
/// </summary>
152-
public sealed class AuthError : ErrUnion
152+
public sealed class IncorrectOpenidScopes : OpenIdError
153153
{
154154
#pragma warning disable 108
155155

156156
/// <summary>
157157
/// <para>The encoder instance.</para>
158158
/// </summary>
159-
internal static enc.StructEncoder<AuthError> Encoder = new AuthErrorEncoder();
159+
internal static enc.StructEncoder<IncorrectOpenidScopes> Encoder = new IncorrectOpenidScopesEncoder();
160160

161161
/// <summary>
162162
/// <para>The decoder instance.</para>
163163
/// </summary>
164-
internal static enc.StructDecoder<AuthError> Decoder = new AuthErrorDecoder();
164+
internal static enc.StructDecoder<IncorrectOpenidScopes> Decoder = new IncorrectOpenidScopesDecoder();
165165

166166
/// <summary>
167-
/// <para>Initializes a new instance of the <see cref="AuthError" /> class.</para>
167+
/// <para>Initializes a new instance of the <see cref="IncorrectOpenidScopes" />
168+
/// class.</para>
168169
/// </summary>
169-
/// <param name="value">The value</param>
170-
public AuthError(global::Dropbox.Api.Openid.AuthError value)
171-
{
172-
this.Value = value;
173-
}
174-
/// <summary>
175-
/// <para>Initializes a new instance of the <see cref="AuthError" /> class.</para>
176-
/// </summary>
177-
private AuthError()
170+
private IncorrectOpenidScopes()
178171
{
179172
}
180173

181174
/// <summary>
182-
/// <para>Gets the value of this instance.</para>
175+
/// <para>A singleton instance of IncorrectOpenidScopes</para>
183176
/// </summary>
184-
public global::Dropbox.Api.Openid.AuthError Value { get; private set; }
177+
public static readonly IncorrectOpenidScopes Instance = new IncorrectOpenidScopes();
185178

186179
#region Encoder class
187180

188181
/// <summary>
189-
/// <para>Encoder for <see cref="AuthError" />.</para>
182+
/// <para>Encoder for <see cref="IncorrectOpenidScopes" />.</para>
190183
/// </summary>
191-
private class AuthErrorEncoder : enc.StructEncoder<AuthError>
184+
private class IncorrectOpenidScopesEncoder : enc.StructEncoder<IncorrectOpenidScopes>
192185
{
193186
/// <summary>
194187
/// <para>Encode fields of given value.</para>
195188
/// </summary>
196189
/// <param name="value">The value.</param>
197190
/// <param name="writer">The writer.</param>
198-
public override void EncodeFields(AuthError value, enc.IJsonWriter writer)
191+
public override void EncodeFields(IncorrectOpenidScopes value, enc.IJsonWriter writer)
199192
{
200-
WriteProperty("auth_error", value.Value, writer, global::Dropbox.Api.Openid.AuthError.Encoder);
201193
}
202194
}
203195

@@ -206,37 +198,20 @@ public override void EncodeFields(AuthError value, enc.IJsonWriter writer)
206198
#region Decoder class
207199

208200
/// <summary>
209-
/// <para>Decoder for <see cref="AuthError" />.</para>
201+
/// <para>Decoder for <see cref="IncorrectOpenidScopes" />.</para>
210202
/// </summary>
211-
private class AuthErrorDecoder : enc.StructDecoder<AuthError>
203+
private class IncorrectOpenidScopesDecoder : enc.StructDecoder<IncorrectOpenidScopes>
212204
{
213205
/// <summary>
214-
/// <para>Create a new instance of type <see cref="AuthError" />.</para>
206+
/// <para>Create a new instance of type <see cref="IncorrectOpenidScopes"
207+
/// />.</para>
215208
/// </summary>
216209
/// <returns>The struct instance.</returns>
217-
protected override AuthError Create()
210+
protected override IncorrectOpenidScopes Create()
218211
{
219-
return new AuthError();
212+
return IncorrectOpenidScopes.Instance;
220213
}
221214

222-
/// <summary>
223-
/// <para>Set given field.</para>
224-
/// </summary>
225-
/// <param name="value">The field value.</param>
226-
/// <param name="fieldName">The field name.</param>
227-
/// <param name="reader">The json reader.</param>
228-
protected override void SetField(AuthError value, string fieldName, enc.IJsonReader reader)
229-
{
230-
switch (fieldName)
231-
{
232-
case "auth_error":
233-
value.Value = global::Dropbox.Api.Openid.AuthError.Decoder.Decode(reader);
234-
break;
235-
default:
236-
reader.Skip();
237-
break;
238-
}
239-
}
240215
}
241216

242217
#endregion
@@ -245,7 +220,7 @@ protected override void SetField(AuthError value, string fieldName, enc.IJsonRea
245220
/// <summary>
246221
/// <para>The other object</para>
247222
/// </summary>
248-
public sealed class Other : ErrUnion
223+
public sealed class Other : OpenIdError
249224
{
250225
#pragma warning disable 108
251226

0 commit comments

Comments
 (0)