コード例 #1
0
        internal static CustomPersistentDiskData DeserializeCustomPersistentDiskData(JsonElement element)
        {
            Optional <CustomPersistentDiskProperties> customPersistentDiskProperties = default;
            string storageId = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("customPersistentDiskProperties"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    customPersistentDiskProperties = CustomPersistentDiskProperties.DeserializeCustomPersistentDiskProperties(property.Value);
                    continue;
                }
                if (property.NameEquals("storageId"))
                {
                    storageId = property.Value.GetString();
                    continue;
                }
            }
            return(new CustomPersistentDiskData(customPersistentDiskProperties.Value, storageId));
        }
コード例 #2
0
 internal CustomPersistentDiskData(CustomPersistentDiskProperties customPersistentDiskProperties, string storageId)
 {
     CustomPersistentDiskProperties = customPersistentDiskProperties;
     StorageId = storageId;
 }