Пример #1
0
 public StorageProfileBaseFilter(JToken node) : base(node)
 {
     if (node["idEqual"] != null)
     {
         this._IdEqual = ParseInt(node["idEqual"].Value <string>());
     }
     if (node["idIn"] != null)
     {
         this._IdIn = node["idIn"].Value <string>();
     }
     if (node["createdAtGreaterThanOrEqual"] != null)
     {
         this._CreatedAtGreaterThanOrEqual = ParseInt(node["createdAtGreaterThanOrEqual"].Value <string>());
     }
     if (node["createdAtLessThanOrEqual"] != null)
     {
         this._CreatedAtLessThanOrEqual = ParseInt(node["createdAtLessThanOrEqual"].Value <string>());
     }
     if (node["updatedAtGreaterThanOrEqual"] != null)
     {
         this._UpdatedAtGreaterThanOrEqual = ParseInt(node["updatedAtGreaterThanOrEqual"].Value <string>());
     }
     if (node["updatedAtLessThanOrEqual"] != null)
     {
         this._UpdatedAtLessThanOrEqual = ParseInt(node["updatedAtLessThanOrEqual"].Value <string>());
     }
     if (node["partnerIdEqual"] != null)
     {
         this._PartnerIdEqual = ParseInt(node["partnerIdEqual"].Value <string>());
     }
     if (node["partnerIdIn"] != null)
     {
         this._PartnerIdIn = node["partnerIdIn"].Value <string>();
     }
     if (node["systemNameEqual"] != null)
     {
         this._SystemNameEqual = node["systemNameEqual"].Value <string>();
     }
     if (node["systemNameIn"] != null)
     {
         this._SystemNameIn = node["systemNameIn"].Value <string>();
     }
     if (node["statusEqual"] != null)
     {
         this._StatusEqual = (StorageProfileStatus)ParseEnum(typeof(StorageProfileStatus), node["statusEqual"].Value <string>());
     }
     if (node["statusIn"] != null)
     {
         this._StatusIn = node["statusIn"].Value <string>();
     }
     if (node["protocolEqual"] != null)
     {
         this._ProtocolEqual = (StorageProfileProtocol)StringEnum.Parse(typeof(StorageProfileProtocol), node["protocolEqual"].Value <string>());
     }
     if (node["protocolIn"] != null)
     {
         this._ProtocolIn = node["protocolIn"].Value <string>();
     }
 }
 public static StorageProfileUpdateStatusRequestBuilder UpdateStatus(int storageId, StorageProfileStatus status)
 {
     return(new StorageProfileUpdateStatusRequestBuilder(storageId, status));
 }
 public StorageProfileUpdateStatusRequestBuilder(int storageId, StorageProfileStatus status)
     : this()
 {
     this.StorageId = storageId;
     this.Status    = status;
 }
