Skip to content

Commit

Permalink
[Azure Traffic Manager] Do not omit resource id, name and type proper…
Browse files Browse the repository at this point in the history
  • Loading branch information
dsgouda authored Sep 26, 2018
2 parents 5eb8934 + f208dd4 commit e836541
Show file tree
Hide file tree
Showing 15 changed files with 86 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,20 @@ public partial interface ITrafficManagerManagementClient : System.IDisposable
string ApiVersion { get; }

/// <summary>
/// Gets or sets the preferred language for the response.
/// The preferred language for the response.
/// </summary>
string AcceptLanguage { get; set; }

/// <summary>
/// Gets or sets the retry timeout in seconds for Long Running
/// Operations. Default value is 30.
/// The retry timeout in seconds for Long Running Operations. Default
/// value is 30.
/// </summary>
int? LongRunningOperationRetryTimeout { get; set; }

/// <summary>
/// When set to true a unique x-ms-client-request-id value is generated
/// and included in each request. Default is true.
/// Whether a unique x-ms-client-request-id should be generated. When
/// set to true a unique x-ms-client-request-id value is generated and
/// included in each request. Default is true.
/// </summary>
bool? GenerateClientRequestId { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private EndpointMonitorStatus(string underlyingValue)
/// </summary>
public override string ToString()
{
return UnderlyingValue.ToString();
return UnderlyingValue == null ? null : UnderlyingValue.ToString();
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ private EndpointStatus(string underlyingValue)
/// </summary>
public override string ToString()
{
return UnderlyingValue.ToString();
return UnderlyingValue == null ? null : UnderlyingValue.ToString();
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ private MonitorProtocol(string underlyingValue)
/// </summary>
public override string ToString()
{
return UnderlyingValue.ToString();
return UnderlyingValue == null ? null : UnderlyingValue.ToString();
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private ProfileMonitorStatus(string underlyingValue)
/// </summary>
public override string ToString()
{
return UnderlyingValue.ToString();
return UnderlyingValue == null ? null : UnderlyingValue.ToString();
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ private ProfileStatus(string underlyingValue)
/// </summary>
public override string ToString()
{
return UnderlyingValue.ToString();
return UnderlyingValue == null ? null : UnderlyingValue.ToString();
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,24 @@ public Resource()
partial void CustomInit();

/// <summary>
/// Gets fully qualified resource Id for the resource. Ex -
/// Gets or sets fully qualified resource Id for the resource. Ex -
/// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}
/// </summary>
[JsonProperty(PropertyName = "id")]
public string Id { get; private set; }
public string Id { get; set; }

/// <summary>
/// Gets the name of the resource
/// Gets or sets the name of the resource
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; private set; }
public string Name { get; set; }

/// <summary>
/// Gets the type of the resource. Ex-
/// Gets or sets the type of the resource. Ex-
/// Microsoft.Network/trafficmanagerProfiles.
/// </summary>
[JsonProperty(PropertyName = "type")]
public string Type { get; private set; }
public string Type { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private TrafficRoutingMethod(string underlyingValue)
/// </summary>
public override string ToString()
{
return UnderlyingValue.ToString();
return UnderlyingValue == null ? null : UnderlyingValue.ToString();
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ private TrafficViewEnrollmentStatus(string underlyingValue)
/// </summary>
public override string ToString()
{
return UnderlyingValue.ToString();
return UnderlyingValue == null ? null : UnderlyingValue.ToString();
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,16 @@ public static IEnumerable<Tuple<string, string, string>> ApiInfo_TrafficManagerM
}.AsEnumerable();
}
}
// BEGIN: Code Generation Metadata Section
public static readonly String AutoRestVersion = "latest";
public static readonly String AutoRestBootStrapperVersion = "[email protected]";
public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/trafficmanager/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --opt-in-extensible-enums --csharp-sdks-folder=D:\\Source\\tatlicioglu\\azure-sdk-for-net\\src\\SDKs";
public static readonly String GithubForkName = "Azure";
public static readonly String GithubBranchName = "master";
public static readonly String GithubCommidId = "07af8ada3a9463d813e3b9271160451e49b2349d";
public static readonly String CodeGenerationErrors = "";
public static readonly String GithubRepoName = "azure-rest-api-specs";
// END: Code Generation Metadata Section
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,20 @@ public partial class TrafficManagerManagementClient : ServiceClient<TrafficManag
public string ApiVersion { get; private set; }

/// <summary>
/// Gets or sets the preferred language for the response.
/// The preferred language for the response.
/// </summary>
public string AcceptLanguage { get; set; }

/// <summary>
/// Gets or sets the retry timeout in seconds for Long Running Operations.
/// Default value is 30.
/// The retry timeout in seconds for Long Running Operations. Default value is
/// 30.
/// </summary>
public int? LongRunningOperationRetryTimeout { get; set; }

/// <summary>
/// When set to true a unique x-ms-client-request-id value is generated and
/// included in each request. Default is true.
/// Whether a unique x-ms-client-request-id should be generated. When set to
/// true a unique x-ms-client-request-id value is generated and included in
/// each request. Default is true.
/// </summary>
public bool? GenerateClientRequestId { get; set; }

Expand Down Expand Up @@ -97,6 +98,19 @@ public partial class TrafficManagerManagementClient : ServiceClient<TrafficManag
/// </summary>
public virtual ITrafficManagerUserMetricsKeysOperations TrafficManagerUserMetricsKeys { get; private set; }

/// <summary>
/// Initializes a new instance of the TrafficManagerManagementClient class.
/// </summary>
/// <param name='httpClient'>
/// HttpClient to be used
/// </param>
/// <param name='disposeHttpClient'>
/// True: will dispose the provided httpClient on calling TrafficManagerManagementClient.Dispose(). False: will not dispose provided httpClient</param>
protected TrafficManagerManagementClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)
{
Initialize();
}

/// <summary>
/// Initializes a new instance of the TrafficManagerManagementClient class.
/// </summary>
Expand Down Expand Up @@ -192,6 +206,33 @@ public TrafficManagerManagementClient(ServiceClientCredentials credentials, para
}
}

/// <summary>
/// Initializes a new instance of the TrafficManagerManagementClient class.
/// </summary>
/// <param name='credentials'>
/// Required. Credentials needed for the client to connect to Azure.
/// </param>
/// <param name='httpClient'>
/// HttpClient to be used
/// </param>
/// <param name='disposeHttpClient'>
/// True: will dispose the provided httpClient on calling TrafficManagerManagementClient.Dispose(). False: will not dispose provided httpClient</param>
/// <exception cref="System.ArgumentNullException">
/// Thrown when a required parameter is null
/// </exception>
public TrafficManagerManagementClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient)
{
if (credentials == null)
{
throw new System.ArgumentNullException("credentials");
}
Credentials = credentials;
if (Credentials != null)
{
Credentials.InitializeServiceClient(this);
}
}

/// <summary>
/// Initializes a new instance of the TrafficManagerManagementClient class.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
<PackageId>Microsoft.Azure.Management.TrafficManager</PackageId>
<Description>Microsoft Azure Management TrafficManager Library</Description>
<AssemblyName>Microsoft.Azure.Management.TrafficManager</AssemblyName>
<Version>2.5.0</Version>
<Version>2.5.1</Version>
<PackageTags>Microsoft Azure TrafficManager management;TrafficManager;TrafficManager management;</PackageTags>
<PackageReleaseNotes>
<![CDATA[
This is the Azure Traffic Manager SDK for API version 2018-04-01.
Do not omit resource id, type and name in API requests.
]]>
</PackageReleaseNotes>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[assembly: AssemblyDescription("Provides Microsoft Azure Traffic Manager management functions for managing the Microsoft Azure Traffic Manager service.")]

[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("2.5.0.0")]
[assembly: AssemblyFileVersion("2.5.1.0")]

[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Start-AutoRestCodeGeneration -ResourceProvider "trafficmanager/resource-manager" -AutoRestVersion "latest"
Start-AutoRestCodeGeneration -ResourceProvider "trafficmanager/resource-manager" -AutoRestVersion "latest" -AutoRestCodeGenerationFlags "--opt-in-extensible-enums"
18 changes: 6 additions & 12 deletions src/SDKs/_metadata/trafficmanager_resource-manager.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,12 @@ AutoRest installed successfully.
Commencing code generation
Generating CSharp code
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/trafficmanager/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=E:\GitHub\AllenFork\azure-sdk-for-net\src\SDKs
2018-07-20 18:05:48 UTC
1) azure-rest-api-specs repository information
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/trafficmanager/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --opt-in-extensible-enums --csharp-sdks-folder=D:\Source\tatlicioglu\azure-sdk-for-net\src\SDKs
2018-09-26 21:08:29 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: ad8ff141e1b55aa5578567ed625d3a2a70bff1ae

2) AutoRest information
Commit: 07af8ada3a9463d813e3b9271160451e49b2349d
AutoRest information
Requested version: latest
Bootstrapper version: [email protected]


Latest installed version:


Bootstrapper version: [email protected]

0 comments on commit e836541

Please sign in to comment.