Skip to content
Draft
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
@@ -0,0 +1,84 @@
// 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.

namespace Microsoft.Azure.Management.Sql.Models
{
using System.Linq;

/// <summary>
/// Azure Active Directory identity configuration for a resource.
/// </summary>
public partial class DataSyncParticipantIdentity
{
/// <summary>
/// Initializes a new instance of the DataSyncParticipantIdentity class.
/// </summary>
public DataSyncParticipantIdentity()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the DataSyncParticipantIdentity class.
/// </summary>

/// <param name="type">The Datasync identity type
/// Possible values include: &#39;None&#39;, &#39;SystemAssigned&#39;, &#39;UserAssigned&#39;,
/// &#39;SystemAssignedUserAssigned&#39;</param>

/// <param name="tenantId">The DataSync participant identity tenant id
/// </param>

/// <param name="userAssignedIdentities">The resource ids of the user assigned identities to use
/// </param>
public DataSyncParticipantIdentity(string type, System.Guid? tenantId = default(System.Guid?), System.Collections.Generic.IDictionary<string, DataSyncParticipantUserAssignedIdentity> userAssignedIdentities = default(System.Collections.Generic.IDictionary<string, DataSyncParticipantUserAssignedIdentity>))

{
this.Type = type;
this.TenantId = tenantId;
this.UserAssignedIdentities = userAssignedIdentities;
CustomInit();
}

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


/// <summary>
/// Gets or sets the Datasync identity type Possible values include: &#39;None&#39;, &#39;SystemAssigned&#39;, &#39;UserAssigned&#39;, &#39;SystemAssignedUserAssigned&#39;
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "type")]
public string Type {get; set; }

Choose a reason for hiding this comment

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

Why is string chosen instead of enum?


/// <summary>
/// Gets or sets the DataSync participant identity tenant id
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "tenantId")]
public System.Guid? TenantId {get; set; }

/// <summary>
/// Gets or sets the resource ids of the user assigned identities to use
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "userAssignedIdentities")]
public System.Collections.Generic.IDictionary<string, DataSyncParticipantUserAssignedIdentity> UserAssignedIdentities {get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (this.Type == null)

Choose a reason for hiding this comment

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

Also check that type is one of three supported values?

Choose a reason for hiding this comment

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

What about validating other fields?

{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Type");
}


}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// 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.

