public YouTubeDistributionProfile(XmlElement node) : base(node) { foreach (XmlElement propertyNode in node.ChildNodes) { switch (propertyNode.Name) { case "feedSpecVersion": this._FeedSpecVersion = (YouTubeDistributionFeedSpecVersion)StringEnum.Parse(typeof(YouTubeDistributionFeedSpecVersion), propertyNode.InnerText); continue; case "username": this._Username = propertyNode.InnerText; continue; case "notificationEmail": this._NotificationEmail = propertyNode.InnerText; continue; case "sftpHost": this._SftpHost = propertyNode.InnerText; continue; case "sftpPort": this._SftpPort = ParseInt(propertyNode.InnerText); continue; case "sftpLogin": this._SftpLogin = propertyNode.InnerText; continue; case "sftpPublicKey": this._SftpPublicKey = propertyNode.InnerText; continue; case "sftpPrivateKey": this._SftpPrivateKey = propertyNode.InnerText; continue; case "sftpBaseDir": this._SftpBaseDir = propertyNode.InnerText; continue; case "ownerName": this._OwnerName = propertyNode.InnerText; continue; case "defaultCategory": this._DefaultCategory = propertyNode.InnerText; continue; case "allowComments": this._AllowComments = propertyNode.InnerText; continue; case "allowEmbedding": this._AllowEmbedding = propertyNode.InnerText; continue; case "allowRatings": this._AllowRatings = propertyNode.InnerText; continue; case "allowResponses": this._AllowResponses = propertyNode.InnerText; continue; case "commercialPolicy": this._CommercialPolicy = propertyNode.InnerText; continue; case "ugcPolicy": this._UgcPolicy = propertyNode.InnerText; continue; case "target": this._Target = propertyNode.InnerText; continue; case "adServerPartnerId": this._AdServerPartnerId = propertyNode.InnerText; continue; case "enableAdServer": this._EnableAdServer = ParseBool(propertyNode.InnerText); continue; case "allowPreRollAds": this._AllowPreRollAds = ParseBool(propertyNode.InnerText); continue; case "allowPostRollAds": this._AllowPostRollAds = ParseBool(propertyNode.InnerText); continue; case "strict": this._Strict = propertyNode.InnerText; continue; case "overrideManualEdits": this._OverrideManualEdits = propertyNode.InnerText; continue; case "urgentReference": this._UrgentReference = propertyNode.InnerText; continue; case "allowSyndication": this._AllowSyndication = propertyNode.InnerText; continue; case "hideViewCount": this._HideViewCount = propertyNode.InnerText; continue; case "allowAdsenseForVideo": this._AllowAdsenseForVideo = propertyNode.InnerText; continue; case "allowInvideo": this._AllowInvideo = propertyNode.InnerText; continue; case "allowMidRollAds": this._AllowMidRollAds = ParseBool(propertyNode.InnerText); continue; case "instreamStandard": this._InstreamStandard = propertyNode.InnerText; continue; case "instreamTrueview": this._InstreamTrueview = propertyNode.InnerText; continue; case "claimType": this._ClaimType = propertyNode.InnerText; continue; case "blockOutsideOwnership": this._BlockOutsideOwnership = propertyNode.InnerText; continue; case "captionAutosync": this._CaptionAutosync = propertyNode.InnerText; continue; case "deleteReference": this._DeleteReference = ParseBool(propertyNode.InnerText); continue; case "releaseClaims": this._ReleaseClaims = ParseBool(propertyNode.InnerText); continue; case "apiAuthorizeUrl": this._ApiAuthorizeUrl = propertyNode.InnerText; continue; } } }
public YouTubeDistributionProfile(JToken node) : base(node) { if (node["feedSpecVersion"] != null) { this._FeedSpecVersion = (YouTubeDistributionFeedSpecVersion)StringEnum.Parse(typeof(YouTubeDistributionFeedSpecVersion), node["feedSpecVersion"].Value <string>()); } if (node["username"] != null) { this._Username = node["username"].Value <string>(); } if (node["notificationEmail"] != null) { this._NotificationEmail = node["notificationEmail"].Value <string>(); } if (node["sftpHost"] != null) { this._SftpHost = node["sftpHost"].Value <string>(); } if (node["sftpPort"] != null) { this._SftpPort = ParseInt(node["sftpPort"].Value <string>()); } if (node["sftpLogin"] != null) { this._SftpLogin = node["sftpLogin"].Value <string>(); } if (node["sftpPublicKey"] != null) { this._SftpPublicKey = node["sftpPublicKey"].Value <string>(); } if (node["sftpPrivateKey"] != null) { this._SftpPrivateKey = node["sftpPrivateKey"].Value <string>(); } if (node["sftpBaseDir"] != null) { this._SftpBaseDir = node["sftpBaseDir"].Value <string>(); } if (node["ownerName"] != null) { this._OwnerName = node["ownerName"].Value <string>(); } if (node["defaultCategory"] != null) { this._DefaultCategory = node["defaultCategory"].Value <string>(); } if (node["allowComments"] != null) { this._AllowComments = node["allowComments"].Value <string>(); } if (node["allowEmbedding"] != null) { this._AllowEmbedding = node["allowEmbedding"].Value <string>(); } if (node["allowRatings"] != null) { this._AllowRatings = node["allowRatings"].Value <string>(); } if (node["allowResponses"] != null) { this._AllowResponses = node["allowResponses"].Value <string>(); } if (node["commercialPolicy"] != null) { this._CommercialPolicy = node["commercialPolicy"].Value <string>(); } if (node["ugcPolicy"] != null) { this._UgcPolicy = node["ugcPolicy"].Value <string>(); } if (node["target"] != null) { this._Target = node["target"].Value <string>(); } if (node["adServerPartnerId"] != null) { this._AdServerPartnerId = node["adServerPartnerId"].Value <string>(); } if (node["enableAdServer"] != null) { this._EnableAdServer = ParseBool(node["enableAdServer"].Value <string>()); } if (node["allowPreRollAds"] != null) { this._AllowPreRollAds = ParseBool(node["allowPreRollAds"].Value <string>()); } if (node["allowPostRollAds"] != null) { this._AllowPostRollAds = ParseBool(node["allowPostRollAds"].Value <string>()); } if (node["strict"] != null) { this._Strict = node["strict"].Value <string>(); } if (node["overrideManualEdits"] != null) { this._OverrideManualEdits = node["overrideManualEdits"].Value <string>(); } if (node["urgentReference"] != null) { this._UrgentReference = node["urgentReference"].Value <string>(); } if (node["allowSyndication"] != null) { this._AllowSyndication = node["allowSyndication"].Value <string>(); } if (node["hideViewCount"] != null) { this._HideViewCount = node["hideViewCount"].Value <string>(); } if (node["allowAdsenseForVideo"] != null) { this._AllowAdsenseForVideo = node["allowAdsenseForVideo"].Value <string>(); } if (node["allowInvideo"] != null) { this._AllowInvideo = node["allowInvideo"].Value <string>(); } if (node["allowMidRollAds"] != null) { this._AllowMidRollAds = ParseBool(node["allowMidRollAds"].Value <string>()); } if (node["instreamStandard"] != null) { this._InstreamStandard = node["instreamStandard"].Value <string>(); } if (node["instreamTrueview"] != null) { this._InstreamTrueview = node["instreamTrueview"].Value <string>(); } if (node["claimType"] != null) { this._ClaimType = node["claimType"].Value <string>(); } if (node["blockOutsideOwnership"] != null) { this._BlockOutsideOwnership = node["blockOutsideOwnership"].Value <string>(); } if (node["captionAutosync"] != null) { this._CaptionAutosync = node["captionAutosync"].Value <string>(); } if (node["deleteReference"] != null) { this._DeleteReference = ParseBool(node["deleteReference"].Value <string>()); } if (node["releaseClaims"] != null) { this._ReleaseClaims = ParseBool(node["releaseClaims"].Value <string>()); } if (node["apiAuthorizeUrl"] != null) { this._ApiAuthorizeUrl = node["apiAuthorizeUrl"].Value <string>(); } if (node["privacyStatus"] != null) { this._PrivacyStatus = node["privacyStatus"].Value <string>(); } if (node["enableContentId"] != null) { this._EnableContentId = node["enableContentId"].Value <string>(); } if (node["thirdPartyAds"] != null) { this._ThirdPartyAds = node["thirdPartyAds"].Value <string>(); } if (node["productListingAds"] != null) { this._ProductListingAds = node["productListingAds"].Value <string>(); } if (node["domainWhitelist"] != null) { this._DomainWhitelist = node["domainWhitelist"].Value <string>(); } if (node["notifySubscribers"] != null) { this._NotifySubscribers = node["notifySubscribers"].Value <string>(); } }