Пример #4
0
        public StorageProfile(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "id":
                    this._Id = ParseInt(propertyNode.InnerText);
                    continue;

                case "createdAt":
                    this._CreatedAt = ParseInt(propertyNode.InnerText);
                    continue;

                case "updatedAt":
                    this._UpdatedAt = ParseInt(propertyNode.InnerText);
                    continue;

                case "partnerId":
                    this._PartnerId = ParseInt(propertyNode.InnerText);
                    continue;

                case "name":
                    this._Name = propertyNode.InnerText;
                    continue;

                case "systemName":
                    this._SystemName = propertyNode.InnerText;
                    continue;

                case "desciption":
                    this._Desciption = propertyNode.InnerText;
                    continue;

                case "status":
                    this._Status = (StorageProfileStatus)ParseEnum(typeof(StorageProfileStatus), propertyNode.InnerText);
                    continue;

                case "protocol":
                    this._Protocol = (StorageProfileProtocol)StringEnum.Parse(typeof(StorageProfileProtocol), propertyNode.InnerText);
                    continue;

                case "storageUrl":
                    this._StorageUrl = propertyNode.InnerText;
                    continue;

                case "storageBaseDir":
                    this._StorageBaseDir = propertyNode.InnerText;
                    continue;

                case "storageUsername":
                    this._StorageUsername = propertyNode.InnerText;
                    continue;

                case "storagePassword":
                    this._StoragePassword = propertyNode.InnerText;
                    continue;

                case "storageFtpPassiveMode":
                    this._StorageFtpPassiveMode = ParseBool(propertyNode.InnerText);
                    continue;

                case "minFileSize":
                    this._MinFileSize = ParseInt(propertyNode.InnerText);
                    continue;

                case "maxFileSize":
                    this._MaxFileSize = ParseInt(propertyNode.InnerText);
                    continue;

                case "flavorParamsIds":
                    this._FlavorParamsIds = propertyNode.InnerText;
                    continue;

                case "maxConcurrentConnections":
                    this._MaxConcurrentConnections = ParseInt(propertyNode.InnerText);
                    continue;

                case "pathManagerClass":
                    this._PathManagerClass = propertyNode.InnerText;
                    continue;

                case "pathManagerParams":
                    this._PathManagerParams = new List <KeyValue>();
                    foreach (XmlElement arrayNode in propertyNode.ChildNodes)
                    {
                        this._PathManagerParams.Add(ObjectFactory.Create <KeyValue>(arrayNode));
                    }
                    continue;

                case "trigger":
                    this._Trigger = ParseInt(propertyNode.InnerText);
                    continue;

                case "deliveryPriority":
                    this._DeliveryPriority = ParseInt(propertyNode.InnerText);
                    continue;

                case "deliveryStatus":
                    this._DeliveryStatus = (StorageProfileDeliveryStatus)ParseEnum(typeof(StorageProfileDeliveryStatus), propertyNode.InnerText);
                    continue;

                case "readyBehavior":
                    this._ReadyBehavior = (StorageProfileReadyBehavior)ParseEnum(typeof(StorageProfileReadyBehavior), propertyNode.InnerText);
                    continue;

                case "allowAutoDelete":
                    this._AllowAutoDelete = ParseInt(propertyNode.InnerText);
                    continue;

                case "createFileLink":
                    this._CreateFileLink = ParseBool(propertyNode.InnerText);
                    continue;

                case "rules":
                    this._Rules = new List <Rule>();
                    foreach (XmlElement arrayNode in propertyNode.ChildNodes)
                    {
                        this._Rules.Add(ObjectFactory.Create <Rule>(arrayNode));
                    }
                    continue;

                case "deliveryProfileIds":
                    this._DeliveryProfileIds = new List <KeyValue>();
                    foreach (XmlElement arrayNode in propertyNode.ChildNodes)
                    {
                        this._DeliveryProfileIds.Add(ObjectFactory.Create <KeyValue>(arrayNode));
                    }
                    continue;

                case "privateKey":
                    this._PrivateKey = propertyNode.InnerText;
                    continue;

                case "publicKey":
                    this._PublicKey = propertyNode.InnerText;
                    continue;

                case "passPhrase":
                    this._PassPhrase = propertyNode.InnerText;
                    continue;

                case "shouldExportThumbs":
                    this._ShouldExportThumbs = ParseBool(propertyNode.InnerText);
                    continue;
                }
            }
        }
 public StorageProfile(JToken node) : base(node)
 {
     if (node["id"] != null)
     {
         this._Id = ParseInt(node["id"].Value <string>());
     }
     if (node["createdAt"] != null)
     {
         this._CreatedAt = ParseInt(node["createdAt"].Value <string>());
     }
     if (node["updatedAt"] != null)
     {
         this._UpdatedAt = ParseInt(node["updatedAt"].Value <string>());
     }
     if (node["partnerId"] != null)
     {
         this._PartnerId = ParseInt(node["partnerId"].Value <string>());
     }
     if (node["name"] != null)
     {
         this._Name = node["name"].Value <string>();
     }
     if (node["systemName"] != null)
     {
         this._SystemName = node["systemName"].Value <string>();
     }
     if (node["desciption"] != null)
     {
         this._Desciption = node["desciption"].Value <string>();
     }
     if (node["status"] != null)
     {
         this._Status = (StorageProfileStatus)ParseEnum(typeof(StorageProfileStatus), node["status"].Value <string>());
     }
     if (node["protocol"] != null)
     {
         this._Protocol = (StorageProfileProtocol)StringEnum.Parse(typeof(StorageProfileProtocol), node["protocol"].Value <string>());
     }
     if (node["storageUrl"] != null)
     {
         this._StorageUrl = node["storageUrl"].Value <string>();
     }
     if (node["storageBaseDir"] != null)
     {
         this._StorageBaseDir = node["storageBaseDir"].Value <string>();
     }
     if (node["storageUsername"] != null)
     {
         this._StorageUsername = node["storageUsername"].Value <string>();
     }
     if (node["storagePassword"] != null)
     {
         this._StoragePassword = node["storagePassword"].Value <string>();
     }
     if (node["storageFtpPassiveMode"] != null)
     {
         this._StorageFtpPassiveMode = ParseBool(node["storageFtpPassiveMode"].Value <string>());
     }
     if (node["minFileSize"] != null)
     {
         this._MinFileSize = ParseInt(node["minFileSize"].Value <string>());
     }
     if (node["maxFileSize"] != null)
     {
         this._MaxFileSize = ParseInt(node["maxFileSize"].Value <string>());
     }
     if (node["flavorParamsIds"] != null)
     {
         this._FlavorParamsIds = node["flavorParamsIds"].Value <string>();
     }
     if (node["maxConcurrentConnections"] != null)
     {
         this._MaxConcurrentConnections = ParseInt(node["maxConcurrentConnections"].Value <string>());
     }
     if (node["pathManagerClass"] != null)
     {
         this._PathManagerClass = node["pathManagerClass"].Value <string>();
     }
     if (node["pathManagerParams"] != null)
     {
         this._PathManagerParams = new List <KeyValue>();
         foreach (var arrayNode in node["pathManagerParams"].Children())
         {
             this._PathManagerParams.Add(ObjectFactory.Create <KeyValue>(arrayNode));
         }
     }
     if (node["trigger"] != null)
     {
         this._Trigger = ParseInt(node["trigger"].Value <string>());
     }
     if (node["deliveryPriority"] != null)
     {
         this._DeliveryPriority = ParseInt(node["deliveryPriority"].Value <string>());
     }
     if (node["deliveryStatus"] != null)
     {
         this._DeliveryStatus = (StorageProfileDeliveryStatus)ParseEnum(typeof(StorageProfileDeliveryStatus), node["deliveryStatus"].Value <string>());
     }
     if (node["readyBehavior"] != null)
     {
         this._ReadyBehavior = (StorageProfileReadyBehavior)ParseEnum(typeof(StorageProfileReadyBehavior), node["readyBehavior"].Value <string>());
     }
     if (node["allowAutoDelete"] != null)
     {
         this._AllowAutoDelete = ParseInt(node["allowAutoDelete"].Value <string>());
     }
     if (node["createFileLink"] != null)
     {
         this._CreateFileLink = ParseBool(node["createFileLink"].Value <string>());
     }
     if (node["rules"] != null)
     {
         this._Rules = new List <Rule>();
         foreach (var arrayNode in node["rules"].Children())
         {
             this._Rules.Add(ObjectFactory.Create <Rule>(arrayNode));
         }
     }
     if (node["deliveryProfileIds"] != null)
     {
         this._DeliveryProfileIds = new List <KeyValue>();
         foreach (var arrayNode in node["deliveryProfileIds"].Children())
         {
             this._DeliveryProfileIds.Add(ObjectFactory.Create <KeyValue>(arrayNode));
         }
     }
     if (node["privateKey"] != null)
     {
         this._PrivateKey = node["privateKey"].Value <string>();
     }
     if (node["publicKey"] != null)
     {
         this._PublicKey = node["publicKey"].Value <string>();
     }
     if (node["passPhrase"] != null)
     {
         this._PassPhrase = node["passPhrase"].Value <string>();
     }
     if (node["shouldExportThumbs"] != null)
     {
         this._ShouldExportThumbs = ParseBool(node["shouldExportThumbs"].Value <string>());
     }
     if (node["packagerUrl"] != null)
     {
         this._PackagerUrl = node["packagerUrl"].Value <string>();
     }
     if (node["exportPeriodically"] != null)
     {
         this._ExportPeriodically = ParseBool(node["exportPeriodically"].Value <string>());
     }
     if (node["excludedFlavorParamsIds"] != null)
     {
         this._ExcludedFlavorParamsIds = node["excludedFlavorParamsIds"].Value <string>();
     }
     if (node["shouldExportCaptions"] != null)
     {
         this._ShouldExportCaptions = ParseBool(node["shouldExportCaptions"].Value <string>());
     }
 }
