forked from Azure/azure-sdk-for-net
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.NET SDK Resource Provider:'SignalR'
REST Spec PR 'Azure/azure-rest-api-specs#5661' REST Spec PR Author 'juniwang' REST Spec PR Last commit
- Loading branch information
Showing
15 changed files
with
595 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>SignalRService_2018-03-01-preview;</AzureApiTag> | ||
<AzureApiTag>SignalRService_2018-10-01;</AzureApiTag> | ||
<PackageTags>$(PackageTags);$(CommonTags);$(AzureApiTag);</PackageTags> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 106 additions & 0 deletions
106
src/SDKs/SignalR/Management.SignalR/Generated/Models/SignalRFeature.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
// <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.SignalR.Models | ||
{ | ||
using Microsoft.Rest; | ||
using Newtonsoft.Json; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
/// <summary> | ||
/// Feature of a SignalR resource, which controls the SignalR runtime | ||
/// behavior. | ||
/// </summary> | ||
public partial class SignalRFeature | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the SignalRFeature class. | ||
/// </summary> | ||
public SignalRFeature() | ||
{ | ||
CustomInit(); | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the SignalRFeature class. | ||
/// </summary> | ||
/// <param name="value">Value of the feature flag. See Azure SignalR | ||
/// service document | ||
/// https://docs.microsoft.com/en-us/azure/azure-signalr/ for allowed | ||
/// values.</param> | ||
/// <param name="properties">Optional properties related to this | ||
/// feature.</param> | ||
public SignalRFeature(string value, IDictionary<string, string> properties = default(IDictionary<string, string>)) | ||
{ | ||
Value = value; | ||
Properties = properties; | ||
CustomInit(); | ||
} | ||
/// <summary> | ||
/// Static constructor for SignalRFeature class. | ||
/// </summary> | ||
static SignalRFeature() | ||
{ | ||
Flag = "ServiceMode"; | ||
} | ||
|
||
/// <summary> | ||
/// An initialization method that performs custom operations like setting defaults | ||
/// </summary> | ||
partial void CustomInit(); | ||
|
||
/// <summary> | ||
/// Gets or sets value of the feature flag. See Azure SignalR service | ||
/// document https://docs.microsoft.com/en-us/azure/azure-signalr/ for | ||
/// allowed values. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "value")] | ||
public string Value { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets optional properties related to this feature. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "properties")] | ||
public IDictionary<string, string> Properties { get; set; } | ||
|
||
/// <summary> | ||
/// Name of the feature. Required. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "flag")] | ||
public static string Flag { get; private set; } | ||
|
||
/// <summary> | ||
/// Validate the object. | ||
/// </summary> | ||
/// <exception cref="ValidationException"> | ||
/// Thrown if validation fails | ||
/// </exception> | ||
public virtual void Validate() | ||
{ | ||
if (Value == null) | ||
{ | ||
throw new ValidationException(ValidationRules.CannotBeNull, "Value"); | ||
} | ||
if (Value != null) | ||
{ | ||
if (Value.Length > 128) | ||
{ | ||
throw new ValidationException(ValidationRules.MaxLength, "Value", 128); | ||
} | ||
if (Value.Length < 1) | ||
{ | ||
throw new ValidationException(ValidationRules.MinLength, "Value", 1); | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.