示例#1
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (ContactDetails == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "ContactDetails");
     }
     if (ContactDetails != null)
     {
         ContactDetails.Validate();
     }
     if (ShippingAddress != null)
     {
         ShippingAddress.Validate();
     }
     if (DataImportDetails != null)
     {
         foreach (var element in DataImportDetails)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
     if (DataExportDetails != null)
     {
         foreach (var element1 in DataExportDetails)
         {
             if (element1 != null)
             {
                 element1.Validate();
             }
         }
     }
     if (Preferences != null)
     {
         Preferences.Validate();
     }
     if (KeyEncryptionKey != null)
     {
         KeyEncryptionKey.Validate();
     }
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the JobDetails class.
 /// </summary>
 /// <param name="contactDetails">Contact details for notification and
 /// shipping.</param>
 /// <param name="jobStages">List of stages that run in the job.</param>
 /// <param name="shippingAddress">Shipping address of the
 /// customer.</param>
 /// <param name="deliveryPackage">Delivery package shipping
 /// details.</param>
 /// <param name="returnPackage">Return package shipping
 /// details.</param>
 /// <param name="dataImportDetails">Details of the data to be imported
 /// into azure.</param>
 /// <param name="dataExportDetails">Details of the data to be exported
 /// from azure.</param>
 /// <param name="preferences">Preferences for the order.</param>
 /// <param name="copyLogDetails">List of copy log details.</param>
 /// <param name="reverseShipmentLabelSasKey">Shared access key to
 /// download the return shipment label</param>
 /// <param name="chainOfCustodySasKey">Shared access key to download
 /// the chain of custody logs</param>
 /// <param name="keyEncryptionKey">Details about which key encryption
 /// type is being used.</param>
 /// <param name="expectedDataSizeInTeraBytes">The expected size of the
 /// data, which needs to be transferred in this job, in
 /// terabytes.</param>
 /// <param name="actions">Available actions on the job.</param>
 /// <param name="lastMitigationActionOnJob">Last mitigation action
 /// performed on the job.</param>
 /// <param name="datacenterAddress">Datacenter address to ship to, for
 /// the given sku and storage location.</param>
 /// <param name="dataCenterCode">DataCenter code. Possible values
 /// include: 'Invalid', 'BY2', 'BY1', 'ORK70', 'AM2', 'AMS20', 'BY21',
 /// 'BY24', 'MWH01', 'AMS06', 'SSE90', 'SYD03', 'SYD23', 'CBR20',
 /// 'YTO20', 'CWL20', 'LON24', 'BOM01', 'BL20', 'BL7', 'SEL20',
 /// 'TYO01', 'BN1', 'SN5', 'CYS04', 'TYO22', 'YTO21', 'YQB20', 'FRA22',
 /// 'MAA01', 'CPQ02', 'CPQ20', 'SIN20', 'HKG20', 'SG2', 'MEL23',
 /// 'SEL21', 'OSA20', 'SHA03', 'BJB', 'JNB22', 'JNB21', 'MNZ21', 'SN8',
 /// 'AUH20', 'ZRH20', 'PUS20', 'AdHoc', 'CH1', 'DSM05'</param>
 public JobDetails(ContactDetails contactDetails, IList <JobStages> jobStages = default(IList <JobStages>), ShippingAddress shippingAddress = default(ShippingAddress), PackageShippingDetails deliveryPackage = default(PackageShippingDetails), PackageShippingDetails returnPackage = default(PackageShippingDetails), IList <DataImportDetails> dataImportDetails = default(IList <DataImportDetails>), IList <DataExportDetails> dataExportDetails = default(IList <DataExportDetails>), Preferences preferences = default(Preferences), IList <CopyLogDetails> copyLogDetails = default(IList <CopyLogDetails>), string reverseShipmentLabelSasKey = default(string), string chainOfCustodySasKey = default(string), KeyEncryptionKey keyEncryptionKey = default(KeyEncryptionKey), int?expectedDataSizeInTeraBytes = default(int?), IList <CustomerResolutionCode?> actions = default(IList <CustomerResolutionCode?>), LastMitigationActionOnJob lastMitigationActionOnJob = default(LastMitigationActionOnJob), DatacenterAddressResponse datacenterAddress = default(DatacenterAddressResponse), string dataCenterCode = default(string))
 {
     JobStages                   = jobStages;
     ContactDetails              = contactDetails;
     ShippingAddress             = shippingAddress;
     DeliveryPackage             = deliveryPackage;
     ReturnPackage               = returnPackage;
     DataImportDetails           = dataImportDetails;
     DataExportDetails           = dataExportDetails;
     Preferences                 = preferences;
     CopyLogDetails              = copyLogDetails;
     ReverseShipmentLabelSasKey  = reverseShipmentLabelSasKey;
     ChainOfCustodySasKey        = chainOfCustodySasKey;
     KeyEncryptionKey            = keyEncryptionKey;
     ExpectedDataSizeInTeraBytes = expectedDataSizeInTeraBytes;
     Actions = actions;
     LastMitigationActionOnJob = lastMitigationActionOnJob;
     DatacenterAddress         = datacenterAddress;
     DataCenterCode            = dataCenterCode;
     CustomInit();
 }
 /// <summary>
 /// Initializes a new instance of the DataBoxJobDetails class.
 /// </summary>
 /// <param name="contactDetails">Contact details for notification and
 /// shipping.</param>
 /// <param name="shippingAddress">Shipping address of the
 /// customer.</param>
 /// <param name="destinationAccountDetails">Destination account
 /// details.</param>
 /// <param name="expectedDataSizeInTeraBytes">The expected size of the
 /// data, which needs to be transfered in this job, in tera
 /// bytes.</param>
 /// <param name="jobStages">List of stages that run in the job.</param>
 /// <param name="deliveryPackage">Delivery package shipping
 /// details.</param>
 /// <param name="returnPackage">Return package shipping
 /// details.</param>
 /// <param name="errorDetails">Error details for failure. This is
 /// optional.</param>
 /// <param name="preferences">Preferences for the order.</param>
 /// <param name="copyLogDetails">List of copy log details.</param>
 /// <param name="reverseShipmentLabelSasKey">Shared access key to
 /// download the return shipment label</param>
 /// <param name="chainOfCustodySasKey">Shared access key to download
 /// the chain of custody logs</param>
 /// <param name="copyProgress">Copy progress per storage
 /// account.</param>
 public DataBoxJobDetails(ContactDetails contactDetails, ShippingAddress shippingAddress, IList <DestinationAccountDetails> destinationAccountDetails, int?expectedDataSizeInTeraBytes = default(int?), IList <JobStages> jobStages = default(IList <JobStages>), PackageShippingDetails deliveryPackage = default(PackageShippingDetails), PackageShippingDetails returnPackage = default(PackageShippingDetails), IList <JobErrorDetails> errorDetails = default(IList <JobErrorDetails>), Preferences preferences = default(Preferences), IList <CopyLogDetails> copyLogDetails = default(IList <CopyLogDetails>), string reverseShipmentLabelSasKey = default(string), string chainOfCustodySasKey = default(string), IList <CopyProgress> copyProgress = default(IList <CopyProgress>))
     : base(contactDetails, shippingAddress, destinationAccountDetails, expectedDataSizeInTeraBytes, jobStages, deliveryPackage, returnPackage, errorDetails, preferences, copyLogDetails, reverseShipmentLabelSasKey, chainOfCustodySasKey)
 {
     CopyProgress = copyProgress;
     CustomInit();
 }
示例#4
0
 /// <summary>
 /// Initializes a new instance of the UpdateJobDetails class.
 /// </summary>
 /// <param name="contactDetails">Contact details for notification and
 /// shipping.</param>
 /// <param name="shippingAddress">Shipping address of the
 /// customer.</param>
 public UpdateJobDetails(ContactDetails contactDetails = default(ContactDetails), ShippingAddress shippingAddress = default(ShippingAddress))
 {
     ContactDetails  = contactDetails;
     ShippingAddress = shippingAddress;
     CustomInit();
 }