void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 {
     writer.WriteStartObject();
     writer.WritePropertyName("lun");
     writer.WriteNumberValue(Lun);
     if (Optional.IsDefined(Name))
     {
         writer.WritePropertyName("name");
         writer.WriteStringValue(Name);
     }
     if (Optional.IsDefined(Vhd))
     {
         writer.WritePropertyName("vhd");
         writer.WriteObjectValue(Vhd);
     }
     if (Optional.IsDefined(Image))
     {
         writer.WritePropertyName("image");
         writer.WriteObjectValue(Image);
     }
     if (Optional.IsDefined(Caching))
     {
         writer.WritePropertyName("caching");
         writer.WriteStringValue(Caching.Value.ToSerialString());
     }
     if (Optional.IsDefined(WriteAcceleratorEnabled))
     {
         writer.WritePropertyName("writeAcceleratorEnabled");
         writer.WriteBooleanValue(WriteAcceleratorEnabled.Value);
     }
     writer.WritePropertyName("createOption");
     writer.WriteStringValue(CreateOption.ToString());
     if (Optional.IsDefined(DiskSizeGB))
     {
         writer.WritePropertyName("diskSizeGB");
         writer.WriteNumberValue(DiskSizeGB.Value);
     }
     if (Optional.IsDefined(ManagedDisk))
     {
         writer.WritePropertyName("managedDisk");
         writer.WriteObjectValue(ManagedDisk);
     }
     if (Optional.IsDefined(ToBeDetached))
     {
         writer.WritePropertyName("toBeDetached");
         writer.WriteBooleanValue(ToBeDetached.Value);
     }
     if (Optional.IsDefined(DetachOption))
     {
         writer.WritePropertyName("detachOption");
         writer.WriteStringValue(DetachOption.Value.ToString());
     }
     if (Optional.IsDefined(DeleteOption))
     {
         writer.WritePropertyName("deleteOption");
         writer.WriteStringValue(DeleteOption.Value.ToString());
     }
     writer.WriteEndObject();
 }
 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 {
     writer.WriteStartObject();
     writer.WritePropertyName("lun");
     writer.WriteNumberValue(Lun);
     if (Name != null)
     {
         writer.WritePropertyName("name");
         writer.WriteStringValue(Name);
     }
     if (Vhd != null)
     {
         writer.WritePropertyName("vhd");
         writer.WriteObjectValue(Vhd);
     }
     if (Image != null)
     {
         writer.WritePropertyName("image");
         writer.WriteObjectValue(Image);
     }
     if (Caching != null)
     {
         writer.WritePropertyName("caching");
         writer.WriteStringValue(Caching.Value.ToSerialString());
     }
     if (WriteAcceleratorEnabled != null)
     {
         writer.WritePropertyName("writeAcceleratorEnabled");
         writer.WriteBooleanValue(WriteAcceleratorEnabled.Value);
     }
     writer.WritePropertyName("createOption");
     writer.WriteStringValue(CreateOption.ToString());
     if (DiskSizeGB != null)
     {
         writer.WritePropertyName("diskSizeGB");
         writer.WriteNumberValue(DiskSizeGB.Value);
     }
     if (ManagedDisk != null)
     {
         writer.WritePropertyName("managedDisk");
         writer.WriteObjectValue(ManagedDisk);
     }
     if (ToBeDetached != null)
     {
         writer.WritePropertyName("toBeDetached");
         writer.WriteBooleanValue(ToBeDetached.Value);
     }
     if (DiskIopsReadWrite != null)
     {
         writer.WritePropertyName("diskIOPSReadWrite");
         writer.WriteNumberValue(DiskIopsReadWrite.Value);
     }
     if (DiskMBpsReadWrite != null)
     {
         writer.WritePropertyName("diskMBpsReadWrite");
         writer.WriteNumberValue(DiskMBpsReadWrite.Value);
     }
     writer.WriteEndObject();
 }
 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 {
     writer.WriteStartObject();
     if (Optional.IsDefined(Name))
     {
         writer.WritePropertyName("name");
         writer.WriteStringValue(Name);
     }
     if (Optional.IsDefined(Caching))
     {
         writer.WritePropertyName("caching");
         writer.WriteStringValue(Caching.Value.ToSerialString());
     }
     if (Optional.IsDefined(WriteAcceleratorEnabled))
     {
         writer.WritePropertyName("writeAcceleratorEnabled");
         writer.WriteBooleanValue(WriteAcceleratorEnabled.Value);
     }
     writer.WritePropertyName("createOption");
     writer.WriteStringValue(CreateOption.ToString());
     if (Optional.IsDefined(DiffDiskSettings))
     {
         writer.WritePropertyName("diffDiskSettings");
         writer.WriteObjectValue(DiffDiskSettings);
     }
     if (Optional.IsDefined(DiskSizeGB))
     {
         writer.WritePropertyName("diskSizeGB");
         writer.WriteNumberValue(DiskSizeGB.Value);
     }
     if (Optional.IsDefined(OSType))
     {
         writer.WritePropertyName("osType");
         writer.WriteStringValue(OSType.Value.ToSerialString());
     }
     if (Optional.IsDefined(Image))
     {
         writer.WritePropertyName("image");
         writer.WriteObjectValue(Image);
     }
     if (Optional.IsCollectionDefined(VhdContainers))
     {
         writer.WritePropertyName("vhdContainers");
         writer.WriteStartArray();
         foreach (var item in VhdContainers)
         {
             writer.WriteStringValue(item);
         }
         writer.WriteEndArray();
     }
     if (Optional.IsDefined(ManagedDisk))
     {
         writer.WritePropertyName("managedDisk");
         writer.WriteObjectValue(ManagedDisk);
     }
     writer.WriteEndObject();
 }
 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 {
     writer.WriteStartObject();
     if (OsType != null)
     {
         writer.WritePropertyName("osType");
         writer.WriteStringValue(OsType.Value.ToSerialString());
     }
     if (EncryptionSettings != null)
     {
         writer.WritePropertyName("encryptionSettings");
         writer.WriteObjectValue(EncryptionSettings);
     }
     if (Name != null)
     {
         writer.WritePropertyName("name");
         writer.WriteStringValue(Name);
     }
     if (Vhd != null)
     {
         writer.WritePropertyName("vhd");
         writer.WriteObjectValue(Vhd);
     }
     if (Image != null)
     {
         writer.WritePropertyName("image");
         writer.WriteObjectValue(Image);
     }
     if (Caching != null)
     {
         writer.WritePropertyName("caching");
         writer.WriteStringValue(Caching.Value.ToSerialString());
     }
     if (WriteAcceleratorEnabled != null)
     {
         writer.WritePropertyName("writeAcceleratorEnabled");
         writer.WriteBooleanValue(WriteAcceleratorEnabled.Value);
     }
     if (DiffDiskSettings != null)
     {
         writer.WritePropertyName("diffDiskSettings");
         writer.WriteObjectValue(DiffDiskSettings);
     }
     writer.WritePropertyName("createOption");
     writer.WriteStringValue(CreateOption.ToString());
     if (DiskSizeGB != null)
     {
         writer.WritePropertyName("diskSizeGB");
         writer.WriteNumberValue(DiskSizeGB.Value);
     }
     if (ManagedDisk != null)
     {
         writer.WritePropertyName("managedDisk");
         writer.WriteObjectValue(ManagedDisk);
     }
     writer.WriteEndObject();
 }
