Skip to content

Commit 31e0315

Browse files
author
SDKAuto
committed
CodeGen from PR 18901 in Azure/azure-rest-api-specs
Merge 2783869ac274ab2774ee5c781cedd6b02d9fa112 into 11830d3ce01db4f39a41dc37a86075b125c87fdc
1 parent ec77d18 commit 31e0315

File tree

811 files changed

+106019
-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.

811 files changed

+106019
-0
lines changed
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.RecoveryServicesBackup.Models
7+
{
8+
using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions;
9+
10+
/// <summary>Any object</summary>
11+
public partial class Any :
12+
Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny,
13+
Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.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.RecoveryServicesBackup.Runtime.IJsonSerializable
25+
{
26+
27+
}
28+
/// Any object
29+
internal partial interface IAnyInternal
30+
31+
{
32+
33+
}
34+
}
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.RecoveryServicesBackup.Models
7+
{
8+
using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.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.RecoveryServicesBackup.Runtime.Json.JsonObject json);
21+
22+
/// <summary>
23+
/// <c>AfterToJson</c> will be called after the json erialization has finished, allowing customization of the <see cref="Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.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.RecoveryServicesBackup.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 <see "returnNow" /> output parameter.
34+
/// Implement this method in a partial class to enable this behavior.
35+
/// </summary>
36+
/// <param name="json">The JsonNode that should be deserialized into this object.</param>
37+
/// <param name="returnNow">Determines if the rest of the deserialization should be processed, or if the method should return
38+
/// instantly.</param>
39+
40+
partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow);
41+
42+
/// <summary>
43+
/// <c>BeforeToJson</c> will be called before the json serialization has commenced, allowing complete customization of the
44+
/// object before it is serialized.
45+
/// If you wish to disable the default serialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter.
46+
/// Implement this method in a partial class to enable this behavior.
47+
/// </summary>
48+
/// <param name="container">The JSON container that the serialization result will be placed in.</param>
49+
/// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return
50+
/// instantly.</param>
51+
52+
partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow);
53+
54+
/// <summary>
55+
/// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of <see cref="Any" />.
56+
/// </summary>
57+
/// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from.</param>
58+
internal Any(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)
59+
{
60+
bool returnNow = false;
61+
BeforeFromJson(json, ref returnNow);
62+
if (returnNow)
63+
{
64+
return;
65+
}
66+
AfterFromJson(json);
67+
}
68+
69+
/// <summary>
70+
/// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny.
71+
/// </summary>
72+
/// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode" /> to deserialize from.</param>
73+
/// <returns>
74+
/// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny.
75+
/// </returns>
76+
public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node)
77+
{
78+
return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.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.RecoveryServicesBackup.Runtime.Json.JsonNode" />.
83+
/// </summary>
84+
/// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.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.RecoveryServicesBackup.Runtime.SerializationMode"/>.</param>
87+
/// <returns>
88+
/// a serialized instance of <see cref="Any" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode" />.
89+
/// </returns>
90+
public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode serializationMode)
91+
{
92+
container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.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+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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.RecoveryServicesBackup.Models.Api10
7+
{
8+
using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions;
9+
10+
/// <summary>The resource management error additional info.</summary>
11+
public partial class ErrorAdditionalInfo :
12+
Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo,
13+
Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfoInternal
14+
{
15+
16+
/// <summary>Backing field for <see cref="Info" /> property.</summary>
17+
private Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny _info;
18+
19+
/// <summary>The additional info.</summary>
20+
[Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)]
21+
public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Any()); }
22+
23+
/// <summary>Internal Acessors for Info</summary>
24+
Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Any()); set { {_info = value;} } }
25+
26+
/// <summary>Internal Acessors for Type</summary>
27+
string Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfoInternal.Type { get => this._type; set { {_type = value;} } }
28+
29+
/// <summary>Backing field for <see cref="Type" /> property.</summary>
30+
private string _type;
31+
32+
/// <summary>The additional info type.</summary>
33+
[Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Origin(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.PropertyOrigin.Owned)]
34+
public string Type { get => this._type; }
35+
36+
/// <summary>Creates an new <see cref="ErrorAdditionalInfo" /> instance.</summary>
37+
public ErrorAdditionalInfo()
38+
{
39+
40+
}
41+
}
42+
/// The resource management error additional info.
43+
public partial interface IErrorAdditionalInfo :
44+
Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.IJsonSerializable
45+
{
46+
/// <summary>The additional info.</summary>
47+
[Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info(
48+
Required = false,
49+
ReadOnly = true,
50+
Description = @"The additional info.",
51+
SerializedName = @"info",
52+
PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny) })]
53+
Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny Info { get; }
54+
/// <summary>The additional info type.</summary>
55+
[Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Info(
56+
Required = false,
57+
ReadOnly = true,
58+
Description = @"The additional info type.",
59+
SerializedName = @"type",
60+
PossibleTypes = new [] { typeof(string) })]
61+
string Type { get; }
62+
63+
}
64+
/// The resource management error additional info.
65+
internal partial interface IErrorAdditionalInfoInternal
66+
67+
{
68+
/// <summary>The additional info.</summary>
69+
Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.IAny Info { get; set; }
70+
/// <summary>The additional info type.</summary>
71+
string Type { get; set; }
72+
73+
}
74+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
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.RecoveryServicesBackup.Models.Api10
7+
{
8+
using static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Extensions;
9+
10+
/// <summary>The resource management error additional info.</summary>
11+
public partial class ErrorAdditionalInfo
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.RecoveryServicesBackup.Runtime.Json.JsonObject json);
21+
22+
/// <summary>
23+
/// <c>AfterToJson</c> will be called after the json erialization has finished, allowing customization of the <see cref="Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.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.RecoveryServicesBackup.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 <see "returnNow" /> output parameter.
34+
/// Implement this method in a partial class to enable this behavior.
35+
/// </summary>
36+
/// <param name="json">The JsonNode that should be deserialized into this object.</param>
37+
/// <param name="returnNow">Determines if the rest of the deserialization should be processed, or if the method should return
38+
/// instantly.</param>
39+
40+
partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json, ref bool returnNow);
41+
42+
/// <summary>
43+
/// <c>BeforeToJson</c> will be called before the json serialization has commenced, allowing complete customization of the
44+
/// object before it is serialized.
45+
/// If you wish to disable the default serialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter.
46+
/// Implement this method in a partial class to enable this behavior.
47+
/// </summary>
48+
/// <param name="container">The JSON container that the serialization result will be placed in.</param>
49+
/// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return
50+
/// instantly.</param>
51+
52+
partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, ref bool returnNow);
53+
54+
/// <summary>
55+
/// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject into a new instance of <see cref="ErrorAdditionalInfo" />.
56+
/// </summary>
57+
/// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject instance to deserialize from.</param>
58+
internal ErrorAdditionalInfo(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json)
59+
{
60+
bool returnNow = false;
61+
BeforeFromJson(json, ref returnNow);
62+
if (returnNow)
63+
{
64+
return;
65+
}
66+
{_type = If( json?.PropertyT<Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString>("type"), out var __jsonType) ? (string)__jsonType : (string)Type;}
67+
{_info = If( json?.PropertyT<Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject>("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Any.FromJson(__jsonInfo) : Info;}
68+
AfterFromJson(json);
69+
}
70+
71+
/// <summary>
72+
/// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo.
73+
/// </summary>
74+
/// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode" /> to deserialize from.</param>
75+
/// <returns>
76+
/// an instance of Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo.
77+
/// </returns>
78+
public static Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Models.Api10.IErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode node)
79+
{
80+
return node is Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject json ? new ErrorAdditionalInfo(json) : null;
81+
}
82+
83+
/// <summary>
84+
/// Serializes this instance of <see cref="ErrorAdditionalInfo" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode" />.
85+
/// </summary>
86+
/// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
87+
/// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
88+
/// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode"/>.</param>
89+
/// <returns>
90+
/// a serialized instance of <see cref="ErrorAdditionalInfo" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode" />.
91+
/// </returns>
92+
public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode serializationMode)
93+
{
94+
container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonObject();
95+
96+
bool returnNow = false;
97+
BeforeToJson(ref container, ref returnNow);
98+
if (returnNow)
99+
{
100+
return container;
101+
}
102+
if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly))
103+
{
104+
AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add );
105+
}
106+
if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.SerializationMode.IncludeReadOnly))
107+
{
108+
AddIf( null != this._info ? (Microsoft.Azure.PowerShell.Cmdlets.RecoveryServicesBackup.Runtime.Json.JsonNode) this._info.ToJson(null,serializationMode) : null, "info" ,container.Add );
109+
}
110+
AfterToJson(ref container);
111+
return container;
112+
}
113+
}
114+
}

0 commit comments

Comments
 (0)