Skip to content

Commit

Permalink
Relay : Removed the maxLength for entity names (Azure#3587)
Browse files Browse the repository at this point in the history
* Removed the maxLength for entity names

* added test for maxlength removal

* updated the AssemblyFileVersion
  • Loading branch information
Ajit Navasare authored and shahabhijeet committed Aug 16, 2017
1 parent 5a8b476 commit 95a1126
Show file tree
Hide file tree
Showing 47 changed files with 3,852 additions and 175 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

Expand Down Expand Up @@ -338,10 +338,6 @@ internal HybridConnectionsOperations(RelayManagementClient client)
}
if (hybridConnectionName != null)
{
if (hybridConnectionName.Length > 50)
{
throw new ValidationException(ValidationRules.MaxLength, "hybridConnectionName", 50);
}
if (hybridConnectionName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "hybridConnectionName", 1);
Expand Down Expand Up @@ -583,10 +579,6 @@ internal HybridConnectionsOperations(RelayManagementClient client)
}
if (hybridConnectionName != null)
{
if (hybridConnectionName.Length > 50)
{
throw new ValidationException(ValidationRules.MaxLength, "hybridConnectionName", 50);
}
if (hybridConnectionName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "hybridConnectionName", 1);
Expand Down Expand Up @@ -798,10 +790,6 @@ internal HybridConnectionsOperations(RelayManagementClient client)
}
if (hybridConnectionName != null)
{
if (hybridConnectionName.Length > 50)
{
throw new ValidationException(ValidationRules.MaxLength, "hybridConnectionName", 50);
}
if (hybridConnectionName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "hybridConnectionName", 1);
Expand Down Expand Up @@ -1031,10 +1019,6 @@ internal HybridConnectionsOperations(RelayManagementClient client)
}
if (hybridConnectionName != null)
{
if (hybridConnectionName.Length > 50)
{
throw new ValidationException(ValidationRules.MaxLength, "hybridConnectionName", 50);
}
if (hybridConnectionName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "hybridConnectionName", 1);
Expand Down Expand Up @@ -1270,10 +1254,6 @@ internal HybridConnectionsOperations(RelayManagementClient client)
}
if (hybridConnectionName != null)
{
if (hybridConnectionName.Length > 50)
{
throw new ValidationException(ValidationRules.MaxLength, "hybridConnectionName", 50);
}
if (hybridConnectionName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "hybridConnectionName", 1);
Expand All @@ -1285,10 +1265,6 @@ internal HybridConnectionsOperations(RelayManagementClient client)
}
if (authorizationRuleName != null)
{
if (authorizationRuleName.Length > 50)
{
throw new ValidationException(ValidationRules.MaxLength, "authorizationRuleName", 50);
}
if (authorizationRuleName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "authorizationRuleName", 1);
Expand Down Expand Up @@ -1535,10 +1511,6 @@ internal HybridConnectionsOperations(RelayManagementClient client)
}
if (hybridConnectionName != null)
{
if (hybridConnectionName.Length > 50)
{
throw new ValidationException(ValidationRules.MaxLength, "hybridConnectionName", 50);
}
if (hybridConnectionName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "hybridConnectionName", 1);
Expand All @@ -1550,10 +1522,6 @@ internal HybridConnectionsOperations(RelayManagementClient client)
}
if (authorizationRuleName != null)
{
if (authorizationRuleName.Length > 50)
{
throw new ValidationException(ValidationRules.MaxLength, "authorizationRuleName", 50);
}
if (authorizationRuleName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "authorizationRuleName", 1);
Expand Down Expand Up @@ -1770,10 +1738,6 @@ internal HybridConnectionsOperations(RelayManagementClient client)
}
if (hybridConnectionName != null)
{
if (hybridConnectionName.Length > 50)
{
throw new ValidationException(ValidationRules.MaxLength, "hybridConnectionName", 50);
}
if (hybridConnectionName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "hybridConnectionName", 1);
Expand All @@ -1785,10 +1749,6 @@ internal HybridConnectionsOperations(RelayManagementClient client)
}
if (authorizationRuleName != null)
{
if (authorizationRuleName.Length > 50)
{
throw new ValidationException(ValidationRules.MaxLength, "authorizationRuleName", 50);
}
if (authorizationRuleName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "authorizationRuleName", 1);
Expand Down Expand Up @@ -2023,10 +1983,6 @@ internal HybridConnectionsOperations(RelayManagementClient client)
}
if (hybridConnectionName != null)
{
if (hybridConnectionName.Length > 50)
{
throw new ValidationException(ValidationRules.MaxLength, "hybridConnectionName", 50);
}
if (hybridConnectionName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "hybridConnectionName", 1);
Expand All @@ -2038,10 +1994,6 @@ internal HybridConnectionsOperations(RelayManagementClient client)
}
if (authorizationRuleName != null)
{
if (authorizationRuleName.Length > 50)
{
throw new ValidationException(ValidationRules.MaxLength, "authorizationRuleName", 50);
}
if (authorizationRuleName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "authorizationRuleName", 1);
Expand Down Expand Up @@ -2280,10 +2232,6 @@ internal HybridConnectionsOperations(RelayManagementClient client)
}
if (hybridConnectionName != null)
{
if (hybridConnectionName.Length > 50)
{
throw new ValidationException(ValidationRules.MaxLength, "hybridConnectionName", 50);
}
if (hybridConnectionName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "hybridConnectionName", 1);
Expand All @@ -2295,10 +2243,6 @@ internal HybridConnectionsOperations(RelayManagementClient client)
}
if (authorizationRuleName != null)
{
if (authorizationRuleName.Length > 50)
{
throw new ValidationException(ValidationRules.MaxLength, "authorizationRuleName", 50);
}
if (authorizationRuleName.Length < 1)
{
throw new ValidationException(ValidationRules.MinLength, "authorizationRuleName", 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

Expand Down
2 changes: 1 addition & 1 deletion src/SDKs/Relay/Management.Relay/Generated/IOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

Expand Down
35 changes: 34 additions & 1 deletion src/SDKs/Relay/Management.Relay/Generated/Models/AccessRights.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

Expand All @@ -29,4 +29,37 @@ public enum AccessRights
[EnumMember(Value = "Listen")]
Listen
}
internal static class AccessRightsEnumExtension
{
internal static string ToSerializedValue(this AccessRights? value) =>
value == null ? null : ((AccessRights)value).ToSerializedValue();

internal static string ToSerializedValue(this AccessRights value)
{
switch( value )
{
case AccessRights.Manage:
return "Manage";
case AccessRights.Send:
return "Send";
case AccessRights.Listen:
return "Listen";
}
return null;
}

internal static AccessRights? ParseAccessRights(this string value)
{
switch( value )
{
case "Manage":
return AccessRights.Manage;
case "Send":
return AccessRights.Send;
case "Listen":
return AccessRights.Listen;
}
return null;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

Expand Down
31 changes: 30 additions & 1 deletion src/SDKs/Relay/Management.Relay/Generated/Models/KeyType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

Expand All @@ -27,4 +27,33 @@ public enum KeyType
[EnumMember(Value = "SecondaryKey")]
SecondaryKey
}
internal static class KeyTypeEnumExtension
{
internal static string ToSerializedValue(this KeyType? value) =>
value == null ? null : ((KeyType)value).ToSerializedValue();

internal static string ToSerializedValue(this KeyType value)
{
switch( value )
{
case KeyType.PrimaryKey:
return "PrimaryKey";
case KeyType.SecondaryKey:
return "SecondaryKey";
}
return null;
}

internal static KeyType? ParseKeyType(this string value)
{
switch( value )
{
case "PrimaryKey":
return KeyType.PrimaryKey;
case "SecondaryKey":
return KeyType.SecondaryKey;
}
return null;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

Expand Down
2 changes: 1 addition & 1 deletion src/SDKs/Relay/Management.Relay/Generated/Models/Page.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

Expand Down
Loading

0 comments on commit 95a1126

Please sign in to comment.