Skip to content

Commit 1a8414c

Browse files
author
SDKAuto
committed
CodeGen from PR 23400 in Azure/azure-rest-api-specs
Merge b18026f8c89c01de1041e7f538d44f5784ba5845 into f790e624d0d080b89d962a3bd19c65bc6a6b2f5e
1 parent eb06681 commit 1a8414c

File tree

1,108 files changed

+213311
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,108 files changed

+213311
-0
lines changed

swaggerci/apimanagement.DefaultTag/generated/api/ApiManagementClient.cs

Lines changed: 82815 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
6+
namespace Microsoft.Azure.PowerShell.Cmdlets.Api.Models
7+
{
8+
using static Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Extensions;
9+
10+
/// <summary>Any object</summary>
11+
public partial class Any :
12+
Microsoft.Azure.PowerShell.Cmdlets.Api.Models.IAny,
13+
Microsoft.Azure.PowerShell.Cmdlets.Api.Models.IAnyInternal
14+
{
15+
16+
/// <summary>Creates an new <see cref="Any" /> instance.</summary>
17+
public Any()
18+
{
19+
20+
}
21+
}
22+
/// Any object
23+
public partial interface IAny :
24+
Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.IJsonSerializable
25+
{
26+
27+
}
28+
/// Any object
29+
internal partial interface IAnyInternal
30+
31+
{
32+
33+
}
34+
}
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
6+
namespace Microsoft.Azure.PowerShell.Cmdlets.Api.Models
7+
{
8+
using static Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Extensions;
9+
10+
/// <summary>Any object</summary>
11+
public partial class Any
12+
{
13+
14+
/// <summary>
15+
/// <c>AfterFromJson</c> will be called after the json deserialization has finished, allowing customization of the object
16+
/// before it is returned. Implement this method in a partial class to enable this behavior
17+
/// </summary>
18+
/// <param name="json">The JsonNode that should be deserialized into this object.</param>
19+
20+
partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonObject json);
21+
22+
/// <summary>
23+
/// <c>AfterToJson</c> will be called after the json serialization has finished, allowing customization of the <see cref="Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonObject"
24+
/// /> before it is returned. Implement this method in a partial class to enable this behavior
25+
/// </summary>
26+
/// <param name="container">The JSON container that the serialization result will be placed in.</param>
27+
28+
partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonObject container);
29+
30+
/// <summary>
31+
/// <c>BeforeFromJson</c> will be called before the json deserialization has commenced, allowing complete customization of
32+
/// the object before it is deserialized.
33+
/// If you wish to disable the default deserialization entirely, return <c>true</c> in the <paramref name= "returnNow" />
34+
/// output parameter.
35+
/// Implement this method in a partial class to enable this behavior.
36+
/// </summary>
37+
/// <param name="json">The JsonNode that should be deserialized into this object.</param>
38+
/// <param name="returnNow">Determines if the rest of the deserialization should be processed, or if the method should return
39+
/// instantly.</param>
40+
41+
partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonObject json, ref bool returnNow);
42+
43+
/// <summary>
44+
/// <c>BeforeToJson</c> will be called before the json serialization has commenced, allowing complete customization of the
45+
/// object before it is serialized.
46+
/// If you wish to disable the default serialization entirely, return <c>true</c> in the <paramref name="returnNow" /> output
47+
/// parameter.
48+
/// Implement this method in a partial class to enable this behavior.
49+
/// </summary>
50+
/// <param name="container">The JSON container that the serialization result will be placed in.</param>
51+
/// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return
52+
/// instantly.</param>
53+
54+
partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonObject container, ref bool returnNow);
55+
56+
/// <summary>
57+
/// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonObject into a new instance of <see cref="Any" />.
58+
/// </summary>
59+
/// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonObject instance to deserialize from.</param>
60+
internal Any(Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonObject json)
61+
{
62+
bool returnNow = false;
63+
BeforeFromJson(json, ref returnNow);
64+
if (returnNow)
65+
{
66+
return;
67+
}
68+
AfterFromJson(json);
69+
}
70+
71+
/// <summary>
72+
/// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.Api.Models.IAny.
73+
/// </summary>
74+
/// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonNode" /> to deserialize from.</param>
75+
/// <returns>an instance of Microsoft.Azure.PowerShell.Cmdlets.Api.Models.IAny.</returns>
76+
public static Microsoft.Azure.PowerShell.Cmdlets.Api.Models.IAny FromJson(Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonNode node)
77+
{
78+
return node is Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonObject json ? new Any(json) : null;
79+
}
80+
81+
/// <summary>
82+
/// Serializes this instance of <see cref="Any" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonNode" />.
83+
/// </summary>
84+
/// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
85+
/// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
86+
/// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.SerializationMode"/>.</param>
87+
/// <returns>
88+
/// a serialized instance of <see cref="Any" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonNode" />.
89+
/// </returns>
90+
public Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.SerializationMode serializationMode)
91+
{
92+
container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonObject();
93+
94+
bool returnNow = false;
95+
BeforeToJson(ref container, ref returnNow);
96+
if (returnNow)
97+
{
98+
return container;
99+
}
100+
AfterToJson(ref container);
101+
return container;
102+
}
103+
}
104+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
6+
namespace Microsoft.Azure.PowerShell.Cmdlets.Api.Models.Api20
7+
{
8+
using static Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Extensions;
9+
10+
/// <summary>The Private Endpoint resource.</summary>
11+
public partial class PrivateEndpoint :
12+
Microsoft.Azure.PowerShell.Cmdlets.Api.Models.Api20.IPrivateEndpoint,
13+
Microsoft.Azure.PowerShell.Cmdlets.Api.Models.Api20.IPrivateEndpointInternal
14+
{
15+
16+
/// <summary>Backing field for <see cref="Id" /> property.</summary>
17+
private string _id;
18+
19+
/// <summary>The ARM identifier for Private Endpoint</summary>
20+
[Microsoft.Azure.PowerShell.Cmdlets.Api.Origin(Microsoft.Azure.PowerShell.Cmdlets.Api.PropertyOrigin.Owned)]
21+
public string Id { get => this._id; }
22+
23+
/// <summary>Internal Acessors for Id</summary>
24+
string Microsoft.Azure.PowerShell.Cmdlets.Api.Models.Api20.IPrivateEndpointInternal.Id { get => this._id; set { {_id = value;} } }
25+
26+
/// <summary>Creates an new <see cref="PrivateEndpoint" /> instance.</summary>
27+
public PrivateEndpoint()
28+
{
29+
30+
}
31+
}
32+
/// The Private Endpoint resource.
33+
public partial interface IPrivateEndpoint :
34+
Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.IJsonSerializable
35+
{
36+
/// <summary>The ARM identifier for Private Endpoint</summary>
37+
[Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Info(
38+
Required = false,
39+
ReadOnly = true,
40+
Description = @"The ARM identifier for Private Endpoint",
41+
SerializedName = @"id",
42+
PossibleTypes = new [] { typeof(string) })]
43+
string Id { get; }
44+
45+
}
46+
/// The Private Endpoint resource.
47+
internal partial interface IPrivateEndpointInternal
48+
49+
{
50+
/// <summary>The ARM identifier for Private Endpoint</summary>
51+
string Id { get; set; }
52+
53+
}
54+
}
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
6+
namespace Microsoft.Azure.PowerShell.Cmdlets.Api.Models.Api20
7+
{
8+
using static Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Extensions;
9+
10+
/// <summary>The Private Endpoint resource.</summary>
11+
public partial class PrivateEndpoint
12+
{
13+
14+
/// <summary>
15+
/// <c>AfterFromJson</c> will be called after the json deserialization has finished, allowing customization of the object
16+
/// before it is returned. Implement this method in a partial class to enable this behavior
17+
/// </summary>
18+
/// <param name="json">The JsonNode that should be deserialized into this object.</param>
19+
20+
partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonObject json);
21+
22+
/// <summary>
23+
/// <c>AfterToJson</c> will be called after the json serialization has finished, allowing customization of the <see cref="Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonObject"
24+
/// /> before it is returned. Implement this method in a partial class to enable this behavior
25+
/// </summary>
26+
/// <param name="container">The JSON container that the serialization result will be placed in.</param>
27+
28+
partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonObject container);
29+
30+
/// <summary>
31+
/// <c>BeforeFromJson</c> will be called before the json deserialization has commenced, allowing complete customization of
32+
/// the object before it is deserialized.
33+
/// If you wish to disable the default deserialization entirely, return <c>true</c> in the <paramref name= "returnNow" />
34+
/// output parameter.
35+
/// Implement this method in a partial class to enable this behavior.
36+
/// </summary>
37+
/// <param name="json">The JsonNode that should be deserialized into this object.</param>
38+
/// <param name="returnNow">Determines if the rest of the deserialization should be processed, or if the method should return
39+
/// instantly.</param>
40+
41+
partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonObject json, ref bool returnNow);
42+
43+
/// <summary>
44+
/// <c>BeforeToJson</c> will be called before the json serialization has commenced, allowing complete customization of the
45+
/// object before it is serialized.
46+
/// If you wish to disable the default serialization entirely, return <c>true</c> in the <paramref name="returnNow" /> output
47+
/// parameter.
48+
/// Implement this method in a partial class to enable this behavior.
49+
/// </summary>
50+
/// <param name="container">The JSON container that the serialization result will be placed in.</param>
51+
/// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return
52+
/// instantly.</param>
53+
54+
partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonObject container, ref bool returnNow);
55+
56+
/// <summary>
57+
/// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.Api.Models.Api20.IPrivateEndpoint.
58+
/// </summary>
59+
/// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonNode" /> to deserialize from.</param>
60+
/// <returns>
61+
/// an instance of Microsoft.Azure.PowerShell.Cmdlets.Api.Models.Api20.IPrivateEndpoint.
62+
/// </returns>
63+
public static Microsoft.Azure.PowerShell.Cmdlets.Api.Models.Api20.IPrivateEndpoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonNode node)
64+
{
65+
return node is Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonObject json ? new PrivateEndpoint(json) : null;
66+
}
67+
68+
/// <summary>
69+
/// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonObject into a new instance of <see cref="PrivateEndpoint" />.
70+
/// </summary>
71+
/// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonObject instance to deserialize from.</param>
72+
internal PrivateEndpoint(Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonObject json)
73+
{
74+
bool returnNow = false;
75+
BeforeFromJson(json, ref returnNow);
76+
if (returnNow)
77+
{
78+
return;
79+
}
80+
{_id = If( json?.PropertyT<Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id;}
81+
AfterFromJson(json);
82+
}
83+
84+
/// <summary>
85+
/// Serializes this instance of <see cref="PrivateEndpoint" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonNode" />.
86+
/// </summary>
87+
/// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
88+
/// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
89+
/// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.SerializationMode"/>.</param>
90+
/// <returns>
91+
/// a serialized instance of <see cref="PrivateEndpoint" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonNode" />.
92+
/// </returns>
93+
public Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.SerializationMode serializationMode)
94+
{
95+
container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonObject();
96+
97+
bool returnNow = false;
98+
BeforeToJson(ref container, ref returnNow);
99+
if (returnNow)
100+
{
101+
return container;
102+
}
103+
if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.SerializationMode.IncludeReadOnly))
104+
{
105+
AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Api.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add );
106+
}
107+
AfterToJson(ref container);
108+
return container;
109+
}
110+
}
111+
}

0 commit comments

Comments
 (0)