示例#5
0
 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 {
     writer.WriteStartObject();
     writer.WritePropertyName("createOption");
     writer.WriteStringValue(CreateOption.ToString());
     if (Optional.IsDefined(StorageAccountId))
     {
         writer.WritePropertyName("storageAccountId");
         writer.WriteStringValue(StorageAccountId);
     }
     if (Optional.IsDefined(ImageReference))
     {
         writer.WritePropertyName("imageReference");
         writer.WriteObjectValue(ImageReference);
     }
     if (Optional.IsDefined(GalleryImageReference))
     {
         writer.WritePropertyName("galleryImageReference");
         writer.WriteObjectValue(GalleryImageReference);
     }
     if (Optional.IsDefined(SourceUri))
     {
         writer.WritePropertyName("sourceUri");
         writer.WriteStringValue(SourceUri.AbsoluteUri);
     }
     if (Optional.IsDefined(SourceResourceId))
     {
         writer.WritePropertyName("sourceResourceId");
         writer.WriteStringValue(SourceResourceId);
     }
     if (Optional.IsDefined(UploadSizeBytes))
     {
         writer.WritePropertyName("uploadSizeBytes");
         writer.WriteNumberValue(UploadSizeBytes.Value);
     }
     if (Optional.IsDefined(LogicalSectorSize))
     {
         writer.WritePropertyName("logicalSectorSize");
         writer.WriteNumberValue(LogicalSectorSize.Value);
     }
     if (Optional.IsDefined(SecurityDataUri))
     {
         writer.WritePropertyName("securityDataUri");
         writer.WriteStringValue(SecurityDataUri.AbsoluteUri);
     }
     writer.WriteEndObject();
 }
 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 {
     writer.WriteStartObject();
     if (Optional.IsDefined(Name))
     {
         writer.WritePropertyName("name");
         writer.WriteStringValue(Name);
     }
     writer.WritePropertyName("lun");
     writer.WriteNumberValue(Lun);
     if (Optional.IsDefined(Caching))
     {
         writer.WritePropertyName("caching");
         writer.WriteStringValue(Caching.Value.ToSerialString());
     }
     if (Optional.IsDefined(WriteAcceleratorEnabled))
     {
         writer.WritePropertyName("writeAcceleratorEnabled");
         writer.WriteBooleanValue(WriteAcceleratorEnabled.Value);
     }
     writer.WritePropertyName("createOption");
     writer.WriteStringValue(CreateOption.ToString());
     if (Optional.IsDefined(DiskSizeGB))
     {
         writer.WritePropertyName("diskSizeGB");
         writer.WriteNumberValue(DiskSizeGB.Value);
     }
     if (Optional.IsDefined(ManagedDisk))
     {
         writer.WritePropertyName("managedDisk");
         writer.WriteObjectValue(ManagedDisk);
     }
     if (Optional.IsDefined(DiskIopsReadWrite))
     {
         writer.WritePropertyName("diskIOPSReadWrite");
         writer.WriteNumberValue(DiskIopsReadWrite.Value);
     }
     if (Optional.IsDefined(DiskMBpsReadWrite))
     {
         writer.WritePropertyName("diskMBpsReadWrite");
         writer.WriteNumberValue(DiskMBpsReadWrite.Value);
     }
     writer.WriteEndObject();
 }
