public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as ItemProtocolLink; if (typedSource != null) { Link = typedSource.Link; Redirection = typedSource.Redirection; } else { JToken token; if (source.TryGetProperty("Link", out token) && token.Type != JTokenType.Null) { Link = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Redirection", out token) && token.Type != JTokenType.Null) { Redirection = (Redirection)serializer.Deserialize(token.CreateReader(), typeof(Redirection)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as EncryptedEmailParams; if (typedSource != null) { Subject = typedSource.Subject; ExpirationDays = typedSource.ExpirationDays; NotifyOnUse = typedSource.NotifyOnUse; } else { JToken token; if (source.TryGetProperty("Subject", out token) && token.Type != JTokenType.Null) { Subject = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("ExpirationDays", out token) && token.Type != JTokenType.Null) { ExpirationDays = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("NotifyOnUse", out token) && token.Type != JTokenType.Null) { NotifyOnUse = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as AccessControlsBulkParams; if (typedSource != null) { NotifyUser = typedSource.NotifyUser; NotifyMessage = typedSource.NotifyMessage; AccessControlParams = typedSource.AccessControlParams; } else { JToken token; if (source.TryGetProperty("NotifyUser", out token) && token.Type != JTokenType.Null) { NotifyUser = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("NotifyMessage", out token) && token.Type != JTokenType.Null) { NotifyMessage = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("AccessControlParams", out token) && token.Type != JTokenType.Null) { AccessControlParams = (IEnumerable <AccessControlParam>)serializer.Deserialize(token.CreateReader(), typeof(IEnumerable <AccessControlParam>)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as DeviceStatus; if (typedSource != null) { LockedUsers = typedSource.LockedUsers; UsersToWipe = typedSource.UsersToWipe; } else { JToken token; if (source.TryGetProperty("LockedUsers", out token) && token.Type != JTokenType.Null) { LockedUsers = (IEnumerable <User>)serializer.Deserialize(token.CreateReader(), typeof(IEnumerable <User>)); } if (source.TryGetProperty("UsersToWipe", out token) && token.Type != JTokenType.Null) { UsersToWipe = (IEnumerable <DeviceUserWipe>)serializer.Deserialize(token.CreateReader(), typeof(IEnumerable <DeviceUserWipe>)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as SentNotification; if (typedSource != null) { DateSent = typedSource.DateSent; Subject = typedSource.Subject; To = typedSource.To; } else { JToken token; if (source.TryGetProperty("DateSent", out token) && token.Type != JTokenType.Null) { DateSent = (DateTime?)serializer.Deserialize(token.CreateReader(), typeof(DateTime?)); } if (source.TryGetProperty("Subject", out token) && token.Type != JTokenType.Null) { Subject = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("To", out token) && token.Type != JTokenType.Null) { To = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as AccountMessageCode; if (typedSource != null) { AccountType = typedSource.AccountType; MessageType = typedSource.MessageType; CancelDate = typedSource.CancelDate; } else { JToken token; if (source.TryGetProperty("AccountType", out token) && token.Type != JTokenType.Null) { AccountType = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("MessageType", out token) && token.Type != JTokenType.Null) { MessageType = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("CancelDate", out token) && token.Type != JTokenType.Null) { CancelDate = (DateTime?)serializer.Deserialize(token.CreateReader(), typeof(DateTime?)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as SupportFeedback; if (typedSource != null) { Rating = typedSource.Rating; Comments = typedSource.Comments; } else { JToken token; if (source.TryGetProperty("Rating", out token) && token.Type != JTokenType.Null) { Rating = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("Comments", out token) && token.Type != JTokenType.Null) { Comments = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as OutlookInformationOptionInt; if (typedSource != null) { Locked = typedSource.Locked; Value = typedSource.Value; } else { JToken token; if (source.TryGetProperty("Locked", out token) && token.Type != JTokenType.Null) { Locked = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if (source.TryGetProperty("Value", out token) && token.Type != JTokenType.Null) { Value = (int)serializer.Deserialize(token.CreateReader(), typeof(int)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as SalesTaxQuote; if (typedSource != null) { TaxRate = typedSource.TaxRate; TotalTax = typedSource.TotalTax; ErrorMessage = typedSource.ErrorMessage; } else { JToken token; if (source.TryGetProperty("TaxRate", out token) && token.Type != JTokenType.Null) { TaxRate = (decimal?)serializer.Deserialize(token.CreateReader(), typeof(decimal?)); } if (source.TryGetProperty("TotalTax", out token) && token.Type != JTokenType.Null) { TotalTax = (decimal?)serializer.Deserialize(token.CreateReader(), typeof(decimal?)); } if (source.TryGetProperty("ErrorMessage", out token) && token.Type != JTokenType.Null) { ErrorMessage = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as CompanyContactInformation; if (typedSource != null) { CompanyName = typedSource.CompanyName; PhoneNumber = typedSource.PhoneNumber; } else { JToken token; if (source.TryGetProperty("CompanyName", out token) && token.Type != JTokenType.Null) { CompanyName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("PhoneNumber", out token) && token.Type != JTokenType.Null) { PhoneNumber = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as ClientUpgradeWeb; if (typedSource != null) { ClientUpgradeLink = typedSource.ClientUpgradeLink; ClientUpgradeText = typedSource.ClientUpgradeText; } else { JToken token; if (source.TryGetProperty("ClientUpgradeLink", out token) && token.Type != JTokenType.Null) { ClientUpgradeLink = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("ClientUpgradeText", out token) && token.Type != JTokenType.Null) { ClientUpgradeText = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as UserPolicy; if (typedSource != null) { UserId = typedSource.UserId; Active = typedSource.Active; Policy = typedSource.Policy; } else { JToken token; if (source.TryGetProperty("UserId", out token) && token.Type != JTokenType.Null) { UserId = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Active", out token) && token.Type != JTokenType.Null) { Active = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("Policy", out token) && token.Type != JTokenType.Null) { Policy = (Policy)serializer.Deserialize(token.CreateReader(), typeof(Policy)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as CspTenantAccountParameters; if (typedSource != null) { PartnerAccountId = typedSource.PartnerAccountId; PartnerAdminEmail = typedSource.PartnerAdminEmail; } else { JToken token; if (source.TryGetProperty("PartnerAccountId", out token) && token.Type != JTokenType.Null) { PartnerAccountId = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("PartnerAdminEmail", out token) && token.Type != JTokenType.Null) { PartnerAdminEmail = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as ShareAccessRight; if (typedSource != null) { DisplayText = typedSource.DisplayText; AccessRightType = typedSource.AccessRightType; } else { JToken token; if (source.TryGetProperty("DisplayText", out token) && token.Type != JTokenType.Null) { DisplayText = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("AccessRightType", out token) && token.Type != JTokenType.Null) { AccessRightType = (SafeEnum <ShareAccessRightType>)serializer.Deserialize(token.CreateReader(), typeof(SafeEnum <ShareAccessRightType>)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as ToolInformation; if (typedSource != null) { ToolName = typedSource.ToolName; Version = typedSource.Version; } else { JToken token; if (source.TryGetProperty("ToolName", out token) && token.Type != JTokenType.Null) { ToolName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Version", out token) && token.Type != JTokenType.Null) { Version = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as NotifyUsersParams; if (typedSource != null) { UserIds = typedSource.UserIds; CustomMessage = typedSource.CustomMessage; } else { JToken token; if (source.TryGetProperty("UserIds", out token) && token.Type != JTokenType.Null) { UserIds = (IEnumerable <string>)serializer.Deserialize(token.CreateReader(), typeof(IEnumerable <string>)); } if (source.TryGetProperty("CustomMessage", out token) && token.Type != JTokenType.Null) { CustomMessage = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as Metadata; if (typedSource != null) { Name = typedSource.Name; Value = typedSource.Value; IsPublic = typedSource.IsPublic; } else { JToken token; if (source.TryGetProperty("Name", out token) && token.Type != JTokenType.Null) { Name = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Value", out token) && token.Type != JTokenType.Null) { Value = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("IsPublic", out token) && token.Type != JTokenType.Null) { IsPublic = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as FolderTemplateItem; if (typedSource != null) { Name = typedSource.Name; Description = typedSource.Description; Items = typedSource.Items; } else { JToken token; if (source.TryGetProperty("Name", out token) && token.Type != JTokenType.Null) { Name = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Description", out token) && token.Type != JTokenType.Null) { Description = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Items", out token) && token.Type != JTokenType.Null) { Items = (IEnumerable <FolderTemplateItem>)serializer.Deserialize(token.CreateReader(), typeof(IEnumerable <FolderTemplateItem>)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as WebhookSignatureKeys; if (typedSource != null) { PrimaryKey = typedSource.PrimaryKey; SecondaryKey = typedSource.SecondaryKey; } else { JToken token; if (source.TryGetProperty("PrimaryKey", out token) && token.Type != JTokenType.Null) { PrimaryKey = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("SecondaryKey", out token) && token.Type != JTokenType.Null) { SecondaryKey = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as EditingPlatformInfo; if (typedSource != null) { EditingPlatform = typedSource.EditingPlatform; ItemProtocolLink = typedSource.ItemProtocolLink; } else { JToken token; if (source.TryGetProperty("EditingPlatform", out token) && token.Type != JTokenType.Null) { EditingPlatform = (SafeEnum <EditingPlatform>)serializer.Deserialize(token.CreateReader(), typeof(SafeEnum <EditingPlatform>)); } if (source.TryGetProperty("ItemProtocolLink", out token) && token.Type != JTokenType.Null) { ItemProtocolLink = (ItemProtocolLink)serializer.Deserialize(token.CreateReader(), typeof(ItemProtocolLink)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as QuerySorting; if (typedSource != null) { SortBy = typedSource.SortBy; Ascending = typedSource.Ascending; } else { JToken token; if (source.TryGetProperty("SortBy", out token) && token.Type != JTokenType.Null) { SortBy = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Ascending", out token) && token.Type != JTokenType.Null) { Ascending = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as EmailAddress; if (typedSource != null) { Email = typedSource.Email; IsConfirmed = typedSource.IsConfirmed; IsPrimary = typedSource.IsPrimary; } else { JToken token; if (source.TryGetProperty("Email", out token) && token.Type != JTokenType.Null) { Email = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("IsConfirmed", out token) && token.Type != JTokenType.Null) { IsConfirmed = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("IsPrimary", out token) && token.Type != JTokenType.Null) { IsPrimary = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as SSOInfoEntry; if (typedSource != null) { Key = typedSource.Key; Value = typedSource.Value; } else { JToken token; if (source.TryGetProperty("Key", out token) && token.Type != JTokenType.Null) { Key = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Value", out token) && token.Type != JTokenType.Null) { Value = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as DeviceUserWipe; if (typedSource != null) { WipeToken = typedSource.WipeToken; Success = typedSource.Success; ErrorMessage = typedSource.ErrorMessage; } else { JToken token; if (source.TryGetProperty("WipeToken", out token) && token.Type != JTokenType.Null) { WipeToken = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Success", out token) && token.Type != JTokenType.Null) { Success = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("ErrorMessage", out token) && token.Type != JTokenType.Null) { ErrorMessage = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as ConnectorGroup; if (typedSource != null) { Zones = typedSource.Zones; Provider = typedSource.Provider; } else { JToken token; if (source.TryGetProperty("Zones", out token) && token.Type != JTokenType.Null) { Zones = (IEnumerable <ConnectorGroupZone>)serializer.Deserialize(token.CreateReader(), typeof(IEnumerable <ConnectorGroupZone>)); } if (source.TryGetProperty("Provider", out token) && token.Type != JTokenType.Null) { Provider = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as AdvancedSearchResults; if (typedSource != null) { PartialResults = typedSource.PartialResults; Results = typedSource.Results; TimedOut = typedSource.TimedOut; } else { JToken token; if (source.TryGetProperty("PartialResults", out token) && token.Type != JTokenType.Null) { PartialResults = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if (source.TryGetProperty("Results", out token) && token.Type != JTokenType.Null) { Results = (IEnumerable <SearchResult>)serializer.Deserialize(token.CreateReader(), typeof(IEnumerable <SearchResult>)); } if (source.TryGetProperty("TimedOut", out token) && token.Type != JTokenType.Null) { TimedOut = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as ODataFeed <T>; if (typedSource != null) { count = typedSource.count; Feed = typedSource.Feed; NextLink = typedSource.NextLink; } else { JToken token; if (source.TryGetProperty("odata.count", out token) && token.Type != JTokenType.Null) { count = (int)serializer.Deserialize(token.CreateReader(), typeof(int)); } if (source.TryGetProperty("value", out token) && token.Type != JTokenType.Null) { Feed = (IEnumerable <T>)serializer.Deserialize(token.CreateReader(), typeof(IEnumerable <T>)); } if (source.TryGetProperty("odata.nextLink", out token) && token.Type != JTokenType.Null) { NextLink = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as SubscribedResourceEvent; if (typedSource != null) { ResourceType = typedSource.ResourceType; OperationName = typedSource.OperationName; } else { JToken token; if (source.TryGetProperty("ResourceType", out token) && token.Type != JTokenType.Null) { ResourceType = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("OperationName", out token) && token.Type != JTokenType.Null) { OperationName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as SymbolicLink; if (typedSource != null) { Link = typedSource.Link; ConnectorGroup = typedSource.ConnectorGroup; } else { JToken token; if (source.TryGetProperty("Link", out token) && token.Type != JTokenType.Null) { Link = (Uri)serializer.Deserialize(token.CreateReader(), typeof(Uri)); } if (source.TryGetProperty("ConnectorGroup", out token) && token.Type != JTokenType.Null) { ConnectorGroup = (ConnectorGroup)serializer.Deserialize(token.CreateReader(), typeof(ConnectorGroup)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as WebhookClient; if (typedSource != null) { OAuthClientId = typedSource.OAuthClientId; SignatureKeys = typedSource.SignatureKeys; } else { JToken token; if (source.TryGetProperty("OAuthClientId", out token) && token.Type != JTokenType.Null) { OAuthClientId = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("SignatureKeys", out token) && token.Type != JTokenType.Null) { SignatureKeys = (WebhookSignatureKeys)serializer.Deserialize(token.CreateReader(), typeof(WebhookSignatureKeys)); } } }