Пример #1
0
 /// <summary>
 /// Initializes a new instance of the Device class.
 /// </summary>
 /// <param name="friendlyName">The friendly name of the device.</param>
 /// <param name="activationTime">The UTC time at which the device was
 /// activated</param>
 /// <param name="culture">The language culture setting on the device.
 /// For eg: "en-US"</param>
 /// <param name="deviceDescription">The device description.</param>
 /// <param name="deviceSoftwareVersion">The version number of the
 /// software running on the device.</param>
 /// <param name="deviceConfigurationStatus">The current configuration
 /// status of the device. Possible values include: 'Complete',
 /// 'Pending'</param>
 /// <param name="targetIqn">The target IQN.</param>
 /// <param name="modelDescription">The device model.</param>
 /// <param name="status">The current status of the device. Possible
 /// values include: 'Unknown', 'Online', 'Offline', 'Deactivated',
 /// 'RequiresAttention', 'MaintenanceMode', 'Creating', 'Provisioning',
 /// 'Deactivating', 'Deleted', 'ReadyToSetup'</param>
 /// <param name="serialNumber">The serial number.</param>
 /// <param name="deviceType">The type of the device. Possible values
 /// include: 'Invalid', 'Series8000VirtualAppliance',
 /// 'Series8000PhysicalAppliance'</param>
 /// <param name="activeController">The identifier of the active
 /// controller of the device. Possible values include: 'Unknown',
 /// 'None', 'Controller0', 'Controller1'</param>
 /// <param name="friendlySoftwareVersion">The device friendly software
 /// version.</param>
 /// <param name="id">The path ID that uniquely identifies the
 /// object.</param>
 /// <param name="name">The name of the object.</param>
 /// <param name="type">The hierarchical type of the object.</param>
 /// <param name="kind">The Kind of the object. Currently only
 /// Series8000 is supported. Possible values include:
 /// 'Series8000'</param>
 /// <param name="friendlySoftwareName">The friendly name of the
 /// software running on the device.</param>
 /// <param name="availableLocalStorageInBytes">The storage in bytes
 /// that is available locally on the device.</param>
 /// <param name="availableTieredStorageInBytes">The storage in bytes
 /// that is available on the device for tiered volumes.</param>
 /// <param name="provisionedTieredStorageInBytes">The storage in bytes
 /// that has been provisioned on the device for tiered volumes.</param>
 /// <param name="provisionedLocalStorageInBytes">The storage in bytes
 /// used for locally pinned volumes on the device (including additional
 /// local reservation).</param>
 /// <param name="provisionedVolumeSizeInBytes">Total capacity in bytes
 /// of tiered and locally pinned volumes on the device</param>
 /// <param name="usingStorageInBytes">The storage in bytes that is
 /// currently being used on the device, including both local and
 /// cloud.</param>
 /// <param name="totalTieredStorageInBytes">The total tiered storage
 /// available on the device in bytes.</param>
 /// <param name="agentGroupVersion">The device agent group
 /// version.</param>
 /// <param name="networkInterfaceCardCount">The number of network
 /// interface cards</param>
 /// <param name="deviceLocation">The location of the virtual
 /// appliance.</param>
 /// <param name="virtualMachineApiType">The virtual machine API type.
 /// Possible values include: 'Classic', 'Arm'</param>
 /// <param name="details">The additional device details regarding the
 /// end point count and volume container count.</param>
 /// <param name="rolloverDetails">The additional device details for the
 /// service data encryption key rollover.</param>
 public Device(string friendlyName, System.DateTime activationTime, string culture, string deviceDescription, string deviceSoftwareVersion, DeviceConfigurationStatus deviceConfigurationStatus, string targetIqn, string modelDescription, DeviceStatus status, string serialNumber, DeviceType deviceType, ControllerId activeController, string friendlySoftwareVersion, string id = default(string), string name = default(string), string type = default(string), Kind?kind = default(Kind?), string friendlySoftwareName = default(string), long?availableLocalStorageInBytes = default(long?), long?availableTieredStorageInBytes = default(long?), long?provisionedTieredStorageInBytes = default(long?), long?provisionedLocalStorageInBytes = default(long?), long?provisionedVolumeSizeInBytes = default(long?), long?usingStorageInBytes = default(long?), long?totalTieredStorageInBytes = default(long?), int?agentGroupVersion = default(int?), int?networkInterfaceCardCount = default(int?), string deviceLocation = default(string), VirtualMachineApiType?virtualMachineApiType = default(VirtualMachineApiType?), DeviceDetails details = default(DeviceDetails), DeviceRolloverDetails rolloverDetails = default(DeviceRolloverDetails))
     : base(id, name, type, kind)
 {
     FriendlyName              = friendlyName;
     ActivationTime            = activationTime;
     Culture                   = culture;
     DeviceDescription         = deviceDescription;
     DeviceSoftwareVersion     = deviceSoftwareVersion;
     FriendlySoftwareName      = friendlySoftwareName;
     DeviceConfigurationStatus = deviceConfigurationStatus;
     TargetIqn                 = targetIqn;
     ModelDescription          = modelDescription;
     Status                          = status;
     SerialNumber                    = serialNumber;
     DeviceType                      = deviceType;
     ActiveController                = activeController;
     FriendlySoftwareVersion         = friendlySoftwareVersion;
     AvailableLocalStorageInBytes    = availableLocalStorageInBytes;
     AvailableTieredStorageInBytes   = availableTieredStorageInBytes;
     ProvisionedTieredStorageInBytes = provisionedTieredStorageInBytes;
     ProvisionedLocalStorageInBytes  = provisionedLocalStorageInBytes;
     ProvisionedVolumeSizeInBytes    = provisionedVolumeSizeInBytes;
     UsingStorageInBytes             = usingStorageInBytes;
     TotalTieredStorageInBytes       = totalTieredStorageInBytes;
     AgentGroupVersion               = agentGroupVersion;
     NetworkInterfaceCardCount       = networkInterfaceCardCount;
     DeviceLocation                  = deviceLocation;
     VirtualMachineApiType           = virtualMachineApiType;
     Details                         = details;
     RolloverDetails                 = rolloverDetails;
 }
        internal static string ToSerializedValue(this DeviceConfigurationStatus value)
        {
            switch (value)
            {
            case DeviceConfigurationStatus.Complete:
                return("Complete");

            case DeviceConfigurationStatus.Pending:
                return("Pending");
            }
            return(null);
        }