Skip to content

Commit

Permalink
autogen common types with reference type attributes (#23457)
Browse files Browse the repository at this point in the history
* wip for generating common files

* updates after merge

* wip regen complete working on tests

* updates after latest autorest changes
using temp types.json file to work around autorest bug

* update tests after regen changes

* updates after merge

* update lro plurality

* typo fix

* trim large lro recordings

* remove temp files

* update api

* move files after merge
  • Loading branch information
m-nash authored Aug 23, 2021
1 parent 6b0c901 commit 3e1d919
Show file tree
Hide file tree
Showing 346 changed files with 11,644 additions and 338,311 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
</Description>
<PackageTags>azure;management;resource</PackageTags>
<NoWarn>$(NoWarn);CA2214</NoWarn>
<IncludeGeneratorSharedCode>true</IncludeGeneratorSharedCode>
</PropertyGroup>

<ItemGroup>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ public int CompareTo(Sku other)
int compareResult = 0;
if ((compareResult = string.Compare(Name, other.Name, StringComparison.InvariantCultureIgnoreCase)) == 0 &&
(compareResult = string.Compare(Family, other.Family, StringComparison.InvariantCultureIgnoreCase)) == 0 &&
(compareResult = string.Compare(Model, other.Model, StringComparison.InvariantCultureIgnoreCase)) == 0 &&
(compareResult = string.Compare(Size, other.Size, StringComparison.InvariantCultureIgnoreCase)) == 0 &&
(compareResult = string.Compare(Tier, other.Tier, StringComparison.InvariantCultureIgnoreCase)) == 0)
(compareResult = string.Compare(Size, other.Size, StringComparison.InvariantCultureIgnoreCase)) == 0)
{
return Nullable.Compare<long>(Capacity, other.Capacity);
}
Expand All @@ -54,9 +52,8 @@ public bool Equals(Sku other)

return string.Equals(Name, other.Name, StringComparison.InvariantCultureIgnoreCase) &&
string.Equals(Family, other.Family, StringComparison.InvariantCultureIgnoreCase) &&
string.Equals(Model, other.Model, StringComparison.InvariantCultureIgnoreCase) &&
string.Equals(Size, other.Size, StringComparison.InvariantCultureIgnoreCase) &&
string.Equals(Tier, other.Tier, StringComparison.InvariantCultureIgnoreCase) &&
(Tier.HasValue ? Tier.Value.Equals(other.Tier) : !other.Tier.HasValue) &&
long.Equals(Capacity, other.Capacity);
}

Expand Down Expand Up @@ -86,10 +83,9 @@ public override int GetHashCode()
{
return HashCodeBuilder.Combine(
Name?.ToLower(CultureInfo.InvariantCulture),
Model?.ToLower(CultureInfo.InvariantCulture),
Family?.ToLower(CultureInfo.InvariantCulture),
Size?.ToLower(CultureInfo.InvariantCulture),
Tier?.ToLower(CultureInfo.InvariantCulture),
Tier?.ToString().ToLower(CultureInfo.InvariantCulture),
Capacity);
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Azure.ResourceManager.Resources.Models
/// A class representing a sub-resource that contains only the read-only ID.
/// </summary>
[ReferenceType]
public partial class SubResource
public abstract partial class SubResource
{
/// <summary>
/// Initializes an empty instance of <see cref="SubResource"/> for mocking.
Expand All @@ -22,7 +22,7 @@ protected SubResource()
/// <summary> Initializes a new instance of <see cref="SubResource"/>. </summary>
/// <param name="id"> ARM resource Id. </param>
[SerializationConstructor]
protected internal SubResource(string id)
protected SubResource(string id)
{
Id = id;
}
Expand Down

This file was deleted.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3e1d919

Please sign in to comment.