示例#7
0
 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 {
     writer.WriteStartObject();
     writer.WritePropertyName("createOption");
     writer.WriteStringValue(CreateOption.ToString());
     if (StorageAccountId != null)
     {
         writer.WritePropertyName("storageAccountId");
         writer.WriteStringValue(StorageAccountId);
     }
     if (ImageReference != null)
     {
         writer.WritePropertyName("imageReference");
         writer.WriteObjectValue(ImageReference);
     }
     if (GalleryImageReference != null)
     {
         writer.WritePropertyName("galleryImageReference");
         writer.WriteObjectValue(GalleryImageReference);
     }
     if (SourceUri != null)
     {
         writer.WritePropertyName("sourceUri");
         writer.WriteStringValue(SourceUri);
     }
     if (SourceResourceId != null)
     {
         writer.WritePropertyName("sourceResourceId");
         writer.WriteStringValue(SourceResourceId);
     }
     if (SourceUniqueId != null)
     {
         writer.WritePropertyName("sourceUniqueId");
         writer.WriteStringValue(SourceUniqueId);
     }
     if (UploadSizeBytes != null)
     {
         writer.WritePropertyName("uploadSizeBytes");
         writer.WriteNumberValue(UploadSizeBytes.Value);
     }
     writer.WriteEndObject();
 }