void enc.IEncodable <DeletedMetadata> .Encode(enc.IEncoder encoder) { using (var obj = encoder.AddObject()) { obj.AddField <string>(".tag", "deleted"); obj.AddField <string>("name", this.Name); obj.AddField <string>("path_lower", this.PathLower); } }
void enc.IEncodable <BasicAccount> .Encode(enc.IEncoder encoder) { using (var obj = encoder.AddObject()) { obj.AddField <string>("account_id", this.AccountId); obj.AddFieldObject <Name>("name", this.Name); obj.AddField <bool>("is_teammate", this.IsTeammate); } }
void enc.IEncodable <ThumbnailArg> .Encode(enc.IEncoder encoder) { using (var obj = encoder.AddObject()) { obj.AddField <string>("path", this.Path); obj.AddFieldObject <ThumbnailFormat>("format", this.Format); obj.AddFieldObject <ThumbnailSize>("size", this.Size); } }
void enc.IEncodable <UserMembershipInfo> .Encode(enc.IEncoder encoder) { using (var obj = encoder.AddObject()) { obj.AddFieldObject <AccessType>("access_type", this.AccessType); obj.AddFieldObject <UserInfo>("user", this.User); obj.AddField <bool>("active", this.Active); } }
void enc.IEncodable <SearchResult> .Encode(enc.IEncoder encoder) { using (var obj = encoder.AddObject()) { obj.AddFieldObjectList <SearchMatch>("matches", this.Matches); obj.AddField <bool>("more", this.More); obj.AddField <ulong>("start", this.Start); } }
void enc.IEncodable <ListFolderResult> .Encode(enc.IEncoder encoder) { using (var obj = encoder.AddObject()) { obj.AddFieldObjectList <Metadata>("entries", this.Entries); obj.AddField <string>("cursor", this.Cursor); obj.AddField <bool>("has_more", this.HasMore); } }
void enc.IEncodable <GetSharedLinksArg> .Encode(enc.IEncoder encoder) { using (var obj = encoder.AddObject()) { if (this.Path != null) { obj.AddField <string>("path", this.Path); } } }
void enc.IEncodable <Name> .Encode(enc.IEncoder encoder) { using (var obj = encoder.AddObject()) { obj.AddField <string>("given_name", this.GivenName); obj.AddField <string>("surname", this.Surname); obj.AddField <string>("familiar_name", this.FamiliarName); obj.AddField <string>("display_name", this.DisplayName); } }
void enc.IEncodable <GroupInfo> .Encode(enc.IEncoder encoder) { using (var obj = encoder.AddObject()) { obj.AddField <string>("display_name", this.DisplayName); obj.AddField <string>("id", this.Id); obj.AddField <long>("member_count", this.MemberCount); obj.AddField <bool>("same_team", this.SameTeam); } }
void enc.IEncodable <SearchArg> .Encode(enc.IEncoder encoder) { using (var obj = encoder.AddObject()) { obj.AddField <string>("path", this.Path); obj.AddField <string>("query", this.Query); obj.AddField <ulong>("start", this.Start); obj.AddField <ulong>("max_results", this.MaxResults); obj.AddFieldObject <SearchMode>("mode", this.Mode); } }
void enc.IEncodable <PreviewArg> .Encode(enc.IEncoder encoder) { using (var obj = encoder.AddObject()) { obj.AddField <string>("path", this.Path); if (this.Rev != null) { obj.AddField <string>("rev", this.Rev); } } }
void enc.IEncodable <ListFolderLongpollResult> .Encode(enc.IEncoder encoder) { using (var obj = encoder.AddObject()) { obj.AddField <bool>("changes", this.Changes); if (this.Backoff != null) { obj.AddField <ulong>("backoff", this.Backoff.Value); } } }
void enc.IEncodable <CreateSharedLinkArg> .Encode(enc.IEncoder encoder) { using (var obj = encoder.AddObject()) { obj.AddField <string>("path", this.Path); obj.AddField <bool>("short_url", this.ShortUrl); if (this.PendingUpload != null) { obj.AddFieldObject <PendingUploadMode>("pending_upload", this.PendingUpload); } } }
void enc.IEncodable <UserInfo> .Encode(enc.IEncoder encoder) { using (var obj = encoder.AddObject()) { obj.AddField <string>("account_id", this.AccountId); obj.AddField <string>("display_name", this.DisplayName); obj.AddField <bool>("same_team", this.SameTeam); if (this.MemberId != null) { obj.AddField <string>("member_id", this.MemberId); } } }
void enc.IEncodable <FolderMetadata> .Encode(enc.IEncoder encoder) { using (var obj = encoder.AddObject()) { obj.AddField <string>(".tag", "folder"); obj.AddField <string>("name", this.Name); obj.AddField <string>("path_lower", this.PathLower); if (this.Id != null) { obj.AddField <string>("id", this.Id); } } }
void enc.IEncodable <CollectionLinkMetadata> .Encode(enc.IEncoder encoder) { using (var obj = encoder.AddObject()) { obj.AddField <string>(".tag", "collection"); obj.AddField <string>("url", this.Url); obj.AddFieldObject <Visibility>("visibility", this.Visibility); if (this.Expires != null) { obj.AddField <sys.DateTime>("expires", this.Expires.Value); } } }
void enc.IEncodable <CommitInfo> .Encode(enc.IEncoder encoder) { using (var obj = encoder.AddObject()) { obj.AddField <string>("path", this.Path); obj.AddFieldObject <WriteMode>("mode", this.Mode); obj.AddField <bool>("autorename", this.Autorename); if (this.ClientModified != null) { obj.AddField <sys.DateTime>("client_modified", this.ClientModified.Value); } obj.AddField <bool>("mute", this.Mute); } }
void enc.IEncodable <BasicSharedFolderMetadata> .Encode(enc.IEncoder encoder) { using (var obj = encoder.AddObject()) { obj.AddField <string>(".tag", "basic"); obj.AddField <string>("name", this.Name); obj.AddField <string>("id", this.Id); obj.AddFieldObject <AccessType>("access_type", this.AccessType); obj.AddFieldObject <SharedLinkPolicy>("shared_link_policy", this.SharedLinkPolicy); if (this.PathLower != null) { obj.AddField <string>("path_lower", this.PathLower); } } }
void enc.IEncodable <FullSharedFolderMetadata> .Encode(enc.IEncoder encoder) { using (var obj = encoder.AddObject()) { obj.AddField <string>(".tag", "full"); obj.AddField <string>("name", this.Name); obj.AddField <string>("id", this.Id); obj.AddFieldObject <AccessType>("access_type", this.AccessType); obj.AddFieldObject <SharedLinkPolicy>("shared_link_policy", this.SharedLinkPolicy); obj.AddFieldObjectList <UserMembershipInfo>("membership", this.Membership); obj.AddFieldObjectList <GroupMembershipInfo>("groups", this.Groups); if (this.PathLower != null) { obj.AddField <string>("path_lower", this.PathLower); } } }
void enc.IEncodable <FileMetadata> .Encode(enc.IEncoder encoder) { using (var obj = encoder.AddObject()) { obj.AddField <string>(".tag", "file"); obj.AddField <string>("name", this.Name); obj.AddField <string>("path_lower", this.PathLower); obj.AddField <sys.DateTime>("client_modified", this.ClientModified); obj.AddField <sys.DateTime>("server_modified", this.ServerModified); obj.AddField <string>("rev", this.Rev); obj.AddField <ulong>("size", this.Size); if (this.Id != null) { obj.AddField <string>("id", this.Id); } } }
void enc.IEncodable <FullAccount> .Encode(enc.IEncoder encoder) { using (var obj = encoder.AddObject()) { obj.AddField <string>("account_id", this.AccountId); obj.AddFieldObject <Name>("name", this.Name); obj.AddField <string>("email", this.Email); obj.AddField <string>("locale", this.Locale); obj.AddField <string>("referral_link", this.ReferralLink); obj.AddField <bool>("is_paired", this.IsPaired); obj.AddFieldObject <AccountType>("account_type", this.AccountType); if (this.Country != null) { obj.AddField <string>("country", this.Country); } if (this.Team != null) { obj.AddFieldObject <Team>("team", this.Team); } } }
void enc.IEncodable <LinkMetadata> .Encode(enc.IEncoder encoder) { if (this.IsPath) { ((enc.IEncodable <PathLinkMetadata>) this.AsPath).Encode(encoder); } else if (this.IsCollection) { ((enc.IEncodable <CollectionLinkMetadata>) this.AsCollection).Encode(encoder); } else { using (var obj = encoder.AddObject()) { obj.AddField <string>(".tag", ""); obj.AddField <string>("url", this.Url); obj.AddFieldObject <Visibility>("visibility", this.Visibility); if (this.Expires != null) { obj.AddField <sys.DateTime>("expires", this.Expires.Value); } } } }