Пример #6
0
        public StorageProfileBaseFilter(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "idEqual":
                    this._IdEqual = ParseInt(propertyNode.InnerText);
                    continue;

                case "idIn":
                    this._IdIn = propertyNode.InnerText;
                    continue;

                case "createdAtGreaterThanOrEqual":
                    this._CreatedAtGreaterThanOrEqual = ParseInt(propertyNode.InnerText);
                    continue;

                case "createdAtLessThanOrEqual":
                    this._CreatedAtLessThanOrEqual = ParseInt(propertyNode.InnerText);
                    continue;

                case "updatedAtGreaterThanOrEqual":
                    this._UpdatedAtGreaterThanOrEqual = ParseInt(propertyNode.InnerText);
                    continue;

                case "updatedAtLessThanOrEqual":
                    this._UpdatedAtLessThanOrEqual = ParseInt(propertyNode.InnerText);
                    continue;

                case "partnerIdEqual":
                    this._PartnerIdEqual = ParseInt(propertyNode.InnerText);
                    continue;

                case "partnerIdIn":
                    this._PartnerIdIn = propertyNode.InnerText;
                    continue;

                case "systemNameEqual":
                    this._SystemNameEqual = propertyNode.InnerText;
                    continue;

                case "systemNameIn":
                    this._SystemNameIn = propertyNode.InnerText;
                    continue;

                case "statusEqual":
                    this._StatusEqual = (StorageProfileStatus)ParseEnum(typeof(StorageProfileStatus), propertyNode.InnerText);
                    continue;

                case "statusIn":
                    this._StatusIn = propertyNode.InnerText;
                    continue;

                case "protocolEqual":
                    this._ProtocolEqual = (StorageProfileProtocol)StringEnum.Parse(typeof(StorageProfileProtocol), propertyNode.InnerText);
                    continue;

                case "protocolIn":
                    this._ProtocolIn = propertyNode.InnerText;
                    continue;
                }
            }
        }