Skip to content

Commit

Permalink
Bring generated code up-to-date (#8222)
Browse files Browse the repository at this point in the history
  • Loading branch information
pakrym authored Oct 18, 2019
1 parent 8e67d38 commit 352b49b
Showing 1 changed file with 15 additions and 60 deletions.
75 changes: 15 additions & 60 deletions sdk/storage/Azure.Storage.Blobs/src/Generated/BlobRestClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -827,22 +827,20 @@ internal static Azure.Core.HttpMessage GetAccountInfoAsync_CreateMessage(
{
case 200:
{
// Create the result
Azure.Storage.Blobs.Models.AccountInfo _value = new Azure.Storage.Blobs.Models.AccountInfo();

// Get response headers
string _header;
Azure.Storage.Blobs.Models.SkuName skuName = default;
Azure.Storage.Blobs.Models.AccountKind accountKind = default;
if (response.Headers.TryGetValue("x-ms-sku-name", out _header))
{
skuName = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseSkuName(_header);
_value.SkuName = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseSkuName(_header);
}
if (response.Headers.TryGetValue("x-ms-account-kind", out _header))
{
accountKind = (Azure.Storage.Blobs.Models.AccountKind)System.Enum.Parse(typeof(Azure.Storage.Blobs.Models.AccountKind), _header, false);
_value.AccountKind = (Azure.Storage.Blobs.Models.AccountKind)System.Enum.Parse(typeof(Azure.Storage.Blobs.Models.AccountKind), _header, false);
}

Azure.Storage.Blobs.Models.AccountInfo _value = new Azure.Storage.Blobs.Models.AccountInfo(skuName, accountKind);

// Create the response
return Response.FromValue(_value, response);
}
Expand Down Expand Up @@ -12548,76 +12546,29 @@ namespace Azure.Storage.Blobs.Models
}
#endregion enum strings AccessTier

#region struct AccountInfo
#region class AccountInfo
namespace Azure.Storage.Blobs.Models
{
/// <summary>
/// AccountInfo
/// </summary>
public readonly partial struct AccountInfo: System.IEquatable<AccountInfo>
public partial class AccountInfo
{
/// <summary>
/// Identifies the sku name of the account
/// </summary>
public Azure.Storage.Blobs.Models.SkuName SkuName { get; }
public Azure.Storage.Blobs.Models.SkuName SkuName { get; internal set; }

/// <summary>
/// Identifies the account kind
/// </summary>
public Azure.Storage.Blobs.Models.AccountKind AccountKind { get; }
public Azure.Storage.Blobs.Models.AccountKind AccountKind { get; internal set; }

/// <summary>
/// Prevent direct instantiation of AccountInfo instances.
/// You can use BlobsModelFactory.AccountInfo instead.
/// </summary>
internal AccountInfo(
Azure.Storage.Blobs.Models.SkuName skuName,
Azure.Storage.Blobs.Models.AccountKind accountKind)
{
SkuName = skuName;
AccountKind = accountKind;
}

/// <summary>
/// Check if two AccountInfo instances are equal.
/// </summary>
/// <param name="other">The instance to compare to.</param>
/// <returns>True if they're equal, false otherwise.</returns>
[System.ComponentModel.EditorBrowsable((System.ComponentModel.EditorBrowsableState.Never))]
public bool Equals(AccountInfo other)
{
if (!SkuName.Equals(other.SkuName))
{
return false;
}
if (!AccountKind.Equals(other.AccountKind))
{
return false;
}

return true;
}

/// <summary>
/// Check if two AccountInfo instances are equal.
/// </summary>
/// <param name="obj">The instance to compare to.</param>
/// <returns>True if they're equal, false otherwise.</returns>
[System.ComponentModel.EditorBrowsable((System.ComponentModel.EditorBrowsableState.Never))]
public override bool Equals(object obj) => obj is AccountInfo && Equals((AccountInfo)obj);

/// <summary>
/// Get a hash code for the AccountInfo.
/// </summary>
[System.ComponentModel.EditorBrowsable((System.ComponentModel.EditorBrowsableState.Never))]
public override int GetHashCode()
{
var hashCode = new Azure.Core.HashCodeBuilder();
hashCode.Add(SkuName);
hashCode.Add(AccountKind);

return hashCode.ToHashCode();
}
internal AccountInfo() { }
}

/// <summary>
Expand All @@ -12632,11 +12583,15 @@ public static AccountInfo AccountInfo(
Azure.Storage.Blobs.Models.SkuName skuName,
Azure.Storage.Blobs.Models.AccountKind accountKind)
{
return new AccountInfo(skuName, accountKind);
return new AccountInfo()
{
SkuName = skuName,
AccountKind = accountKind,
};
}
}
}
#endregion struct AccountInfo
#endregion class AccountInfo

#region enum AccountKind
namespace Azure.Storage.Blobs.Models
Expand Down

0 comments on commit 352b49b

Please sign in to comment.