namespace Microsoft.Azure.Management.Sql.Models
{

/// <summary>
/// Defines values for DataSyncParticipantIdentityType.
/// </summary>


public static class DataSyncParticipantIdentityType
{
public const string None = "None";
public const string SystemAssigned = "SystemAssigned";
public const string UserAssigned = "UserAssigned";
public const string SystemAssignedUserAssigned = "SystemAssignedUserAssigned";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// 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.

namespace Microsoft.Azure.Management.Sql.Models
{
using System.Linq;

/// <summary>
/// Azure Active Directory identity configuration for a resource.
/// </summary>
public partial class DataSyncParticipantUserAssignedIdentity
{
/// <summary>
/// Initializes a new instance of the DataSyncParticipantUserAssignedIdentity class.
/// </summary>
public DataSyncParticipantUserAssignedIdentity()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the DataSyncParticipantUserAssignedIdentity class.
/// </summary>

/// <param name="principalId">The Azure Active Directory principal id.
/// </param>

/// <param name="clientId">The Azure Active Directory client id.
/// </param>
public DataSyncParticipantUserAssignedIdentity(System.Guid? principalId = default(System.Guid?), System.Guid? clientId = default(System.Guid?))

{
this.PrincipalId = principalId;
this.ClientId = clientId;
CustomInit();
}

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


/// <summary>
/// Gets the Azure Active Directory principal id.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "principalId")]
public System.Guid? PrincipalId {get; private set; }

/// <summary>
/// Gets the Azure Active Directory client id.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "clientId")]
public System.Guid? ClientId {get; private set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
// 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.

namespace Microsoft.Azure.Management.Sql.Models
{
using System.Linq;

/// <summary>
/// The error detail.
/// </summary>
public partial class ErrorDetailAutoGenerated
{
/// <summary>
/// Initializes a new instance of the ErrorDetailAutoGenerated class.
/// </summary>
public ErrorDetailAutoGenerated()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the ErrorDetailAutoGenerated class.
/// </summary>

/// <param name="code">The error code.
/// </param>

/// <param name="message">The error message.
/// </param>

/// <param name="target">The error target.
/// </param>

/// <param name="details">The error details.
/// </param>

/// <param name="additionalInfo">The error additional info.
/// </param>
public ErrorDetailAutoGenerated(string code = default(string), string message = default(string), string target = default(string), System.Collections.Generic.IList<ErrorDetailAutoGenerated> details = default(System.Collections.Generic.IList<ErrorDetailAutoGenerated>), System.Collections.Generic.IList<ErrorAdditionalInfo> additionalInfo = default(System.Collections.Generic.IList<ErrorAdditionalInfo>))

{
this.Code = code;
this.Message = message;
this.Target = target;
this.Details = details;
this.AdditionalInfo = additionalInfo;
CustomInit();
}

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


/// <summary>
/// Gets the error code.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "code")]
public string Code {get; private set; }

/// <summary>
/// Gets the error message.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "message")]
public string Message {get; private set; }

/// <summary>
/// Gets the error target.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "target")]
public string Target {get; private set; }

/// <summary>
/// Gets the error details.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "details")]
public System.Collections.Generic.IList<ErrorDetailAutoGenerated> Details {get; private set; }

/// <summary>
/// Gets the error additional info.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "additionalInfo")]
public System.Collections.Generic.IList<ErrorAdditionalInfo> AdditionalInfo {get; private set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// 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.

namespace Microsoft.Azure.Management.Sql.Models
{
using System.Linq;

/// <summary>
/// Common error response for all Azure Resource Manager APIs to return error
/// details for failed operations. (This also follows the OData error response
/// format.).
/// </summary>
/// <remarks>
/// Common error response for all Azure Resource Manager APIs to return error
/// details for failed operations. (This also follows the OData error response
/// format.).
/// </remarks>
public partial class ErrorResponseAutoGenerated
{
/// <summary>
/// Initializes a new instance of the ErrorResponseAutoGenerated class.
/// </summary>
public ErrorResponseAutoGenerated()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the ErrorResponseAutoGenerated class.
/// </summary>

/// <param name="error">The error object.
/// </param>
public ErrorResponseAutoGenerated(ErrorDetailAutoGenerated error = default(ErrorDetailAutoGenerated))

{
this.Error = error;
CustomInit();
}

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


/// <summary>
/// Gets or sets the error object.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "error")]
public ErrorDetailAutoGenerated Error {get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// 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.

namespace Microsoft.Azure.Management.Sql.Models
{

/// <summary>
/// Exception thrown for an invalid response with ErrorResponseAutoGenerated information.
/// </summary>
public partial class ErrorResponseAutoGeneratedException : Microsoft.Rest.RestException
{
/// <summary>
/// Gets information about the associated HTTP request.
/// </summary>
public Microsoft.Rest.HttpRequestMessageWrapper Request { get; set; }

/// <summary>
/// Gets information about the associated HTTP response.
/// </summary>
public Microsoft.Rest.HttpResponseMessageWrapper Response { get; set; }

/// <summary>
/// Gets or sets the body object.
/// </summary>
public ErrorResponseAutoGenerated Body { get; set; }

/// <summary>
/// Initializes a new instance of the ErrorResponseAutoGeneratedException class.
/// </summary>
public ErrorResponseAutoGeneratedException()
{
}

/// <summary>
/// Initializes a new instance of the ErrorResponseAutoGenerated class.
/// </summary>
/// <param name="message">The exception message.</param>
public ErrorResponseAutoGeneratedException(string message)
: this(message, null)
{
}

/// <summary>
/// Initializes a new instance of the ErrorResponseAutoGenerated class.
/// </summary>
/// <param name="message">The exception message.</param>
/// <param name="innerException">Inner exception.</param>
public ErrorResponseAutoGeneratedException(string message, System.Exception innerException)
: base(message, innerException)
{
}
}
}
Loading