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

[AutoPR Microsoft.Azure.Management.ManagedServiceIdentity] MSI: Use common types. Fix definitions for proper .NET SDK generation. #423

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
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ public partial interface IManagedServiceIdentityClient : System.IDisposable
bool? GenerateClientRequestId { get; set; }


/// <summary>
/// Gets the ISystemAssignedIdentitiesOperations.
/// </summary>
ISystemAssignedIdentitiesOperations SystemAssignedIdentities { get; }

/// <summary>
/// Gets the IOperations.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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 Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

/// <summary>
/// SystemAssignedIdentitiesOperations operations.
/// </summary>
public partial interface ISystemAssignedIdentitiesOperations
{
/// <summary>
/// Gets the systemAssignedIdentity available under the specified RP
/// scope.
/// </summary>
/// <param name='scope'>
/// The resource provider scope of the resource. Parent resource being
/// extended by Managed Identities.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<SystemAssignedIdentity>> GetByScopeWithHttpMessagesAsync(string scope, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public partial interface IUserAssignedIdentitiesOperations
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<Identity>> UpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, Identity parameters, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<Identity>> UpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, IdentityUpdate parameters, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Gets the identity.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ public partial class ManagedServiceIdentityClient : ServiceClient<ManagedService
/// </summary>
public bool? GenerateClientRequestId { get; set; }

/// <summary>
/// Gets the ISystemAssignedIdentitiesOperations.
/// </summary>
public virtual ISystemAssignedIdentitiesOperations SystemAssignedIdentities { get; private set; }

/// <summary>
/// Gets the IOperations.
/// </summary>
Expand Down Expand Up @@ -325,6 +330,7 @@ public ManagedServiceIdentityClient(System.Uri baseUri, ServiceClientCredentials
/// </summary>
private void Initialize()
{
SystemAssignedIdentities = new SystemAssignedIdentitiesOperations(this);
Operations = new Operations(this);
UserAssignedIdentities = new UserAssignedIdentitiesOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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.Models
{
using Newtonsoft.Json;
using System.Linq;

/// <summary>
/// The resource model definition for a Azure Resource Manager resource
/// with an etag.
/// </summary>
public partial class AzureEntityResource : Resource
{
/// <summary>
/// Initializes a new instance of the AzureEntityResource class.
/// </summary>
public AzureEntityResource()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the AzureEntityResource class.
/// </summary>
/// <param name="id">Fully qualified resource Id for the resource. Ex -
/// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}</param>
/// <param name="name">The name of the resource</param>
/// <param name="type">The type of the resource. Ex-
/// Microsoft.Compute/virtualMachines or
/// Microsoft.Storage/storageAccounts.</param>
/// <param name="etag">Resource Etag.</param>
public AzureEntityResource(string id = default(string), string name = default(string), string type = default(string), string etag = default(string))
: base(id, name, type)
{
Etag = etag;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets resource Etag.
/// </summary>
[JsonProperty(PropertyName = "etag")]
public string Etag { get; private set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
namespace Microsoft.Azure.Management.ManagedServiceIdentity.Models
{
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Collections;
Expand All @@ -22,7 +21,7 @@ namespace Microsoft.Azure.Management.ManagedServiceIdentity.Models
/// Describes an identity resource.
/// </summary>
[Rest.Serialization.JsonTransformation]
public partial class Identity : IResource
public partial class Identity : TrackedResource
{
/// <summary>
/// Initializes a new instance of the Identity class.
Expand All @@ -35,35 +34,27 @@ public Identity()
/// <summary>
/// Initializes a new instance of the Identity class.
/// </summary>
/// <param name="id">The id of the created identity.</param>
/// <param name="name">The name of the created identity.</param>
/// <param name="location">The Azure region where the identity
/// lives.</param>
/// <param name="tags">Resource tags</param>
/// <param name="location">The geo-location where the resource
/// lives</param>
/// <param name="id">Fully qualified resource Id for the resource. Ex -
/// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}</param>
/// <param name="name">The name of the resource</param>
/// <param name="type">The type of the resource. Ex-
/// Microsoft.Compute/virtualMachines or
/// Microsoft.Storage/storageAccounts.</param>
/// <param name="tags">Resource tags.</param>
/// <param name="tenantId">The id of the tenant which the identity
/// belongs to.</param>
/// <param name="principalId">The id of the service principal object
/// associated with the created identity.</param>
/// <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. 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>
public Identity(string id = default(string), string name = default(string), string location = default(string), IDictionary<string, string> tags = default(IDictionary<string, string>), System.Guid? tenantId = default(System.Guid?), System.Guid? principalId = default(System.Guid?), System.Guid? clientId = default(System.Guid?), string clientSecretUrl = default(string), string type = default(string))
public Identity(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary<string, string> tags = default(IDictionary<string, string>), System.Guid? tenantId = default(System.Guid?), System.Guid? principalId = default(System.Guid?), System.Guid? clientId = default(System.Guid?))
: base(location, id, name, type, tags)
{
Id = id;
Name = name;
Location = location;
Tags = tags;
TenantId = tenantId;
PrincipalId = principalId;
ClientId = clientId;
ClientSecretUrl = clientSecretUrl;
Type = type;
CustomInit();
}

Expand All @@ -72,30 +63,6 @@ public Identity()
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets the id of the created identity.
/// </summary>
[JsonProperty(PropertyName = "id")]
public string Id { get; private set; }

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

/// <summary>
/// Gets or sets the Azure region where the identity lives.
/// </summary>
[JsonProperty(PropertyName = "location")]
public string Location { get; set; }

/// <summary>
/// Gets or sets resource tags
/// </summary>
[JsonProperty(PropertyName = "tags")]
public IDictionary<string, string> Tags { get; set; }

/// <summary>
/// Gets the id of the tenant which the identity belongs to.
/// </summary>
Expand All @@ -117,21 +84,14 @@ public Identity()
public System.Guid? ClientId { get; private set; }

/// <summary>
/// Gets The ManagedServiceIdentity DataPlane 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.
/// Validate the object.
/// </summary>
[JsonProperty(PropertyName = "properties.clientSecretUrl")]
public string ClientSecretUrl { get; private set; }

/// <summary>
/// Gets the type of resource i.e.
/// Microsoft.ManagedIdentity/userAssignedIdentities. Possible values
/// include: 'Microsoft.ManagedIdentity/userAssignedIdentities'
/// </summary>
[JsonProperty(PropertyName = "type")]
public string Type { get; private set; }

/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public override void Validate()
{
base.Validate();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// 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.Models
{
using Microsoft.Rest;
using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

/// <summary>
/// Describes an identity resource.
/// </summary>
[Rest.Serialization.JsonTransformation]
public partial class IdentityUpdate : Resource
{
/// <summary>
/// Initializes a new instance of the IdentityUpdate class.
/// </summary>
public IdentityUpdate()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the IdentityUpdate class.
/// </summary>
/// <param name="id">Fully qualified resource Id for the resource. Ex -
/// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}</param>
/// <param name="name">The name of the resource</param>
/// <param name="type">The type of the resource. Ex-
/// Microsoft.Compute/virtualMachines or
/// Microsoft.Storage/storageAccounts.</param>
/// <param name="location">The geo-location where the resource
/// lives</param>
/// <param name="tags">Resource tags</param>
/// <param name="tenantId">The id of the tenant which the identity
/// belongs to.</param>
/// <param name="principalId">The id of the service principal object
/// associated with the created identity.</param>
/// <param name="clientId">The id of the app associated with the
/// identity. This is a random generated UUID by MSI.</param>
public IdentityUpdate(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary<string, string> tags = default(IDictionary<string, string>), System.Guid? tenantId = default(System.Guid?), System.Guid? principalId = default(System.Guid?), System.Guid? clientId = default(System.Guid?))
: base(id, name, type)
{
Location = location;
Tags = tags;
TenantId = tenantId;
PrincipalId = principalId;
ClientId = clientId;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets or sets the geo-location where the resource lives
/// </summary>
[JsonProperty(PropertyName = "location")]
public string Location { get; set; }

/// <summary>
/// Gets or sets resource tags
/// </summary>
[JsonProperty(PropertyName = "tags")]
public IDictionary<string, string> Tags { get; set; }

/// <summary>
/// Gets the id of the tenant which the identity belongs to.
/// </summary>
[JsonProperty(PropertyName = "properties.tenantId")]
public System.Guid? TenantId { get; private set; }

/// <summary>
/// Gets the id of the service principal object associated with the
/// created identity.
/// </summary>
[JsonProperty(PropertyName = "properties.principalId")]
public System.Guid? PrincipalId { get; private set; }

/// <summary>
/// Gets the id of the app associated with the identity. This is a
/// random generated UUID by MSI.
/// </summary>
[JsonProperty(PropertyName = "properties.clientId")]
public System.Guid? ClientId { get; private set; }

}
}
Loading