예제 #1
0
        /// <summary>
        /// <para>Initializes a new instance of the <see cref="PaperDocCreateArgs" />
        /// class.</para>
        /// </summary>
        /// <param name="importFormat">The format of provided data.</param>
        /// <param name="parentFolderId">The Paper folder ID where the Paper document should be
        /// created. The API user has to have write access to this folder or error is
        /// thrown.</param>
        public PaperDocCreateArgs(ImportFormat importFormat,
                                  string parentFolderId = null)
        {
            if (importFormat == null)
            {
                throw new sys.ArgumentNullException("importFormat");
            }

            this.ImportFormat   = importFormat;
            this.ParentFolderId = parentFolderId;
        }
        /// <summary>
        /// <para>Initializes a new instance of the <see cref="PaperDocUpdateArgs" />
        /// class.</para>
        /// </summary>
        /// <param name="docId">The Paper doc ID.</param>
        /// <param name="docUpdatePolicy">The policy used for the current update call.</param>
        /// <param name="revision">The latest doc revision. This value must match the head
        /// revision or an error code will be returned. This is to prevent colliding
        /// writes.</param>
        /// <param name="importFormat">The format of provided data.</param>
        public PaperDocUpdateArgs(string docId,
                                  PaperDocUpdatePolicy docUpdatePolicy,
                                  long revision,
                                  ImportFormat importFormat)
            : base(docId)
        {
            if (docUpdatePolicy == null)
            {
                throw new sys.ArgumentNullException("docUpdatePolicy");
            }

            if (importFormat == null)
            {
                throw new sys.ArgumentNullException("importFormat");
            }

            this.DocUpdatePolicy = docUpdatePolicy;
            this.Revision        = revision;
            this.ImportFormat    = importFormat;
        }