Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate new SDK for ManagedServiceIdentity with new swagger api version #5165

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@


# Microsoft Azure SDK for .NET
## All PRs should be opened against master branch. This branch is being retired and will be deleted.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have already defaulted our repo to master branch, don't think we need this change. Appreciate the help


### Microsoft Azure SDK for .NET
----------
The Microsoft Azure SDK for .NET allows you to build applications
that take advantage of scalable cloud computing resources.
Expand Down
2 changes: 1 addition & 1 deletion src/SDKs/ManagedServiceIdentity/AzSdk.RP.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--This file and it's contents are updated at build time moving or editing might result in build failure. Take due deligence while editing this file-->
<PropertyGroup>
<AzureApiTag />
<AzureApiTag>ManagedIdentity_2018-11-30;</AzureApiTag>
<PackageTags>$(PackageTags);$(CommonTags);$(AzureApiTag);</PackageTags>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,20 @@ public partial interface IManagedServiceIdentityClient : 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 @@ -57,19 +57,20 @@ public partial class ManagedServiceIdentityClient : ServiceClient<ManagedService
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 All @@ -83,6 +84,19 @@ public partial class ManagedServiceIdentityClient : ServiceClient<ManagedService
/// </summary>
public virtual IUserAssignedIdentitiesOperations UserAssignedIdentities { get; private set; }

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

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

/// <summary>
/// Initializes a new instance of the ManagedServiceIdentityClient 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 ManagedServiceIdentityClient.Dispose(). False: will not dispose provided httpClient</param>
/// <exception cref="System.ArgumentNullException">
/// Thrown when a required parameter is null
/// </exception>
public ManagedServiceIdentityClient(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 ManagedServiceIdentityClient class.
/// </summary>
Expand Down Expand Up @@ -287,7 +328,7 @@ private void Initialize()
Operations = new Operations(this);
UserAssignedIdentities = new UserAssignedIdentitiesOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
ApiVersion = "2015-08-31-preview";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wendyNEU are you planning to release a stable version for your api version 2015-08-31-preview ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I plan to release a stable version for api version 2018-11-30

ApiVersion = "2018-11-30";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ public Identity()
/// <param name="clientId">The id of the app associated with the
/// identity. This is a random generated UUID by MSI.</param>
/// <param name="clientSecretUrl"> The ManagedServiceIdentity DataPlane
/// URL that can be queried to obtain the identity credentials.</param>
/// URL that can be queried to obtain the identity credentials. If
/// identity is user assigned, then the clientSecretUrl will not be
/// present in the response, otherwise it will be present.</param>
/// <param name="type">The type of resource i.e.
/// Microsoft.ManagedIdentity/userAssignedIdentities. Possible values
/// include: 'Microsoft.ManagedIdentity/userAssignedIdentities'</param>
Expand Down Expand Up @@ -116,7 +118,9 @@ public Identity()

/// <summary>
/// Gets The ManagedServiceIdentity DataPlane URL that can be queried
/// to obtain the identity credentials.
/// to obtain the identity credentials. If identity is user assigned,
/// then the clientSecretUrl will not be present in the response,
/// otherwise it will be present.
/// </summary>
[JsonProperty(PropertyName = "properties.clientSecretUrl")]
public string ClientSecretUrl { get; private set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.ManagedServiceIdentity
{
using System;
using System.Collections.Generic;
using System.Linq;

internal static partial class SdkInfo
{
public static IEnumerable<Tuple<string, string, string>> ApiInfo_ManagedServiceIdentityClient
{
get
{
return new Tuple<string, string, string>[]
{
new Tuple<string, string, string>("ManagedIdentity", "Operations", "2018-11-30"),
new Tuple<string, string, string>("ManagedIdentity", "UserAssignedIdentities", "2018-11-30"),
}.AsEnumerable();
}
}
// BEGIN: Code Generation Metadata Section
public static readonly String AutoRestVersion = "latest";
public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283";
public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/msi/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\\azure-sdk-for-net\\src\\SDKs";
public static readonly String GithubForkName = "Azure";
public static readonly String GithubBranchName = "master";
public static readonly String GithubCommidId = "14f4c33c0a6cc17d0b3577fbddfaacd38a235b57";
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 @@ -5,8 +5,8 @@

<PropertyGroup>
<PackageId>Microsoft.Azure.Management.ManagedServiceIdentity</PackageId>
<Description>Provides developers with libraries for ManagedSericeIdentity under Azure Resource manager to perform CRUD operations on identities.</Description>
<Version>0.10.0-preview</Version>
<Description>Provides developers with libraries for ManagedServiceIdentity under Azure Resource manager to perform CRUD operations on identities.</Description>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove description, use PackageReleaseNotes instead

<Version>0.11.0</Version>
<AssemblyName>Microsoft.Azure.Management.ManagedServiceIdentity</AssemblyName>
<PackageTags>Microsoft Azure resource management;msi;managedserviceidentity;</PackageTags>
<PackageReleaseNotes>Taking dependency on 10.0.3 version of Newtonsoft nuget package.</PackageReleaseNotes>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the PackageReleaseNotes here

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Start-AutoRestCodeGeneration -ResourceProvider "msi/resource-manager" -AutoRestVersion "latest"
23 changes: 13 additions & 10 deletions src/SDKs/_metadata/managedserviceidentity_resource-manager.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
2017-12-15 22:38:47 UTC

1) azure-rest-api-specs repository information
GitHub user: Azure
Branch: current
Commit: ca7dadf950700baa6a9fde9e78bd80d4498213f4

2) AutoRest information
Installing AutoRest version: latest
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/managedserviceidentity/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\azure-sdk-for-net\src\SDKs
2019-01-23 21:27:23 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: 14f4c33c0a6cc17d0b3577fbddfaacd38a235b57
AutoRest information
Requested version: latest
Bootstrapper version: C:\Users\vakuma\AppData\Roaming\npm `-- autorest@2.0.4215
Latest installed version:
Bootstrapper version: autorest@2.0.4283
14 changes: 14 additions & 0 deletions src/SDKs/_metadata/msi_resource-manager.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Installing AutoRest version: latest
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/msi/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\azure-sdk-for-net\src\SDKs
2019-01-23 22:21:24 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: 14f4c33c0a6cc17d0b3577fbddfaacd38a235b57
AutoRest information
Requested version: latest
Bootstrapper version: autorest@2.0.4283