diff --git a/Dropbox.Api/Async/PollError.cs b/Dropbox.Api/Async/PollError.cs
index ed9a662d05..47baa6c010 100644
--- a/Dropbox.Api/Async/PollError.cs
+++ b/Dropbox.Api/Async/PollError.cs
@@ -338,7 +338,7 @@ public override InternalError DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : PollError
{
diff --git a/Dropbox.Api/Auth/AuthError.cs b/Dropbox.Api/Auth/AuthError.cs
index 9d4219846c..ee624fecc2 100644
--- a/Dropbox.Api/Auth/AuthError.cs
+++ b/Dropbox.Api/Auth/AuthError.cs
@@ -449,7 +449,7 @@ public override InvalidSelectAdmin DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : AuthError
{
diff --git a/Dropbox.Api/Auth/RateLimitError.cs b/Dropbox.Api/Auth/RateLimitError.cs
new file mode 100644
index 0000000000..8ec1d421f4
--- /dev/null
+++ b/Dropbox.Api/Auth/RateLimitError.cs
@@ -0,0 +1,132 @@
+//
+// Auto-generated by StoneAPI, do not modify.
+//
+
+namespace Dropbox.Api.Auth
+{
+ using sys = System;
+ using col = System.Collections.Generic;
+ using re = System.Text.RegularExpressions;
+
+ using enc = Dropbox.Api.Stone;
+
+ ///
+ /// Error occurred because the app is being rate limited.
+ ///
+ public class RateLimitError
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new RateLimitErrorEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new RateLimitErrorDecoder();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The reason why the app is being rate limited.
+ /// The number of seconds that the app should wait before
+ /// making another request.
+ public RateLimitError(RateLimitReason reason,
+ ulong retryAfter = 1)
+ {
+ if (reason == null)
+ {
+ throw new sys.ArgumentNullException("reason");
+ }
+
+ this.Reason = reason;
+ this.RetryAfter = retryAfter;
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// This is to construct an instance of the object when
+ /// deserializing.
+ public RateLimitError()
+ {
+ this.RetryAfter = 1;
+ }
+
+ ///
+ /// The reason why the app is being rate limited.
+ ///
+ public RateLimitReason Reason { get; protected set; }
+
+ ///
+ /// The number of seconds that the app should wait before making another
+ /// request.
+ ///
+ public ulong RetryAfter { get; protected set; }
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class RateLimitErrorEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(RateLimitError value, enc.IJsonWriter writer)
+ {
+ WriteProperty("reason", value.Reason, writer, Dropbox.Api.Auth.RateLimitReason.Encoder);
+ WriteProperty("retry_after", value.RetryAfter, writer, enc.UInt64Encoder.Instance);
+ }
+ }
+
+ #endregion
+
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class RateLimitErrorDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override RateLimitError Create()
+ {
+ return new RateLimitError();
+ }
+
+ ///
+ /// Set given field.
+ ///
+ /// The field value.
+ /// The field name.
+ /// The json reader.
+ protected override void SetField(RateLimitError value, string fieldName, enc.IJsonReader reader)
+ {
+ switch (fieldName)
+ {
+ case "reason":
+ value.Reason = Dropbox.Api.Auth.RateLimitReason.Decoder.Decode(reader);
+ break;
+ case "retry_after":
+ value.RetryAfter = enc.UInt64Decoder.Instance.Decode(reader);
+ break;
+ default:
+ reader.Skip();
+ break;
+ }
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/Dropbox.Api/Auth/RateLimitReason.cs b/Dropbox.Api/Auth/RateLimitReason.cs
new file mode 100644
index 0000000000..99cd1298fb
--- /dev/null
+++ b/Dropbox.Api/Auth/RateLimitReason.cs
@@ -0,0 +1,419 @@
+//
+// Auto-generated by StoneAPI, do not modify.
+//
+
+namespace Dropbox.Api.Auth
+{
+ using sys = System;
+ using col = System.Collections.Generic;
+ using re = System.Text.RegularExpressions;
+
+ using enc = Dropbox.Api.Stone;
+
+ ///
+ /// The rate limit reason object
+ ///
+ public class RateLimitReason
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new RateLimitReasonEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new RateLimitReasonDecoder();
+
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ public RateLimitReason()
+ {
+ }
+
+ ///
+ /// Gets a value indicating whether this instance is TooManyRequests
+ ///
+ public bool IsTooManyRequests
+ {
+ get
+ {
+ return this is TooManyRequests;
+ }
+ }
+
+ ///
+ /// Gets this instance as a TooManyRequests, or null.
+ ///
+ public TooManyRequests AsTooManyRequests
+ {
+ get
+ {
+ return this as TooManyRequests;
+ }
+ }
+
+ ///
+ /// Gets a value indicating whether this instance is
+ /// TooManyWriteOperations
+ ///
+ public bool IsTooManyWriteOperations
+ {
+ get
+ {
+ return this is TooManyWriteOperations;
+ }
+ }
+
+ ///
+ /// Gets this instance as a TooManyWriteOperations, or null.
+ ///
+ public TooManyWriteOperations AsTooManyWriteOperations
+ {
+ get
+ {
+ return this as TooManyWriteOperations;
+ }
+ }
+
+ ///
+ /// Gets a value indicating whether this instance is Other
+ ///
+ public bool IsOther
+ {
+ get
+ {
+ return this is Other;
+ }
+ }
+
+ ///
+ /// Gets this instance as a Other, or null.
+ ///
+ public Other AsOther
+ {
+ get
+ {
+ return this as Other;
+ }
+ }
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class RateLimitReasonEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(RateLimitReason value, enc.IJsonWriter writer)
+ {
+ if (value is TooManyRequests)
+ {
+ WriteProperty(".tag", "too_many_requests", writer, enc.StringEncoder.Instance);
+ TooManyRequests.Encoder.EncodeFields((TooManyRequests)value, writer);
+ return;
+ }
+ if (value is TooManyWriteOperations)
+ {
+ WriteProperty(".tag", "too_many_write_operations", writer, enc.StringEncoder.Instance);
+ TooManyWriteOperations.Encoder.EncodeFields((TooManyWriteOperations)value, writer);
+ return;
+ }
+ if (value is Other)
+ {
+ WriteProperty(".tag", "other", writer, enc.StringEncoder.Instance);
+ Other.Encoder.EncodeFields((Other)value, writer);
+ return;
+ }
+ throw new sys.InvalidOperationException();
+ }
+ }
+
+ #endregion
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class RateLimitReasonDecoder : enc.UnionDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override RateLimitReason Create()
+ {
+ return new RateLimitReason();
+ }
+
+ ///
+ /// Decode based on given tag.
+ ///
+ /// The tag.
+ /// The json reader.
+ /// The decoded object.
+ protected override RateLimitReason Decode(string tag, enc.IJsonReader reader)
+ {
+ switch (tag)
+ {
+ case "too_many_requests":
+ return TooManyRequests.Decoder.DecodeFields(reader);
+ case "too_many_write_operations":
+ return TooManyWriteOperations.Decoder.DecodeFields(reader);
+ default:
+ return Other.Decoder.DecodeFields(reader);
+ }
+ }
+ }
+
+ #endregion
+
+ ///
+ /// You are making too many requests in the past few minutes.
+ ///
+ public sealed class TooManyRequests : RateLimitReason
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new TooManyRequestsEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new TooManyRequestsDecoder();
+
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ private TooManyRequests()
+ {
+ }
+
+ ///
+ /// A singleton instance of TooManyRequests
+ ///
+ public static readonly TooManyRequests Instance = new TooManyRequests();
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class TooManyRequestsEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(TooManyRequests value, enc.IJsonWriter writer)
+ {
+ }
+ }
+
+ #endregion
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class TooManyRequestsDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override TooManyRequests Create()
+ {
+ return new TooManyRequests();
+ }
+
+ ///
+ /// Decode fields without ensuring start and end object.
+ ///
+ /// The json reader.
+ /// The decoded object.
+ public override TooManyRequests DecodeFields(enc.IJsonReader reader)
+ {
+ return TooManyRequests.Instance;
+ }
+ }
+
+ #endregion
+ }
+
+ ///
+ /// There are currently too many write operations happening in the user's
+ /// Dropbox.
+ ///
+ public sealed class TooManyWriteOperations : RateLimitReason
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new TooManyWriteOperationsEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new TooManyWriteOperationsDecoder();
+
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ private TooManyWriteOperations()
+ {
+ }
+
+ ///
+ /// A singleton instance of TooManyWriteOperations
+ ///
+ public static readonly TooManyWriteOperations Instance = new TooManyWriteOperations();
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class TooManyWriteOperationsEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(TooManyWriteOperations value, enc.IJsonWriter writer)
+ {
+ }
+ }
+
+ #endregion
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class TooManyWriteOperationsDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override TooManyWriteOperations Create()
+ {
+ return new TooManyWriteOperations();
+ }
+
+ ///
+ /// Decode fields without ensuring start and end object.
+ ///
+ /// The json reader.
+ /// The decoded object.
+ public override TooManyWriteOperations DecodeFields(enc.IJsonReader reader)
+ {
+ return TooManyWriteOperations.Instance;
+ }
+ }
+
+ #endregion
+ }
+
+ ///
+ /// The other object
+ ///
+ public sealed class Other : RateLimitReason
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new OtherEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new OtherDecoder();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ private Other()
+ {
+ }
+
+ ///
+ /// A singleton instance of Other
+ ///
+ public static readonly Other Instance = new Other();
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class OtherEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(Other value, enc.IJsonWriter writer)
+ {
+ }
+ }
+
+ #endregion
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class OtherDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override Other Create()
+ {
+ return new Other();
+ }
+
+ ///
+ /// Decode fields without ensuring start and end object.
+ ///
+ /// The json reader.
+ /// The decoded object.
+ public override Other DecodeFields(enc.IJsonReader reader)
+ {
+ return Other.Instance;
+ }
+ }
+
+ #endregion
+ }
+ }
+}
diff --git a/Dropbox.Api/Dropbox.Api.Portable.csproj b/Dropbox.Api/Dropbox.Api.Portable.csproj
index 400cf580de..a2ed2c5580 100644
--- a/Dropbox.Api/Dropbox.Api.Portable.csproj
+++ b/Dropbox.Api/Dropbox.Api.Portable.csproj
@@ -76,6 +76,8 @@
+
+
@@ -160,6 +162,10 @@
+
+
+
+
@@ -188,6 +194,7 @@
+
@@ -218,6 +225,7 @@
+
@@ -257,6 +265,7 @@
+
@@ -311,7 +320,6 @@
-
@@ -325,11 +333,6 @@
-
-
-
-
-
@@ -415,6 +418,8 @@
+
+
@@ -428,6 +433,7 @@
+
diff --git a/Dropbox.Api/Dropbox.Api.Portable40.csproj b/Dropbox.Api/Dropbox.Api.Portable40.csproj
index 3665fbfb54..39a777666c 100644
--- a/Dropbox.Api/Dropbox.Api.Portable40.csproj
+++ b/Dropbox.Api/Dropbox.Api.Portable40.csproj
@@ -100,6 +100,8 @@
+
+
@@ -184,6 +186,10 @@
+
+
+
+
@@ -212,6 +218,7 @@
+
@@ -242,6 +249,7 @@
+
@@ -281,6 +289,7 @@
+
@@ -335,7 +344,6 @@
-
@@ -349,11 +357,6 @@
-
-
-
-
-
@@ -439,6 +442,8 @@
+
+
@@ -452,6 +457,7 @@
+
diff --git a/Dropbox.Api/Dropbox.Api.csproj b/Dropbox.Api/Dropbox.Api.csproj
index 314b72731a..00c731e497 100644
--- a/Dropbox.Api/Dropbox.Api.csproj
+++ b/Dropbox.Api/Dropbox.Api.csproj
@@ -81,6 +81,8 @@
+
+
@@ -165,6 +167,10 @@
+
+
+
+
@@ -193,6 +199,7 @@
+
@@ -223,6 +230,7 @@
+
@@ -262,6 +270,7 @@
+
@@ -316,7 +325,6 @@
-
@@ -330,11 +338,6 @@
-
-
-
-
-
@@ -420,6 +423,8 @@
+
+
@@ -433,6 +438,7 @@
+
diff --git a/Dropbox.Api/Files/CommitInfo.cs b/Dropbox.Api/Files/CommitInfo.cs
index 0b63857f37..bf148edfb0 100644
--- a/Dropbox.Api/Files/CommitInfo.cs
+++ b/Dropbox.Api/Files/CommitInfo.cs
@@ -56,9 +56,9 @@ public CommitInfo(string path,
{
throw new sys.ArgumentNullException("path");
}
- if (!re.Regex.IsMatch(path, @"\A(?:/(.|[\r\n])*)\z"))
+ if (!re.Regex.IsMatch(path, @"\A(?:(/(.|[\r\n])*)|(ns:[0-9]+(/.*)?))\z"))
{
- throw new sys.ArgumentOutOfRangeException("path", @"Value should match pattern '\A(?:/(.|[\r\n])*)\z'");
+ throw new sys.ArgumentOutOfRangeException("path", @"Value should match pattern '\A(?:(/(.|[\r\n])*)|(ns:[0-9]+(/.*)?))\z'");
}
if (mode == null)
diff --git a/Dropbox.Api/Files/CreateFolderArg.cs b/Dropbox.Api/Files/CreateFolderArg.cs
index dca56d231c..a82b9cc1f6 100644
--- a/Dropbox.Api/Files/CreateFolderArg.cs
+++ b/Dropbox.Api/Files/CreateFolderArg.cs
@@ -38,9 +38,9 @@ public CreateFolderArg(string path)
{
throw new sys.ArgumentNullException("path");
}
- if (!re.Regex.IsMatch(path, @"\A(?:/(.|[\r\n])*)\z"))
+ if (!re.Regex.IsMatch(path, @"\A(?:(/(.|[\r\n])*)|(ns:[0-9]+(/.*)?))\z"))
{
- throw new sys.ArgumentOutOfRangeException("path", @"Value should match pattern '\A(?:/(.|[\r\n])*)\z'");
+ throw new sys.ArgumentOutOfRangeException("path", @"Value should match pattern '\A(?:(/(.|[\r\n])*)|(ns:[0-9]+(/.*)?))\z'");
}
this.Path = path;
diff --git a/Dropbox.Api/Files/DeleteArg.cs b/Dropbox.Api/Files/DeleteArg.cs
index b23b09db18..f3d2e89492 100644
--- a/Dropbox.Api/Files/DeleteArg.cs
+++ b/Dropbox.Api/Files/DeleteArg.cs
@@ -37,9 +37,9 @@ public DeleteArg(string path)
{
throw new sys.ArgumentNullException("path");
}
- if (!re.Regex.IsMatch(path, @"\A(?:/(.|[\r\n])*)\z"))
+ if (!re.Regex.IsMatch(path, @"\A(?:(/(.|[\r\n])*)|(ns:[0-9]+(/.*)?))\z"))
{
- throw new sys.ArgumentOutOfRangeException("path", @"Value should match pattern '\A(?:/(.|[\r\n])*)\z'");
+ throw new sys.ArgumentOutOfRangeException("path", @"Value should match pattern '\A(?:(/(.|[\r\n])*)|(ns:[0-9]+(/.*)?))\z'");
}
this.Path = path;
diff --git a/Dropbox.Api/Files/DownloadError.cs b/Dropbox.Api/Files/DownloadError.cs
index dcdfd3056b..f766ce39ae 100644
--- a/Dropbox.Api/Files/DownloadError.cs
+++ b/Dropbox.Api/Files/DownloadError.cs
@@ -243,7 +243,7 @@ protected override void SetField(Path value, string fieldName, enc.IJsonReader r
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : DownloadError
{
diff --git a/Dropbox.Api/Files/FilesRoutes.cs b/Dropbox.Api/Files/FilesRoutes.cs
index ed7869232b..589f58974b 100644
--- a/Dropbox.Api/Files/FilesRoutes.cs
+++ b/Dropbox.Api/Files/FilesRoutes.cs
@@ -3341,6 +3341,211 @@ public FileMetadata EndUploadSessionFinish(sys.IAsyncResult asyncResult)
return task.Result;
}
+ ///
+ /// This route helps you commit many files at once into a user's Dropbox. Use
+ /// and
+ /// to
+ /// upload file contents. We recommend uploading many files in parallel to increase
+ /// throughput. Once the file contents have been uploaded, rather than calling , use this
+ /// route to finish all your upload sessions in a single request.
+ /// or needs to be true for last
+ /// or
+ /// call.
+ /// This route will return job_id immediately and do the async commit job in
+ /// background. We have another route
+ /// to check the job status.
+ /// For the same account, this route should be executed serially. That means you
+ /// should not start next job before current job finishes. Also we only allow up to
+ /// 1000 entries in a single request
+ ///
+ /// The request parameters
+ /// The task that represents the asynchronous send operation. The TResult
+ /// parameter contains the response from the server.
+ public t.Task UploadSessionFinishBatchAsync(UploadSessionFinishBatchArg uploadSessionFinishBatchArg)
+ {
+ return this.Transport.SendRpcRequestAsync(uploadSessionFinishBatchArg, "api", "/files/upload_session/finish_batch", Dropbox.Api.Files.UploadSessionFinishBatchArg.Encoder, Dropbox.Api.Async.LaunchEmptyResult.Decoder, enc.EmptyDecoder.Instance);
+ }
+
+ ///
+ /// Begins an asynchronous send to the upload session finish batch route.
+ ///
+ /// The request parameters.
+ /// The method to be called when the asynchronous send is
+ /// completed.
+ /// A user provided object that distinguished this send from other
+ /// send requests.
+ /// An object that represents the asynchronous send request.
+ public sys.IAsyncResult BeginUploadSessionFinishBatch(UploadSessionFinishBatchArg uploadSessionFinishBatchArg, sys.AsyncCallback callback, object state = null)
+ {
+ var task = this.UploadSessionFinishBatchAsync(uploadSessionFinishBatchArg);
+
+ return enc.Util.ToApm(task, callback, state);
+ }
+
+ ///
+ /// This route helps you commit many files at once into a user's Dropbox. Use
+ /// and
+ /// to
+ /// upload file contents. We recommend uploading many files in parallel to increase
+ /// throughput. Once the file contents have been uploaded, rather than calling , use this
+ /// route to finish all your upload sessions in a single request.
+ /// or needs to be true for last
+ /// or
+ /// call.
+ /// This route will return job_id immediately and do the async commit job in
+ /// background. We have another route
+ /// to check the job status.
+ /// For the same account, this route should be executed serially. That means you
+ /// should not start next job before current job finishes. Also we only allow up to
+ /// 1000 entries in a single request
+ ///
+ /// Commit information for each file in the batch.
+ /// The task that represents the asynchronous send operation. The TResult
+ /// parameter contains the response from the server.
+ public t.Task UploadSessionFinishBatchAsync(col.IEnumerable entries)
+ {
+ var uploadSessionFinishBatchArg = new UploadSessionFinishBatchArg(entries);
+
+ return this.UploadSessionFinishBatchAsync(uploadSessionFinishBatchArg);
+ }
+
+ ///
+ /// Begins an asynchronous send to the upload session finish batch route.
+ ///
+ /// Commit information for each file in the batch.
+ /// The method to be called when the asynchronous send is
+ /// completed.
+ /// A user provided object that distinguished this send
+ /// from other send requests.
+ /// An object that represents the asynchronous send request.
+ public sys.IAsyncResult BeginUploadSessionFinishBatch(col.IEnumerable entries,
+ sys.AsyncCallback callback,
+ object callbackState = null)
+ {
+ var uploadSessionFinishBatchArg = new UploadSessionFinishBatchArg(entries);
+
+ return this.BeginUploadSessionFinishBatch(uploadSessionFinishBatchArg, callback, callbackState);
+ }
+
+ ///
+ /// Waits for the pending asynchronous send to the upload session finish batch
+ /// route to complete
+ ///
+ /// The reference to the pending asynchronous send
+ /// request
+ /// The response to the send request
+ public Dropbox.Api.Async.LaunchEmptyResult EndUploadSessionFinishBatch(sys.IAsyncResult asyncResult)
+ {
+ var task = asyncResult as t.Task;
+ if (task == null)
+ {
+ throw new sys.InvalidOperationException();
+ }
+
+ return task.Result;
+ }
+
+ ///
+ /// Returns the status of an asynchronous job for . If
+ /// success, it returns list of result for each entry
+ ///
+ /// The request parameters
+ /// The task that represents the asynchronous send operation. The TResult
+ /// parameter contains the response from the server.
+ /// Thrown if there is an error
+ /// processing the request; This will contain a .
+ public t.Task UploadSessionFinishBatchCheckAsync(Dropbox.Api.Async.PollArg pollArg)
+ {
+ return this.Transport.SendRpcRequestAsync(pollArg, "api", "/files/upload_session/finish_batch/check", Dropbox.Api.Async.PollArg.Encoder, Dropbox.Api.Files.UploadSessionFinishBatchJobStatus.Decoder, Dropbox.Api.Async.PollError.Decoder);
+ }
+
+ ///
+ /// Begins an asynchronous send to the upload session finish batch check
+ /// route.
+ ///
+ /// The request parameters.
+ /// The method to be called when the asynchronous send is
+ /// completed.
+ /// A user provided object that distinguished this send from other
+ /// send requests.
+ /// An object that represents the asynchronous send request.
+ public sys.IAsyncResult BeginUploadSessionFinishBatchCheck(Dropbox.Api.Async.PollArg pollArg, sys.AsyncCallback callback, object state = null)
+ {
+ var task = this.UploadSessionFinishBatchCheckAsync(pollArg);
+
+ return enc.Util.ToApm(task, callback, state);
+ }
+
+ ///
+ /// Returns the status of an asynchronous job for . If
+ /// success, it returns list of result for each entry
+ ///
+ /// Id of the asynchronous job. This is the value of a
+ /// response returned from the method that launched the job.
+ /// The task that represents the asynchronous send operation. The TResult
+ /// parameter contains the response from the server.
+ /// Thrown if there is an error
+ /// processing the request; This will contain a .
+ public t.Task UploadSessionFinishBatchCheckAsync(string asyncJobId)
+ {
+ var pollArg = new Dropbox.Api.Async.PollArg(asyncJobId);
+
+ return this.UploadSessionFinishBatchCheckAsync(pollArg);
+ }
+
+ ///
+ /// Begins an asynchronous send to the upload session finish batch check
+ /// route.
+ ///
+ /// Id of the asynchronous job. This is the value of a
+ /// response returned from the method that launched the job.
+ /// The method to be called when the asynchronous send is
+ /// completed.
+ /// A user provided object that distinguished this send
+ /// from other send requests.
+ /// An object that represents the asynchronous send request.
+ public sys.IAsyncResult BeginUploadSessionFinishBatchCheck(string asyncJobId,
+ sys.AsyncCallback callback,
+ object callbackState = null)
+ {
+ var pollArg = new Dropbox.Api.Async.PollArg(asyncJobId);
+
+ return this.BeginUploadSessionFinishBatchCheck(pollArg, callback, callbackState);
+ }
+
+ ///
+ /// Waits for the pending asynchronous send to the upload session finish batch
+ /// check route to complete
+ ///
+ /// The reference to the pending asynchronous send
+ /// request
+ /// The response to the send request
+ /// Thrown if there is an error
+ /// processing the request; This will contain a .
+ public UploadSessionFinishBatchJobStatus EndUploadSessionFinishBatchCheck(sys.IAsyncResult asyncResult)
+ {
+ var task = asyncResult as t.Task;
+ if (task == null)
+ {
+ throw new sys.InvalidOperationException();
+ }
+
+ return task.Result;
+ }
+
///
/// Upload sessions allow you to upload a single file using multiple requests.
/// This call starts a new upload session with the given data. You can then use
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : ListFolderError
{
diff --git a/Dropbox.Api/Files/ListRevisionsArg.cs b/Dropbox.Api/Files/ListRevisionsArg.cs
index 8abe0f8bc9..edef6ab7c6 100644
--- a/Dropbox.Api/Files/ListRevisionsArg.cs
+++ b/Dropbox.Api/Files/ListRevisionsArg.cs
@@ -40,9 +40,9 @@ public ListRevisionsArg(string path,
{
throw new sys.ArgumentNullException("path");
}
- if (!re.Regex.IsMatch(path, @"\A(?:/(.|[\r\n])*)\z"))
+ if (!re.Regex.IsMatch(path, @"\A(?:/(.|[\r\n])*|id:.*|(ns:[0-9]+(/.*)?))\z"))
{
- throw new sys.ArgumentOutOfRangeException("path", @"Value should match pattern '\A(?:/(.|[\r\n])*)\z'");
+ throw new sys.ArgumentOutOfRangeException("path", @"Value should match pattern '\A(?:/(.|[\r\n])*|id:.*|(ns:[0-9]+(/.*)?))\z'");
}
if (limit < 1UL)
diff --git a/Dropbox.Api/Files/PropertiesError.cs b/Dropbox.Api/Files/PropertiesError.cs
index f4e143c9c1..6be28b82eb 100644
--- a/Dropbox.Api/Files/PropertiesError.cs
+++ b/Dropbox.Api/Files/PropertiesError.cs
@@ -484,7 +484,7 @@ public override RestrictedContent DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : PropertiesError
{
diff --git a/Dropbox.Api/Files/PropertyGroupWithPath.cs b/Dropbox.Api/Files/PropertyGroupWithPath.cs
index b5e688089d..1ccebc545e 100644
--- a/Dropbox.Api/Files/PropertyGroupWithPath.cs
+++ b/Dropbox.Api/Files/PropertyGroupWithPath.cs
@@ -41,9 +41,9 @@ public PropertyGroupWithPath(string path,
{
throw new sys.ArgumentNullException("path");
}
- if (!re.Regex.IsMatch(path, @"\A(?:/(.|[\r\n])*|id:.*)\z"))
+ if (!re.Regex.IsMatch(path, @"\A(?:/(.|[\r\n])*|id:.*|(ns:[0-9]+(/.*)?))\z"))
{
- throw new sys.ArgumentOutOfRangeException("path", @"Value should match pattern '\A(?:/(.|[\r\n])*|id:.*)\z'");
+ throw new sys.ArgumentOutOfRangeException("path", @"Value should match pattern '\A(?:/(.|[\r\n])*|id:.*|(ns:[0-9]+(/.*)?))\z'");
}
var propertyGroupsList = enc.Util.ToList(propertyGroups);
diff --git a/Dropbox.Api/Files/RelocationArg.cs b/Dropbox.Api/Files/RelocationArg.cs
index 384c49b301..f918529dcb 100644
--- a/Dropbox.Api/Files/RelocationArg.cs
+++ b/Dropbox.Api/Files/RelocationArg.cs
@@ -39,18 +39,18 @@ public RelocationArg(string fromPath,
{
throw new sys.ArgumentNullException("fromPath");
}
- if (!re.Regex.IsMatch(fromPath, @"\A(?:/(.|[\r\n])*)\z"))
+ if (!re.Regex.IsMatch(fromPath, @"\A(?:(/(.|[\r\n])*)|(ns:[0-9]+(/.*)?))\z"))
{
- throw new sys.ArgumentOutOfRangeException("fromPath", @"Value should match pattern '\A(?:/(.|[\r\n])*)\z'");
+ throw new sys.ArgumentOutOfRangeException("fromPath", @"Value should match pattern '\A(?:(/(.|[\r\n])*)|(ns:[0-9]+(/.*)?))\z'");
}
if (toPath == null)
{
throw new sys.ArgumentNullException("toPath");
}
- if (!re.Regex.IsMatch(toPath, @"\A(?:/(.|[\r\n])*)\z"))
+ if (!re.Regex.IsMatch(toPath, @"\A(?:(/(.|[\r\n])*)|(ns:[0-9]+(/.*)?))\z"))
{
- throw new sys.ArgumentOutOfRangeException("toPath", @"Value should match pattern '\A(?:/(.|[\r\n])*)\z'");
+ throw new sys.ArgumentOutOfRangeException("toPath", @"Value should match pattern '\A(?:(/(.|[\r\n])*)|(ns:[0-9]+(/.*)?))\z'");
}
this.FromPath = fromPath;
diff --git a/Dropbox.Api/Files/RelocationError.cs b/Dropbox.Api/Files/RelocationError.cs
index 4a708e4902..99bcd93d28 100644
--- a/Dropbox.Api/Files/RelocationError.cs
+++ b/Dropbox.Api/Files/RelocationError.cs
@@ -937,7 +937,7 @@ public override TooManyFiles DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : RelocationError
{
diff --git a/Dropbox.Api/Files/RemovePropertiesArg.cs b/Dropbox.Api/Files/RemovePropertiesArg.cs
index e9ea8ba8c9..71a3f7b4a1 100644
--- a/Dropbox.Api/Files/RemovePropertiesArg.cs
+++ b/Dropbox.Api/Files/RemovePropertiesArg.cs
@@ -41,9 +41,9 @@ public RemovePropertiesArg(string path,
{
throw new sys.ArgumentNullException("path");
}
- if (!re.Regex.IsMatch(path, @"\A(?:/(.|[\r\n])*|id:.*)\z"))
+ if (!re.Regex.IsMatch(path, @"\A(?:/(.|[\r\n])*|id:.*|(ns:[0-9]+(/.*)?))\z"))
{
- throw new sys.ArgumentOutOfRangeException("path", @"Value should match pattern '\A(?:/(.|[\r\n])*|id:.*)\z'");
+ throw new sys.ArgumentOutOfRangeException("path", @"Value should match pattern '\A(?:/(.|[\r\n])*|id:.*|(ns:[0-9]+(/.*)?))\z'");
}
var propertyTemplateIdsList = enc.Util.ToList(propertyTemplateIds);
diff --git a/Dropbox.Api/Files/RestoreArg.cs b/Dropbox.Api/Files/RestoreArg.cs
index 9343ae12cc..4e4dbfb40a 100644
--- a/Dropbox.Api/Files/RestoreArg.cs
+++ b/Dropbox.Api/Files/RestoreArg.cs
@@ -39,9 +39,9 @@ public RestoreArg(string path,
{
throw new sys.ArgumentNullException("path");
}
- if (!re.Regex.IsMatch(path, @"\A(?:/(.|[\r\n])*)\z"))
+ if (!re.Regex.IsMatch(path, @"\A(?:(/(.|[\r\n])*)|(ns:[0-9]+(/.*)?))\z"))
{
- throw new sys.ArgumentOutOfRangeException("path", @"Value should match pattern '\A(?:/(.|[\r\n])*)\z'");
+ throw new sys.ArgumentOutOfRangeException("path", @"Value should match pattern '\A(?:(/(.|[\r\n])*)|(ns:[0-9]+(/.*)?))\z'");
}
if (rev == null)
diff --git a/Dropbox.Api/Files/SearchArg.cs b/Dropbox.Api/Files/SearchArg.cs
index 7845ee81f5..fad06a13aa 100644
--- a/Dropbox.Api/Files/SearchArg.cs
+++ b/Dropbox.Api/Files/SearchArg.cs
@@ -51,9 +51,9 @@ public SearchArg(string path,
{
throw new sys.ArgumentNullException("path");
}
- if (!re.Regex.IsMatch(path, @"\A(?:(/(.|[\r\n])*)?)\z"))
+ if (!re.Regex.IsMatch(path, @"\A(?:(/(.|[\r\n])*)?|(ns:[0-9]+(/.*)?))\z"))
{
- throw new sys.ArgumentOutOfRangeException("path", @"Value should match pattern '\A(?:(/(.|[\r\n])*)?)\z'");
+ throw new sys.ArgumentOutOfRangeException("path", @"Value should match pattern '\A(?:(/(.|[\r\n])*)?|(ns:[0-9]+(/.*)?))\z'");
}
if (query == null)
diff --git a/Dropbox.Api/Files/SearchError.cs b/Dropbox.Api/Files/SearchError.cs
index 84e4a1ba76..302129be35 100644
--- a/Dropbox.Api/Files/SearchError.cs
+++ b/Dropbox.Api/Files/SearchError.cs
@@ -243,7 +243,7 @@ protected override void SetField(Path value, string fieldName, enc.IJsonReader r
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : SearchError
{
diff --git a/Dropbox.Api/Files/UpdatePropertyGroupArg.cs b/Dropbox.Api/Files/UpdatePropertyGroupArg.cs
index d4d1b963f8..4bf0463ac4 100644
--- a/Dropbox.Api/Files/UpdatePropertyGroupArg.cs
+++ b/Dropbox.Api/Files/UpdatePropertyGroupArg.cs
@@ -41,9 +41,9 @@ public UpdatePropertyGroupArg(string path,
{
throw new sys.ArgumentNullException("path");
}
- if (!re.Regex.IsMatch(path, @"\A(?:/(.|[\r\n])*|id:.*)\z"))
+ if (!re.Regex.IsMatch(path, @"\A(?:/(.|[\r\n])*|id:.*|(ns:[0-9]+(/.*)?))\z"))
{
- throw new sys.ArgumentOutOfRangeException("path", @"Value should match pattern '\A(?:/(.|[\r\n])*|id:.*)\z'");
+ throw new sys.ArgumentOutOfRangeException("path", @"Value should match pattern '\A(?:/(.|[\r\n])*|id:.*|(ns:[0-9]+(/.*)?))\z'");
}
var updatePropertyGroupsList = enc.Util.ToList(updatePropertyGroups);
diff --git a/Dropbox.Api/Files/UploadError.cs b/Dropbox.Api/Files/UploadError.cs
index c37684f49c..4cd188f2aa 100644
--- a/Dropbox.Api/Files/UploadError.cs
+++ b/Dropbox.Api/Files/UploadError.cs
@@ -234,7 +234,7 @@ public override Path DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : UploadError
{
diff --git a/Dropbox.Api/Files/UploadErrorWithProperties.cs b/Dropbox.Api/Files/UploadErrorWithProperties.cs
index 05a94c8444..58d1d3329c 100644
--- a/Dropbox.Api/Files/UploadErrorWithProperties.cs
+++ b/Dropbox.Api/Files/UploadErrorWithProperties.cs
@@ -366,7 +366,7 @@ public override Path DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : UploadErrorWithProperties
{
diff --git a/Dropbox.Api/Files/UploadSessionFinishBatchArg.cs b/Dropbox.Api/Files/UploadSessionFinishBatchArg.cs
new file mode 100644
index 0000000000..b45f681507
--- /dev/null
+++ b/Dropbox.Api/Files/UploadSessionFinishBatchArg.cs
@@ -0,0 +1,126 @@
+//
+// Auto-generated by StoneAPI, do not modify.
+//
+
+namespace Dropbox.Api.Files
+{
+ using sys = System;
+ using col = System.Collections.Generic;
+ using re = System.Text.RegularExpressions;
+
+ using enc = Dropbox.Api.Stone;
+
+ ///
+ /// The upload session finish batch arg object
+ ///
+ public class UploadSessionFinishBatchArg
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new UploadSessionFinishBatchArgEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new UploadSessionFinishBatchArgDecoder();
+
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ /// Commit information for each file in the batch.
+ public UploadSessionFinishBatchArg(col.IEnumerable entries)
+ {
+ var entriesList = enc.Util.ToList(entries);
+
+ if (entries == null)
+ {
+ throw new sys.ArgumentNullException("entries");
+ }
+ if (entriesList.Count > 1000)
+ {
+ throw new sys.ArgumentOutOfRangeException("entries", "List should at at most 1000 items");
+ }
+
+ this.Entries = entriesList;
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ /// This is to construct an instance of the object when
+ /// deserializing.
+ public UploadSessionFinishBatchArg()
+ {
+ }
+
+ ///
+ /// Commit information for each file in the batch.
+ ///
+ public col.IList Entries { get; protected set; }
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class UploadSessionFinishBatchArgEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(UploadSessionFinishBatchArg value, enc.IJsonWriter writer)
+ {
+ WriteListProperty("entries", value.Entries, writer, Dropbox.Api.Files.UploadSessionFinishArg.Encoder);
+ }
+ }
+
+ #endregion
+
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class UploadSessionFinishBatchArgDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override UploadSessionFinishBatchArg Create()
+ {
+ return new UploadSessionFinishBatchArg();
+ }
+
+ ///
+ /// Set given field.
+ ///
+ /// The field value.
+ /// The field name.
+ /// The json reader.
+ protected override void SetField(UploadSessionFinishBatchArg value, string fieldName, enc.IJsonReader reader)
+ {
+ switch (fieldName)
+ {
+ case "entries":
+ value.Entries = ReadList(reader, Dropbox.Api.Files.UploadSessionFinishArg.Decoder);
+ break;
+ default:
+ reader.Skip();
+ break;
+ }
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/Dropbox.Api/Files/UploadSessionFinishBatchJobStatus.cs b/Dropbox.Api/Files/UploadSessionFinishBatchJobStatus.cs
new file mode 100644
index 0000000000..0e6203a3b0
--- /dev/null
+++ b/Dropbox.Api/Files/UploadSessionFinishBatchJobStatus.cs
@@ -0,0 +1,320 @@
+//
+// Auto-generated by StoneAPI, do not modify.
+//
+
+namespace Dropbox.Api.Files
+{
+ using sys = System;
+ using col = System.Collections.Generic;
+ using re = System.Text.RegularExpressions;
+
+ using enc = Dropbox.Api.Stone;
+
+ ///
+ /// The upload session finish batch job status object
+ ///
+ public class UploadSessionFinishBatchJobStatus
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new UploadSessionFinishBatchJobStatusEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new UploadSessionFinishBatchJobStatusDecoder();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public UploadSessionFinishBatchJobStatus()
+ {
+ }
+
+ ///
+ /// Gets a value indicating whether this instance is Complete
+ ///
+ public bool IsComplete
+ {
+ get
+ {
+ return this is Complete;
+ }
+ }
+
+ ///
+ /// Gets this instance as a Complete, or null.
+ ///
+ public Complete AsComplete
+ {
+ get
+ {
+ return this as Complete;
+ }
+ }
+
+ ///
+ /// Gets a value indicating whether this instance is InProgress
+ ///
+ public bool IsInProgress
+ {
+ get
+ {
+ return this is InProgress;
+ }
+ }
+
+ ///
+ /// Gets this instance as a InProgress, or null.
+ ///
+ public InProgress AsInProgress
+ {
+ get
+ {
+ return this as InProgress;
+ }
+ }
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class UploadSessionFinishBatchJobStatusEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(UploadSessionFinishBatchJobStatus value, enc.IJsonWriter writer)
+ {
+ if (value is Complete)
+ {
+ WriteProperty(".tag", "complete", writer, enc.StringEncoder.Instance);
+ Complete.Encoder.EncodeFields((Complete)value, writer);
+ return;
+ }
+ if (value is InProgress)
+ {
+ WriteProperty(".tag", "in_progress", writer, enc.StringEncoder.Instance);
+ InProgress.Encoder.EncodeFields((InProgress)value, writer);
+ return;
+ }
+ throw new sys.InvalidOperationException();
+ }
+ }
+
+ #endregion
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class UploadSessionFinishBatchJobStatusDecoder : enc.UnionDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override UploadSessionFinishBatchJobStatus Create()
+ {
+ return new UploadSessionFinishBatchJobStatus();
+ }
+
+ ///
+ /// Decode based on given tag.
+ ///
+ /// The tag.
+ /// The json reader.
+ /// The decoded object.
+ protected override UploadSessionFinishBatchJobStatus Decode(string tag, enc.IJsonReader reader)
+ {
+ switch (tag)
+ {
+ case "complete":
+ return Complete.Decoder.DecodeFields(reader);
+ case "in_progress":
+ return InProgress.Decoder.DecodeFields(reader);
+ default:
+ throw new sys.InvalidOperationException();
+ }
+ }
+ }
+
+ #endregion
+
+ ///
+ /// The has
+ /// finished.
+ ///
+ public sealed class Complete : UploadSessionFinishBatchJobStatus
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new CompleteEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new CompleteDecoder();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The value
+ public Complete(UploadSessionFinishBatchResult value)
+ {
+ this.Value = value;
+ }
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ private Complete()
+ {
+ }
+
+ ///
+ /// Gets the value of this instance.
+ ///
+ public UploadSessionFinishBatchResult Value { get; private set; }
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class CompleteEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(Complete value, enc.IJsonWriter writer)
+ {
+ Dropbox.Api.Files.UploadSessionFinishBatchResult.Encoder.EncodeFields(value.Value, writer);
+ }
+ }
+
+ #endregion
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class CompleteDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override Complete Create()
+ {
+ return new Complete();
+ }
+
+ ///
+ /// Decode fields without ensuring start and end object.
+ ///
+ /// The json reader.
+ /// The decoded object.
+ public override Complete DecodeFields(enc.IJsonReader reader)
+ {
+ return new Complete(Dropbox.Api.Files.UploadSessionFinishBatchResult.Decoder.DecodeFields(reader));
+ }
+ }
+
+ #endregion
+ }
+
+ ///
+ /// The asynchronous job is still in progress.
+ ///
+ public sealed class InProgress : UploadSessionFinishBatchJobStatus
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new InProgressEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new InProgressDecoder();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ private InProgress()
+ {
+ }
+
+ ///
+ /// A singleton instance of InProgress
+ ///
+ public static readonly InProgress Instance = new InProgress();
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class InProgressEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(InProgress value, enc.IJsonWriter writer)
+ {
+ }
+ }
+
+ #endregion
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class InProgressDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override InProgress Create()
+ {
+ return new InProgress();
+ }
+
+ ///
+ /// Decode fields without ensuring start and end object.
+ ///
+ /// The json reader.
+ /// The decoded object.
+ public override InProgress DecodeFields(enc.IJsonReader reader)
+ {
+ return InProgress.Instance;
+ }
+ }
+
+ #endregion
+ }
+ }
+}
diff --git a/Dropbox.Api/Files/UploadSessionFinishBatchResult.cs b/Dropbox.Api/Files/UploadSessionFinishBatchResult.cs
new file mode 100644
index 0000000000..5693325d53
--- /dev/null
+++ b/Dropbox.Api/Files/UploadSessionFinishBatchResult.cs
@@ -0,0 +1,122 @@
+//
+// Auto-generated by StoneAPI, do not modify.
+//
+
+namespace Dropbox.Api.Files
+{
+ using sys = System;
+ using col = System.Collections.Generic;
+ using re = System.Text.RegularExpressions;
+
+ using enc = Dropbox.Api.Stone;
+
+ ///
+ /// The upload session finish batch result object
+ ///
+ public class UploadSessionFinishBatchResult
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new UploadSessionFinishBatchResultEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new UploadSessionFinishBatchResultDecoder();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Commit result for each file in the batch.
+ public UploadSessionFinishBatchResult(col.IEnumerable entries)
+ {
+ var entriesList = enc.Util.ToList(entries);
+
+ if (entries == null)
+ {
+ throw new sys.ArgumentNullException("entries");
+ }
+
+ this.Entries = entriesList;
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// This is to construct an instance of the object when
+ /// deserializing.
+ public UploadSessionFinishBatchResult()
+ {
+ }
+
+ ///
+ /// Commit result for each file in the batch.
+ ///
+ public col.IList Entries { get; protected set; }
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class UploadSessionFinishBatchResultEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(UploadSessionFinishBatchResult value, enc.IJsonWriter writer)
+ {
+ WriteListProperty("entries", value.Entries, writer, Dropbox.Api.Files.UploadSessionFinishBatchResultEntry.Encoder);
+ }
+ }
+
+ #endregion
+
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class UploadSessionFinishBatchResultDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override UploadSessionFinishBatchResult Create()
+ {
+ return new UploadSessionFinishBatchResult();
+ }
+
+ ///
+ /// Set given field.
+ ///
+ /// The field value.
+ /// The field name.
+ /// The json reader.
+ protected override void SetField(UploadSessionFinishBatchResult value, string fieldName, enc.IJsonReader reader)
+ {
+ switch (fieldName)
+ {
+ case "entries":
+ value.Entries = ReadList(reader, Dropbox.Api.Files.UploadSessionFinishBatchResultEntry.Decoder);
+ break;
+ default:
+ reader.Skip();
+ break;
+ }
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/Dropbox.Api/Team/AlphaGroupsGetInfoItem.cs b/Dropbox.Api/Files/UploadSessionFinishBatchResultEntry.cs
similarity index 55%
rename from Dropbox.Api/Team/AlphaGroupsGetInfoItem.cs
rename to Dropbox.Api/Files/UploadSessionFinishBatchResultEntry.cs
index cee95278c5..465aa4c898 100644
--- a/Dropbox.Api/Team/AlphaGroupsGetInfoItem.cs
+++ b/Dropbox.Api/Files/UploadSessionFinishBatchResultEntry.cs
@@ -2,7 +2,7 @@
// Auto-generated by StoneAPI, do not modify.
//
-namespace Dropbox.Api.Team
+namespace Dropbox.Api.Files
{
using sys = System;
using col = System.Collections.Generic;
@@ -11,98 +11,98 @@ namespace Dropbox.Api.Team
using enc = Dropbox.Api.Stone;
///
- /// The alpha groups get info item object
+ /// The upload session finish batch result entry object
///
- public class AlphaGroupsGetInfoItem
+ public class UploadSessionFinishBatchResultEntry
{
#pragma warning disable 108
///
/// The encoder instance.
///
- internal static enc.StructEncoder Encoder = new AlphaGroupsGetInfoItemEncoder();
+ internal static enc.StructEncoder Encoder = new UploadSessionFinishBatchResultEntryEncoder();
///
/// The decoder instance.
///
- internal static enc.StructDecoder Decoder = new AlphaGroupsGetInfoItemDecoder();
+ internal static enc.StructDecoder Decoder = new UploadSessionFinishBatchResultEntryDecoder();
///
- /// Initializes a new instance of the
- /// class.
+ /// Initializes a new instance of the class.
///
- public AlphaGroupsGetInfoItem()
+ public UploadSessionFinishBatchResultEntry()
{
}
///
- /// Gets a value indicating whether this instance is IdNotFound
+ /// Gets a value indicating whether this instance is Success
///
- public bool IsIdNotFound
+ public bool IsSuccess
{
get
{
- return this is IdNotFound;
+ return this is Success;
}
}
///
- /// Gets this instance as a IdNotFound, or null.
+ /// Gets this instance as a Success, or null.
///
- public IdNotFound AsIdNotFound
+ public Success AsSuccess
{
get
{
- return this as IdNotFound;
+ return this as Success;
}
}
///
- /// Gets a value indicating whether this instance is GroupInfo
+ /// Gets a value indicating whether this instance is Failure
///
- public bool IsGroupInfo
+ public bool IsFailure
{
get
{
- return this is GroupInfo;
+ return this is Failure;
}
}
///
- /// Gets this instance as a GroupInfo, or null.
+ /// Gets this instance as a Failure, or null.
///
- public GroupInfo AsGroupInfo
+ public Failure AsFailure
{
get
{
- return this as GroupInfo;
+ return this as Failure;
}
}
#region Encoder class
///
- /// Encoder for .
+ /// Encoder for .
///
- private class AlphaGroupsGetInfoItemEncoder : enc.StructEncoder
+ private class UploadSessionFinishBatchResultEntryEncoder : enc.StructEncoder
{
///
/// Encode fields of given value.
///
/// The value.
/// The writer.
- public override void EncodeFields(AlphaGroupsGetInfoItem value, enc.IJsonWriter writer)
+ public override void EncodeFields(UploadSessionFinishBatchResultEntry value, enc.IJsonWriter writer)
{
- if (value is IdNotFound)
+ if (value is Success)
{
- WriteProperty(".tag", "id_not_found", writer, enc.StringEncoder.Instance);
- IdNotFound.Encoder.EncodeFields((IdNotFound)value, writer);
+ WriteProperty(".tag", "success", writer, enc.StringEncoder.Instance);
+ Success.Encoder.EncodeFields((Success)value, writer);
return;
}
- if (value is GroupInfo)
+ if (value is Failure)
{
- WriteProperty(".tag", "group_info", writer, enc.StringEncoder.Instance);
- GroupInfo.Encoder.EncodeFields((GroupInfo)value, writer);
+ WriteProperty(".tag", "failure", writer, enc.StringEncoder.Instance);
+ Failure.Encoder.EncodeFields((Failure)value, writer);
return;
}
throw new sys.InvalidOperationException();
@@ -114,18 +114,18 @@ public override void EncodeFields(AlphaGroupsGetInfoItem value, enc.IJsonWriter
#region Decoder class
///
- /// Decoder for .
+ /// Decoder for .
///
- private class AlphaGroupsGetInfoItemDecoder : enc.UnionDecoder
+ private class UploadSessionFinishBatchResultEntryDecoder : enc.UnionDecoder
{
///
- /// Create a new instance of type .
+ /// Create a new instance of type .
///
/// The struct instance.
- protected override AlphaGroupsGetInfoItem Create()
+ protected override UploadSessionFinishBatchResultEntry Create()
{
- return new AlphaGroupsGetInfoItem();
+ return new UploadSessionFinishBatchResultEntry();
}
///
@@ -134,14 +134,14 @@ protected override AlphaGroupsGetInfoItem Create()
/// The tag.
/// The json reader.
/// The decoded object.
- protected override AlphaGroupsGetInfoItem Decode(string tag, enc.IJsonReader reader)
+ protected override UploadSessionFinishBatchResultEntry Decode(string tag, enc.IJsonReader reader)
{
switch (tag)
{
- case "id_not_found":
- return IdNotFound.Decoder.DecodeFields(reader);
- case "group_info":
- return GroupInfo.Decoder.DecodeFields(reader);
+ case "success":
+ return Success.Decoder.DecodeFields(reader);
+ case "failure":
+ return Failure.Decoder.DecodeFields(reader);
default:
throw new sys.InvalidOperationException();
}
@@ -151,60 +151,57 @@ protected override AlphaGroupsGetInfoItem Decode(string tag, enc.IJsonReader rea
#endregion
///
- /// An ID that was provided as a parameter to , and did not
- /// match a corresponding group. The ID can be a group ID, or an external ID, depending
- /// on how the method was called.
+ /// The success object
///
- public sealed class IdNotFound : AlphaGroupsGetInfoItem
+ public sealed class Success : UploadSessionFinishBatchResultEntry
{
#pragma warning disable 108
///
/// The encoder instance.
///
- internal static enc.StructEncoder Encoder = new IdNotFoundEncoder();
+ internal static enc.StructEncoder Encoder = new SuccessEncoder();
///
/// The decoder instance.
///
- internal static enc.StructDecoder Decoder = new IdNotFoundDecoder();
+ internal static enc.StructDecoder Decoder = new SuccessDecoder();
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// The value
- public IdNotFound(string value)
+ public Success(FileMetadata value)
{
this.Value = value;
}
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
- private IdNotFound()
+ private Success()
{
}
///
/// Gets the value of this instance.
///
- public string Value { get; private set; }
+ public FileMetadata Value { get; private set; }
#region Encoder class
///
- /// Encoder for .
+ /// Encoder for .
///
- private class IdNotFoundEncoder : enc.StructEncoder
+ private class SuccessEncoder : enc.StructEncoder
{
///
/// Encode fields of given value.
///
/// The value.
/// The writer.
- public override void EncodeFields(IdNotFound value, enc.IJsonWriter writer)
+ public override void EncodeFields(Success value, enc.IJsonWriter writer)
{
- WriteProperty("id_not_found", value.Value, writer, enc.StringEncoder.Instance);
+ Dropbox.Api.Files.FileMetadata.Encoder.EncodeFields(value.Value, writer);
}
}
@@ -213,36 +210,27 @@ public override void EncodeFields(IdNotFound value, enc.IJsonWriter writer)
#region Decoder class
///
- /// Decoder for .
+ /// Decoder for .
///
- private class IdNotFoundDecoder : enc.StructDecoder
+ private class SuccessDecoder : enc.StructDecoder
{
///
- /// Create a new instance of type .
+ /// Create a new instance of type .
///
/// The struct instance.
- protected override IdNotFound Create()
+ protected override Success Create()
{
- return new IdNotFound();
+ return new Success();
}
///
- /// Set given field.
+ /// Decode fields without ensuring start and end object.
///
- /// The field value.
- /// The field name.
/// The json reader.
- protected override void SetField(IdNotFound value, string fieldName, enc.IJsonReader reader)
+ /// The decoded object.
+ public override Success DecodeFields(enc.IJsonReader reader)
{
- switch (fieldName)
- {
- case "id_not_found":
- value.Value = enc.StringDecoder.Instance.Decode(reader);
- break;
- default:
- reader.Skip();
- break;
- }
+ return new Success(Dropbox.Api.Files.FileMetadata.Decoder.DecodeFields(reader));
}
}
@@ -250,57 +238,57 @@ protected override void SetField(IdNotFound value, string fieldName, enc.IJsonRe
}
///
- /// Info about a group.
+ /// The failure object
///
- public sealed class GroupInfo : AlphaGroupsGetInfoItem
+ public sealed class Failure : UploadSessionFinishBatchResultEntry
{
#pragma warning disable 108
///
/// The encoder instance.
///
- internal static enc.StructEncoder Encoder = new GroupInfoEncoder();
+ internal static enc.StructEncoder Encoder = new FailureEncoder();
///
/// The decoder instance.
///
- internal static enc.StructDecoder Decoder = new GroupInfoDecoder();
+ internal static enc.StructDecoder Decoder = new FailureDecoder();
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// The value
- public GroupInfo(AlphaGroupFullInfo value)
+ public Failure(UploadSessionFinishError value)
{
this.Value = value;
}
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
- private GroupInfo()
+ private Failure()
{
}
///
/// Gets the value of this instance.
///
- public AlphaGroupFullInfo Value { get; private set; }
+ public UploadSessionFinishError Value { get; private set; }
#region Encoder class
///
- /// Encoder for .
+ /// Encoder for .
///
- private class GroupInfoEncoder : enc.StructEncoder
+ private class FailureEncoder : enc.StructEncoder
{
///
/// Encode fields of given value.
///
/// The value.
/// The writer.
- public override void EncodeFields(GroupInfo value, enc.IJsonWriter writer)
+ public override void EncodeFields(Failure value, enc.IJsonWriter writer)
{
- Dropbox.Api.Team.AlphaGroupFullInfo.Encoder.EncodeFields(value.Value, writer);
+ Dropbox.Api.Files.UploadSessionFinishError.Encoder.EncodeFields(value.Value, writer);
}
}
@@ -309,27 +297,36 @@ public override void EncodeFields(GroupInfo value, enc.IJsonWriter writer)
#region Decoder class
///
- /// Decoder for .
+ /// Decoder for .
///
- private class GroupInfoDecoder : enc.StructDecoder
+ private class FailureDecoder : enc.StructDecoder
{
///
- /// Create a new instance of type .
+ /// Create a new instance of type .
///
/// The struct instance.
- protected override GroupInfo Create()
+ protected override Failure Create()
{
- return new GroupInfo();
+ return new Failure();
}
///
- /// Decode fields without ensuring start and end object.
+ /// Set given field.
///
+ /// The field value.
+ /// The field name.
/// The json reader.
- /// The decoded object.
- public override GroupInfo DecodeFields(enc.IJsonReader reader)
+ protected override void SetField(Failure value, string fieldName, enc.IJsonReader reader)
{
- return new GroupInfo(Dropbox.Api.Team.AlphaGroupFullInfo.Decoder.DecodeFields(reader));
+ switch (fieldName)
+ {
+ case "failure":
+ value.Value = Dropbox.Api.Files.UploadSessionFinishError.Decoder.Decode(reader);
+ break;
+ default:
+ reader.Skip();
+ break;
+ }
}
}
diff --git a/Dropbox.Api/Files/UploadSessionFinishError.cs b/Dropbox.Api/Files/UploadSessionFinishError.cs
index 27cea6b25e..a5d6c90b78 100644
--- a/Dropbox.Api/Files/UploadSessionFinishError.cs
+++ b/Dropbox.Api/Files/UploadSessionFinishError.cs
@@ -486,7 +486,7 @@ public override TooManySharedFolderTargets DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : UploadSessionFinishError
{
diff --git a/Dropbox.Api/Files/UploadSessionLookupError.cs b/Dropbox.Api/Files/UploadSessionLookupError.cs
index fa1a8b3dc5..ddfb9780db 100644
--- a/Dropbox.Api/Files/UploadSessionLookupError.cs
+++ b/Dropbox.Api/Files/UploadSessionLookupError.cs
@@ -566,7 +566,7 @@ public override NotClosed DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : UploadSessionLookupError
{
diff --git a/Dropbox.Api/Properties/ModifyPropertyTemplateError.cs b/Dropbox.Api/Properties/ModifyPropertyTemplateError.cs
index 64dc97d5a7..838285c5c3 100644
--- a/Dropbox.Api/Properties/ModifyPropertyTemplateError.cs
+++ b/Dropbox.Api/Properties/ModifyPropertyTemplateError.cs
@@ -801,7 +801,7 @@ public override RestrictedContent DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : ModifyPropertyTemplateError
{
diff --git a/Dropbox.Api/Properties/PropertyTemplateError.cs b/Dropbox.Api/Properties/PropertyTemplateError.cs
index d9bd13b2df..4a04997fde 100644
--- a/Dropbox.Api/Properties/PropertyTemplateError.cs
+++ b/Dropbox.Api/Properties/PropertyTemplateError.cs
@@ -357,7 +357,7 @@ public override RestrictedContent DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : PropertyTemplateError
{
diff --git a/Dropbox.Api/Sharing/AddFolderMemberError.cs b/Dropbox.Api/Sharing/AddFolderMemberError.cs
index bc77eb264f..4462a8d716 100644
--- a/Dropbox.Api/Sharing/AddFolderMemberError.cs
+++ b/Dropbox.Api/Sharing/AddFolderMemberError.cs
@@ -189,6 +189,28 @@ public RateLimit AsRateLimit
}
}
+ ///
+ /// Gets a value indicating whether this instance is TooManyInvitees
+ ///
+ public bool IsTooManyInvitees
+ {
+ get
+ {
+ return this is TooManyInvitees;
+ }
+ }
+
+ ///
+ /// Gets this instance as a TooManyInvitees, or null.
+ ///
+ public TooManyInvitees AsTooManyInvitees
+ {
+ get
+ {
+ return this as TooManyInvitees;
+ }
+ }
+
///
/// Gets a value indicating whether this instance is InsufficientPlan
///
@@ -333,6 +355,12 @@ public override void EncodeFields(AddFolderMemberError value, enc.IJsonWriter wr
RateLimit.Encoder.EncodeFields((RateLimit)value, writer);
return;
}
+ if (value is TooManyInvitees)
+ {
+ WriteProperty(".tag", "too_many_invitees", writer, enc.StringEncoder.Instance);
+ TooManyInvitees.Encoder.EncodeFields((TooManyInvitees)value, writer);
+ return;
+ }
if (value is InsufficientPlan)
{
WriteProperty(".tag", "insufficient_plan", writer, enc.StringEncoder.Instance);
@@ -403,6 +431,8 @@ protected override AddFolderMemberError Decode(string tag, enc.IJsonReader reade
return TooManyPendingInvites.Decoder.DecodeFields(reader);
case "rate_limit":
return RateLimit.Decoder.DecodeFields(reader);
+ case "too_many_invitees":
+ return TooManyInvitees.Decoder.DecodeFields(reader);
case "insufficient_plan":
return InsufficientPlan.Decoder.DecodeFields(reader);
case "team_folder":
@@ -969,7 +999,8 @@ protected override void SetField(TooManyPendingInvites value, string fieldName,
}
///
- /// The user has reached the rate limit for invitations.
+ /// The current user has hit the limit of invites they can send per day. Try
+ /// again in 24 hours.
///
public sealed class RateLimit : AddFolderMemberError
{
@@ -1046,6 +1077,85 @@ public override RateLimit DecodeFields(enc.IJsonReader reader)
#endregion
}
+ ///
+ /// The current user is trying to share with too many people at once.
+ ///
+ public sealed class TooManyInvitees : AddFolderMemberError
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new TooManyInviteesEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new TooManyInviteesDecoder();
+
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ private TooManyInvitees()
+ {
+ }
+
+ ///
+ /// A singleton instance of TooManyInvitees
+ ///
+ public static readonly TooManyInvitees Instance = new TooManyInvitees();
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class TooManyInviteesEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(TooManyInvitees value, enc.IJsonWriter writer)
+ {
+ }
+ }
+
+ #endregion
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class TooManyInviteesDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override TooManyInvitees Create()
+ {
+ return new TooManyInvitees();
+ }
+
+ ///
+ /// Decode fields without ensuring start and end object.
+ ///
+ /// The json reader.
+ /// The decoded object.
+ public override TooManyInvitees DecodeFields(enc.IJsonReader reader)
+ {
+ return TooManyInvitees.Instance;
+ }
+ }
+
+ #endregion
+ }
+
///
/// The current user's account doesn't support this action. An example of this is
/// when adding a read-only member. This action can only be performed by users that
diff --git a/Dropbox.Api/Sharing/AddMemberSelectorError.cs b/Dropbox.Api/Sharing/AddMemberSelectorError.cs
index 81bda499eb..6240442e96 100644
--- a/Dropbox.Api/Sharing/AddMemberSelectorError.cs
+++ b/Dropbox.Api/Sharing/AddMemberSelectorError.cs
@@ -35,6 +35,28 @@ public AddMemberSelectorError()
{
}
+ ///
+ /// Gets a value indicating whether this instance is AutomaticGroup
+ ///
+ public bool IsAutomaticGroup
+ {
+ get
+ {
+ return this is AutomaticGroup;
+ }
+ }
+
+ ///
+ /// Gets this instance as a AutomaticGroup, or null.
+ ///
+ public AutomaticGroup AsAutomaticGroup
+ {
+ get
+ {
+ return this as AutomaticGroup;
+ }
+ }
+
///
/// Gets a value indicating whether this instance is InvalidDropboxId
///
@@ -181,6 +203,12 @@ private class AddMemberSelectorErrorEncoder : enc.StructEncoderThe writer.
public override void EncodeFields(AddMemberSelectorError value, enc.IJsonWriter writer)
{
+ if (value is AutomaticGroup)
+ {
+ WriteProperty(".tag", "automatic_group", writer, enc.StringEncoder.Instance);
+ AutomaticGroup.Encoder.EncodeFields((AutomaticGroup)value, writer);
+ return;
+ }
if (value is InvalidDropboxId)
{
WriteProperty(".tag", "invalid_dropbox_id", writer, enc.StringEncoder.Instance);
@@ -250,6 +278,8 @@ protected override AddMemberSelectorError Decode(string tag, enc.IJsonReader rea
{
switch (tag)
{
+ case "automatic_group":
+ return AutomaticGroup.Decoder.DecodeFields(reader);
case "invalid_dropbox_id":
return InvalidDropboxId.Decoder.DecodeFields(reader);
case "invalid_email":
@@ -268,6 +298,85 @@ protected override AddMemberSelectorError Decode(string tag, enc.IJsonReader rea
#endregion
+ ///
+ /// Automatically created groups can only be added to team folders.
+ ///
+ public sealed class AutomaticGroup : AddMemberSelectorError
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new AutomaticGroupEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new AutomaticGroupDecoder();
+
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ private AutomaticGroup()
+ {
+ }
+
+ ///
+ /// A singleton instance of AutomaticGroup
+ ///
+ public static readonly AutomaticGroup Instance = new AutomaticGroup();
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class AutomaticGroupEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(AutomaticGroup value, enc.IJsonWriter writer)
+ {
+ }
+ }
+
+ #endregion
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class AutomaticGroupDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override AutomaticGroup Create()
+ {
+ return new AutomaticGroup();
+ }
+
+ ///
+ /// Decode fields without ensuring start and end object.
+ ///
+ /// The json reader.
+ /// The decoded object.
+ public override AutomaticGroup DecodeFields(enc.IJsonReader reader)
+ {
+ return AutomaticGroup.Instance;
+ }
+ }
+
+ #endregion
+ }
+
///
/// The value is the ID that could not be identified.
///
diff --git a/Dropbox.Api/Sharing/ChangeFileMemberAccessArgs.cs b/Dropbox.Api/Sharing/ChangeFileMemberAccessArgs.cs
new file mode 100644
index 0000000000..80a596f0b3
--- /dev/null
+++ b/Dropbox.Api/Sharing/ChangeFileMemberAccessArgs.cs
@@ -0,0 +1,163 @@
+//
+// Auto-generated by StoneAPI, do not modify.
+//
+
+namespace Dropbox.Api.Sharing
+{
+ using sys = System;
+ using col = System.Collections.Generic;
+ using re = System.Text.RegularExpressions;
+
+ using enc = Dropbox.Api.Stone;
+
+ ///
+ /// Arguments for .
+ ///
+ public class ChangeFileMemberAccessArgs
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new ChangeFileMemberAccessArgsEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new ChangeFileMemberAccessArgsDecoder();
+
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ /// File for which we are changing a member's access.
+ /// The member whose access we are changing.
+ /// The new access level for the member.
+ public ChangeFileMemberAccessArgs(string file,
+ MemberSelector member,
+ AccessLevel accessLevel)
+ {
+ if (file == null)
+ {
+ throw new sys.ArgumentNullException("file");
+ }
+ if (file.Length < 1)
+ {
+ throw new sys.ArgumentOutOfRangeException("file", "Length should be at least 1");
+ }
+ if (!re.Regex.IsMatch(file, @"\A(?:((/|id:).*|nspath:[^:]*:[^:]*))\z"))
+ {
+ throw new sys.ArgumentOutOfRangeException("file", @"Value should match pattern '\A(?:((/|id:).*|nspath:[^:]*:[^:]*))\z'");
+ }
+
+ if (member == null)
+ {
+ throw new sys.ArgumentNullException("member");
+ }
+
+ if (accessLevel == null)
+ {
+ throw new sys.ArgumentNullException("accessLevel");
+ }
+
+ this.File = file;
+ this.Member = member;
+ this.AccessLevel = accessLevel;
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ /// This is to construct an instance of the object when
+ /// deserializing.
+ public ChangeFileMemberAccessArgs()
+ {
+ }
+
+ ///
+ /// File for which we are changing a member's access.
+ ///
+ public string File { get; protected set; }
+
+ ///
+ /// The member whose access we are changing.
+ ///
+ public MemberSelector Member { get; protected set; }
+
+ ///
+ /// The new access level for the member.
+ ///
+ public AccessLevel AccessLevel { get; protected set; }
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class ChangeFileMemberAccessArgsEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(ChangeFileMemberAccessArgs value, enc.IJsonWriter writer)
+ {
+ WriteProperty("file", value.File, writer, enc.StringEncoder.Instance);
+ WriteProperty("member", value.Member, writer, Dropbox.Api.Sharing.MemberSelector.Encoder);
+ WriteProperty("access_level", value.AccessLevel, writer, Dropbox.Api.Sharing.AccessLevel.Encoder);
+ }
+ }
+
+ #endregion
+
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class ChangeFileMemberAccessArgsDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override ChangeFileMemberAccessArgs Create()
+ {
+ return new ChangeFileMemberAccessArgs();
+ }
+
+ ///
+ /// Set given field.
+ ///
+ /// The field value.
+ /// The field name.
+ /// The json reader.
+ protected override void SetField(ChangeFileMemberAccessArgs value, string fieldName, enc.IJsonReader reader)
+ {
+ switch (fieldName)
+ {
+ case "file":
+ value.File = enc.StringDecoder.Instance.Decode(reader);
+ break;
+ case "member":
+ value.Member = Dropbox.Api.Sharing.MemberSelector.Decoder.Decode(reader);
+ break;
+ case "access_level":
+ value.AccessLevel = Dropbox.Api.Sharing.AccessLevel.Decoder.Decode(reader);
+ break;
+ default:
+ reader.Skip();
+ break;
+ }
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/Dropbox.Api/Sharing/FileAction.cs b/Dropbox.Api/Sharing/FileAction.cs
index 6f0dd10444..9c6947dfaf 100644
--- a/Dropbox.Api/Sharing/FileAction.cs
+++ b/Dropbox.Api/Sharing/FileAction.cs
@@ -78,6 +78,28 @@ public InviteViewer AsInviteViewer
}
}
+ ///
+ /// Gets a value indicating whether this instance is InviteViewerNoComment
+ ///
+ public bool IsInviteViewerNoComment
+ {
+ get
+ {
+ return this is InviteViewerNoComment;
+ }
+ }
+
+ ///
+ /// Gets this instance as a InviteViewerNoComment, or null.
+ ///
+ public InviteViewerNoComment AsInviteViewerNoComment
+ {
+ get
+ {
+ return this as InviteViewerNoComment;
+ }
+ }
+
///
/// Gets a value indicating whether this instance is Unshare
///
@@ -122,6 +144,28 @@ public RelinquishMembership AsRelinquishMembership
}
}
+ ///
+ /// Gets a value indicating whether this instance is ShareLink
+ ///
+ public bool IsShareLink
+ {
+ get
+ {
+ return this is ShareLink;
+ }
+ }
+
+ ///
+ /// Gets this instance as a ShareLink, or null.
+ ///
+ public ShareLink AsShareLink
+ {
+ get
+ {
+ return this as ShareLink;
+ }
+ }
+
///
/// Gets a value indicating whether this instance is Other
///
@@ -170,6 +214,12 @@ public override void EncodeFields(FileAction value, enc.IJsonWriter writer)
InviteViewer.Encoder.EncodeFields((InviteViewer)value, writer);
return;
}
+ if (value is InviteViewerNoComment)
+ {
+ WriteProperty(".tag", "invite_viewer_no_comment", writer, enc.StringEncoder.Instance);
+ InviteViewerNoComment.Encoder.EncodeFields((InviteViewerNoComment)value, writer);
+ return;
+ }
if (value is Unshare)
{
WriteProperty(".tag", "unshare", writer, enc.StringEncoder.Instance);
@@ -182,6 +232,12 @@ public override void EncodeFields(FileAction value, enc.IJsonWriter writer)
RelinquishMembership.Encoder.EncodeFields((RelinquishMembership)value, writer);
return;
}
+ if (value is ShareLink)
+ {
+ WriteProperty(".tag", "share_link", writer, enc.StringEncoder.Instance);
+ ShareLink.Encoder.EncodeFields((ShareLink)value, writer);
+ return;
+ }
if (value is Other)
{
WriteProperty(".tag", "other", writer, enc.StringEncoder.Instance);
@@ -224,10 +280,14 @@ protected override FileAction Decode(string tag, enc.IJsonReader reader)
return EditContents.Decoder.DecodeFields(reader);
case "invite_viewer":
return InviteViewer.Decoder.DecodeFields(reader);
+ case "invite_viewer_no_comment":
+ return InviteViewerNoComment.Decoder.DecodeFields(reader);
case "unshare":
return Unshare.Decoder.DecodeFields(reader);
case "relinquish_membership":
return RelinquishMembership.Decoder.DecodeFields(reader);
+ case "share_link":
+ return ShareLink.Decoder.DecodeFields(reader);
default:
return Other.Decoder.DecodeFields(reader);
}
@@ -394,6 +454,86 @@ public override InviteViewer DecodeFields(enc.IJsonReader reader)
#endregion
}
+ ///
+ /// Add a member with view permissions but no comment permissions.
+ ///
+ public sealed class InviteViewerNoComment : FileAction
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new InviteViewerNoCommentEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new InviteViewerNoCommentDecoder();
+
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ private InviteViewerNoComment()
+ {
+ }
+
+ ///
+ /// A singleton instance of InviteViewerNoComment
+ ///
+ public static readonly InviteViewerNoComment Instance = new InviteViewerNoComment();
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class InviteViewerNoCommentEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(InviteViewerNoComment value, enc.IJsonWriter writer)
+ {
+ }
+ }
+
+ #endregion
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class InviteViewerNoCommentDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override InviteViewerNoComment Create()
+ {
+ return new InviteViewerNoComment();
+ }
+
+ ///
+ /// Decode fields without ensuring start and end object.
+ ///
+ /// The json reader.
+ /// The decoded object.
+ public override InviteViewerNoComment DecodeFields(enc.IJsonReader reader)
+ {
+ return InviteViewerNoComment.Instance;
+ }
+ }
+
+ #endregion
+ }
+
///
/// Stop sharing this file.
///
@@ -552,6 +692,84 @@ public override RelinquishMembership DecodeFields(enc.IJsonReader reader)
#endregion
}
+ ///
+ /// Create a shared link to the file.
+ ///
+ public sealed class ShareLink : FileAction
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new ShareLinkEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new ShareLinkDecoder();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ private ShareLink()
+ {
+ }
+
+ ///
+ /// A singleton instance of ShareLink
+ ///
+ public static readonly ShareLink Instance = new ShareLink();
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class ShareLinkEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(ShareLink value, enc.IJsonWriter writer)
+ {
+ }
+ }
+
+ #endregion
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class ShareLinkDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override ShareLink Create()
+ {
+ return new ShareLink();
+ }
+
+ ///
+ /// Decode fields without ensuring start and end object.
+ ///
+ /// The json reader.
+ /// The decoded object.
+ public override ShareLink DecodeFields(enc.IJsonReader reader)
+ {
+ return ShareLink.Instance;
+ }
+ }
+
+ #endregion
+ }
+
///
/// The other object
///
diff --git a/Dropbox.Api/Sharing/FileMemberActionError.cs b/Dropbox.Api/Sharing/FileMemberActionError.cs
index 6a9ad14d63..e56bd25ea3 100644
--- a/Dropbox.Api/Sharing/FileMemberActionError.cs
+++ b/Dropbox.Api/Sharing/FileMemberActionError.cs
@@ -337,7 +337,7 @@ public override NoPermission DecodeFields(enc.IJsonReader reader)
}
///
- /// Unknown error when applying action to member.
+ /// The other object
///
public sealed class Other : FileMemberActionError
{
diff --git a/Dropbox.Api/Sharing/FileMemberActionIndividualResult.cs b/Dropbox.Api/Sharing/FileMemberActionIndividualResult.cs
index ad66a84c92..e417ce9991 100644
--- a/Dropbox.Api/Sharing/FileMemberActionIndividualResult.cs
+++ b/Dropbox.Api/Sharing/FileMemberActionIndividualResult.cs
@@ -251,7 +251,7 @@ protected override void SetField(Success value, string fieldName, enc.IJsonReade
}
///
- /// User was not able to remove this member.
+ /// User was not able to perform this action.
///
public sealed class MemberError : FileMemberActionIndividualResult
{
diff --git a/Dropbox.Api/Sharing/FileMemberActionResult.cs b/Dropbox.Api/Sharing/FileMemberActionResult.cs
index e7874d0198..e84bffa9c7 100644
--- a/Dropbox.Api/Sharing/FileMemberActionResult.cs
+++ b/Dropbox.Api/Sharing/FileMemberActionResult.cs
@@ -13,7 +13,8 @@ namespace Dropbox.Api.Sharing
///
/// Per-member result for or .
+ /// cref="Dropbox.Api.Sharing.Routes.SharingRoutes.AddFileMemberAsync" /> or .
///
public class FileMemberActionResult
{
diff --git a/Dropbox.Api/Sharing/FolderAction.cs b/Dropbox.Api/Sharing/FolderAction.cs
index 529b29f399..77d21b3509 100644
--- a/Dropbox.Api/Sharing/FolderAction.cs
+++ b/Dropbox.Api/Sharing/FolderAction.cs
@@ -122,6 +122,28 @@ public InviteViewer AsInviteViewer
}
}
+ ///
+ /// Gets a value indicating whether this instance is InviteViewerNoComment
+ ///
+ public bool IsInviteViewerNoComment
+ {
+ get
+ {
+ return this is InviteViewerNoComment;
+ }
+ }
+
+ ///
+ /// Gets this instance as a InviteViewerNoComment, or null.
+ ///
+ public InviteViewerNoComment AsInviteViewerNoComment
+ {
+ get
+ {
+ return this as InviteViewerNoComment;
+ }
+ }
+
///
/// Gets a value indicating whether this instance is RelinquishMembership
///
@@ -210,6 +232,28 @@ public LeaveACopy AsLeaveACopy
}
}
+ ///
+ /// Gets a value indicating whether this instance is ShareLink
+ ///
+ public bool IsShareLink
+ {
+ get
+ {
+ return this is ShareLink;
+ }
+ }
+
+ ///
+ /// Gets this instance as a ShareLink, or null.
+ ///
+ public ShareLink AsShareLink
+ {
+ get
+ {
+ return this as ShareLink;
+ }
+ }
+
///
/// Gets a value indicating whether this instance is Other
///
@@ -270,6 +314,12 @@ public override void EncodeFields(FolderAction value, enc.IJsonWriter writer)
InviteViewer.Encoder.EncodeFields((InviteViewer)value, writer);
return;
}
+ if (value is InviteViewerNoComment)
+ {
+ WriteProperty(".tag", "invite_viewer_no_comment", writer, enc.StringEncoder.Instance);
+ InviteViewerNoComment.Encoder.EncodeFields((InviteViewerNoComment)value, writer);
+ return;
+ }
if (value is RelinquishMembership)
{
WriteProperty(".tag", "relinquish_membership", writer, enc.StringEncoder.Instance);
@@ -294,6 +344,12 @@ public override void EncodeFields(FolderAction value, enc.IJsonWriter writer)
LeaveACopy.Encoder.EncodeFields((LeaveACopy)value, writer);
return;
}
+ if (value is ShareLink)
+ {
+ WriteProperty(".tag", "share_link", writer, enc.StringEncoder.Instance);
+ ShareLink.Encoder.EncodeFields((ShareLink)value, writer);
+ return;
+ }
if (value is Other)
{
WriteProperty(".tag", "other", writer, enc.StringEncoder.Instance);
@@ -340,6 +396,8 @@ protected override FolderAction Decode(string tag, enc.IJsonReader reader)
return InviteEditor.Decoder.DecodeFields(reader);
case "invite_viewer":
return InviteViewer.Decoder.DecodeFields(reader);
+ case "invite_viewer_no_comment":
+ return InviteViewerNoComment.Decoder.DecodeFields(reader);
case "relinquish_membership":
return RelinquishMembership.Decoder.DecodeFields(reader);
case "unmount":
@@ -348,6 +406,8 @@ protected override FolderAction Decode(string tag, enc.IJsonReader reader)
return Unshare.Decoder.DecodeFields(reader);
case "leave_a_copy":
return LeaveACopy.Decoder.DecodeFields(reader);
+ case "share_link":
+ return ShareLink.Decoder.DecodeFields(reader);
default:
return Other.Decoder.DecodeFields(reader);
}
@@ -673,6 +733,87 @@ public override InviteViewer DecodeFields(enc.IJsonReader reader)
#endregion
}
+ ///
+ /// Invite a user or group to join the folder with read permission but no comment
+ /// permissions.
+ ///
+ public sealed class InviteViewerNoComment : FolderAction
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new InviteViewerNoCommentEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new InviteViewerNoCommentDecoder();
+
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ private InviteViewerNoComment()
+ {
+ }
+
+ ///
+ /// A singleton instance of InviteViewerNoComment
+ ///
+ public static readonly InviteViewerNoComment Instance = new InviteViewerNoComment();
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class InviteViewerNoCommentEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(InviteViewerNoComment value, enc.IJsonWriter writer)
+ {
+ }
+ }
+
+ #endregion
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class InviteViewerNoCommentDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override InviteViewerNoComment Create()
+ {
+ return new InviteViewerNoComment();
+ }
+
+ ///
+ /// Decode fields without ensuring start and end object.
+ ///
+ /// The json reader.
+ /// The decoded object.
+ public override InviteViewerNoComment DecodeFields(enc.IJsonReader reader)
+ {
+ return InviteViewerNoComment.Instance;
+ }
+ }
+
+ #endregion
+ }
+
///
/// Relinquish one's own membership in the folder.
///
@@ -988,6 +1129,84 @@ public override LeaveACopy DecodeFields(enc.IJsonReader reader)
#endregion
}
+ ///
+ /// Create a shared link for folder.
+ ///
+ public sealed class ShareLink : FolderAction
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new ShareLinkEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new ShareLinkDecoder();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ private ShareLink()
+ {
+ }
+
+ ///
+ /// A singleton instance of ShareLink
+ ///
+ public static readonly ShareLink Instance = new ShareLink();
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class ShareLinkEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(ShareLink value, enc.IJsonWriter writer)
+ {
+ }
+ }
+
+ #endregion
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class ShareLinkDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override ShareLink Create()
+ {
+ return new ShareLink();
+ }
+
+ ///
+ /// Decode fields without ensuring start and end object.
+ ///
+ /// The json reader.
+ /// The decoded object.
+ public override ShareLink DecodeFields(enc.IJsonReader reader)
+ {
+ return ShareLink.Instance;
+ }
+ }
+
+ #endregion
+ }
+
///
/// The other object
///
diff --git a/Dropbox.Api/Sharing/GetSharedLinkFileError.cs b/Dropbox.Api/Sharing/GetSharedLinkFileError.cs
index 943692638f..afedda2319 100644
--- a/Dropbox.Api/Sharing/GetSharedLinkFileError.cs
+++ b/Dropbox.Api/Sharing/GetSharedLinkFileError.cs
@@ -452,7 +452,7 @@ public override SharedLinkAccessDenied DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error
+ /// The other object
///
public sealed class Other : GetSharedLinkFileError
{
diff --git a/Dropbox.Api/Sharing/GroupInfo.cs b/Dropbox.Api/Sharing/GroupInfo.cs
index 531432f881..d7e2230522 100644
--- a/Dropbox.Api/Sharing/GroupInfo.cs
+++ b/Dropbox.Api/Sharing/GroupInfo.cs
@@ -35,6 +35,7 @@ public class GroupInfo : Dropbox.Api.TeamCommon.GroupSummary
///
/// The group name
/// The group id
+ /// Who is allowed to manage the group.
/// The type of group.
/// If the current user is an owner of the group.
/// If the group is owned by the current user's team.
@@ -43,12 +44,13 @@ public class GroupInfo : Dropbox.Api.TeamCommon.GroupSummary
/// The number of members in the group.
public GroupInfo(string groupName,
string groupId,
+ Dropbox.Api.TeamCommon.GroupManagementType groupManagementType,
Dropbox.Api.TeamCommon.GroupType groupType,
bool isOwner,
bool sameTeam,
string groupExternalId = null,
uint? memberCount = null)
- : base(groupName, groupId, groupExternalId, memberCount)
+ : base(groupName, groupId, groupManagementType, groupExternalId, memberCount)
{
if (groupType == null)
{
@@ -100,6 +102,7 @@ public override void EncodeFields(GroupInfo value, enc.IJsonWriter writer)
{
WriteProperty("group_name", value.GroupName, writer, enc.StringEncoder.Instance);
WriteProperty("group_id", value.GroupId, writer, enc.StringEncoder.Instance);
+ WriteProperty("group_management_type", value.GroupManagementType, writer, Dropbox.Api.TeamCommon.GroupManagementType.Encoder);
WriteProperty("group_type", value.GroupType, writer, Dropbox.Api.TeamCommon.GroupType.Encoder);
WriteProperty("is_owner", value.IsOwner, writer, enc.BooleanEncoder.Instance);
WriteProperty("same_team", value.SameTeam, writer, enc.BooleanEncoder.Instance);
@@ -149,6 +152,9 @@ protected override void SetField(GroupInfo value, string fieldName, enc.IJsonRea
case "group_id":
value.GroupId = enc.StringDecoder.Instance.Decode(reader);
break;
+ case "group_management_type":
+ value.GroupManagementType = Dropbox.Api.TeamCommon.GroupManagementType.Decoder.Decode(reader);
+ break;
case "group_type":
value.GroupType = Dropbox.Api.TeamCommon.GroupType.Decoder.Decode(reader);
break;
diff --git a/Dropbox.Api/Sharing/InsufficientQuotaAmounts.cs b/Dropbox.Api/Sharing/InsufficientQuotaAmounts.cs
new file mode 100644
index 0000000000..4a94f090ec
--- /dev/null
+++ b/Dropbox.Api/Sharing/InsufficientQuotaAmounts.cs
@@ -0,0 +1,143 @@
+//
+// Auto-generated by StoneAPI, do not modify.
+//
+
+namespace Dropbox.Api.Sharing
+{
+ using sys = System;
+ using col = System.Collections.Generic;
+ using re = System.Text.RegularExpressions;
+
+ using enc = Dropbox.Api.Stone;
+
+ ///
+ /// The insufficient quota amounts object
+ ///
+ public class InsufficientQuotaAmounts
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new InsufficientQuotaAmountsEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new InsufficientQuotaAmountsDecoder();
+
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ /// The amount of space needed to add the item (the size of
+ /// the item).
+ /// The amount of extra space needed to add the
+ /// item.
+ /// The amount of space left in the user's Dropbox, less than
+ /// space_needed.
+ public InsufficientQuotaAmounts(ulong spaceNeeded,
+ ulong spaceShortage,
+ ulong spaceLeft)
+ {
+ this.SpaceNeeded = spaceNeeded;
+ this.SpaceShortage = spaceShortage;
+ this.SpaceLeft = spaceLeft;
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ /// This is to construct an instance of the object when
+ /// deserializing.
+ public InsufficientQuotaAmounts()
+ {
+ }
+
+ ///
+ /// The amount of space needed to add the item (the size of the item).
+ ///
+ public ulong SpaceNeeded { get; protected set; }
+
+ ///
+ /// The amount of extra space needed to add the item.
+ ///
+ public ulong SpaceShortage { get; protected set; }
+
+ ///
+ /// The amount of space left in the user's Dropbox, less than
+ /// space_needed.
+ ///
+ public ulong SpaceLeft { get; protected set; }
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class InsufficientQuotaAmountsEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(InsufficientQuotaAmounts value, enc.IJsonWriter writer)
+ {
+ WriteProperty("space_needed", value.SpaceNeeded, writer, enc.UInt64Encoder.Instance);
+ WriteProperty("space_shortage", value.SpaceShortage, writer, enc.UInt64Encoder.Instance);
+ WriteProperty("space_left", value.SpaceLeft, writer, enc.UInt64Encoder.Instance);
+ }
+ }
+
+ #endregion
+
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class InsufficientQuotaAmountsDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override InsufficientQuotaAmounts Create()
+ {
+ return new InsufficientQuotaAmounts();
+ }
+
+ ///
+ /// Set given field.
+ ///
+ /// The field value.
+ /// The field name.
+ /// The json reader.
+ protected override void SetField(InsufficientQuotaAmounts value, string fieldName, enc.IJsonReader reader)
+ {
+ switch (fieldName)
+ {
+ case "space_needed":
+ value.SpaceNeeded = enc.UInt64Decoder.Instance.Decode(reader);
+ break;
+ case "space_shortage":
+ value.SpaceShortage = enc.UInt64Decoder.Instance.Decode(reader);
+ break;
+ case "space_left":
+ value.SpaceLeft = enc.UInt64Decoder.Instance.Decode(reader);
+ break;
+ default:
+ reader.Skip();
+ break;
+ }
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/Dropbox.Api/Sharing/MemberAccessLevelResult.cs b/Dropbox.Api/Sharing/MemberAccessLevelResult.cs
index 26b5d1fbb3..d767376478 100644
--- a/Dropbox.Api/Sharing/MemberAccessLevelResult.cs
+++ b/Dropbox.Api/Sharing/MemberAccessLevelResult.cs
@@ -36,11 +36,18 @@ public class MemberAccessLevelResult
/// through a parent folder.
/// A localized string with additional information about why the
/// user has this access level to the content.
+ /// The parent folders that a member has access to. The
+ /// field is present if the user has access to the first parent folder where the member
+ /// gains access.
public MemberAccessLevelResult(AccessLevel accessLevel = null,
- string warning = null)
+ string warning = null,
+ col.IEnumerable accessDetails = null)
{
+ var accessDetailsList = enc.Util.ToList(accessDetails);
+
this.AccessLevel = accessLevel;
this.Warning = warning;
+ this.AccessDetails = accessDetailsList;
}
///
@@ -65,6 +72,12 @@ public MemberAccessLevelResult()
///
public string Warning { get; protected set; }
+ ///
+ /// The parent folders that a member has access to. The field is present if the
+ /// user has access to the first parent folder where the member gains access.
+ ///
+ public col.IList AccessDetails { get; protected set; }
+
#region Encoder class
///
@@ -87,6 +100,10 @@ public override void EncodeFields(MemberAccessLevelResult value, enc.IJsonWriter
{
WriteProperty("warning", value.Warning, writer, enc.StringEncoder.Instance);
}
+ if (value.AccessDetails.Count > 0)
+ {
+ WriteListProperty("access_details", value.AccessDetails, writer, Dropbox.Api.Sharing.ParentFolderAccessInfo.Encoder);
+ }
}
}
@@ -126,6 +143,9 @@ protected override void SetField(MemberAccessLevelResult value, string fieldName
case "warning":
value.Warning = enc.StringDecoder.Instance.Decode(reader);
break;
+ case "access_details":
+ value.AccessDetails = ReadList(reader, Dropbox.Api.Sharing.ParentFolderAccessInfo.Decoder);
+ break;
default:
reader.Skip();
break;
diff --git a/Dropbox.Api/Sharing/MemberAction.cs b/Dropbox.Api/Sharing/MemberAction.cs
index 34039aa884..03e0158576 100644
--- a/Dropbox.Api/Sharing/MemberAction.cs
+++ b/Dropbox.Api/Sharing/MemberAction.cs
@@ -122,6 +122,28 @@ public MakeViewer AsMakeViewer
}
}
+ ///
+ /// Gets a value indicating whether this instance is MakeViewerNoComment
+ ///
+ public bool IsMakeViewerNoComment
+ {
+ get
+ {
+ return this is MakeViewerNoComment;
+ }
+ }
+
+ ///
+ /// Gets this instance as a MakeViewerNoComment, or null.
+ ///
+ public MakeViewerNoComment AsMakeViewerNoComment
+ {
+ get
+ {
+ return this as MakeViewerNoComment;
+ }
+ }
+
///
/// Gets a value indicating whether this instance is Remove
///
@@ -204,6 +226,12 @@ public override void EncodeFields(MemberAction value, enc.IJsonWriter writer)
MakeViewer.Encoder.EncodeFields((MakeViewer)value, writer);
return;
}
+ if (value is MakeViewerNoComment)
+ {
+ WriteProperty(".tag", "make_viewer_no_comment", writer, enc.StringEncoder.Instance);
+ MakeViewerNoComment.Encoder.EncodeFields((MakeViewerNoComment)value, writer);
+ return;
+ }
if (value is Remove)
{
WriteProperty(".tag", "remove", writer, enc.StringEncoder.Instance);
@@ -256,6 +284,8 @@ protected override MemberAction Decode(string tag, enc.IJsonReader reader)
return MakeOwner.Decoder.DecodeFields(reader);
case "make_viewer":
return MakeViewer.Decoder.DecodeFields(reader);
+ case "make_viewer_no_comment":
+ return MakeViewerNoComment.Decoder.DecodeFields(reader);
case "remove":
return Remove.Decoder.DecodeFields(reader);
default:
@@ -578,6 +608,86 @@ public override MakeViewer DecodeFields(enc.IJsonReader reader)
#endregion
}
+ ///
+ /// Make the member a viewer of the folder without commenting permissions.
+ ///
+ public sealed class MakeViewerNoComment : MemberAction
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new MakeViewerNoCommentEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new MakeViewerNoCommentDecoder();
+
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ private MakeViewerNoComment()
+ {
+ }
+
+ ///
+ /// A singleton instance of MakeViewerNoComment
+ ///
+ public static readonly MakeViewerNoComment Instance = new MakeViewerNoComment();
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class MakeViewerNoCommentEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(MakeViewerNoComment value, enc.IJsonWriter writer)
+ {
+ }
+ }
+
+ #endregion
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class MakeViewerNoCommentDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override MakeViewerNoComment Create()
+ {
+ return new MakeViewerNoComment();
+ }
+
+ ///
+ /// Decode fields without ensuring start and end object.
+ ///
+ /// The json reader.
+ /// The decoded object.
+ public override MakeViewerNoComment DecodeFields(enc.IJsonReader reader)
+ {
+ return MakeViewerNoComment.Instance;
+ }
+ }
+
+ #endregion
+ }
+
///
/// Remove the member from the folder.
///
diff --git a/Dropbox.Api/Sharing/ModifySharedLinkSettingsError.cs b/Dropbox.Api/Sharing/ModifySharedLinkSettingsError.cs
index f93002f82f..6829e589bc 100644
--- a/Dropbox.Api/Sharing/ModifySharedLinkSettingsError.cs
+++ b/Dropbox.Api/Sharing/ModifySharedLinkSettingsError.cs
@@ -579,7 +579,7 @@ public override SharedLinkAccessDenied DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error
+ /// The other object
///
public sealed class Other : ModifySharedLinkSettingsError
{
diff --git a/Dropbox.Api/Sharing/MountFolderError.cs b/Dropbox.Api/Sharing/MountFolderError.cs
index c502f4ad4f..4ba7befca1 100644
--- a/Dropbox.Api/Sharing/MountFolderError.cs
+++ b/Dropbox.Api/Sharing/MountFolderError.cs
@@ -494,6 +494,15 @@ public sealed class InsufficientQuota : MountFolderError
///
internal static enc.StructDecoder Decoder = new InsufficientQuotaDecoder();
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ /// The value
+ public InsufficientQuota(InsufficientQuotaAmounts value)
+ {
+ this.Value = value;
+ }
///
/// Initializes a new instance of the
/// class.
@@ -503,9 +512,9 @@ private InsufficientQuota()
}
///
- /// A singleton instance of InsufficientQuota
+ /// Gets the value of this instance.
///
- public static readonly InsufficientQuota Instance = new InsufficientQuota();
+ public InsufficientQuotaAmounts Value { get; private set; }
#region Encoder class
@@ -521,6 +530,7 @@ private class InsufficientQuotaEncoder : enc.StructEncoder
/// The writer.
public override void EncodeFields(InsufficientQuota value, enc.IJsonWriter writer)
{
+ Dropbox.Api.Sharing.InsufficientQuotaAmounts.Encoder.EncodeFields(value.Value, writer);
}
}
@@ -550,7 +560,7 @@ protected override InsufficientQuota Create()
/// The decoded object.
public override InsufficientQuota DecodeFields(enc.IJsonReader reader)
{
- return InsufficientQuota.Instance;
+ return new InsufficientQuota(Dropbox.Api.Sharing.InsufficientQuotaAmounts.Decoder.DecodeFields(reader));
}
}
diff --git a/Dropbox.Api/Sharing/ParentFolderAccessInfo.cs b/Dropbox.Api/Sharing/ParentFolderAccessInfo.cs
new file mode 100644
index 0000000000..2309ab8b1e
--- /dev/null
+++ b/Dropbox.Api/Sharing/ParentFolderAccessInfo.cs
@@ -0,0 +1,161 @@
+//
+// Auto-generated by StoneAPI, do not modify.
+//
+
+namespace Dropbox.Api.Sharing
+{
+ using sys = System;
+ using col = System.Collections.Generic;
+ using re = System.Text.RegularExpressions;
+
+ using enc = Dropbox.Api.Stone;
+
+ ///
+ /// Contains information about a parent folder that a member has access to.
+ ///
+ public class ParentFolderAccessInfo
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new ParentFolderAccessInfoEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new ParentFolderAccessInfoDecoder();
+
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ /// Display name for the folder.
+ /// The identifier of the parent shared folder.
+ /// The user's permissions for the parent shared
+ /// folder.
+ public ParentFolderAccessInfo(string folderName,
+ string sharedFolderId,
+ col.IEnumerable permissions)
+ {
+ if (folderName == null)
+ {
+ throw new sys.ArgumentNullException("folderName");
+ }
+
+ if (sharedFolderId == null)
+ {
+ throw new sys.ArgumentNullException("sharedFolderId");
+ }
+ if (!re.Regex.IsMatch(sharedFolderId, @"\A(?:[-_0-9a-zA-Z:]+)\z"))
+ {
+ throw new sys.ArgumentOutOfRangeException("sharedFolderId", @"Value should match pattern '\A(?:[-_0-9a-zA-Z:]+)\z'");
+ }
+
+ var permissionsList = enc.Util.ToList(permissions);
+
+ if (permissions == null)
+ {
+ throw new sys.ArgumentNullException("permissions");
+ }
+
+ this.FolderName = folderName;
+ this.SharedFolderId = sharedFolderId;
+ this.Permissions = permissionsList;
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ /// This is to construct an instance of the object when
+ /// deserializing.
+ public ParentFolderAccessInfo()
+ {
+ }
+
+ ///
+ /// Display name for the folder.
+ ///
+ public string FolderName { get; protected set; }
+
+ ///
+ /// The identifier of the parent shared folder.
+ ///
+ public string SharedFolderId { get; protected set; }
+
+ ///
+ /// The user's permissions for the parent shared folder.
+ ///
+ public col.IList Permissions { get; protected set; }
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class ParentFolderAccessInfoEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(ParentFolderAccessInfo value, enc.IJsonWriter writer)
+ {
+ WriteProperty("folder_name", value.FolderName, writer, enc.StringEncoder.Instance);
+ WriteProperty("shared_folder_id", value.SharedFolderId, writer, enc.StringEncoder.Instance);
+ WriteListProperty("permissions", value.Permissions, writer, Dropbox.Api.Sharing.MemberPermission.Encoder);
+ }
+ }
+
+ #endregion
+
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class ParentFolderAccessInfoDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override ParentFolderAccessInfo Create()
+ {
+ return new ParentFolderAccessInfo();
+ }
+
+ ///
+ /// Set given field.
+ ///
+ /// The field value.
+ /// The field name.
+ /// The json reader.
+ protected override void SetField(ParentFolderAccessInfo value, string fieldName, enc.IJsonReader reader)
+ {
+ switch (fieldName)
+ {
+ case "folder_name":
+ value.FolderName = enc.StringDecoder.Instance.Decode(reader);
+ break;
+ case "shared_folder_id":
+ value.SharedFolderId = enc.StringDecoder.Instance.Decode(reader);
+ break;
+ case "permissions":
+ value.Permissions = ReadList(reader, Dropbox.Api.Sharing.MemberPermission.Decoder);
+ break;
+ default:
+ reader.Skip();
+ break;
+ }
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/Dropbox.Api/Sharing/PermissionDeniedReason.cs b/Dropbox.Api/Sharing/PermissionDeniedReason.cs
index f3d0f62ea5..416a58927e 100644
--- a/Dropbox.Api/Sharing/PermissionDeniedReason.cs
+++ b/Dropbox.Api/Sharing/PermissionDeniedReason.cs
@@ -169,6 +169,29 @@ public TargetNotActive AsTargetNotActive
}
}
+ ///
+ /// Gets a value indicating whether this instance is
+ /// FolderIsLimitedTeamFolder
+ ///
+ public bool IsFolderIsLimitedTeamFolder
+ {
+ get
+ {
+ return this is FolderIsLimitedTeamFolder;
+ }
+ }
+
+ ///
+ /// Gets this instance as a FolderIsLimitedTeamFolder, or null.
+ ///
+ public FolderIsLimitedTeamFolder AsFolderIsLimitedTeamFolder
+ {
+ get
+ {
+ return this as FolderIsLimitedTeamFolder;
+ }
+ }
+
///
/// Gets a value indicating whether this instance is Other
///
@@ -241,6 +264,12 @@ public override void EncodeFields(PermissionDeniedReason value, enc.IJsonWriter
TargetNotActive.Encoder.EncodeFields((TargetNotActive)value, writer);
return;
}
+ if (value is FolderIsLimitedTeamFolder)
+ {
+ WriteProperty(".tag", "folder_is_limited_team_folder", writer, enc.StringEncoder.Instance);
+ FolderIsLimitedTeamFolder.Encoder.EncodeFields((FolderIsLimitedTeamFolder)value, writer);
+ return;
+ }
if (value is Other)
{
WriteProperty(".tag", "other", writer, enc.StringEncoder.Instance);
@@ -292,6 +321,8 @@ protected override PermissionDeniedReason Decode(string tag, enc.IJsonReader rea
return TargetIsSelf.Decoder.DecodeFields(reader);
case "target_not_active":
return TargetNotActive.Decoder.DecodeFields(reader);
+ case "folder_is_limited_team_folder":
+ return FolderIsLimitedTeamFolder.Decoder.DecodeFields(reader);
default:
return Other.Decoder.DecodeFields(reader);
}
@@ -778,6 +809,86 @@ public override TargetNotActive DecodeFields(enc.IJsonReader reader)
#endregion
}
+ ///
+ /// Folder is team folder for a limited team.
+ ///
+ public sealed class FolderIsLimitedTeamFolder : PermissionDeniedReason
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new FolderIsLimitedTeamFolderEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new FolderIsLimitedTeamFolderDecoder();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ private FolderIsLimitedTeamFolder()
+ {
+ }
+
+ ///
+ /// A singleton instance of FolderIsLimitedTeamFolder
+ ///
+ public static readonly FolderIsLimitedTeamFolder Instance = new FolderIsLimitedTeamFolder();
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class FolderIsLimitedTeamFolderEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(FolderIsLimitedTeamFolder value, enc.IJsonWriter writer)
+ {
+ }
+ }
+
+ #endregion
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class FolderIsLimitedTeamFolderDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override FolderIsLimitedTeamFolder Create()
+ {
+ return new FolderIsLimitedTeamFolder();
+ }
+
+ ///
+ /// Decode fields without ensuring start and end object.
+ ///
+ /// The json reader.
+ /// The decoded object.
+ public override FolderIsLimitedTeamFolder DecodeFields(enc.IJsonReader reader)
+ {
+ return FolderIsLimitedTeamFolder.Instance;
+ }
+ }
+
+ #endregion
+ }
+
///
/// The other object
///
diff --git a/Dropbox.Api/Sharing/RemoveFileMemberError.cs b/Dropbox.Api/Sharing/RemoveFileMemberError.cs
index 6b761d20c9..a5a17762ae 100644
--- a/Dropbox.Api/Sharing/RemoveFileMemberError.cs
+++ b/Dropbox.Api/Sharing/RemoveFileMemberError.cs
@@ -405,7 +405,8 @@ protected override void SetField(AccessError value, string fieldName, enc.IJsonR
///
/// This member does not have explicit access to the file and therefore cannot be
- /// removed.
+ /// removed. The return value is the access that a user might have to the file from a
+ /// parent folder.
///
public sealed class NoExplicitAccess : RemoveFileMemberError
{
@@ -421,6 +422,15 @@ public sealed class NoExplicitAccess : RemoveFileMemberError
///
internal static enc.StructDecoder Decoder = new NoExplicitAccessDecoder();
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ /// The value
+ public NoExplicitAccess(MemberAccessLevelResult value)
+ {
+ this.Value = value;
+ }
///
/// Initializes a new instance of the
/// class.
@@ -430,9 +440,9 @@ private NoExplicitAccess()
}
///
- /// A singleton instance of NoExplicitAccess
+ /// Gets the value of this instance.
///
- public static readonly NoExplicitAccess Instance = new NoExplicitAccess();
+ public MemberAccessLevelResult Value { get; private set; }
#region Encoder class
@@ -448,6 +458,7 @@ private class NoExplicitAccessEncoder : enc.StructEncoder
/// The writer.
public override void EncodeFields(NoExplicitAccess value, enc.IJsonWriter writer)
{
+ Dropbox.Api.Sharing.MemberAccessLevelResult.Encoder.EncodeFields(value.Value, writer);
}
}
@@ -476,7 +487,7 @@ protected override NoExplicitAccess Create()
/// The decoded object.
public override NoExplicitAccess DecodeFields(enc.IJsonReader reader)
{
- return NoExplicitAccess.Instance;
+ return new NoExplicitAccess(Dropbox.Api.Sharing.MemberAccessLevelResult.Decoder.DecodeFields(reader));
}
}
diff --git a/Dropbox.Api/Sharing/ResolvedVisibility.cs b/Dropbox.Api/Sharing/ResolvedVisibility.cs
index 188d576115..861f51d317 100644
--- a/Dropbox.Api/Sharing/ResolvedVisibility.cs
+++ b/Dropbox.Api/Sharing/ResolvedVisibility.cs
@@ -431,7 +431,7 @@ public override SharedFolderOnly DecodeFields(enc.IJsonReader reader)
}
///
- /// An unknown restriction is in place.
+ /// The other object
///
public sealed class Other : ResolvedVisibility
{
diff --git a/Dropbox.Api/Sharing/RevokeSharedLinkError.cs b/Dropbox.Api/Sharing/RevokeSharedLinkError.cs
index 8783b881d8..4339835c69 100644
--- a/Dropbox.Api/Sharing/RevokeSharedLinkError.cs
+++ b/Dropbox.Api/Sharing/RevokeSharedLinkError.cs
@@ -452,7 +452,7 @@ public override SharedLinkAccessDenied DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error
+ /// The other object
///
public sealed class Other : RevokeSharedLinkError
{
diff --git a/Dropbox.Api/Sharing/SharedFolderMemberError.cs b/Dropbox.Api/Sharing/SharedFolderMemberError.cs
index bb7a7d0696..ca23535d4f 100644
--- a/Dropbox.Api/Sharing/SharedFolderMemberError.cs
+++ b/Dropbox.Api/Sharing/SharedFolderMemberError.cs
@@ -79,6 +79,28 @@ public NotAMember AsNotAMember
}
}
+ ///
+ /// Gets a value indicating whether this instance is NoExplicitAccess
+ ///
+ public bool IsNoExplicitAccess
+ {
+ get
+ {
+ return this is NoExplicitAccess;
+ }
+ }
+
+ ///
+ /// Gets this instance as a NoExplicitAccess, or null.
+ ///
+ public NoExplicitAccess AsNoExplicitAccess
+ {
+ get
+ {
+ return this as NoExplicitAccess;
+ }
+ }
+
///
/// Gets a value indicating whether this instance is Other
///
@@ -127,6 +149,12 @@ public override void EncodeFields(SharedFolderMemberError value, enc.IJsonWriter
NotAMember.Encoder.EncodeFields((NotAMember)value, writer);
return;
}
+ if (value is NoExplicitAccess)
+ {
+ WriteProperty(".tag", "no_explicit_access", writer, enc.StringEncoder.Instance);
+ NoExplicitAccess.Encoder.EncodeFields((NoExplicitAccess)value, writer);
+ return;
+ }
if (value is Other)
{
WriteProperty(".tag", "other", writer, enc.StringEncoder.Instance);
@@ -170,6 +198,8 @@ protected override SharedFolderMemberError Decode(string tag, enc.IJsonReader re
return InvalidDropboxId.Decoder.DecodeFields(reader);
case "not_a_member":
return NotAMember.Decoder.DecodeFields(reader);
+ case "no_explicit_access":
+ return NoExplicitAccess.Decoder.DecodeFields(reader);
default:
return Other.Decoder.DecodeFields(reader);
}
@@ -335,6 +365,95 @@ public override NotAMember DecodeFields(enc.IJsonReader reader)
#endregion
}
+ ///
+ /// The target member only has inherited access to the shared folder.
+ ///
+ public sealed class NoExplicitAccess : SharedFolderMemberError
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new NoExplicitAccessEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new NoExplicitAccessDecoder();
+
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ /// The value
+ public NoExplicitAccess(MemberAccessLevelResult value)
+ {
+ this.Value = value;
+ }
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ private NoExplicitAccess()
+ {
+ }
+
+ ///
+ /// Gets the value of this instance.
+ ///
+ public MemberAccessLevelResult Value { get; private set; }
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class NoExplicitAccessEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(NoExplicitAccess value, enc.IJsonWriter writer)
+ {
+ Dropbox.Api.Sharing.MemberAccessLevelResult.Encoder.EncodeFields(value.Value, writer);
+ }
+ }
+
+ #endregion
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class NoExplicitAccessDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override NoExplicitAccess Create()
+ {
+ return new NoExplicitAccess();
+ }
+
+ ///
+ /// Decode fields without ensuring start and end object.
+ ///
+ /// The json reader.
+ /// The decoded object.
+ public override NoExplicitAccess DecodeFields(enc.IJsonReader reader)
+ {
+ return new NoExplicitAccess(Dropbox.Api.Sharing.MemberAccessLevelResult.Decoder.DecodeFields(reader));
+ }
+ }
+
+ #endregion
+ }
+
///
/// The other object
///
diff --git a/Dropbox.Api/Sharing/SharedFolderMetadata.cs b/Dropbox.Api/Sharing/SharedFolderMetadata.cs
index 5abcca62ce..226521ccf3 100644
--- a/Dropbox.Api/Sharing/SharedFolderMetadata.cs
+++ b/Dropbox.Api/Sharing/SharedFolderMetadata.cs
@@ -41,6 +41,8 @@ public class SharedFolderMetadata : SharedFolderMetadataBase
/// The ID of the shared folder.
/// Timestamp indicating when the current user was invited to
/// this shared folder.
+ /// URL for displaying a web preview of the shared
+ /// folder.
/// The team that owns the folder. This field is not present if
/// the folder is not owned by a team.
/// The ID of the parent shared folder. This field
@@ -56,6 +58,7 @@ public SharedFolderMetadata(AccessLevel accessType,
string name,
string sharedFolderId,
sys.DateTime timeInvited,
+ string previewUrl,
Dropbox.Api.Users.Team ownerTeam = null,
string parentSharedFolderId = null,
string pathLower = null,
@@ -76,11 +79,17 @@ public SharedFolderMetadata(AccessLevel accessType,
throw new sys.ArgumentOutOfRangeException("sharedFolderId", @"Value should match pattern '\A(?:[-_0-9a-zA-Z:]+)\z'");
}
+ if (previewUrl == null)
+ {
+ throw new sys.ArgumentNullException("previewUrl");
+ }
+
var permissionsList = enc.Util.ToList(permissions);
this.Name = name;
this.SharedFolderId = sharedFolderId;
this.TimeInvited = timeInvited;
+ this.PreviewUrl = previewUrl;
this.PathLower = pathLower;
this.Permissions = permissionsList;
}
@@ -111,6 +120,11 @@ public SharedFolderMetadata()
///
public sys.DateTime TimeInvited { get; protected set; }
+ ///
+ /// URL for displaying a web preview of the shared folder.
+ ///
+ public string PreviewUrl { get; protected set; }
+
///
/// The lower-cased full path of this shared folder. Absent for unmounted
/// folders.
@@ -143,6 +157,7 @@ public override void EncodeFields(SharedFolderMetadata value, enc.IJsonWriter wr
WriteProperty("name", value.Name, writer, enc.StringEncoder.Instance);
WriteProperty("shared_folder_id", value.SharedFolderId, writer, enc.StringEncoder.Instance);
WriteProperty("time_invited", value.TimeInvited, writer, enc.DateTimeEncoder.Instance);
+ WriteProperty("preview_url", value.PreviewUrl, writer, enc.StringEncoder.Instance);
if (value.OwnerTeam != null)
{
WriteProperty("owner_team", value.OwnerTeam, writer, Dropbox.Api.Users.Team.Encoder);
@@ -209,6 +224,9 @@ protected override void SetField(SharedFolderMetadata value, string fieldName, e
case "time_invited":
value.TimeInvited = enc.DateTimeDecoder.Instance.Decode(reader);
break;
+ case "preview_url":
+ value.PreviewUrl = enc.StringDecoder.Instance.Decode(reader);
+ break;
case "owner_team":
value.OwnerTeam = Dropbox.Api.Users.Team.Decoder.Decode(reader);
break;
diff --git a/Dropbox.Api/Sharing/SharedLinkAccessFailureReason.cs b/Dropbox.Api/Sharing/SharedLinkAccessFailureReason.cs
index ddee57666e..82a8ab73fb 100644
--- a/Dropbox.Api/Sharing/SharedLinkAccessFailureReason.cs
+++ b/Dropbox.Api/Sharing/SharedLinkAccessFailureReason.cs
@@ -663,7 +663,7 @@ public override OwnerOnly DecodeFields(enc.IJsonReader reader)
}
///
- /// An unknown accessibility failure.
+ /// The other object
///
public sealed class Other : SharedLinkAccessFailureReason
{
diff --git a/Dropbox.Api/Sharing/SharedLinkError.cs b/Dropbox.Api/Sharing/SharedLinkError.cs
index 249a3ff12c..eb0f721583 100644
--- a/Dropbox.Api/Sharing/SharedLinkError.cs
+++ b/Dropbox.Api/Sharing/SharedLinkError.cs
@@ -339,7 +339,7 @@ public override SharedLinkAccessDenied DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error
+ /// The other object
///
public sealed class Other : SharedLinkError
{
diff --git a/Dropbox.Api/Sharing/SharedLinkPolicy.cs b/Dropbox.Api/Sharing/SharedLinkPolicy.cs
index 5eb01c406f..db3fa2f066 100644
--- a/Dropbox.Api/Sharing/SharedLinkPolicy.cs
+++ b/Dropbox.Api/Sharing/SharedLinkPolicy.cs
@@ -334,7 +334,7 @@ public override Members DecodeFields(enc.IJsonReader reader)
}
///
- /// An unknown shared link policy.
+ /// The other object
///
public sealed class Other : SharedLinkPolicy
{
diff --git a/Dropbox.Api/Sharing/SharingRoutes.cs b/Dropbox.Api/Sharing/SharingRoutes.cs
index 8dea75dc96..90ef884eb1 100644
--- a/Dropbox.Api/Sharing/SharingRoutes.cs
+++ b/Dropbox.Api/Sharing/SharingRoutes.cs
@@ -272,6 +272,103 @@ public void EndAddFolderMember(sys.IAsyncResult asyncResult)
}
}
+ ///
+ /// Changes a member's access on a shared file.
+ ///
+ /// The request parameters
+ /// The task that represents the asynchronous send operation. The TResult
+ /// parameter contains the response from the server.
+ /// Thrown if there is an error
+ /// processing the request; This will contain a .
+ public t.Task ChangeFileMemberAccessAsync(ChangeFileMemberAccessArgs changeFileMemberAccessArgs)
+ {
+ return this.Transport.SendRpcRequestAsync(changeFileMemberAccessArgs, "api", "/sharing/change_file_member_access", Dropbox.Api.Sharing.ChangeFileMemberAccessArgs.Encoder, Dropbox.Api.Sharing.FileMemberActionResult.Decoder, Dropbox.Api.Sharing.FileMemberActionError.Decoder);
+ }
+
+ ///
+ /// Begins an asynchronous send to the change file member access route.
+ ///
+ /// The request parameters.
+ /// The method to be called when the asynchronous send is
+ /// completed.
+ /// A user provided object that distinguished this send from other
+ /// send requests.
+ /// An object that represents the asynchronous send request.
+ public sys.IAsyncResult BeginChangeFileMemberAccess(ChangeFileMemberAccessArgs changeFileMemberAccessArgs, sys.AsyncCallback callback, object state = null)
+ {
+ var task = this.ChangeFileMemberAccessAsync(changeFileMemberAccessArgs);
+
+ return enc.Util.ToApm(task, callback, state);
+ }
+
+ ///
+ /// Changes a member's access on a shared file.
+ ///
+ /// File for which we are changing a member's access.
+ /// The member whose access we are changing.
+ /// The new access level for the member.
+ /// The task that represents the asynchronous send operation. The TResult
+ /// parameter contains the response from the server.
+ /// Thrown if there is an error
+ /// processing the request; This will contain a .
+ public t.Task ChangeFileMemberAccessAsync(string file,
+ MemberSelector member,
+ AccessLevel accessLevel)
+ {
+ var changeFileMemberAccessArgs = new ChangeFileMemberAccessArgs(file,
+ member,
+ accessLevel);
+
+ return this.ChangeFileMemberAccessAsync(changeFileMemberAccessArgs);
+ }
+
+ ///
+ /// Begins an asynchronous send to the change file member access route.
+ ///
+ /// File for which we are changing a member's access.
+ /// The member whose access we are changing.
+ /// The new access level for the member.
+ /// The method to be called when the asynchronous send is
+ /// completed.
+ /// A user provided object that distinguished this send
+ /// from other send requests.
+ /// An object that represents the asynchronous send request.
+ public sys.IAsyncResult BeginChangeFileMemberAccess(string file,
+ MemberSelector member,
+ AccessLevel accessLevel,
+ sys.AsyncCallback callback,
+ object callbackState = null)
+ {
+ var changeFileMemberAccessArgs = new ChangeFileMemberAccessArgs(file,
+ member,
+ accessLevel);
+
+ return this.BeginChangeFileMemberAccess(changeFileMemberAccessArgs, callback, callbackState);
+ }
+
+ ///
+ /// Waits for the pending asynchronous send to the change file member access
+ /// route to complete
+ ///
+ /// The reference to the pending asynchronous send
+ /// request
+ /// The response to the send request
+ /// Thrown if there is an error
+ /// processing the request; This will contain a .
+ public FileMemberActionResult EndChangeFileMemberAccess(sys.IAsyncResult asyncResult)
+ {
+ var task = asyncResult as t.Task;
+ if (task == null)
+ {
+ throw new sys.InvalidOperationException();
+ }
+
+ return task.Result;
+ }
+
///
/// Returns the status of an asynchronous job.
/// Apps must have full Dropbox access to use this endpoint.
diff --git a/Dropbox.Api/Sharing/UpdateFolderPolicyError.cs b/Dropbox.Api/Sharing/UpdateFolderPolicyError.cs
index 18fdfe7879..ee7d5688ae 100644
--- a/Dropbox.Api/Sharing/UpdateFolderPolicyError.cs
+++ b/Dropbox.Api/Sharing/UpdateFolderPolicyError.cs
@@ -126,6 +126,28 @@ public DisallowedSharedLinkPolicy AsDisallowedSharedLinkPolicy
}
}
+ ///
+ /// Gets a value indicating whether this instance is NoPermission
+ ///
+ public bool IsNoPermission
+ {
+ get
+ {
+ return this is NoPermission;
+ }
+ }
+
+ ///
+ /// Gets this instance as a NoPermission, or null.
+ ///
+ public NoPermission AsNoPermission
+ {
+ get
+ {
+ return this as NoPermission;
+ }
+ }
+
///
/// Gets a value indicating whether this instance is Other
///
@@ -186,6 +208,12 @@ public override void EncodeFields(UpdateFolderPolicyError value, enc.IJsonWriter
DisallowedSharedLinkPolicy.Encoder.EncodeFields((DisallowedSharedLinkPolicy)value, writer);
return;
}
+ if (value is NoPermission)
+ {
+ WriteProperty(".tag", "no_permission", writer, enc.StringEncoder.Instance);
+ NoPermission.Encoder.EncodeFields((NoPermission)value, writer);
+ return;
+ }
if (value is Other)
{
WriteProperty(".tag", "other", writer, enc.StringEncoder.Instance);
@@ -233,6 +261,8 @@ protected override UpdateFolderPolicyError Decode(string tag, enc.IJsonReader re
return TeamPolicyDisallowsMemberPolicy.Decoder.DecodeFields(reader);
case "disallowed_shared_link_policy":
return DisallowedSharedLinkPolicy.Decoder.DecodeFields(reader);
+ case "no_permission":
+ return NoPermission.Decoder.DecodeFields(reader);
default:
return Other.Decoder.DecodeFields(reader);
}
@@ -580,6 +610,85 @@ public override DisallowedSharedLinkPolicy DecodeFields(enc.IJsonReader reader)
#endregion
}
+ ///
+ /// The current user does not have permission to perform this action.
+ ///
+ public sealed class NoPermission : UpdateFolderPolicyError
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new NoPermissionEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new NoPermissionDecoder();
+
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ private NoPermission()
+ {
+ }
+
+ ///
+ /// A singleton instance of NoPermission
+ ///
+ public static readonly NoPermission Instance = new NoPermission();
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class NoPermissionEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(NoPermission value, enc.IJsonWriter writer)
+ {
+ }
+ }
+
+ #endregion
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class NoPermissionDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override NoPermission Create()
+ {
+ return new NoPermission();
+ }
+
+ ///
+ /// Decode fields without ensuring start and end object.
+ ///
+ /// The json reader.
+ /// The decoded object.
+ public override NoPermission DecodeFields(enc.IJsonReader reader)
+ {
+ return NoPermission.Instance;
+ }
+ }
+
+ #endregion
+ }
+
///
/// The other object
///
diff --git a/Dropbox.Api/Sharing/Visibility.cs b/Dropbox.Api/Sharing/Visibility.cs
index f6f0dfa774..209bd7b94e 100644
--- a/Dropbox.Api/Sharing/Visibility.cs
+++ b/Dropbox.Api/Sharing/Visibility.cs
@@ -664,7 +664,7 @@ public override SharedFolderOnly DecodeFields(enc.IJsonReader reader)
}
///
- /// An unknown restriction is in place.
+ /// The other object
///
public sealed class Other : Visibility
{
diff --git a/Dropbox.Api/Stone/JsonWriter.cs b/Dropbox.Api/Stone/JsonWriter.cs
index 330c7639be..34c76e2893 100644
--- a/Dropbox.Api/Stone/JsonWriter.cs
+++ b/Dropbox.Api/Stone/JsonWriter.cs
@@ -55,7 +55,7 @@ public static string Write(T encodable, IEncoder encoder, bool escapeNonAs
var json = builder.ToString();
- return !string.IsNullOrEmpty(json) ? json : "null";
+ return !string.IsNullOrEmpty(json) ? json .Replace("\x7f", "\\u007f"): "null";
}
///
diff --git a/Dropbox.Api/Team/AlphaGroupCreateArg.cs b/Dropbox.Api/Team/AlphaGroupCreateArg.cs
deleted file mode 100644
index 231553c920..0000000000
--- a/Dropbox.Api/Team/AlphaGroupCreateArg.cs
+++ /dev/null
@@ -1,139 +0,0 @@
-//
-// Auto-generated by StoneAPI, do not modify.
-//
-
-namespace Dropbox.Api.Team
-{
- using sys = System;
- using col = System.Collections.Generic;
- using re = System.Text.RegularExpressions;
-
- using enc = Dropbox.Api.Stone;
-
- ///
- /// The alpha group create arg object
- ///
- ///
- public class AlphaGroupCreateArg : GroupCreateArg
- {
- #pragma warning disable 108
-
- ///
- /// The encoder instance.
- ///
- internal static enc.StructEncoder Encoder = new AlphaGroupCreateArgEncoder();
-
- ///
- /// The decoder instance.
- ///
- internal static enc.StructDecoder Decoder = new AlphaGroupCreateArgDecoder();
-
- ///
- /// Initializes a new instance of the
- /// class.
- ///
- /// Group name.
- /// The creator of a team can associate an arbitrary
- /// external ID to the group.
- /// Whether the team can be managed by selected
- /// users, or only by team admins
- public AlphaGroupCreateArg(string groupName,
- string groupExternalId = null,
- Dropbox.Api.TeamCommon.GroupManagementType groupManagementType = null)
- : base(groupName, groupExternalId)
- {
- if (groupManagementType == null)
- {
- groupManagementType = Dropbox.Api.TeamCommon.GroupManagementType.CompanyManaged.Instance;
- }
- this.GroupManagementType = groupManagementType;
- }
-
- ///
- /// Initializes a new instance of the
- /// class.
- ///
- /// This is to construct an instance of the object when
- /// deserializing.
- public AlphaGroupCreateArg()
- {
- this.GroupManagementType = Dropbox.Api.TeamCommon.GroupManagementType.CompanyManaged.Instance;
- }
-
- ///
- /// Whether the team can be managed by selected users, or only by team
- /// admins
- ///
- public Dropbox.Api.TeamCommon.GroupManagementType GroupManagementType { get; protected set; }
-
- #region Encoder class
-
- ///
- /// Encoder for .
- ///
- private class AlphaGroupCreateArgEncoder : enc.StructEncoder
- {
- ///
- /// Encode fields of given value.
- ///
- /// The value.
- /// The writer.
- public override void EncodeFields(AlphaGroupCreateArg value, enc.IJsonWriter writer)
- {
- WriteProperty("group_name", value.GroupName, writer, enc.StringEncoder.Instance);
- if (value.GroupExternalId != null)
- {
- WriteProperty("group_external_id", value.GroupExternalId, writer, enc.StringEncoder.Instance);
- }
- WriteProperty("group_management_type", value.GroupManagementType, writer, Dropbox.Api.TeamCommon.GroupManagementType.Encoder);
- }
- }
-
- #endregion
-
-
- #region Decoder class
-
- ///
- /// Decoder for .
- ///
- private class AlphaGroupCreateArgDecoder : enc.StructDecoder
- {
- ///
- /// Create a new instance of type .
- ///
- /// The struct instance.
- protected override AlphaGroupCreateArg Create()
- {
- return new AlphaGroupCreateArg();
- }
-
- ///
- /// Set given field.
- ///
- /// The field value.
- /// The field name.
- /// The json reader.
- protected override void SetField(AlphaGroupCreateArg value, string fieldName, enc.IJsonReader reader)
- {
- switch (fieldName)
- {
- case "group_name":
- value.GroupName = enc.StringDecoder.Instance.Decode(reader);
- break;
- case "group_external_id":
- value.GroupExternalId = enc.StringDecoder.Instance.Decode(reader);
- break;
- case "group_management_type":
- value.GroupManagementType = Dropbox.Api.TeamCommon.GroupManagementType.Decoder.Decode(reader);
- break;
- default:
- reader.Skip();
- break;
- }
- }
- }
-
- #endregion
- }
-}
diff --git a/Dropbox.Api/Team/AlphaGroupFullInfo.cs b/Dropbox.Api/Team/AlphaGroupFullInfo.cs
deleted file mode 100644
index e3044a5ea7..0000000000
--- a/Dropbox.Api/Team/AlphaGroupFullInfo.cs
+++ /dev/null
@@ -1,172 +0,0 @@
-//
-// Auto-generated by StoneAPI, do not modify.
-//
-
-namespace Dropbox.Api.Team
-{
- using sys = System;
- using col = System.Collections.Generic;
- using re = System.Text.RegularExpressions;
-
- using enc = Dropbox.Api.Stone;
-
- ///
- /// Full description of a group.
- ///
- ///
- public class AlphaGroupFullInfo : Dropbox.Api.TeamCommon.AlphaGroupSummary
- {
- #pragma warning disable 108
-
- ///
- /// The encoder instance.
- ///
- internal static enc.StructEncoder Encoder = new AlphaGroupFullInfoEncoder();
-
- ///
- /// The decoder instance.
- ///
- internal static enc.StructDecoder Decoder = new AlphaGroupFullInfoDecoder();
-
- ///
- /// Initializes a new instance of the
- /// class.
- ///
- /// The group name
- /// The group id
- /// Who is allowed to manage the group.
- /// The group creation time as a UTC timestamp in milliseconds
- /// since the Unix epoch.
- /// External ID of group. This is an arbitrary ID that an
- /// admin can attach to a group.
- /// The number of members in the group.
- /// List of group members.
- public AlphaGroupFullInfo(string groupName,
- string groupId,
- Dropbox.Api.TeamCommon.GroupManagementType groupManagementType,
- ulong created,
- string groupExternalId = null,
- uint? memberCount = null,
- col.IEnumerable members = null)
- : base(groupName, groupId, groupManagementType, groupExternalId, memberCount)
- {
- var membersList = enc.Util.ToList(members);
-
- this.Created = created;
- this.Members = membersList;
- }
-
- ///
- /// Initializes a new instance of the
- /// class.
- ///
- /// This is to construct an instance of the object when
- /// deserializing.
- public AlphaGroupFullInfo()
- {
- }
-
- ///
- /// The group creation time as a UTC timestamp in milliseconds since the Unix
- /// epoch.
- ///
- public ulong Created { get; protected set; }
-
- ///
- /// List of group members.
- ///
- public col.IList Members { get; protected set; }
-
- #region Encoder class
-
- ///
- /// Encoder for .
- ///
- private class AlphaGroupFullInfoEncoder : enc.StructEncoder
- {
- ///
- /// Encode fields of given value.
- ///
- /// The value.
- /// The writer.
- public override void EncodeFields(AlphaGroupFullInfo value, enc.IJsonWriter writer)
- {
- WriteProperty("group_name", value.GroupName, writer, enc.StringEncoder.Instance);
- WriteProperty("group_id", value.GroupId, writer, enc.StringEncoder.Instance);
- WriteProperty("group_management_type", value.GroupManagementType, writer, Dropbox.Api.TeamCommon.GroupManagementType.Encoder);
- WriteProperty("created", value.Created, writer, enc.UInt64Encoder.Instance);
- if (value.GroupExternalId != null)
- {
- WriteProperty("group_external_id", value.GroupExternalId, writer, enc.StringEncoder.Instance);
- }
- if (value.MemberCount != null)
- {
- WriteProperty("member_count", value.MemberCount.Value, writer, enc.UInt32Encoder.Instance);
- }
- if (value.Members.Count > 0)
- {
- WriteListProperty("members", value.Members, writer, Dropbox.Api.Team.GroupMemberInfo.Encoder);
- }
- }
- }
-
- #endregion
-
-
- #region Decoder class
-
- ///
- /// Decoder for .
- ///
- private class AlphaGroupFullInfoDecoder : enc.StructDecoder
- {
- ///
- /// Create a new instance of type .
- ///
- /// The struct instance.
- protected override AlphaGroupFullInfo Create()
- {
- return new AlphaGroupFullInfo();
- }
-
- ///
- /// Set given field.
- ///
- /// The field value.
- /// The field name.
- /// The json reader.
- protected override void SetField(AlphaGroupFullInfo value, string fieldName, enc.IJsonReader reader)
- {
- switch (fieldName)
- {
- case "group_name":
- value.GroupName = enc.StringDecoder.Instance.Decode(reader);
- break;
- case "group_id":
- value.GroupId = enc.StringDecoder.Instance.Decode(reader);
- break;
- case "group_management_type":
- value.GroupManagementType = Dropbox.Api.TeamCommon.GroupManagementType.Decoder.Decode(reader);
- break;
- case "created":
- value.Created = enc.UInt64Decoder.Instance.Decode(reader);
- break;
- case "group_external_id":
- value.GroupExternalId = enc.StringDecoder.Instance.Decode(reader);
- break;
- case "member_count":
- value.MemberCount = enc.UInt32Decoder.Instance.Decode(reader);
- break;
- case "members":
- value.Members = ReadList(reader, Dropbox.Api.Team.GroupMemberInfo.Decoder);
- break;
- default:
- reader.Skip();
- break;
- }
- }
- }
-
- #endregion
- }
-}
diff --git a/Dropbox.Api/Team/AlphaGroupUpdateArgs.cs b/Dropbox.Api/Team/AlphaGroupUpdateArgs.cs
deleted file mode 100644
index 6a74fd3761..0000000000
--- a/Dropbox.Api/Team/AlphaGroupUpdateArgs.cs
+++ /dev/null
@@ -1,155 +0,0 @@
-//
-// Auto-generated by StoneAPI, do not modify.
-//
-
-namespace Dropbox.Api.Team
-{
- using sys = System;
- using col = System.Collections.Generic;
- using re = System.Text.RegularExpressions;
-
- using enc = Dropbox.Api.Stone;
-
- ///
- /// The alpha group update args object
- ///
- ///
- public class AlphaGroupUpdateArgs : GroupUpdateArgs
- {
- #pragma warning disable 108
-
- ///
- /// The encoder instance.
- ///
- internal static enc.StructEncoder Encoder = new AlphaGroupUpdateArgsEncoder();
-
- ///
- /// The decoder instance.
- ///
- internal static enc.StructDecoder Decoder = new AlphaGroupUpdateArgsDecoder();
-
- ///
- /// Initializes a new instance of the
- /// class.
- ///
- /// Specify a group.
- /// Whether to return the list of members in the group.
- /// Note that the default value will cause all the group members to be returned in the
- /// response. This may take a long time for large groups.
- /// Optional argument. Set group name to this if
- /// provided.
- /// Optional argument. New group external ID. If the
- /// argument is None, the group's external_id won't be updated. If the argument is
- /// empty string, the group's external id will be cleared.
- /// Set new group management type, if
- /// provided.
- public AlphaGroupUpdateArgs(GroupSelector @group,
- bool returnMembers = true,
- string newGroupName = null,
- string newGroupExternalId = null,
- Dropbox.Api.TeamCommon.GroupManagementType newGroupManagementType = null)
- : base(@group, returnMembers, newGroupName, newGroupExternalId)
- {
- this.NewGroupManagementType = newGroupManagementType;
- }
-
- ///
- /// Initializes a new instance of the
- /// class.
- ///
- /// This is to construct an instance of the object when
- /// deserializing.
- public AlphaGroupUpdateArgs()
- {
- }
-
- ///
- /// Set new group management type, if provided.
- ///
- public Dropbox.Api.TeamCommon.GroupManagementType NewGroupManagementType { get; protected set; }
-
- #region Encoder class
-
- ///
- /// Encoder for .
- ///
- private class AlphaGroupUpdateArgsEncoder : enc.StructEncoder
- {
- ///
- /// Encode fields of given value.
- ///
- /// The value.
- /// The writer.
- public override void EncodeFields(AlphaGroupUpdateArgs value, enc.IJsonWriter writer)
- {
- WriteProperty("group", value.Group, writer, Dropbox.Api.Team.GroupSelector.Encoder);
- WriteProperty("return_members", value.ReturnMembers, writer, enc.BooleanEncoder.Instance);
- if (value.NewGroupName != null)
- {
- WriteProperty("new_group_name", value.NewGroupName, writer, enc.StringEncoder.Instance);
- }
- if (value.NewGroupExternalId != null)
- {
- WriteProperty("new_group_external_id", value.NewGroupExternalId, writer, enc.StringEncoder.Instance);
- }
- if (value.NewGroupManagementType != null)
- {
- WriteProperty("new_group_management_type", value.NewGroupManagementType, writer, Dropbox.Api.TeamCommon.GroupManagementType.Encoder);
- }
- }
- }
-
- #endregion
-
-
- #region Decoder class
-
- ///
- /// Decoder for .
- ///
- private class AlphaGroupUpdateArgsDecoder : enc.StructDecoder
- {
- ///
- /// Create a new instance of type .
- ///
- /// The struct instance.
- protected override AlphaGroupUpdateArgs Create()
- {
- return new AlphaGroupUpdateArgs();
- }
-
- ///
- /// Set given field.
- ///
- /// The field value.
- /// The field name.
- /// The json reader.
- protected override void SetField(AlphaGroupUpdateArgs value, string fieldName, enc.IJsonReader reader)
- {
- switch (fieldName)
- {
- case "group":
- value.Group = Dropbox.Api.Team.GroupSelector.Decoder.Decode(reader);
- break;
- case "return_members":
- value.ReturnMembers = enc.BooleanDecoder.Instance.Decode(reader);
- break;
- case "new_group_name":
- value.NewGroupName = enc.StringDecoder.Instance.Decode(reader);
- break;
- case "new_group_external_id":
- value.NewGroupExternalId = enc.StringDecoder.Instance.Decode(reader);
- break;
- case "new_group_management_type":
- value.NewGroupManagementType = Dropbox.Api.TeamCommon.GroupManagementType.Decoder.Decode(reader);
- break;
- default:
- reader.Skip();
- break;
- }
- }
- }
-
- #endregion
- }
-}
diff --git a/Dropbox.Api/Team/AlphaGroupsListResult.cs b/Dropbox.Api/Team/AlphaGroupsListResult.cs
deleted file mode 100644
index ff6538841f..0000000000
--- a/Dropbox.Api/Team/AlphaGroupsListResult.cs
+++ /dev/null
@@ -1,161 +0,0 @@
-//
-// Auto-generated by StoneAPI, do not modify.
-//
-
-namespace Dropbox.Api.Team
-{
- using sys = System;
- using col = System.Collections.Generic;
- using re = System.Text.RegularExpressions;
-
- using enc = Dropbox.Api.Stone;
-
- ///
- /// The alpha groups list result object
- ///
- public class AlphaGroupsListResult
- {
- #pragma warning disable 108
-
- ///
- /// The encoder instance.
- ///
- internal static enc.StructEncoder Encoder = new AlphaGroupsListResultEncoder();
-
- ///
- /// The decoder instance.
- ///
- internal static enc.StructDecoder Decoder = new AlphaGroupsListResultDecoder();
-
- ///
- /// Initializes a new instance of the
- /// class.
- ///
- /// The groups
- /// Pass the cursor into to obtain
- /// the additional groups.
- /// Is true if there are additional groups that have not been
- /// returned yet. An additional call to can
- /// retrieve them.
- public AlphaGroupsListResult(col.IEnumerable groups,
- string cursor,
- bool hasMore)
- {
- var groupsList = enc.Util.ToList(groups);
-
- if (groups == null)
- {
- throw new sys.ArgumentNullException("groups");
- }
-
- if (cursor == null)
- {
- throw new sys.ArgumentNullException("cursor");
- }
-
- this.Groups = groupsList;
- this.Cursor = cursor;
- this.HasMore = hasMore;
- }
-
- ///
- /// Initializes a new instance of the
- /// class.
- ///
- /// This is to construct an instance of the object when
- /// deserializing.
- public AlphaGroupsListResult()
- {
- }
-
- ///
- /// Gets the groups of the alpha groups list result
- ///
- public col.IList Groups { get; protected set; }
-
- ///
- /// Pass the cursor into to obtain
- /// the additional groups.
- ///
- public string Cursor { get; protected set; }
-
- ///
- /// Is true if there are additional groups that have not been returned yet. An
- /// additional call to can
- /// retrieve them.
- ///
- public bool HasMore { get; protected set; }
-
- #region Encoder class
-
- ///
- /// Encoder for .
- ///
- private class AlphaGroupsListResultEncoder : enc.StructEncoder
- {
- ///
- /// Encode fields of given value.
- ///
- /// The value.
- /// The writer.
- public override void EncodeFields(AlphaGroupsListResult value, enc.IJsonWriter writer)
- {
- WriteListProperty("groups", value.Groups, writer, Dropbox.Api.TeamCommon.AlphaGroupSummary.Encoder);
- WriteProperty("cursor", value.Cursor, writer, enc.StringEncoder.Instance);
- WriteProperty("has_more", value.HasMore, writer, enc.BooleanEncoder.Instance);
- }
- }
-
- #endregion
-
-
- #region Decoder class
-
- ///
- /// Decoder for .
- ///
- private class AlphaGroupsListResultDecoder : enc.StructDecoder
- {
- ///
- /// Create a new instance of type .
- ///
- /// The struct instance.
- protected override AlphaGroupsListResult Create()
- {
- return new AlphaGroupsListResult();
- }
-
- ///
- /// Set given field.
- ///
- /// The field value.
- /// The field name.
- /// The json reader.
- protected override void SetField(AlphaGroupsListResult value, string fieldName, enc.IJsonReader reader)
- {
- switch (fieldName)
- {
- case "groups":
- value.Groups = ReadList(reader, Dropbox.Api.TeamCommon.AlphaGroupSummary.Decoder);
- break;
- case "cursor":
- value.Cursor = enc.StringDecoder.Instance.Decode(reader);
- break;
- case "has_more":
- value.HasMore = enc.BooleanDecoder.Instance.Decode(reader);
- break;
- default:
- reader.Skip();
- break;
- }
- }
- }
-
- #endregion
- }
-}
diff --git a/Dropbox.Api/Team/DateRangeError.cs b/Dropbox.Api/Team/DateRangeError.cs
index 2c2b08ec07..b4d06cc08a 100644
--- a/Dropbox.Api/Team/DateRangeError.cs
+++ b/Dropbox.Api/Team/DateRangeError.cs
@@ -117,7 +117,7 @@ protected override DateRangeError Decode(string tag, enc.IJsonReader reader)
#endregion
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : DateRangeError
{
diff --git a/Dropbox.Api/Team/DesktopPlatform.cs b/Dropbox.Api/Team/DesktopPlatform.cs
index 89dbaba9ce..46e865e889 100644
--- a/Dropbox.Api/Team/DesktopPlatform.cs
+++ b/Dropbox.Api/Team/DesktopPlatform.cs
@@ -442,7 +442,7 @@ public override Linux DecodeFields(enc.IJsonReader reader)
}
///
- /// Official Dropbox desktop client for another platform
+ /// The other object
///
public sealed class Other : DesktopPlatform
{
diff --git a/Dropbox.Api/Team/GroupCreateArg.cs b/Dropbox.Api/Team/GroupCreateArg.cs
index e42d0debe1..053342226d 100644
--- a/Dropbox.Api/Team/GroupCreateArg.cs
+++ b/Dropbox.Api/Team/GroupCreateArg.cs
@@ -13,7 +13,6 @@ namespace Dropbox.Api.Team
///
/// The group create arg object
///
- ///
public class GroupCreateArg
{
#pragma warning disable 108
@@ -34,8 +33,11 @@ public class GroupCreateArg
/// Group name.
/// The creator of a team can associate an arbitrary
/// external ID to the group.
+ /// Whether the team can be managed by selected
+ /// users, or only by team admins
public GroupCreateArg(string groupName,
- string groupExternalId = null)
+ string groupExternalId = null,
+ Dropbox.Api.TeamCommon.GroupManagementType groupManagementType = null)
{
if (groupName == null)
{
@@ -44,6 +46,7 @@ public GroupCreateArg(string groupName,
this.GroupName = groupName;
this.GroupExternalId = groupExternalId;
+ this.GroupManagementType = groupManagementType;
}
///
@@ -66,6 +69,12 @@ public GroupCreateArg()
///
public string GroupExternalId { get; protected set; }
+ ///
+ /// Whether the team can be managed by selected users, or only by team
+ /// admins
+ ///
+ public Dropbox.Api.TeamCommon.GroupManagementType GroupManagementType { get; protected set; }
+
#region Encoder class
///
@@ -85,6 +94,10 @@ public override void EncodeFields(GroupCreateArg value, enc.IJsonWriter writer)
{
WriteProperty("group_external_id", value.GroupExternalId, writer, enc.StringEncoder.Instance);
}
+ if (value.GroupManagementType != null)
+ {
+ WriteProperty("group_management_type", value.GroupManagementType, writer, Dropbox.Api.TeamCommon.GroupManagementType.Encoder);
+ }
}
}
@@ -123,6 +136,9 @@ protected override void SetField(GroupCreateArg value, string fieldName, enc.IJs
case "group_external_id":
value.GroupExternalId = enc.StringDecoder.Instance.Decode(reader);
break;
+ case "group_management_type":
+ value.GroupManagementType = Dropbox.Api.TeamCommon.GroupManagementType.Decoder.Decode(reader);
+ break;
default:
reader.Skip();
break;
diff --git a/Dropbox.Api/Team/GroupFullInfo.cs b/Dropbox.Api/Team/GroupFullInfo.cs
index 7f52be2352..34fb48f58a 100644
--- a/Dropbox.Api/Team/GroupFullInfo.cs
+++ b/Dropbox.Api/Team/GroupFullInfo.cs
@@ -34,6 +34,7 @@ public class GroupFullInfo : Dropbox.Api.TeamCommon.GroupSummary
///
/// The group name
/// The group id
+ /// Who is allowed to manage the group.
/// The group creation time as a UTC timestamp in milliseconds
/// since the Unix epoch.
/// External ID of group. This is an arbitrary ID that an
@@ -42,11 +43,12 @@ public class GroupFullInfo : Dropbox.Api.TeamCommon.GroupSummary
/// List of group members.
public GroupFullInfo(string groupName,
string groupId,
+ Dropbox.Api.TeamCommon.GroupManagementType groupManagementType,
ulong created,
string groupExternalId = null,
uint? memberCount = null,
col.IEnumerable members = null)
- : base(groupName, groupId, groupExternalId, memberCount)
+ : base(groupName, groupId, groupManagementType, groupExternalId, memberCount)
{
var membersList = enc.Util.ToList(members);
@@ -90,6 +92,7 @@ public override void EncodeFields(GroupFullInfo value, enc.IJsonWriter writer)
{
WriteProperty("group_name", value.GroupName, writer, enc.StringEncoder.Instance);
WriteProperty("group_id", value.GroupId, writer, enc.StringEncoder.Instance);
+ WriteProperty("group_management_type", value.GroupManagementType, writer, Dropbox.Api.TeamCommon.GroupManagementType.Encoder);
WriteProperty("created", value.Created, writer, enc.UInt64Encoder.Instance);
if (value.GroupExternalId != null)
{
@@ -141,6 +144,9 @@ protected override void SetField(GroupFullInfo value, string fieldName, enc.IJso
case "group_id":
value.GroupId = enc.StringDecoder.Instance.Decode(reader);
break;
+ case "group_management_type":
+ value.GroupManagementType = Dropbox.Api.TeamCommon.GroupManagementType.Decoder.Decode(reader);
+ break;
case "created":
value.Created = enc.UInt64Decoder.Instance.Decode(reader);
break;
diff --git a/Dropbox.Api/Team/GroupUpdateArgs.cs b/Dropbox.Api/Team/GroupUpdateArgs.cs
index c128d3f4e5..d59a1a89fb 100644
--- a/Dropbox.Api/Team/GroupUpdateArgs.cs
+++ b/Dropbox.Api/Team/GroupUpdateArgs.cs
@@ -13,7 +13,6 @@ namespace Dropbox.Api.Team
///
/// The group update args object
///
- ///
///
public class GroupUpdateArgs : IncludeMembersArg
{
@@ -42,10 +41,13 @@ public class GroupUpdateArgs : IncludeMembersArg
/// Optional argument. New group external ID. If the
/// argument is None, the group's external_id won't be updated. If the argument is
/// empty string, the group's external id will be cleared.
+ /// Set new group management type, if
+ /// provided.
public GroupUpdateArgs(GroupSelector @group,
bool returnMembers = true,
string newGroupName = null,
- string newGroupExternalId = null)
+ string newGroupExternalId = null,
+ Dropbox.Api.TeamCommon.GroupManagementType newGroupManagementType = null)
: base(returnMembers)
{
if (@group == null)
@@ -56,6 +58,7 @@ public GroupUpdateArgs(GroupSelector @group,
this.Group = @group;
this.NewGroupName = newGroupName;
this.NewGroupExternalId = newGroupExternalId;
+ this.NewGroupManagementType = newGroupManagementType;
}
///
@@ -85,6 +88,11 @@ public GroupUpdateArgs()
///
public string NewGroupExternalId { get; protected set; }
+ ///
+ /// Set new group management type, if provided.
+ ///
+ public Dropbox.Api.TeamCommon.GroupManagementType NewGroupManagementType { get; protected set; }
+
#region Encoder class
///
@@ -109,6 +117,10 @@ public override void EncodeFields(GroupUpdateArgs value, enc.IJsonWriter writer)
{
WriteProperty("new_group_external_id", value.NewGroupExternalId, writer, enc.StringEncoder.Instance);
}
+ if (value.NewGroupManagementType != null)
+ {
+ WriteProperty("new_group_management_type", value.NewGroupManagementType, writer, Dropbox.Api.TeamCommon.GroupManagementType.Encoder);
+ }
}
}
@@ -153,6 +165,9 @@ protected override void SetField(GroupUpdateArgs value, string fieldName, enc.IJ
case "new_group_external_id":
value.NewGroupExternalId = enc.StringDecoder.Instance.Decode(reader);
break;
+ case "new_group_management_type":
+ value.NewGroupManagementType = Dropbox.Api.TeamCommon.GroupManagementType.Decoder.Decode(reader);
+ break;
default:
reader.Skip();
break;
diff --git a/Dropbox.Api/Team/GroupsListContinueError.cs b/Dropbox.Api/Team/GroupsListContinueError.cs
index b31d75c5c1..f6fa5f4be8 100644
--- a/Dropbox.Api/Team/GroupsListContinueError.cs
+++ b/Dropbox.Api/Team/GroupsListContinueError.cs
@@ -228,7 +228,7 @@ public override InvalidCursor DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : GroupsListContinueError
{
diff --git a/Dropbox.Api/Team/GroupsMembersListContinueError.cs b/Dropbox.Api/Team/GroupsMembersListContinueError.cs
index d17815b6ac..e1fac559b9 100644
--- a/Dropbox.Api/Team/GroupsMembersListContinueError.cs
+++ b/Dropbox.Api/Team/GroupsMembersListContinueError.cs
@@ -228,7 +228,7 @@ public override InvalidCursor DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : GroupsMembersListContinueError
{
diff --git a/Dropbox.Api/Team/GroupsPollError.cs b/Dropbox.Api/Team/GroupsPollError.cs
index 0507761c37..837f91767a 100644
--- a/Dropbox.Api/Team/GroupsPollError.cs
+++ b/Dropbox.Api/Team/GroupsPollError.cs
@@ -450,7 +450,7 @@ public override InternalError DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : GroupsPollError
{
diff --git a/Dropbox.Api/Team/ListMemberAppsError.cs b/Dropbox.Api/Team/ListMemberAppsError.cs
index ca3004caf0..9baf6d395f 100644
--- a/Dropbox.Api/Team/ListMemberAppsError.cs
+++ b/Dropbox.Api/Team/ListMemberAppsError.cs
@@ -229,7 +229,7 @@ public override MemberNotFound DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : ListMemberAppsError
{
diff --git a/Dropbox.Api/Team/ListMemberDevicesError.cs b/Dropbox.Api/Team/ListMemberDevicesError.cs
index fb74de7c14..deafb37893 100644
--- a/Dropbox.Api/Team/ListMemberDevicesError.cs
+++ b/Dropbox.Api/Team/ListMemberDevicesError.cs
@@ -228,7 +228,7 @@ public override MemberNotFound DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : ListMemberDevicesError
{
diff --git a/Dropbox.Api/Team/ListMembersAppsError.cs b/Dropbox.Api/Team/ListMembersAppsError.cs
index 9143bc1553..f42cfdd832 100644
--- a/Dropbox.Api/Team/ListMembersAppsError.cs
+++ b/Dropbox.Api/Team/ListMembersAppsError.cs
@@ -230,7 +230,7 @@ public override Reset DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : ListMembersAppsError
{
diff --git a/Dropbox.Api/Team/ListMembersDevicesError.cs b/Dropbox.Api/Team/ListMembersDevicesError.cs
index fdb3ce3707..d6047c06e0 100644
--- a/Dropbox.Api/Team/ListMembersDevicesError.cs
+++ b/Dropbox.Api/Team/ListMembersDevicesError.cs
@@ -229,7 +229,7 @@ public override Reset DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : ListMembersDevicesError
{
diff --git a/Dropbox.Api/Team/ListTeamAppsError.cs b/Dropbox.Api/Team/ListTeamAppsError.cs
index 20779fd7ca..7ab194be9b 100644
--- a/Dropbox.Api/Team/ListTeamAppsError.cs
+++ b/Dropbox.Api/Team/ListTeamAppsError.cs
@@ -229,7 +229,7 @@ public override Reset DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : ListTeamAppsError
{
diff --git a/Dropbox.Api/Team/ListTeamDevicesError.cs b/Dropbox.Api/Team/ListTeamDevicesError.cs
index 039ae6f0a9..b03316104a 100644
--- a/Dropbox.Api/Team/ListTeamDevicesError.cs
+++ b/Dropbox.Api/Team/ListTeamDevicesError.cs
@@ -228,7 +228,7 @@ public override Reset DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : ListTeamDevicesError
{
diff --git a/Dropbox.Api/Team/MembersDeactivateError.cs b/Dropbox.Api/Team/MembersDeactivateError.cs
index b2599baeff..3c6830d885 100644
--- a/Dropbox.Api/Team/MembersDeactivateError.cs
+++ b/Dropbox.Api/Team/MembersDeactivateError.cs
@@ -258,7 +258,7 @@ public override UserNotInTeam DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : MembersDeactivateError
{
diff --git a/Dropbox.Api/Team/MembersGetInfoError.cs b/Dropbox.Api/Team/MembersGetInfoError.cs
index b5404946bf..978e843d55 100644
--- a/Dropbox.Api/Team/MembersGetInfoError.cs
+++ b/Dropbox.Api/Team/MembersGetInfoError.cs
@@ -118,7 +118,7 @@ protected override MembersGetInfoError Decode(string tag, enc.IJsonReader reader
#endregion
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : MembersGetInfoError
{
diff --git a/Dropbox.Api/Team/MembersListArg.cs b/Dropbox.Api/Team/MembersListArg.cs
index b381efd637..469af23976 100644
--- a/Dropbox.Api/Team/MembersListArg.cs
+++ b/Dropbox.Api/Team/MembersListArg.cs
@@ -31,7 +31,9 @@ public class MembersListArg
/// Initializes a new instance of the class.
///
/// Number of results to return per call.
- public MembersListArg(uint limit = 1000)
+ /// Whether to return removed members.
+ public MembersListArg(uint limit = 1000,
+ bool includeRemoved = false)
{
if (limit < 1U)
{
@@ -43,6 +45,7 @@ public MembersListArg(uint limit = 1000)
}
this.Limit = limit;
+ this.IncludeRemoved = includeRemoved;
}
///
@@ -53,6 +56,7 @@ public MembersListArg(uint limit = 1000)
public MembersListArg()
{
this.Limit = 1000;
+ this.IncludeRemoved = false;
}
///
@@ -60,6 +64,11 @@ public MembersListArg()
///
public uint Limit { get; protected set; }
+ ///
+ /// Whether to return removed members.
+ ///
+ public bool IncludeRemoved { get; protected set; }
+
#region Encoder class
///
@@ -75,6 +84,7 @@ private class MembersListArgEncoder : enc.StructEncoder
public override void EncodeFields(MembersListArg value, enc.IJsonWriter writer)
{
WriteProperty("limit", value.Limit, writer, enc.UInt32Encoder.Instance);
+ WriteProperty("include_removed", value.IncludeRemoved, writer, enc.BooleanEncoder.Instance);
}
}
@@ -110,6 +120,9 @@ protected override void SetField(MembersListArg value, string fieldName, enc.IJs
case "limit":
value.Limit = enc.UInt32Decoder.Instance.Decode(reader);
break;
+ case "include_removed":
+ value.IncludeRemoved = enc.BooleanDecoder.Instance.Decode(reader);
+ break;
default:
reader.Skip();
break;
diff --git a/Dropbox.Api/Team/MembersListContinueError.cs b/Dropbox.Api/Team/MembersListContinueError.cs
index bac7ae4f12..54737a7d6e 100644
--- a/Dropbox.Api/Team/MembersListContinueError.cs
+++ b/Dropbox.Api/Team/MembersListContinueError.cs
@@ -228,7 +228,7 @@ public override InvalidCursor DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : MembersListContinueError
{
diff --git a/Dropbox.Api/Team/MembersListError.cs b/Dropbox.Api/Team/MembersListError.cs
index 8e4a803950..892d2aac2f 100644
--- a/Dropbox.Api/Team/MembersListError.cs
+++ b/Dropbox.Api/Team/MembersListError.cs
@@ -118,7 +118,7 @@ protected override MembersListError Decode(string tag, enc.IJsonReader reader)
#endregion
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : MembersListError
{
diff --git a/Dropbox.Api/Team/MembersRecoverArg.cs b/Dropbox.Api/Team/MembersRecoverArg.cs
new file mode 100644
index 0000000000..c8ee71b34e
--- /dev/null
+++ b/Dropbox.Api/Team/MembersRecoverArg.cs
@@ -0,0 +1,120 @@
+//
+// Auto-generated by StoneAPI, do not modify.
+//
+
+namespace Dropbox.Api.Team
+{
+ using sys = System;
+ using col = System.Collections.Generic;
+ using re = System.Text.RegularExpressions;
+
+ using enc = Dropbox.Api.Stone;
+
+ ///
+ /// Exactly one of team_member_id, email, or external_id must be provided to identify
+ /// the user account.
+ ///
+ public class MembersRecoverArg
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new MembersRecoverArgEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new MembersRecoverArgDecoder();
+
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ /// Identity of user to recover.
+ public MembersRecoverArg(UserSelectorArg user)
+ {
+ if (user == null)
+ {
+ throw new sys.ArgumentNullException("user");
+ }
+
+ this.User = user;
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ /// This is to construct an instance of the object when
+ /// deserializing.
+ public MembersRecoverArg()
+ {
+ }
+
+ ///
+ /// Identity of user to recover.
+ ///
+ public UserSelectorArg User { get; protected set; }
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class MembersRecoverArgEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(MembersRecoverArg value, enc.IJsonWriter writer)
+ {
+ WriteProperty("user", value.User, writer, Dropbox.Api.Team.UserSelectorArg.Encoder);
+ }
+ }
+
+ #endregion
+
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class MembersRecoverArgDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override MembersRecoverArg Create()
+ {
+ return new MembersRecoverArg();
+ }
+
+ ///
+ /// Set given field.
+ ///
+ /// The field value.
+ /// The field name.
+ /// The json reader.
+ protected override void SetField(MembersRecoverArg value, string fieldName, enc.IJsonReader reader)
+ {
+ switch (fieldName)
+ {
+ case "user":
+ value.User = Dropbox.Api.Team.UserSelectorArg.Decoder.Decode(reader);
+ break;
+ default:
+ reader.Skip();
+ break;
+ }
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/Dropbox.Api/Team/MembersRecoverError.cs b/Dropbox.Api/Team/MembersRecoverError.cs
new file mode 100644
index 0000000000..004f6f2502
--- /dev/null
+++ b/Dropbox.Api/Team/MembersRecoverError.cs
@@ -0,0 +1,527 @@
+//
+// Auto-generated by StoneAPI, do not modify.
+//
+
+namespace Dropbox.Api.Team
+{
+ using sys = System;
+ using col = System.Collections.Generic;
+ using re = System.Text.RegularExpressions;
+
+ using enc = Dropbox.Api.Stone;
+
+ ///
+ /// The members recover error object
+ ///
+ public class MembersRecoverError
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new MembersRecoverErrorEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new MembersRecoverErrorDecoder();
+
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ public MembersRecoverError()
+ {
+ }
+
+ ///
+ /// Gets a value indicating whether this instance is UserUnrecoverable
+ ///
+ public bool IsUserUnrecoverable
+ {
+ get
+ {
+ return this is UserUnrecoverable;
+ }
+ }
+
+ ///
+ /// Gets this instance as a UserUnrecoverable, or null.
+ ///
+ public UserUnrecoverable AsUserUnrecoverable
+ {
+ get
+ {
+ return this as UserUnrecoverable;
+ }
+ }
+
+ ///
+ /// Gets a value indicating whether this instance is UserNotInTeam
+ ///
+ public bool IsUserNotInTeam
+ {
+ get
+ {
+ return this is UserNotInTeam;
+ }
+ }
+
+ ///
+ /// Gets this instance as a UserNotInTeam, or null.
+ ///
+ public UserNotInTeam AsUserNotInTeam
+ {
+ get
+ {
+ return this as UserNotInTeam;
+ }
+ }
+
+ ///
+ /// Gets a value indicating whether this instance is Other
+ ///
+ public bool IsOther
+ {
+ get
+ {
+ return this is Other;
+ }
+ }
+
+ ///
+ /// Gets this instance as a Other, or null.
+ ///
+ public Other AsOther
+ {
+ get
+ {
+ return this as Other;
+ }
+ }
+
+ ///
+ /// Gets a value indicating whether this instance is UserNotFound
+ ///
+ public bool IsUserNotFound
+ {
+ get
+ {
+ return this is UserNotFound;
+ }
+ }
+
+ ///
+ /// Gets this instance as a UserNotFound, or null.
+ ///
+ public UserNotFound AsUserNotFound
+ {
+ get
+ {
+ return this as UserNotFound;
+ }
+ }
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class MembersRecoverErrorEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(MembersRecoverError value, enc.IJsonWriter writer)
+ {
+ if (value is UserUnrecoverable)
+ {
+ WriteProperty(".tag", "user_unrecoverable", writer, enc.StringEncoder.Instance);
+ UserUnrecoverable.Encoder.EncodeFields((UserUnrecoverable)value, writer);
+ return;
+ }
+ if (value is UserNotInTeam)
+ {
+ WriteProperty(".tag", "user_not_in_team", writer, enc.StringEncoder.Instance);
+ UserNotInTeam.Encoder.EncodeFields((UserNotInTeam)value, writer);
+ return;
+ }
+ if (value is Other)
+ {
+ WriteProperty(".tag", "other", writer, enc.StringEncoder.Instance);
+ Other.Encoder.EncodeFields((Other)value, writer);
+ return;
+ }
+ if (value is UserNotFound)
+ {
+ WriteProperty(".tag", "user_not_found", writer, enc.StringEncoder.Instance);
+ UserNotFound.Encoder.EncodeFields((UserNotFound)value, writer);
+ return;
+ }
+ throw new sys.InvalidOperationException();
+ }
+ }
+
+ #endregion
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class MembersRecoverErrorDecoder : enc.UnionDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override MembersRecoverError Create()
+ {
+ return new MembersRecoverError();
+ }
+
+ ///
+ /// Decode based on given tag.
+ ///
+ /// The tag.
+ /// The json reader.
+ /// The decoded object.
+ protected override MembersRecoverError Decode(string tag, enc.IJsonReader reader)
+ {
+ switch (tag)
+ {
+ case "user_unrecoverable":
+ return UserUnrecoverable.Decoder.DecodeFields(reader);
+ case "user_not_in_team":
+ return UserNotInTeam.Decoder.DecodeFields(reader);
+ default:
+ return Other.Decoder.DecodeFields(reader);
+ case "user_not_found":
+ return UserNotFound.Decoder.DecodeFields(reader);
+ }
+ }
+ }
+
+ #endregion
+
+ ///
+ /// The user is not recoverable.
+ ///
+ public sealed class UserUnrecoverable : MembersRecoverError
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new UserUnrecoverableEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new UserUnrecoverableDecoder();
+
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ private UserUnrecoverable()
+ {
+ }
+
+ ///
+ /// A singleton instance of UserUnrecoverable
+ ///
+ public static readonly UserUnrecoverable Instance = new UserUnrecoverable();
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class UserUnrecoverableEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(UserUnrecoverable value, enc.IJsonWriter writer)
+ {
+ }
+ }
+
+ #endregion
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class UserUnrecoverableDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override UserUnrecoverable Create()
+ {
+ return new UserUnrecoverable();
+ }
+
+ ///
+ /// Decode fields without ensuring start and end object.
+ ///
+ /// The json reader.
+ /// The decoded object.
+ public override UserUnrecoverable DecodeFields(enc.IJsonReader reader)
+ {
+ return UserUnrecoverable.Instance;
+ }
+ }
+
+ #endregion
+ }
+
+ ///
+ /// The user is not a member of the team.
+ ///
+ public sealed class UserNotInTeam : MembersRecoverError
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new UserNotInTeamEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new UserNotInTeamDecoder();
+
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ private UserNotInTeam()
+ {
+ }
+
+ ///
+ /// A singleton instance of UserNotInTeam
+ ///
+ public static readonly UserNotInTeam Instance = new UserNotInTeam();
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class UserNotInTeamEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(UserNotInTeam value, enc.IJsonWriter writer)
+ {
+ }
+ }
+
+ #endregion
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class UserNotInTeamDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override UserNotInTeam Create()
+ {
+ return new UserNotInTeam();
+ }
+
+ ///
+ /// Decode fields without ensuring start and end object.
+ ///
+ /// The json reader.
+ /// The decoded object.
+ public override UserNotInTeam DecodeFields(enc.IJsonReader reader)
+ {
+ return UserNotInTeam.Instance;
+ }
+ }
+
+ #endregion
+ }
+
+ ///
+ /// The other object
+ ///
+ public sealed class Other : MembersRecoverError
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new OtherEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new OtherDecoder();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ private Other()
+ {
+ }
+
+ ///
+ /// A singleton instance of Other
+ ///
+ public static readonly Other Instance = new Other();
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class OtherEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(Other value, enc.IJsonWriter writer)
+ {
+ }
+ }
+
+ #endregion
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class OtherDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override Other Create()
+ {
+ return new Other();
+ }
+
+ ///
+ /// Decode fields without ensuring start and end object.
+ ///
+ /// The json reader.
+ /// The decoded object.
+ public override Other DecodeFields(enc.IJsonReader reader)
+ {
+ return Other.Instance;
+ }
+ }
+
+ #endregion
+ }
+
+ ///
+ /// No matching user found. The provided team_member_id, email, or external_id
+ /// does not exist on this team.
+ ///
+ public sealed class UserNotFound : MembersRecoverError
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new UserNotFoundEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new UserNotFoundDecoder();
+
+ ///
+ /// Initializes a new instance of the
+ /// class.
+ ///
+ private UserNotFound()
+ {
+ }
+
+ ///
+ /// A singleton instance of UserNotFound
+ ///
+ public static readonly UserNotFound Instance = new UserNotFound();
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class UserNotFoundEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(UserNotFound value, enc.IJsonWriter writer)
+ {
+ }
+ }
+
+ #endregion
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class UserNotFoundDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override UserNotFound Create()
+ {
+ return new UserNotFound();
+ }
+
+ ///
+ /// Decode fields without ensuring start and end object.
+ ///
+ /// The json reader.
+ /// The decoded object.
+ public override UserNotFound DecodeFields(enc.IJsonReader reader)
+ {
+ return UserNotFound.Instance;
+ }
+ }
+
+ #endregion
+ }
+ }
+}
diff --git a/Dropbox.Api/Team/MembersRemoveError.cs b/Dropbox.Api/Team/MembersRemoveError.cs
index 0c9d998bc5..a04e84503f 100644
--- a/Dropbox.Api/Team/MembersRemoveError.cs
+++ b/Dropbox.Api/Team/MembersRemoveError.cs
@@ -290,6 +290,30 @@ public CannotKeepAccountAndDeleteData AsCannotKeepAccountAndDeleteData
}
}
+ ///
+ /// Gets a value indicating whether this instance is
+ /// EmailAddressTooLongToBeDisabled
+ ///
+ public bool IsEmailAddressTooLongToBeDisabled
+ {
+ get
+ {
+ return this is EmailAddressTooLongToBeDisabled;
+ }
+ }
+
+ ///
+ /// Gets this instance as a EmailAddressTooLongToBeDisabled, or
+ /// null.
+ ///
+ public EmailAddressTooLongToBeDisabled AsEmailAddressTooLongToBeDisabled
+ {
+ get
+ {
+ return this as EmailAddressTooLongToBeDisabled;
+ }
+ }
+
///
/// Gets a value indicating whether this instance is UserNotInTeam
///
@@ -414,6 +438,12 @@ public override void EncodeFields(MembersRemoveError value, enc.IJsonWriter writ
CannotKeepAccountAndDeleteData.Encoder.EncodeFields((CannotKeepAccountAndDeleteData)value, writer);
return;
}
+ if (value is EmailAddressTooLongToBeDisabled)
+ {
+ WriteProperty(".tag", "email_address_too_long_to_be_disabled", writer, enc.StringEncoder.Instance);
+ EmailAddressTooLongToBeDisabled.Encoder.EncodeFields((EmailAddressTooLongToBeDisabled)value, writer);
+ return;
+ }
if (value is UserNotInTeam)
{
WriteProperty(".tag", "user_not_in_team", writer, enc.StringEncoder.Instance);
@@ -480,6 +510,8 @@ protected override MembersRemoveError Decode(string tag, enc.IJsonReader reader)
return CannotKeepAccountAndTransfer.Decoder.DecodeFields(reader);
case "cannot_keep_account_and_delete_data":
return CannotKeepAccountAndDeleteData.Decoder.DecodeFields(reader);
+ case "email_address_too_long_to_be_disabled":
+ return EmailAddressTooLongToBeDisabled.Decoder.DecodeFields(reader);
case "user_not_in_team":
return UserNotInTeam.Decoder.DecodeFields(reader);
case "other":
@@ -1374,6 +1406,86 @@ public override CannotKeepAccountAndDeleteData DecodeFields(enc.IJsonReader read
#endregion
}
+ ///
+ /// The email address of the user is too long to be disabled.
+ ///
+ public sealed class EmailAddressTooLongToBeDisabled : MembersRemoveError
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new EmailAddressTooLongToBeDisabledEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new EmailAddressTooLongToBeDisabledDecoder();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ private EmailAddressTooLongToBeDisabled()
+ {
+ }
+
+ ///
+ /// A singleton instance of EmailAddressTooLongToBeDisabled
+ ///
+ public static readonly EmailAddressTooLongToBeDisabled Instance = new EmailAddressTooLongToBeDisabled();
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class EmailAddressTooLongToBeDisabledEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(EmailAddressTooLongToBeDisabled value, enc.IJsonWriter writer)
+ {
+ }
+ }
+
+ #endregion
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class EmailAddressTooLongToBeDisabledDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override EmailAddressTooLongToBeDisabled Create()
+ {
+ return new EmailAddressTooLongToBeDisabled();
+ }
+
+ ///
+ /// Decode fields without ensuring start and end object.
+ ///
+ /// The json reader.
+ /// The decoded object.
+ public override EmailAddressTooLongToBeDisabled DecodeFields(enc.IJsonReader reader)
+ {
+ return EmailAddressTooLongToBeDisabled.Instance;
+ }
+ }
+
+ #endregion
+ }
+
///
/// The user is not a member of the team.
///
@@ -1454,7 +1566,7 @@ public override UserNotInTeam DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : MembersRemoveError
{
diff --git a/Dropbox.Api/Team/MembersSendWelcomeError.cs b/Dropbox.Api/Team/MembersSendWelcomeError.cs
index b85ef873a6..3ccbc72b6f 100644
--- a/Dropbox.Api/Team/MembersSendWelcomeError.cs
+++ b/Dropbox.Api/Team/MembersSendWelcomeError.cs
@@ -149,7 +149,7 @@ protected override MembersSendWelcomeError Decode(string tag, enc.IJsonReader re
#endregion
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : MembersSendWelcomeError
{
diff --git a/Dropbox.Api/Team/MembersSetPermissionsError.cs b/Dropbox.Api/Team/MembersSetPermissionsError.cs
index 436555fd9e..7fdbf2af13 100644
--- a/Dropbox.Api/Team/MembersSetPermissionsError.cs
+++ b/Dropbox.Api/Team/MembersSetPermissionsError.cs
@@ -585,7 +585,7 @@ public override TeamLicenseLimit DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : MembersSetPermissionsError
{
diff --git a/Dropbox.Api/Team/MembersSetProfileError.cs b/Dropbox.Api/Team/MembersSetProfileError.cs
index 4c37370dbb..a8bd8ce68e 100644
--- a/Dropbox.Api/Team/MembersSetProfileError.cs
+++ b/Dropbox.Api/Team/MembersSetProfileError.cs
@@ -814,7 +814,7 @@ public override ParamCannotBeEmpty DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : MembersSetProfileError
{
diff --git a/Dropbox.Api/Team/MembersSuspendError.cs b/Dropbox.Api/Team/MembersSuspendError.cs
index 049b8ac571..6019cb07ee 100644
--- a/Dropbox.Api/Team/MembersSuspendError.cs
+++ b/Dropbox.Api/Team/MembersSuspendError.cs
@@ -557,7 +557,7 @@ public override UserNotInTeam DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : MembersSuspendError
{
diff --git a/Dropbox.Api/Team/MembersUnsuspendError.cs b/Dropbox.Api/Team/MembersUnsuspendError.cs
index c75d6cbee3..eed55dfb47 100644
--- a/Dropbox.Api/Team/MembersUnsuspendError.cs
+++ b/Dropbox.Api/Team/MembersUnsuspendError.cs
@@ -450,7 +450,7 @@ public override UserNotInTeam DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : MembersUnsuspendError
{
diff --git a/Dropbox.Api/Team/MobileClientPlatform.cs b/Dropbox.Api/Team/MobileClientPlatform.cs
index e8ea01003c..3e33003ee2 100644
--- a/Dropbox.Api/Team/MobileClientPlatform.cs
+++ b/Dropbox.Api/Team/MobileClientPlatform.cs
@@ -659,7 +659,7 @@ public override Blackberry DecodeFields(enc.IJsonReader reader)
}
///
- /// Official Dropbox client for another platform
+ /// The other object
///
public sealed class Other : MobileClientPlatform
{
diff --git a/Dropbox.Api/Team/RemovedStatus.cs b/Dropbox.Api/Team/RemovedStatus.cs
new file mode 100644
index 0000000000..92f5f476ba
--- /dev/null
+++ b/Dropbox.Api/Team/RemovedStatus.cs
@@ -0,0 +1,112 @@
+//
+// Auto-generated by StoneAPI, do not modify.
+//
+
+namespace Dropbox.Api.Team
+{
+ using sys = System;
+ using col = System.Collections.Generic;
+ using re = System.Text.RegularExpressions;
+
+ using enc = Dropbox.Api.Stone;
+
+ ///
+ /// The removed status object
+ ///
+ public class RemovedStatus
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new RemovedStatusEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new RemovedStatusDecoder();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// True if the removed team member is recoverable
+ public RemovedStatus(bool isRecoverable)
+ {
+ this.IsRecoverable = isRecoverable;
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// This is to construct an instance of the object when
+ /// deserializing.
+ public RemovedStatus()
+ {
+ }
+
+ ///
+ /// True if the removed team member is recoverable
+ ///
+ public bool IsRecoverable { get; protected set; }
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class RemovedStatusEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(RemovedStatus value, enc.IJsonWriter writer)
+ {
+ WriteProperty("is_recoverable", value.IsRecoverable, writer, enc.BooleanEncoder.Instance);
+ }
+ }
+
+ #endregion
+
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class RemovedStatusDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override RemovedStatus Create()
+ {
+ return new RemovedStatus();
+ }
+
+ ///
+ /// Set given field.
+ ///
+ /// The field value.
+ /// The field name.
+ /// The json reader.
+ protected override void SetField(RemovedStatus value, string fieldName, enc.IJsonReader reader)
+ {
+ switch (fieldName)
+ {
+ case "is_recoverable":
+ value.IsRecoverable = enc.BooleanDecoder.Instance.Decode(reader);
+ break;
+ default:
+ reader.Skip();
+ break;
+ }
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/Dropbox.Api/Team/RevokeDeviceSessionBatchError.cs b/Dropbox.Api/Team/RevokeDeviceSessionBatchError.cs
index 387b4b4a86..91a383cb0a 100644
--- a/Dropbox.Api/Team/RevokeDeviceSessionBatchError.cs
+++ b/Dropbox.Api/Team/RevokeDeviceSessionBatchError.cs
@@ -36,24 +36,24 @@ public RevokeDeviceSessionBatchError()
}
///
- /// Gets a value indicating whether this instance is Unspecified
+ /// Gets a value indicating whether this instance is Other
///
- public bool IsUnspecified
+ public bool IsOther
{
get
{
- return this is Unspecified;
+ return this is Other;
}
}
///
- /// Gets this instance as a Unspecified, or null.
+ /// Gets this instance as a Other, or null.
///
- public Unspecified AsUnspecified
+ public Other AsOther
{
get
{
- return this as Unspecified;
+ return this as Other;
}
}
@@ -71,10 +71,10 @@ private class RevokeDeviceSessionBatchErrorEncoder : enc.StructEncoderThe writer.
public override void EncodeFields(RevokeDeviceSessionBatchError value, enc.IJsonWriter writer)
{
- if (value is Unspecified)
+ if (value is Other)
{
- WriteProperty(".tag", "unspecified", writer, enc.StringEncoder.Instance);
- Unspecified.Encoder.EncodeFields((Unspecified)value, writer);
+ WriteProperty(".tag", "other", writer, enc.StringEncoder.Instance);
+ Other.Encoder.EncodeFields((Other)value, writer);
return;
}
throw new sys.InvalidOperationException();
@@ -111,7 +111,7 @@ protected override RevokeDeviceSessionBatchError Decode(string tag, enc.IJsonRea
switch (tag)
{
default:
- return Unspecified.Decoder.DecodeFields(reader);
+ return Other.Decoder.DecodeFields(reader);
}
}
}
@@ -119,48 +119,47 @@ protected override RevokeDeviceSessionBatchError Decode(string tag, enc.IJsonRea
#endregion
///
- /// An unspecified error.
+ /// The other object
///
- public sealed class Unspecified : RevokeDeviceSessionBatchError
+ public sealed class Other : RevokeDeviceSessionBatchError
{
#pragma warning disable 108
///
/// The encoder instance.
///
- internal static enc.StructEncoder Encoder = new UnspecifiedEncoder();
+ internal static enc.StructEncoder Encoder = new OtherEncoder();
///
/// The decoder instance.
///
- internal static enc.StructDecoder Decoder = new UnspecifiedDecoder();
+ internal static enc.StructDecoder Decoder = new OtherDecoder();
///
- /// Initializes a new instance of the
- /// class.
+ /// Initializes a new instance of the class.
///
- private Unspecified()
+ private Other()
{
}
///
- /// A singleton instance of Unspecified
+ /// A singleton instance of Other
///
- public static readonly Unspecified Instance = new Unspecified();
+ public static readonly Other Instance = new Other();
#region Encoder class
///
- /// Encoder for .
+ /// Encoder for .
///
- private class UnspecifiedEncoder : enc.StructEncoder
+ private class OtherEncoder : enc.StructEncoder
{
///
/// Encode fields of given value.
///
/// The value.
/// The writer.
- public override void EncodeFields(Unspecified value, enc.IJsonWriter writer)
+ public override void EncodeFields(Other value, enc.IJsonWriter writer)
{
}
}
@@ -170,17 +169,17 @@ public override void EncodeFields(Unspecified value, enc.IJsonWriter writer)
#region Decoder class
///
- /// Decoder for .
+ /// Decoder for .
///
- private class UnspecifiedDecoder : enc.StructDecoder
+ private class OtherDecoder : enc.StructDecoder
{
///
- /// Create a new instance of type .
+ /// Create a new instance of type .
///
/// The struct instance.
- protected override Unspecified Create()
+ protected override Other Create()
{
- return new Unspecified();
+ return new Other();
}
///
@@ -188,9 +187,9 @@ protected override Unspecified Create()
///
/// The json reader.
/// The decoded object.
- public override Unspecified DecodeFields(enc.IJsonReader reader)
+ public override Other DecodeFields(enc.IJsonReader reader)
{
- return Unspecified.Instance;
+ return Other.Instance;
}
}
diff --git a/Dropbox.Api/Team/RevokeDeviceSessionError.cs b/Dropbox.Api/Team/RevokeDeviceSessionError.cs
index 9b0e95f08f..e0225f6570 100644
--- a/Dropbox.Api/Team/RevokeDeviceSessionError.cs
+++ b/Dropbox.Api/Team/RevokeDeviceSessionError.cs
@@ -338,7 +338,7 @@ public override MemberNotFound DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : RevokeDeviceSessionError
{
diff --git a/Dropbox.Api/Team/RevokeLinkedAppBatchError.cs b/Dropbox.Api/Team/RevokeLinkedAppBatchError.cs
index 573abc1a5d..77baf3bd2e 100644
--- a/Dropbox.Api/Team/RevokeLinkedAppBatchError.cs
+++ b/Dropbox.Api/Team/RevokeLinkedAppBatchError.cs
@@ -38,24 +38,24 @@ public RevokeLinkedAppBatchError()
}
///
- /// Gets a value indicating whether this instance is Unspecified
+ /// Gets a value indicating whether this instance is Other
///
- public bool IsUnspecified
+ public bool IsOther
{
get
{
- return this is Unspecified;
+ return this is Other;
}
}
///
- /// Gets this instance as a Unspecified, or null.
+ /// Gets this instance as a Other, or null.
///
- public Unspecified AsUnspecified
+ public Other AsOther
{
get
{
- return this as Unspecified;
+ return this as Other;
}
}
@@ -73,10 +73,10 @@ private class RevokeLinkedAppBatchErrorEncoder : enc.StructEncoderThe writer.
public override void EncodeFields(RevokeLinkedAppBatchError value, enc.IJsonWriter writer)
{
- if (value is Unspecified)
+ if (value is Other)
{
- WriteProperty(".tag", "unspecified", writer, enc.StringEncoder.Instance);
- Unspecified.Encoder.EncodeFields((Unspecified)value, writer);
+ WriteProperty(".tag", "other", writer, enc.StringEncoder.Instance);
+ Other.Encoder.EncodeFields((Other)value, writer);
return;
}
throw new sys.InvalidOperationException();
@@ -113,7 +113,7 @@ protected override RevokeLinkedAppBatchError Decode(string tag, enc.IJsonReader
switch (tag)
{
default:
- return Unspecified.Decoder.DecodeFields(reader);
+ return Other.Decoder.DecodeFields(reader);
}
}
}
@@ -121,48 +121,47 @@ protected override RevokeLinkedAppBatchError Decode(string tag, enc.IJsonReader
#endregion
///
- /// An unspecified error.
+ /// The other object
///
- public sealed class Unspecified : RevokeLinkedAppBatchError
+ public sealed class Other : RevokeLinkedAppBatchError
{
#pragma warning disable 108
///
/// The encoder instance.
///
- internal static enc.StructEncoder Encoder = new UnspecifiedEncoder();
+ internal static enc.StructEncoder Encoder = new OtherEncoder();
///
/// The decoder instance.
///
- internal static enc.StructDecoder Decoder = new UnspecifiedDecoder();
+ internal static enc.StructDecoder Decoder = new OtherDecoder();
///
- /// Initializes a new instance of the
- /// class.
+ /// Initializes a new instance of the class.
///
- private Unspecified()
+ private Other()
{
}
///
- /// A singleton instance of Unspecified
+ /// A singleton instance of Other
///
- public static readonly Unspecified Instance = new Unspecified();
+ public static readonly Other Instance = new Other();
#region Encoder class
///
- /// Encoder for .
+ /// Encoder for .
///
- private class UnspecifiedEncoder : enc.StructEncoder
+ private class OtherEncoder : enc.StructEncoder
{
///
/// Encode fields of given value.
///
/// The value.
/// The writer.
- public override void EncodeFields(Unspecified value, enc.IJsonWriter writer)
+ public override void EncodeFields(Other value, enc.IJsonWriter writer)
{
}
}
@@ -172,17 +171,17 @@ public override void EncodeFields(Unspecified value, enc.IJsonWriter writer)
#region Decoder class
///
- /// Decoder for .
+ /// Decoder for .
///
- private class UnspecifiedDecoder : enc.StructDecoder
+ private class OtherDecoder : enc.StructDecoder
{
///
- /// Create a new instance of type .
+ /// Create a new instance of type .
///
/// The struct instance.
- protected override Unspecified Create()
+ protected override Other Create()
{
- return new Unspecified();
+ return new Other();
}
///
@@ -190,9 +189,9 @@ protected override Unspecified Create()
///
/// The json reader.
/// The decoded object.
- public override Unspecified DecodeFields(enc.IJsonReader reader)
+ public override Other DecodeFields(enc.IJsonReader reader)
{
- return Unspecified.Instance;
+ return Other.Instance;
}
}
diff --git a/Dropbox.Api/Team/RevokeLinkedAppError.cs b/Dropbox.Api/Team/RevokeLinkedAppError.cs
index c87d22a9b6..b970fef84b 100644
--- a/Dropbox.Api/Team/RevokeLinkedAppError.cs
+++ b/Dropbox.Api/Team/RevokeLinkedAppError.cs
@@ -337,7 +337,7 @@ public override MemberNotFound DecodeFields(enc.IJsonReader reader)
}
///
- /// An unspecified error.
+ /// The other object
///
public sealed class Other : RevokeLinkedAppError
{
diff --git a/Dropbox.Api/Team/TeamMemberStatus.cs b/Dropbox.Api/Team/TeamMemberStatus.cs
index 9a57081f2c..5b62dbc1ae 100644
--- a/Dropbox.Api/Team/TeamMemberStatus.cs
+++ b/Dropbox.Api/Team/TeamMemberStatus.cs
@@ -101,6 +101,28 @@ public Suspended AsSuspended
}
}
+ ///
+ /// Gets a value indicating whether this instance is Removed
+ ///
+ public bool IsRemoved
+ {
+ get
+ {
+ return this is Removed;
+ }
+ }
+
+ ///
+ /// Gets this instance as a Removed, or null.
+ ///
+ public Removed AsRemoved
+ {
+ get
+ {
+ return this as Removed;
+ }
+ }
+
#region Encoder class
///
@@ -133,6 +155,12 @@ public override void EncodeFields(TeamMemberStatus value, enc.IJsonWriter writer
Suspended.Encoder.EncodeFields((Suspended)value, writer);
return;
}
+ if (value is Removed)
+ {
+ WriteProperty(".tag", "removed", writer, enc.StringEncoder.Instance);
+ Removed.Encoder.EncodeFields((Removed)value, writer);
+ return;
+ }
throw new sys.InvalidOperationException();
}
}
@@ -171,6 +199,8 @@ protected override TeamMemberStatus Decode(string tag, enc.IJsonReader reader)
return Invited.Decoder.DecodeFields(reader);
case "suspended":
return Suspended.Decoder.DecodeFields(reader);
+ case "removed":
+ return Removed.Decoder.DecodeFields(reader);
default:
throw new sys.InvalidOperationException();
}
@@ -413,5 +443,93 @@ public override Suspended DecodeFields(enc.IJsonReader reader)
#endregion
}
+
+ ///
+ /// User is no longer a member of the team. Removed users are only listed when
+ /// include_removed is true in members/list.
+ ///
+ public sealed class Removed : TeamMemberStatus
+ {
+ #pragma warning disable 108
+
+ ///
+ /// The encoder instance.
+ ///
+ internal static enc.StructEncoder Encoder = new RemovedEncoder();
+
+ ///
+ /// The decoder instance.
+ ///
+ internal static enc.StructDecoder Decoder = new RemovedDecoder();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The value
+ public Removed(RemovedStatus value)
+ {
+ this.Value = value;
+ }
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ private Removed()
+ {
+ }
+
+ ///
+ /// Gets the value of this instance.
+ ///
+ public RemovedStatus Value { get; private set; }
+
+ #region Encoder class
+
+ ///
+ /// Encoder for .
+ ///
+ private class RemovedEncoder : enc.StructEncoder
+ {
+ ///
+ /// Encode fields of given value.
+ ///
+ /// The value.
+ /// The writer.
+ public override void EncodeFields(Removed value, enc.IJsonWriter writer)
+ {
+ Dropbox.Api.Team.RemovedStatus.Encoder.EncodeFields(value.Value, writer);
+ }
+ }
+
+ #endregion
+
+ #region Decoder class
+
+ ///
+ /// Decoder for .
+ ///
+ private class RemovedDecoder : enc.StructDecoder
+ {
+ ///
+ /// Create a new instance of type .
+ ///
+ /// The struct instance.
+ protected override Removed Create()
+ {
+ return new Removed();
+ }
+
+ ///
+ /// Decode fields without ensuring start and end object.
+ ///
+ /// The json reader.
+ /// The decoded object.
+ public override Removed DecodeFields(enc.IJsonReader reader)
+ {
+ return new Removed(Dropbox.Api.Team.RemovedStatus.Decoder.DecodeFields(reader));
+ }
+ }
+
+ #endregion
+ }
}
}
diff --git a/Dropbox.Api/Team/TeamRoutes.cs b/Dropbox.Api/Team/TeamRoutes.cs
index 4ebfe97cdc..28bb8a799a 100644
--- a/Dropbox.Api/Team/TeamRoutes.cs
+++ b/Dropbox.Api/Team/TeamRoutes.cs
@@ -33,29 +33,29 @@ internal TeamRoutes(enc.ITransport transport)
/// Creates a new, empty group, with a requested name.
/// Permission : Team member management
///
- /// The request parameters
+ /// The request parameters
/// The task that represents the asynchronous send operation. The TResult
/// parameter contains the response from the server.
/// Thrown if there is an error
/// processing the request; This will contain a .
- public t.Task AlphaGroupsCreateAsync(AlphaGroupCreateArg alphaGroupCreateArg)
+ public t.Task AlphaGroupsCreateAsync(GroupCreateArg groupCreateArg)
{
- return this.Transport.SendRpcRequestAsync(alphaGroupCreateArg, "api", "/team/alpha/groups/create", Dropbox.Api.Team.AlphaGroupCreateArg.Encoder, Dropbox.Api.Team.AlphaGroupFullInfo.Decoder, Dropbox.Api.Team.GroupCreateError.Decoder);
+ return this.Transport.SendRpcRequestAsync(groupCreateArg, "api", "/team/alpha/groups/create", Dropbox.Api.Team.GroupCreateArg.Encoder, Dropbox.Api.Team.GroupFullInfo.Decoder, Dropbox.Api.Team.GroupCreateError.Decoder);
}
///
/// Begins an asynchronous send to the alpha groups create route.
///
- /// The request parameters.
+ /// The request parameters.
/// The method to be called when the asynchronous send is
/// completed.
/// A user provided object that distinguished this send from other
/// send requests.
/// An object that represents the asynchronous send request.
- public sys.IAsyncResult BeginAlphaGroupsCreate(AlphaGroupCreateArg alphaGroupCreateArg, sys.AsyncCallback callback, object state = null)
+ public sys.IAsyncResult BeginAlphaGroupsCreate(GroupCreateArg groupCreateArg, sys.AsyncCallback callback, object state = null)
{
- var task = this.AlphaGroupsCreateAsync(alphaGroupCreateArg);
+ var task = this.AlphaGroupsCreateAsync(groupCreateArg);
return enc.Util.ToApm(task, callback, state);
}
@@ -74,15 +74,15 @@ public sys.IAsyncResult BeginAlphaGroupsCreate(AlphaGroupCreateArg alphaGroupCre
/// Thrown if there is an error
/// processing the request; This will contain a .
- public t.Task AlphaGroupsCreateAsync(string groupName,
- string groupExternalId = null,
- Dropbox.Api.TeamCommon.GroupManagementType groupManagementType = null)
+ public t.Task AlphaGroupsCreateAsync(string groupName,
+ string groupExternalId = null,
+ Dropbox.Api.TeamCommon.GroupManagementType groupManagementType = null)
{
- var alphaGroupCreateArg = new AlphaGroupCreateArg(groupName,
- groupExternalId,
- groupManagementType);
+ var groupCreateArg = new GroupCreateArg(groupName,
+ groupExternalId,
+ groupManagementType);
- return this.AlphaGroupsCreateAsync(alphaGroupCreateArg);
+ return this.AlphaGroupsCreateAsync(groupCreateArg);
}
///
@@ -104,11 +104,11 @@ public sys.IAsyncResult BeginAlphaGroupsCreate(string groupName,
sys.AsyncCallback callback = null,
object callbackState = null)
{
- var alphaGroupCreateArg = new AlphaGroupCreateArg(groupName,
- groupExternalId,
- groupManagementType);
+ var groupCreateArg = new GroupCreateArg(groupName,
+ groupExternalId,
+ groupManagementType);
- return this.BeginAlphaGroupsCreate(alphaGroupCreateArg, callback, callbackState);
+ return this.BeginAlphaGroupsCreate(groupCreateArg, callback, callbackState);
}
///
@@ -121,9 +121,9 @@ public sys.IAsyncResult BeginAlphaGroupsCreate(string groupName,
/// Thrown if there is an error
/// processing the request; This will contain a .
- public AlphaGroupFullInfo EndAlphaGroupsCreate(sys.IAsyncResult asyncResult)
+ public GroupFullInfo EndAlphaGroupsCreate(sys.IAsyncResult asyncResult)
{
- var task = asyncResult as t.Task;
+ var task = asyncResult as t.Task;
if (task == null)
{
throw new sys.InvalidOperationException();
@@ -142,9 +142,9 @@ public AlphaGroupFullInfo EndAlphaGroupsCreate(sys.IAsyncResult asyncResult)
/// Thrown if there is an error
/// processing the request; This will contain a .
- public t.Task> AlphaGroupsGetInfoAsync(GroupsSelector groupsSelector)
+ public t.Task> AlphaGroupsGetInfoAsync(GroupsSelector groupsSelector)
{
- return this.Transport.SendRpcRequestAsync, GroupsGetInfoError>(groupsSelector, "api", "/team/alpha/groups/get_info", Dropbox.Api.Team.GroupsSelector.Encoder, enc.Decoder.CreateListDecoder(Dropbox.Api.Team.AlphaGroupsGetInfoItem.Decoder), Dropbox.Api.Team.GroupsGetInfoError.Decoder);
+ return this.Transport.SendRpcRequestAsync, GroupsGetInfoError>(groupsSelector, "api", "/team/alpha/groups/get_info", Dropbox.Api.Team.GroupsSelector.Encoder, enc.Decoder.CreateListDecoder(Dropbox.Api.Team.GroupsGetInfoItem.Decoder), Dropbox.Api.Team.GroupsGetInfoError.Decoder);
}
///
@@ -173,9 +173,9 @@ public sys.IAsyncResult BeginAlphaGroupsGetInfo(GroupsSelector groupsSelector, s
/// Thrown if there is an error
/// processing the request; This will contain a .
- public col.List EndAlphaGroupsGetInfo(sys.IAsyncResult asyncResult)
+ public col.List EndAlphaGroupsGetInfo(sys.IAsyncResult asyncResult)
{
- var task = asyncResult as t.Task>;
+ var task = asyncResult as t.Task>;
if (task == null)
{
throw new sys.InvalidOperationException();
@@ -191,9 +191,9 @@ public col.List EndAlphaGroupsGetInfo(sys.IAsyncResult a
/// The request parameters
/// The task that represents the asynchronous send operation. The TResult
/// parameter contains the response from the server.
- public t.Task AlphaGroupsListAsync(GroupsListArg groupsListArg)
+ public t.Task AlphaGroupsListAsync(GroupsListArg groupsListArg)
{
- return this.Transport.SendRpcRequestAsync(groupsListArg, "api", "/team/alpha/groups/list", Dropbox.Api.Team.GroupsListArg.Encoder, Dropbox.Api.Team.AlphaGroupsListResult.Decoder, enc.EmptyDecoder.Instance);
+ return this.Transport.SendRpcRequestAsync(groupsListArg, "api", "/team/alpha/groups/list", Dropbox.Api.Team.GroupsListArg.Encoder, Dropbox.Api.Team.GroupsListResult.Decoder, enc.EmptyDecoder.Instance);
}
///
@@ -219,7 +219,7 @@ public sys.IAsyncResult BeginAlphaGroupsList(GroupsListArg groupsListArg, sys.As
/// Number of results to return per call.
/// The task that represents the asynchronous send operation. The TResult
/// parameter contains the response from the server.
- public t.Task AlphaGroupsListAsync(uint limit = 1000)
+ public t.Task AlphaGroupsListAsync(uint limit = 1000)
{
var groupsListArg = new GroupsListArg(limit);
@@ -251,9 +251,9 @@ public sys.IAsyncResult BeginAlphaGroupsList(uint limit = 1000,
/// The reference to the pending asynchronous send
/// request
/// The response to the send request
- public AlphaGroupsListResult EndAlphaGroupsList(sys.IAsyncResult asyncResult)
+ public GroupsListResult EndAlphaGroupsList(sys.IAsyncResult asyncResult)
{
- var task = asyncResult as t.Task;
+ var task = asyncResult as t.Task;
if (task == null)
{
throw new sys.InvalidOperationException();
@@ -274,9 +274,9 @@ public AlphaGroupsListResult EndAlphaGroupsList(sys.IAsyncResult asyncResult)
/// Thrown if there is an error
/// processing the request; This will contain a .
- public t.Task AlphaGroupsListContinueAsync(GroupsListContinueArg groupsListContinueArg)
+ public t.Task AlphaGroupsListContinueAsync(GroupsListContinueArg groupsListContinueArg)
{
- return this.Transport.SendRpcRequestAsync(groupsListContinueArg, "api", "/team/alpha/groups/list/continue", Dropbox.Api.Team.GroupsListContinueArg.Encoder, Dropbox.Api.Team.AlphaGroupsListResult.Decoder, Dropbox.Api.Team.GroupsListContinueError.Decoder);
+ return this.Transport.SendRpcRequestAsync(groupsListContinueArg, "api", "/team/alpha/groups/list/continue", Dropbox.Api.Team.GroupsListContinueArg.Encoder, Dropbox.Api.Team.GroupsListResult.Decoder, Dropbox.Api.Team.GroupsListContinueError.Decoder);
}
///
@@ -308,7 +308,7 @@ public sys.IAsyncResult BeginAlphaGroupsListContinue(GroupsListContinueArg group
/// Thrown if there is an error
/// processing the request; This will contain a .
- public t.Task AlphaGroupsListContinueAsync(string cursor)
+ public t.Task AlphaGroupsListContinueAsync(string cursor)
{
var groupsListContinueArg = new GroupsListContinueArg(cursor);
@@ -344,9 +344,9 @@ public sys.IAsyncResult BeginAlphaGroupsListContinue(string cursor,
/// Thrown if there is an error
/// processing the request; This will contain a .
- public AlphaGroupsListResult EndAlphaGroupsListContinue(sys.IAsyncResult asyncResult)
+ public GroupsListResult EndAlphaGroupsListContinue(sys.IAsyncResult asyncResult)
{
- var task = asyncResult as t.Task;
+ var task = asyncResult as t.Task;
if (task == null)
{
throw new sys.InvalidOperationException();
@@ -359,29 +359,29 @@ public AlphaGroupsListResult EndAlphaGroupsListContinue(sys.IAsyncResult asyncRe
/// Updates a group's name, external ID or management type.
/// Permission : Team member management
///
- /// The request parameters
+ /// The request parameters
/// The task that represents the asynchronous send operation. The TResult
/// parameter contains the response from the server.
/// Thrown if there is an error
/// processing the request; This will contain a .
- public t.Task AlphaGroupsUpdateAsync(AlphaGroupUpdateArgs alphaGroupUpdateArgs)
+ public t.Task AlphaGroupsUpdateAsync(GroupUpdateArgs groupUpdateArgs)
{
- return this.Transport.SendRpcRequestAsync(alphaGroupUpdateArgs, "api", "/team/alpha/groups/update", Dropbox.Api.Team.AlphaGroupUpdateArgs.Encoder, Dropbox.Api.Team.AlphaGroupFullInfo.Decoder, Dropbox.Api.Team.GroupUpdateError.Decoder);
+ return this.Transport.SendRpcRequestAsync(groupUpdateArgs, "api", "/team/alpha/groups/update", Dropbox.Api.Team.GroupUpdateArgs.Encoder, Dropbox.Api.Team.GroupFullInfo.Decoder, Dropbox.Api.Team.GroupUpdateError.Decoder);
}
///
/// Begins an asynchronous send to the alpha groups update route.
///
- /// The request parameters.
+ /// The request parameters.
/// The method to be called when the asynchronous send is
/// completed.
/// A user provided object that distinguished this send from other
/// send requests.
/// An object that represents the asynchronous send request.
- public sys.IAsyncResult BeginAlphaGroupsUpdate(AlphaGroupUpdateArgs alphaGroupUpdateArgs, sys.AsyncCallback callback, object state = null)
+ public sys.IAsyncResult BeginAlphaGroupsUpdate(GroupUpdateArgs groupUpdateArgs, sys.AsyncCallback callback, object state = null)
{
- var task = this.AlphaGroupsUpdateAsync(alphaGroupUpdateArgs);
+ var task = this.AlphaGroupsUpdateAsync(groupUpdateArgs);
return enc.Util.ToApm(task, callback, state);
}
@@ -406,19 +406,19 @@ public sys.IAsyncResult BeginAlphaGroupsUpdate(AlphaGroupUpdateArgs alphaGroupUp
/// Thrown if there is an error
/// processing the request; This will contain a .
- public t.Task AlphaGroupsUpdateAsync(GroupSelector @group,
- bool returnMembers = true,
- string newGroupName = null,
- string newGroupExternalId = null,
- Dropbox.Api.TeamCommon.GroupManagementType newGroupManagementType = null)
+ public t.Task AlphaGroupsUpdateAsync(GroupSelector @group,
+ bool returnMembers = true,
+ string newGroupName = null,
+ string newGroupExternalId = null,
+ Dropbox.Api.TeamCommon.GroupManagementType newGroupManagementType = null)
{
- var alphaGroupUpdateArgs = new AlphaGroupUpdateArgs(@group,
- returnMembers,
- newGroupName,
- newGroupExternalId,
- newGroupManagementType);
+ var groupUpdateArgs = new GroupUpdateArgs(@group,
+ returnMembers,
+ newGroupName,
+ newGroupExternalId,
+ newGroupManagementType);
- return this.AlphaGroupsUpdateAsync(alphaGroupUpdateArgs);
+ return this.AlphaGroupsUpdateAsync(groupUpdateArgs);
}
///
@@ -448,13 +448,13 @@ public sys.IAsyncResult BeginAlphaGroupsUpdate(GroupSelector @group,
sys.AsyncCallback callback = null,
object callbackState = null)
{
- var alphaGroupUpdateArgs = new AlphaGroupUpdateArgs(@group,
- returnMembers,
- newGroupName,
- newGroupExternalId,
- newGroupManagementType);
+ var groupUpdateArgs = new GroupUpdateArgs(@group,
+ returnMembers,
+ newGroupName,
+ newGroupExternalId,
+ newGroupManagementType);
- return this.BeginAlphaGroupsUpdate(alphaGroupUpdateArgs, callback, callbackState);
+ return this.BeginAlphaGroupsUpdate(groupUpdateArgs, callback, callbackState);
}
///
@@ -467,9 +467,9 @@ public sys.IAsyncResult BeginAlphaGroupsUpdate(GroupSelector @group,
/// Thrown if there is an error
/// processing the request; This will contain a .
- public AlphaGroupFullInfo EndAlphaGroupsUpdate(sys.IAsyncResult asyncResult)
+ public GroupFullInfo EndAlphaGroupsUpdate(sys.IAsyncResult asyncResult)
{
- var task = asyncResult as t.Task;
+ var task = asyncResult as t.Task;
if (task == null)
{
throw new sys.InvalidOperationException();
@@ -1042,16 +1042,20 @@ public sys.IAsyncResult BeginGroupsCreate(GroupCreateArg groupCreateArg, sys.Asy
/// Group name.
/// The creator of a team can associate an arbitrary
/// external ID to the group.
+ /// Whether the team can be managed by selected
+ /// users, or only by team admins
/// The task that represents the asynchronous send operation. The TResult
/// parameter contains the response from the server.
/// Thrown if there is an error
/// processing the request; This will contain a .
public t.Task GroupsCreateAsync(string groupName,
- string groupExternalId = null)
+ string groupExternalId = null,
+ Dropbox.Api.TeamCommon.GroupManagementType groupManagementType = null)
{
var groupCreateArg = new GroupCreateArg(groupName,
- groupExternalId);
+ groupExternalId,
+ groupManagementType);
return this.GroupsCreateAsync(groupCreateArg);
}
@@ -1062,6 +1066,8 @@ public t.Task GroupsCreateAsync(string groupName,
/// Group name.
/// The creator of a team can associate an arbitrary
/// external ID to the group.
+ /// Whether the team can be managed by selected
+ /// users, or only by team admins
/// The method to be called when the asynchronous send is
/// completed.
/// A user provided object that distinguished this send
@@ -1069,11 +1075,13 @@ public t.Task GroupsCreateAsync(string groupName,
/// An object that represents the asynchronous send request.
public sys.IAsyncResult BeginGroupsCreate(string groupName,
string groupExternalId = null,
+ Dropbox.Api.TeamCommon.GroupManagementType groupManagementType = null,
sys.AsyncCallback callback = null,
object callbackState = null)
{
var groupCreateArg = new GroupCreateArg(groupName,
- groupExternalId);
+ groupExternalId,
+ groupManagementType);
return this.BeginGroupsCreate(groupCreateArg, callback, callbackState);
}
@@ -1780,6 +1788,8 @@ public GroupsMembersListResult EndGroupsMembersListContinue(sys.IAsyncResult asy
/// resources may take additional time. Use the to determine
/// whether this process has completed.
+ /// This method permits removing the only owner of a group, even in cases where
+ /// this is not possible via the web client.
/// Permission : Team member management
///
/// The request parameters
@@ -1815,6 +1825,8 @@ public sys.IAsyncResult BeginGroupsMembersRemove(GroupMembersRemoveArg groupMemb
/// resources may take additional time. Use the to determine
/// whether this process has completed.
+ /// This method permits removing the only owner of a group, even in cases where
+ /// this is not possible via the web client.
/// Permission : Team member management
///
/// Group from which users will be removed.
@@ -2042,6 +2054,8 @@ public sys.IAsyncResult BeginGroupsUpdate(GroupUpdateArgs groupUpdateArgs, sys.A
/// Optional argument. New group external ID. If the
/// argument is None, the group's external_id won't be updated. If the argument is
/// empty string, the group's external id will be cleared.
+ /// Set new group management type, if
+ /// provided.
/// The task that represents the asynchronous send operation. The TResult
/// parameter contains the response from the server.
/// Thrown if there is an error
@@ -2050,12 +2064,14 @@ public sys.IAsyncResult BeginGroupsUpdate(GroupUpdateArgs groupUpdateArgs, sys.A
public t.Task GroupsUpdateAsync(GroupSelector @group,
bool returnMembers = true,
string newGroupName = null,
- string newGroupExternalId = null)
+ string newGroupExternalId = null,
+ Dropbox.Api.TeamCommon.GroupManagementType newGroupManagementType = null)
{
var groupUpdateArgs = new GroupUpdateArgs(@group,
returnMembers,
newGroupName,
- newGroupExternalId);
+ newGroupExternalId,
+ newGroupManagementType);
return this.GroupsUpdateAsync(groupUpdateArgs);
}
@@ -2072,6 +2088,8 @@ public t.Task GroupsUpdateAsync(GroupSelector @group,
/// Optional argument. New group external ID. If the
/// argument is None, the group's external_id won't be updated. If the argument is
/// empty string, the group's external id will be cleared.
+ /// Set new group management type, if
+ /// provided.
/// The method to be called when the asynchronous send is
/// completed.
/// A user provided object that distinguished this send
@@ -2081,13 +2099,15 @@ public sys.IAsyncResult BeginGroupsUpdate(GroupSelector @group,
bool returnMembers = true,
string newGroupName = null,
string newGroupExternalId = null,
+ Dropbox.Api.TeamCommon.GroupManagementType newGroupManagementType = null,
sys.AsyncCallback callback = null,
object callbackState = null)
{
var groupUpdateArgs = new GroupUpdateArgs(@group,
returnMembers,
newGroupName,
- newGroupExternalId);
+ newGroupExternalId,
+ newGroupManagementType);
return this.BeginGroupsUpdate(groupUpdateArgs, callback, callbackState);
}
@@ -2912,14 +2932,17 @@ public sys.IAsyncResult BeginMembersList(MembersListArg membersListArg, sys.Asyn
/// Permission : Team information
///
/// Number of results to return per call.
+ /// Whether to return removed members.
/// The task that represents the asynchronous send operation. The TResult
/// parameter contains the response from the server.
/// Thrown if there is an error
/// processing the request; This will contain a .
- public t.Task MembersListAsync(uint limit = 1000)
+ public t.Task MembersListAsync(uint limit = 1000,
+ bool includeRemoved = false)
{
- var membersListArg = new MembersListArg(limit);
+ var membersListArg = new MembersListArg(limit,
+ includeRemoved);
return this.MembersListAsync(membersListArg);
}
@@ -2928,16 +2951,19 @@ public t.Task MembersListAsync(uint limit = 1000)
/// Begins an asynchronous send to the members list route.
///
/// Number of results to return per call.
+ /// Whether to return removed members.
/// The method to be called when the asynchronous send is
/// completed.
/// A user provided object that distinguished this send
/// from other send requests.
/// An object that represents the asynchronous send request.
public sys.IAsyncResult BeginMembersList(uint limit = 1000,
+ bool includeRemoved = false,
sys.AsyncCallback callback = null,
object callbackState = null)
{
- var membersListArg = new MembersListArg(limit);
+ var membersListArg = new MembersListArg(limit,
+ includeRemoved);
return this.BeginMembersList(membersListArg, callback, callbackState);
}
@@ -3056,6 +3082,92 @@ public MembersListResult EndMembersListContinue(sys.IAsyncResult asyncResult)
return task.Result;
}
+ ///
+ /// Recover a deleted member.
+ /// Permission : Team member management
+ /// Exactly one of team_member_id, email, or external_id must be provided to
+ /// identify the user account.
+ ///
+ /// The request parameters
+ /// The task that represents the asynchronous send operation.
+ /// Thrown if there is an error
+ /// processing the request; This will contain a .
+ public t.Task MembersRecoverAsync(MembersRecoverArg membersRecoverArg)
+ {
+ return this.Transport.SendRpcRequestAsync(membersRecoverArg, "api", "/team/members/recover", Dropbox.Api.Team.MembersRecoverArg.Encoder, enc.EmptyDecoder.Instance, Dropbox.Api.Team.MembersRecoverError.Decoder);
+ }
+
+ ///
+ /// Begins an asynchronous send to the members recover route.
+ ///
+ /// The request parameters.
+ /// The method to be called when the asynchronous send is
+ /// completed.
+ /// A user provided object that distinguished this send from other
+ /// send requests.
+ /// An object that represents the asynchronous send request.
+ public sys.IAsyncResult BeginMembersRecover(MembersRecoverArg membersRecoverArg, sys.AsyncCallback callback, object state = null)
+ {
+ var task = this.MembersRecoverAsync(membersRecoverArg);
+
+ return enc.Util.ToApm(task, callback, state);
+ }
+
+ ///
+ /// Recover a deleted member.
+ /// Permission : Team member management
+ /// Exactly one of team_member_id, email, or external_id must be provided to
+ /// identify the user account.
+ ///
+ /// Identity of user to recover.
+ /// The task that represents the asynchronous send operation.
+ /// Thrown if there is an error
+ /// processing the request; This will contain a .
+ public t.Task MembersRecoverAsync(UserSelectorArg user)
+ {
+ var membersRecoverArg = new MembersRecoverArg(user);
+
+ return this.MembersRecoverAsync(membersRecoverArg);
+ }
+
+ ///
+ /// Begins an asynchronous send to the members recover route.
+ ///
+ /// Identity of user to recover.
+ /// The method to be called when the asynchronous send is
+ /// completed.
+ /// A user provided object that distinguished this send
+ /// from other send requests.
+ /// An object that represents the asynchronous send request.
+ public sys.IAsyncResult BeginMembersRecover(UserSelectorArg user,
+ sys.AsyncCallback callback,
+ object callbackState = null)
+ {
+ var membersRecoverArg = new MembersRecoverArg(user);
+
+ return this.BeginMembersRecover(membersRecoverArg, callback, callbackState);
+ }
+
+ ///
+ /// Waits for the pending asynchronous send to the members recover route to
+ /// complete
+ ///
+ /// The reference to the pending asynchronous send
+ /// request
+ /// Thrown if there is an error
+ /// processing the request; This will contain a .
+ public void EndMembersRecover(sys.IAsyncResult asyncResult)
+ {
+ var task = asyncResult as t.Task;
+ if (task == null)
+ {
+ throw new sys.InvalidOperationException();
+ }
+ }
+
///
/// Removes a member from a team.
/// Permission : Team member management
diff --git a/Dropbox.Api/TeamCommon/AlphaGroupSummary.cs b/Dropbox.Api/TeamCommon/AlphaGroupSummary.cs
deleted file mode 100644
index 0fdd08cca4..0000000000
--- a/Dropbox.Api/TeamCommon/AlphaGroupSummary.cs
+++ /dev/null
@@ -1,152 +0,0 @@
-//
-// Auto-generated by StoneAPI, do not modify.
-//
-
-namespace Dropbox.Api.TeamCommon
-{
- using sys = System;
- using col = System.Collections.Generic;
- using re = System.Text.RegularExpressions;
-
- using enc = Dropbox.Api.Stone;
-
- ///
- /// Information about a group.
- ///
- ///
- public class AlphaGroupSummary : GroupSummary
- {
- #pragma warning disable 108
-
- ///
- /// The encoder instance.
- ///
- internal static enc.StructEncoder Encoder = new AlphaGroupSummaryEncoder();
-
- ///
- /// The decoder instance.
- ///
- internal static enc.StructDecoder Decoder = new AlphaGroupSummaryDecoder();
-
- ///
- /// Initializes a new instance of the
- /// class.
- ///
- /// The group name
- /// The group id
- /// Who is allowed to manage the group.
- /// External ID of group. This is an arbitrary ID that an
- /// admin can attach to a group.
- /// The number of members in the group.
- public AlphaGroupSummary(string groupName,
- string groupId,
- GroupManagementType groupManagementType,
- string groupExternalId = null,
- uint? memberCount = null)
- : base(groupName, groupId, groupExternalId, memberCount)
- {
- if (groupManagementType == null)
- {
- throw new sys.ArgumentNullException("groupManagementType");
- }
-
- this.GroupManagementType = groupManagementType;
- }
-
- ///
- /// Initializes a new instance of the
- /// class.
- ///
- /// This is to construct an instance of the object when
- /// deserializing.
- public AlphaGroupSummary()
- {
- }
-
- ///
- /// Who is allowed to manage the group.
- ///
- public GroupManagementType GroupManagementType { get; protected set; }
-
- #region Encoder class
-
- ///
- /// Encoder for .
- ///
- private class AlphaGroupSummaryEncoder : enc.StructEncoder
- {
- ///
- /// Encode fields of given value.
- ///
- /// The value.
- /// The writer.
- public override void EncodeFields(AlphaGroupSummary value, enc.IJsonWriter writer)
- {
- WriteProperty("group_name", value.GroupName, writer, enc.StringEncoder.Instance);
- WriteProperty("group_id", value.GroupId, writer, enc.StringEncoder.Instance);
- WriteProperty("group_management_type", value.GroupManagementType, writer, Dropbox.Api.TeamCommon.GroupManagementType.Encoder);
- if (value.GroupExternalId != null)
- {
- WriteProperty("group_external_id", value.GroupExternalId, writer, enc.StringEncoder.Instance);
- }
- if (value.MemberCount != null)
- {
- WriteProperty("member_count", value.MemberCount.Value, writer, enc.UInt32Encoder.Instance);
- }
- }
- }
-
- #endregion
-
-
- #region Decoder class
-
- ///
- /// Decoder for .
- ///
- private class AlphaGroupSummaryDecoder : enc.StructDecoder
- {
- ///
- /// Create a new instance of type .
- ///
- /// The struct instance.
- protected override AlphaGroupSummary Create()
- {
- return new AlphaGroupSummary();
- }
-
- ///
- /// Set given field.
- ///
- /// The field value.
- /// The field name.
- /// The json reader.
- protected override void SetField(AlphaGroupSummary value, string fieldName, enc.IJsonReader reader)
- {
- switch (fieldName)
- {
- case "group_name":
- value.GroupName = enc.StringDecoder.Instance.Decode(reader);
- break;
- case "group_id":
- value.GroupId = enc.StringDecoder.Instance.Decode(reader);
- break;
- case "group_management_type":
- value.GroupManagementType = Dropbox.Api.TeamCommon.GroupManagementType.Decoder.Decode(reader);
- break;
- case "group_external_id":
- value.GroupExternalId = enc.StringDecoder.Instance.Decode(reader);
- break;
- case "member_count":
- value.MemberCount = enc.UInt32Decoder.Instance.Decode(reader);
- break;
- default:
- reader.Skip();
- break;
- }
- }
- }
-
- #endregion
- }
-}
diff --git a/Dropbox.Api/TeamCommon/GroupSummary.cs b/Dropbox.Api/TeamCommon/GroupSummary.cs
index 67891bd891..264dc00f4d 100644
--- a/Dropbox.Api/TeamCommon/GroupSummary.cs
+++ b/Dropbox.Api/TeamCommon/GroupSummary.cs
@@ -13,7 +13,6 @@ namespace Dropbox.Api.TeamCommon
///
/// Information about a group.
///
- ///
public class GroupSummary
{
#pragma warning disable 108
@@ -33,11 +32,13 @@ public class GroupSummary
///
/// The group name
/// The group id
+ /// Who is allowed to manage the group.
/// External ID of group. This is an arbitrary ID that an
/// admin can attach to a group.
/// The number of members in the group.
public GroupSummary(string groupName,
string groupId,
+ GroupManagementType groupManagementType,
string groupExternalId = null,
uint? memberCount = null)
{
@@ -51,8 +52,14 @@ public GroupSummary(string groupName,
throw new sys.ArgumentNullException("groupId");
}
+ if (groupManagementType == null)
+ {
+ throw new sys.ArgumentNullException("groupManagementType");
+ }
+
this.GroupName = groupName;
this.GroupId = groupId;
+ this.GroupManagementType = groupManagementType;
this.GroupExternalId = groupExternalId;
this.MemberCount = memberCount;
}
@@ -76,6 +83,11 @@ public GroupSummary()
///
public string GroupId { get; protected set; }
+ ///
+ /// Who is allowed to manage the group.
+ ///
+ public GroupManagementType GroupManagementType { get; protected set; }
+
///
/// External ID of group. This is an arbitrary ID that an admin can attach to a
/// group.
@@ -103,6 +115,7 @@ public override void EncodeFields(GroupSummary value, enc.IJsonWriter writer)
{
WriteProperty("group_name", value.GroupName, writer, enc.StringEncoder.Instance);
WriteProperty("group_id", value.GroupId, writer, enc.StringEncoder.Instance);
+ WriteProperty("group_management_type", value.GroupManagementType, writer, Dropbox.Api.TeamCommon.GroupManagementType.Encoder);
if (value.GroupExternalId != null)
{
WriteProperty("group_external_id", value.GroupExternalId, writer, enc.StringEncoder.Instance);
@@ -149,6 +162,9 @@ protected override void SetField(GroupSummary value, string fieldName, enc.IJson
case "group_id":
value.GroupId = enc.StringDecoder.Instance.Decode(reader);
break;
+ case "group_management_type":
+ value.GroupManagementType = Dropbox.Api.TeamCommon.GroupManagementType.Decoder.Decode(reader);
+ break;
case "group_external_id":
value.GroupExternalId = enc.StringDecoder.Instance.Decode(reader);
break;
diff --git a/Dropbox.Api/Users/GetAccountError.cs b/Dropbox.Api/Users/GetAccountError.cs
index 8b6a34be7a..e172764a57 100644
--- a/Dropbox.Api/Users/GetAccountError.cs
+++ b/Dropbox.Api/Users/GetAccountError.cs
@@ -58,24 +58,24 @@ public NoAccount AsNoAccount
}
///
- /// Gets a value indicating whether this instance is Unknown
+ /// Gets a value indicating whether this instance is Other
///
- public bool IsUnknown
+ public bool IsOther
{
get
{
- return this is Unknown;
+ return this is Other;
}
}
///
- /// Gets this instance as a Unknown, or null.
+ /// Gets this instance as a Other, or null.
///
- public Unknown AsUnknown
+ public Other AsOther
{
get
{
- return this as Unknown;
+ return this as Other;
}
}
@@ -99,10 +99,10 @@ public override void EncodeFields(GetAccountError value, enc.IJsonWriter writer)
NoAccount.Encoder.EncodeFields((NoAccount)value, writer);
return;
}
- if (value is Unknown)
+ if (value is Other)
{
- WriteProperty(".tag", "unknown", writer, enc.StringEncoder.Instance);
- Unknown.Encoder.EncodeFields((Unknown)value, writer);
+ WriteProperty(".tag", "other", writer, enc.StringEncoder.Instance);
+ Other.Encoder.EncodeFields((Other)value, writer);
return;
}
throw new sys.InvalidOperationException();
@@ -140,7 +140,7 @@ protected override GetAccountError Decode(string tag, enc.IJsonReader reader)
case "no_account":
return NoAccount.Decoder.DecodeFields(reader);
default:
- return Unknown.Decoder.DecodeFields(reader);
+ return Other.Decoder.DecodeFields(reader);
}
}
}
@@ -227,47 +227,47 @@ public override NoAccount DecodeFields(enc.IJsonReader reader)
}
///
- /// The unknown object
+ /// The other object
///
- public sealed class Unknown : GetAccountError
+ public sealed class Other : GetAccountError
{
#pragma warning disable 108
///
/// The encoder instance.
///
- internal static enc.StructEncoder Encoder = new UnknownEncoder();
+ internal static enc.StructEncoder Encoder = new OtherEncoder();
///
/// The decoder instance.
///
- internal static enc.StructDecoder Decoder = new UnknownDecoder();
+ internal static enc.StructDecoder Decoder = new OtherDecoder();
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
- private Unknown()
+ private Other()
{
}
///
- /// A singleton instance of Unknown
+ /// A singleton instance of Other
///
- public static readonly Unknown Instance = new Unknown();
+ public static readonly Other Instance = new Other();
#region Encoder class
///
- /// Encoder for .
+ /// Encoder for .
///
- private class UnknownEncoder : enc.StructEncoder
+ private class OtherEncoder : enc.StructEncoder
{
///
/// Encode fields of given value.
///
/// The value.
/// The writer.
- public override void EncodeFields(Unknown value, enc.IJsonWriter writer)
+ public override void EncodeFields(Other value, enc.IJsonWriter writer)
{
}
}
@@ -277,17 +277,17 @@ public override void EncodeFields(Unknown value, enc.IJsonWriter writer)
#region Decoder class
///
- /// Decoder for .
+ /// Decoder for .
///
- private class UnknownDecoder : enc.StructDecoder
+ private class OtherDecoder : enc.StructDecoder
{
///
- /// Create a new instance of type .
+ /// Create a new instance of type .
///
/// The struct instance.
- protected override Unknown Create()
+ protected override Other Create()
{
- return new Unknown();
+ return new Other();
}
///
@@ -295,9 +295,9 @@ protected override Unknown Create()
///
/// The json reader.
/// The decoded object.
- public override Unknown DecodeFields(enc.IJsonReader reader)
+ public override Other DecodeFields(enc.IJsonReader reader)
{
- return Unknown.Instance;
+ return Other.Instance;
}
}